/* Island: deep sea teal, warm sand, coral. System fonts only, so the page stays
   light on mobile data and every Acehnese diacritic renders. */
:root {
  --sea: #0b4a52; --sea-deep: #083940; --on-sea: #f4fbfa; --on-sea-muted: #c3e0de;
  --coral: #f2835f; --on-coral: #2b130b;
  --bg: #f7f1e5; --card: #fffdf8; --fg: #1c2b2c; --muted: #566766;
  --accent: #0b6470; --on-accent: #ffffff; --border: #e2d8c5; --tint: #e7efe9;
  --coral-ink: #b4472a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1f21; --card: #162d30; --fg: #eef4f2; --muted: #a2b6b4;
    --accent: #6fd0c8; --on-accent: #06282b; --border: #2b4649; --tint: #1b383b;
    --coral-ink: #f2835f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 17px/1.6 var(--sans); }
[hidden] { display: none !important; }
.wrap { max-width: 1040px; margin-inline: auto; padding-inline: 20px; }
/* Same left edge as every other section; only the line length is limited. */
.narrow > * { max-width: 680px; }
.narrow-text { max-width: 640px; }
h1, h2 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.15rem); margin: 0 0 .6em; }
h3 { font-size: 1rem; margin: 18px 0 4px; }
section { padding-block: clamp(24px, 4vw, 40px); }
.muted { color: var(--muted); font-size: .92rem; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.hero :focus-visible, .join :focus-visible { outline-color: var(--on-sea); }

/* buttons */
button, .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 46px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: 10px; text-align: center;
  background: var(--accent); color: var(--on-accent); font: 600 1rem var(--sans);
  text-decoration: none; cursor: pointer;
}
button:hover, .button:hover { filter: brightness(1.08); }
button:disabled { opacity: .5; cursor: default; filter: none; }
.button.coral { background: var(--coral); color: var(--on-coral); }
.button.ghost { background: transparent; color: var(--on-sea); border-color: var(--on-sea-muted); }
.linklike { background: none; color: var(--accent); padding: 4px 0; min-height: 0; font-weight: 500; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }

/* top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding-block: 16px; }
.topbar nav { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; }
.topbar nav a { text-decoration: none; font-weight: 500; }
.brand { display: inline-flex; align-items: center; gap: 14px; font: 700 1.5rem var(--serif); text-decoration: none; color: inherit; }
.brand img { display: block; border-radius: 19px; }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; }
.lang-switch button {
  min-height: 34px; padding: 4px 11px; border: 0; border-radius: 0; font-size: .85rem; font-weight: 500;
  background: transparent; color: inherit;
}
.lang-switch button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

/* hero */
.hero { position: relative; background: var(--sea); color: var(--on-sea); }
.hero .topbar nav a, .hero .brand { color: var(--on-sea); }
.hero .lang-switch { border-color: var(--on-sea-muted); }
.hero .lang-switch button[aria-pressed="true"] { background: var(--on-sea); color: var(--sea); }
.hero-body { padding-block: clamp(32px, 8vw, 84px) clamp(96px, 15vw, 170px); }
.hero h1 { font-size: clamp(2.3rem, 7vw, 4.2rem); margin: 0 0 .5em; max-width: 13em; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.2rem); max-width: 40em; color: var(--on-sea); margin: 0; }
.shore { position: absolute; inset: auto 0 -2px; width: 100%; height: clamp(60px, 11vw, 150px); display: block; overflow: visible; }
.wave-back { fill: var(--sea-deep); }
.wave-front { fill: var(--bg); }
.notice {
  background: var(--card); color: var(--fg); border: 1px solid var(--border); border-left: 4px solid var(--coral);
  border-radius: 8px; padding: 10px 14px; font-size: .92rem;
}
.wrap-notice { max-width: 1000px; margin: 4px auto 0; width: calc(100% - 40px); }

/* sample review */
.demo-card, #card {
  background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: clamp(20px, 4vw, 32px);
}
.eyebrow { margin: 0 0 8px; font-size: .78rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.sentence { font: 600 clamp(1.45rem, 4.2vw, 2rem)/1.3 var(--serif); margin: 0 0 8px; overflow-wrap: anywhere; }
.demo-question { margin: 20px 0 0; font-weight: 600; }
.demo-votes { display: flex; gap: 10px; margin: 10px 0 0; }
.button.vote { flex: 1; font-size: 1.15rem; }

/* "How it works": the recipe book loop, laid out like the training diagram */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
/* the view switch is two radio buttons, so it works without JavaScript */
#view-story:checked ~ .v-ml, #view-story:checked ~ .flow .v-ml,
#view-ml:checked ~ .v-story, #view-ml:checked ~ .flow .v-story { display: none; }
.view-switch { display: inline-flex; margin-bottom: 14px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--card); }
.view-switch label { margin: 0; padding: 9px 16px; min-height: 44px; display: flex; align-items: center; font-weight: 600; font-size: .92rem; cursor: pointer; }
#view-story:checked ~ .view-switch label[for="view-story"],
#view-ml:checked ~ .view-switch label[for="view-ml"] { background: var(--accent); color: var(--on-accent); }
#view-story:focus-visible ~ .view-switch label[for="view-story"],
#view-ml:focus-visible ~ .view-switch label[for="view-ml"] { outline: 3px solid var(--coral); outline-offset: -3px; }
.step-text { margin: 0 0 20px; max-width: 640px; }
.flow {
  display: grid; gap: 10px 8px; align-items: stretch;
  grid-template-columns: minmax(230px, 1.25fr) 30px minmax(0, 1fr) 30px minmax(0, 1fr);
  grid-template-areas:
    "book a1 learn a2 cook"
    "book a3 seal  a4 a5"
    "book a6 taste a7 dish";
}
.f-book { grid-area: book; } .f-learn { grid-area: learn; } .f-cook { grid-area: cook; }
.f-seal { grid-area: seal; } .f-dish { grid-area: dish; } .f-taste { grid-area: taste; }
.a1 { grid-area: a1; } .a2 { grid-area: a2; } .a3 { grid-area: a3; } .a4 { grid-area: a4; }
.a5 { grid-area: a5; } .a6 { grid-area: a6; } .a7 { grid-area: a7; }
.flow-box {
  min-width: 0; background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.flow-box.is-current { border-color: var(--coral); box-shadow: 0 0 0 2px var(--coral); }
.f-seal { border-style: dashed; }
.f-dish { align-self: start; }
.flow-head { display: flex; gap: 10px; align-items: flex-start; }
.flow-head h3 { margin: 0; font: 600 1.08rem/1.25 var(--serif); }
.flow-icon { flex: none; width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.flow-plain { margin: 2px 0 0; font-size: .78rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); }
.flow-text { margin: 8px 0 0; font-size: .9rem; }
.tabs-list { list-style: none; margin: 12px 0 8px; padding: 0; display: grid; gap: 10px; }
.tabs-list li { display: block; padding-top: 10px; border-top: 1px solid var(--border); font-size: .88rem; }
.tabs-list b { display: block; font: 600 .98rem var(--serif); }
.tab-bar { display: block; height: 8px; width: var(--w); margin-bottom: 7px; border-radius: 4px; background: var(--accent); }
.tabs-list li:nth-child(2) .tab-bar { opacity: .68; }
.tabs-list li:nth-child(3) .tab-bar { opacity: .38; }
.flow-note { margin: 10px 0 0; }
.taste-box { display: grid; gap: 8px; margin-top: 10px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.taste-box p { margin: 0; font-size: .86rem; }
.taste-box b { display: block; }
.flow-return { margin: 10px 0 0; font-weight: 600; font-size: .92rem; color: var(--accent); }
.flow-arrow { display: grid; place-items: center; color: var(--muted); font-size: 1.5rem; line-height: 1; transition: color .3s ease; }
.flow-arrow::before { content: "→"; }
.flow-arrow.is-current { color: var(--coral-ink); }
.a3::before { content: "→"; }
.a4::before { content: "↗"; }
.a5::before { content: "↓"; }
.a6::before, .a7::before { content: "←"; }
.a7 { align-items: start; padding-top: 18px; }
.loop-toggle { display: none; margin: 12px 0 0; min-height: 44px; padding: 6px 16px; background: transparent; color: var(--accent); border-color: var(--border); font-size: .9rem; }
.flow.is-animated + .loop-toggle { display: inline-flex; }
@media (max-width: 860px) {
  .flow {
    grid-template-columns: minmax(0, 1fr); gap: 6px;
    grid-template-areas: "book" "a1" "learn" "a2" "cook" "a5" "dish" "a7" "taste" "seal";
  }
  .a3, .a4, .a6 { display: none; }
  .flow-arrow::before, .a5::before, .a7::before { content: "↓"; }
  .f-seal { margin-top: 12px; }
  .a7 { padding-top: 0; }
}

/* people */
.people { list-style: none; padding: 0; margin: 22px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.people li { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); font: 600 1.1rem var(--serif); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tags span { padding: 3px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: .87rem; }

/* join band */
.join { background: var(--sea); color: var(--on-sea); margin-top: 28px; padding-block: clamp(36px, 7vw, 64px); }
.join-contact { color: var(--on-sea-muted); font-size: .95rem; margin-bottom: 0; }
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-block: 22px 30px; font-size: .88rem; }
.github-link { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-left: -9px; color: var(--muted); }
.github-link:hover { color: var(--accent); }

/* tool page */
.tool .topbar { border-bottom: 1px solid var(--border); }
.tool .wrap { max-width: 760px; }
.tool .brand { color: var(--fg); }
.tool .topbar nav a { color: var(--accent); }
.tool .wrap-notice { max-width: 720px; margin-top: 12px; }
#whoami { margin-top: 10px; min-height: 1.2em; }
.tabs { display: flex; gap: 6px; margin-top: 8px; border-bottom: 1px solid var(--border); }
.tabs [role=tab] {
  min-height: 44px; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
  background: transparent; color: var(--muted); padding: 8px 14px;
}
.tabs [role=tab][aria-selected="true"] { color: var(--fg); border-bottom-color: var(--coral); }
.tool section { padding-block: 22px 8px; }
.tool h2 { font-size: 1.55rem; }
label { display: block; margin: 14px 0; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 11px 12px; margin-top: 5px; min-height: 46px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--fg); font: 400 1rem var(--sans);
}
input[type=file] { padding: 9px; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.cards button {
  width: 100%; justify-content: space-between; gap: 12px; text-align: left; padding: 14px 16px;
  background: var(--card); color: var(--fg); border-color: var(--border); font-weight: 600;
}
.cards small { color: var(--muted); font-weight: 400; white-space: nowrap; }
.chip { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 999px; background: var(--tint); color: var(--accent); font-size: .78rem; font-weight: 600; }
details { margin: 22px 0; }
summary { cursor: pointer; color: var(--accent); font-weight: 500; }
.progress { height: 6px; margin: 8px 0 4px; border-radius: 3px; background: var(--tint); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--coral); transition: width .2s; }
@media (prefers-reduced-motion: reduce) { .progress span { transition: none; } }
#card { margin-top: 12px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 12px; font-size: .84rem; color: var(--muted); }
.field { margin: 10px 0 0; font-size: .97rem; }
.field b { display: block; font-size: .76rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rate-row { display: flex; gap: 10px; margin: 18px 0 6px; }
.rate-row button { flex: 1; min-width: 0; min-height: 54px; padding-inline: 4px; font-size: 1.2rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 1rem/1.6 var(--sans); }

/* phones */
@media (max-width: 620px) {
  .cta-row .button { flex: 1 1 150px; }
}
