/* Alanna's Launchpad. Mobile first, no external dependencies. */
:root {
  --oat: #f4ecdf;
  --oat-2: #ebe0cd;
  --paper: #fffaf1;
  --red: #c8102e;
  --red-deep: #9e0c24;
  --forest: #17352a;
  --forest-2: #224a3b;
  --glacier: #33b6b0;
  --glacier-deep: #0d6f6c;
  --ink: #1b1f1c;
  --muted: #55605a;
  --line: rgba(27, 31, 28, .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --pad: clamp(1.1rem, 4.5vw, 3rem);
  --radius: 22px;
  --dock-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--oat);
  color: var(--ink);
  font: 400 1rem/1.55 var(--sans);
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom) + 12px);
  overflow-x: hidden;
}
body::before {
  /* faint paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35; mix-blend-mode: multiply;
  background-image: radial-gradient(rgba(80, 60, 30, .08) 1px, transparent 1px);
  background-size: 3px 3px;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.02; margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
svg { width: 1em; height: 1em; flex: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--glacier-deep); outline-offset: 3px; border-radius: 8px; }
.skip {
  position: fixed; left: 12px; top: -60px; z-index: 200; background: var(--forest); color: var(--oat);
  padding: .8rem 1.1rem; border-radius: 12px; text-decoration: none; font-weight: 600; transition: top .2s;
}
.skip:focus { top: 12px; }
kbd { font: 600 .78em var(--mono); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05em .4em; color: var(--ink); }

/* ---------- Top bar ---------- */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
  transition: background .3s, box-shadow .3s, color .3s;
  color: var(--paper);
}
.topbar.is-solid { background: rgba(244, 236, 223, .9); color: var(--ink); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; min-height: 44px; }
.brand__leaf { width: 30px; height: 30px; color: var(--red); filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); transition: transform .6s var(--ease); }
.brand:hover .brand__leaf { transform: rotate(-20deg) scale(1.08); }
.brand__name { font: 600 1.05rem/1 var(--serif); text-shadow: 0 1px 10px rgba(0,0,0,.35); }
.topbar.is-solid .brand__name { text-shadow: none; }
.brand__name em { font-style: italic; color: inherit; }
.topnav { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 52px; padding: .9rem 1.35rem;
  border-radius: 999px; font: 650 1rem/1 var(--sans); text-decoration: none; border: 2px solid transparent;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--red { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px rgba(200, 16, 46, .7); }
.btn--red:hover { background: var(--red-deep); }
.btn--ghost { border-color: var(--forest); color: var(--forest); }
.btn--ghost:hover { background: var(--forest); color: var(--oat); }
.btn--oat { background: var(--oat); color: var(--forest); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ---------- Hero ---------- */
.hero { position: relative; }
.hero__art {
  position: relative; height: min(68svh, 560px); min-height: 380px; overflow: hidden;
  background: linear-gradient(180deg, #f6b98a 0%, #e9a27a 30%, #3a8f8c 70%, #17352a 100%);
  clip-path: polygon(0 0, 100% 0, 100% 93%, 82% 100%, 64% 94%, 46% 100%, 28% 95%, 12% 100%, 0 94%);
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 50%;
  transform: scale(1.06); animation: settle 2.4s var(--ease) forwards;
}
.hero__img.is-missing { display: none; }
.hero__art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 30, 24, .45) 0%, rgba(15, 30, 24, 0) 22%, rgba(15, 30, 24, 0) 75%, rgba(15, 30, 24, .25) 100%);
}
@keyframes settle { to { transform: scale(1); } }
.hero__stamp {
  position: absolute; z-index: 2; right: var(--pad); bottom: 14%; width: 84px; height: 84px; border-radius: 50%;
  display: grid; place-content: center; text-align: center; gap: 1px;
  background: var(--red); color: var(--paper); font: 700 .62rem/1.05 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  box-shadow: 0 0 0 4px rgba(255, 250, 241, .9), 0 0 0 5px var(--red), 0 12px 24px -8px rgba(0,0,0,.4);
  transform: rotate(-12deg); animation: bob 6s ease-in-out infinite;
}
@keyframes bob { 50% { transform: rotate(-6deg) translateY(-6px); } }
.hero__leaves { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.leaf { position: absolute; top: -40px; color: var(--red); opacity: .9; animation: fall linear forwards; }
.leaf svg { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0,0,0,.25)); }
@keyframes fall {
  0% { transform: translate3d(0, 0, 0) rotate(0); }
  100% { transform: translate3d(var(--drift, 40px), 110vh, 0) rotate(var(--spin, 540deg)); }
}

.hero__copy { position: relative; z-index: 3; padding: 1.4rem var(--pad) 1.6rem; margin-top: -2.2rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .8rem; border-radius: 999px;
  background: var(--paper); color: var(--forest); font: 650 .78rem/1.2 var(--sans); letter-spacing: .02em;
  box-shadow: 0 6px 18px -10px rgba(23, 53, 42, .5);
}
.eyebrow svg { color: var(--red); }
.hero__title { margin-top: 1rem; font-size: clamp(3rem, 15.5vw, 9rem); line-height: .9; letter-spacing: -.035em; }
.hero__title .line { display: block; opacity: 0; transform: translateY(.35em); animation: rise .9s var(--ease) forwards; }
.hero__title .line:nth-child(2) { animation-delay: .12s; }
.hero__title .line:nth-child(3) { animation-delay: .24s; }
.hero__title em { font-style: italic; color: var(--forest); font-weight: 500; }
.line--red { color: var(--red); }
@keyframes rise { to { opacity: 1; transform: none; } }
.hero__lede { margin-top: 1.1rem; font-size: 1.08rem; color: var(--muted); max-width: 34rem; }
.hero__actions { display: grid; gap: .7rem; margin-top: 1.5rem; }

.ticker { overflow: hidden; border-block: 2px solid var(--forest); background: var(--forest); color: var(--oat); margin-top: .6rem; }
.ticker__track { display: flex; align-items: center; gap: 1.1rem; width: max-content; padding: .7rem 0; animation: tick 28s linear infinite; }
.ticker span { font: 600 1.35rem/1 var(--serif); font-style: italic; }
.ticker svg { color: var(--red); width: 1.1rem; height: 1.1rem; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: 4.5rem var(--pad) 3.5rem; position: relative; }
.section__head { max-width: 48rem; margin-bottom: 2rem; }
.kicker { display: flex; align-items: center; gap: .6rem; font: 700 .75rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--glacier-deep); }
.kicker span { display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; border: 1.5px solid currentColor; letter-spacing: 0; font-family: var(--mono); }
.section h2 { margin-top: .9rem; font-size: clamp(2.3rem, 10vw, 5rem); }
.section__lede { margin-top: 1rem; font-size: 1.05rem; color: var(--muted); max-width: 36rem; }

/* ---------- Field guide ---------- */
.guide__tabs {
  display: flex; gap: .5rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem var(--pad) .9rem;
  margin: 0 calc(var(--pad) * -1); scrollbar-width: none;
}
.guide__tabs::-webkit-scrollbar { display: none; }
.gtab {
  scroll-snap-align: start; flex: none; display: inline-flex; align-items: center; gap: .5rem; min-height: 48px; padding: .6rem 1.05rem;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  font: 650 .95rem/1 var(--sans); cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.gtab svg { width: 1.25rem; height: 1.25rem; color: var(--red); }
.gtab[aria-selected="true"] { background: var(--forest); color: var(--oat); border-color: var(--forest); }
.gtab[aria-selected="true"] svg { color: var(--glacier); }
.gtab:active { transform: scale(.96); }
.gpanel {
  position: relative; border-radius: var(--radius); background: var(--paper); padding: 1.4rem 1.25rem 1.5rem; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -40px rgba(23, 53, 42, .5);
  animation: panelIn .5s var(--ease);
}
.gpanel[hidden] { display: none; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } }
.gpanel__bg { position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; color: var(--oat-2); transform: rotate(18deg); }
.gpanel__icon { position: relative; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--red); color: var(--paper); }
.gpanel__icon svg { width: 28px; height: 28px; }
.gpanel h3 { position: relative; margin-top: 1rem; font-size: clamp(1.8rem, 8vw, 2.8rem); }
.gpanel__body { position: relative; margin-top: .7rem; color: var(--muted); font-size: 1.02rem; max-width: 38rem; }
.gpanel__list { position: relative; list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: .55rem; }
.gpanel__list li { display: flex; gap: .65rem; align-items: flex-start; }
.gpanel__list svg { margin-top: .2rem; color: var(--glacier-deep); width: 1.1rem; height: 1.1rem; }
.gpanel__out { position: relative; margin-top: 1.3rem; padding-top: 1rem; border-top: 1.5px dashed var(--line); display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.gpanel__out b { font: 700 .72rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: .2rem; }
.chip { font: 600 .82rem/1 var(--sans); padding: .5rem .7rem; border-radius: 999px; background: #e3f3f1; color: var(--glacier-deep); }
.gpanel__try { position: relative; margin-top: 1.2rem; }

/* ---------- Playground ---------- */
.play { background: var(--forest); color: var(--oat); border-radius: 32px 32px 0 0; overflow: hidden; }
.play::before {
  /* layered mountain silhouettes */
  content: ""; position: absolute; inset: auto 0 0; height: 220px; pointer-events: none; opacity: .5;
  background:
    linear-gradient(135deg, transparent 49.5%, #12291f 50%) 0 100% / 160px 120px repeat-x,
    linear-gradient(225deg, transparent 49.5%, #12291f 50%) 80px 100% / 160px 120px repeat-x;
}
.play .kicker { color: var(--glacier); }
.play .section__lede { color: rgba(244, 236, 223, .78); }
.badge-demo {
  display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; padding: .5rem .85rem; border-radius: 999px;
  background: var(--oat); color: var(--red); font: 800 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
.play__grid { position: relative; display: grid; gap: 1rem; }
.missions {
  display: flex; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: .3rem var(--pad) .8rem;
  margin: 0 calc(var(--pad) * -1); scrollbar-width: none;
}
.missions::-webkit-scrollbar { display: none; }
.mission {
  scroll-snap-align: start; flex: none; width: 74vw; max-width: 280px; text-align: left; min-height: 120px;
  display: grid; grid-template-columns: auto 1fr; gap: .2rem .75rem; align-content: start; padding: 1rem;
  border-radius: 18px; border: 1.5px solid rgba(244, 236, 223, .18); background: rgba(244, 236, 223, .06); color: var(--oat);
  font: inherit; cursor: pointer; transition: background .2s, border-color .2s, transform .25s var(--ease);
}
.mission:active { transform: scale(.97); }
.mission__icon { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgba(244, 236, 223, .12); color: var(--glacier); }
.mission__icon svg { width: 24px; height: 24px; }
.mission__kicker { font: 700 .68rem/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--glacier); }
.mission__name { font: 600 1.15rem/1.15 var(--serif); }
.mission[aria-checked="true"] { background: var(--oat); color: var(--ink); border-color: var(--oat); }
.mission[aria-checked="true"] .mission__icon { background: var(--red); color: var(--paper); }
.mission[aria-checked="true"] .mission__kicker { color: var(--red); }
.mission:disabled { cursor: not-allowed; opacity: .55; }
.mission[aria-checked="true"]:disabled { opacity: 1; }

.console {
  background: var(--paper); color: var(--ink); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}
.console__bar { display: flex; align-items: center; gap: .7rem; padding: .75rem 1rem; background: var(--oat-2); border-bottom: 1px solid var(--line); }
.console__dots { display: flex; gap: 5px; }
.console__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.console__dots i:nth-child(2) { background: #e8a33d; }
.console__dots i:nth-child(3) { background: var(--glacier); }
.console__label { font: 800 .68rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.console__state { margin-left: auto; font: 600 .78rem/1 var(--mono); padding: .4rem .6rem; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); }
.console__state[data-mode="running"] { color: var(--glacier-deep); }
.console__state[data-mode="paused"] { color: #a86400; }
.console__state[data-mode="done"] { background: var(--forest); color: var(--oat); border-color: var(--forest); }
.console__state[data-mode="cancelled"] { color: var(--red); }
.console__brief { padding: 1.1rem 1.1rem .4rem; }
.console__kicker { font: 700 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--glacier-deep); }
.console__title { margin-top: .5rem; font-size: clamp(1.5rem, 6.5vw, 2.1rem); }
.console__prompt { margin-top: .7rem; padding: .8rem .9rem; border-radius: 14px; background: var(--oat); font-family: var(--serif); font-style: italic; font-size: 1.04rem; position: relative; }
.console__prompt::before { content: "Brief"; display: block; font: 700 .62rem/1 var(--sans); font-style: normal; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: .35rem; }
.console__progress { margin: .9rem 1.1rem 0; height: 6px; border-radius: 6px; background: var(--oat-2); overflow: hidden; }
.console__progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--glacier), var(--red)); border-radius: inherit; transition: width .4s var(--ease); }

.steps { list-style: none; margin: 0; padding: .9rem 1.1rem .2rem; display: grid; gap: .1rem; }
.step { display: grid; grid-template-columns: 28px 1fr; gap: .7rem; padding: .5rem 0; color: var(--muted); opacity: .5; transition: opacity .3s, color .3s; }
.step__dot { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; background: var(--paper); }
.step__dot svg { width: 15px; height: 15px; opacity: 0; color: var(--paper); }
.step__text b { display: block; font-weight: 650; color: inherit; }
.step__text small { display: block; font: .82rem/1.4 var(--mono); color: var(--muted); margin-top: .15rem; min-height: 1.1em; }
.step.is-active { opacity: 1; color: var(--ink); }
.step.is-active .step__dot { border-color: var(--glacier); border-top-color: transparent; animation: spin .9s linear infinite; }
.step.is-paused .step__dot { animation-play-state: paused; border-color: #e8a33d; border-top-color: transparent; }
.step.is-done { opacity: 1; color: var(--ink); }
.step.is-done .step__dot { background: var(--glacier-deep); border-color: var(--glacier-deep); }
.step.is-done .step__dot svg { opacity: 1; }
.step.is-cancelled { opacity: .7; text-decoration: line-through; text-decoration-color: var(--red); }
@keyframes spin { to { transform: rotate(360deg); } }

.result { padding: 0 1.1rem; }
.result:empty { display: none; }
.artifact {
  margin: .6rem 0 .4rem; border-radius: 16px; border: 1.5px solid var(--line); background: #fff; overflow: hidden;
  animation: pop .6s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.artifact__head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: var(--oat); font: 700 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--forest); }
.artifact__head svg { color: var(--red); }
.artifact__body { padding: .9rem; }
.artifact__note { margin: .5rem 0 .2rem; font-size: .8rem; color: var(--muted); }
.cancel-note { margin: .6rem 0; padding: .8rem .9rem; border-radius: 14px; background: #fbe9ec; color: var(--red-deep); font-size: .92rem; }

/* artifact: mini site */
.mini-site { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.mini-site__url { font: .72rem/1 var(--mono); padding: .5rem .6rem; background: var(--oat-2); color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.mini-site__url i { width: 8px; height: 8px; border-radius: 50%; background: var(--glacier); }
.mini-site__hero { padding: 1.1rem .9rem; background: linear-gradient(160deg, #0d6f6c, #17352a); color: var(--oat); }
.mini-site__hero b { display: block; font: 600 1.4rem/1.05 var(--serif); }
.mini-site__hero span { display: block; margin-top: .3rem; font-size: .8rem; opacity: .8; }
.mini-site__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .6rem; background: var(--paper); }
.mini-site__cards div { height: 46px; border-radius: 8px; background: var(--oat-2); }
.mini-site__cards div:first-child { background: #f3d4d9; }
.scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin-top: .7rem; }
.score { text-align: center; padding: .5rem .2rem; border-radius: 10px; background: #e3f3f1; }
.score b { display: block; font: 700 1.15rem/1 var(--mono); color: var(--glacier-deep); }
.score span { font-size: .66rem; color: var(--muted); }

/* artifact: diff */
.diff { font: .78rem/1.55 var(--mono); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.diff div { padding: .1rem .6rem; white-space: pre-wrap; word-break: break-word; }
.diff .del { background: #fbe9ec; color: var(--red-deep); }
.diff .add { background: #e3f3f1; color: var(--glacier-deep); }
.diff .ctx { color: var(--muted); }
.tests { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .7rem; }
.tests span { font: 600 .74rem/1 var(--mono); padding: .4rem .55rem; border-radius: 8px; background: var(--forest); color: var(--oat); }

/* artifact: research */
.cite-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.cite-list li { padding-left: .8rem; border-left: 3px solid var(--glacier); font-size: .92rem; }
.cite-list sup { font: 700 .7rem var(--mono); color: var(--red); margin-left: .15rem; }
.sources { margin-top: .8rem; padding-top: .6rem; border-top: 1px dashed var(--line); font: .74rem/1.5 var(--mono); color: var(--muted); }

/* artifact: chart */
.chart { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: .4rem; height: 130px; padding: .2rem .2rem 0; border-bottom: 1.5px solid var(--ink); }
.chart div { position: relative; border-radius: 6px 6px 0 0; background: var(--glacier); height: 0; transition: height .9s var(--ease); }
.chart div.hi { background: var(--red); }
.chart-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; margin-top: .3rem; font: .66rem var(--mono); text-align: center; color: var(--muted); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: .8rem; }
.kpis div { padding: .5rem; border-radius: 10px; background: var(--oat); }
.kpis b { display: block; font: 600 1.15rem/1 var(--serif); }
.kpis span { font-size: .68rem; color: var(--muted); }

/* artifact: poster */
.poster {
  position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  background:
    radial-gradient(circle at 50% 34%, #ffd9a0 0 13%, transparent 13.5%),
    linear-gradient(180deg, #f6b98a 0%, #e98f6a 40%, #33b6b0 62%, #0d6f6c 100%);
}
.poster::before, .poster::after { content: ""; position: absolute; inset: auto 0 0; }
.poster::before { height: 55%; background: linear-gradient(135deg, transparent 50%, #2b5a4a 50.5%) 0 100% / 50% 100% no-repeat, linear-gradient(225deg, transparent 50%, #224a3b 50.5%) 100% 100% / 60% 90% no-repeat; bottom: 30%; }
.poster::after { height: 30%; background: linear-gradient(180deg, #33b6b0, #0d6f6c); }
.poster svg { position: absolute; z-index: 2; color: var(--red); }
.poster__leaf { width: 34%; height: 34%; left: 33%; top: 18%; animation: bob 5s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(0,0,0,.25)); }
.poster__title { position: absolute; z-index: 3; left: 0; right: 0; bottom: 8%; text-align: center; font: 600 1.4rem/1 var(--serif); color: var(--paper); text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.swatches { display: flex; gap: .35rem; margin-top: .7rem; }
.swatches i { flex: 1; height: 26px; border-radius: 8px; }
.sw-1 { background: #f6b98a; }
.sw-2 { background: var(--glacier); }
.sw-3 { background: var(--glacier-deep); }
.sw-4 { background: var(--forest); }
.sw-5 { background: var(--red); }

/* artifact: orchestration board */
.board { display: grid; gap: .45rem; }
.lane { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .6rem; padding: .6rem .7rem; border-radius: 12px; background: var(--oat); font-size: .9rem; }
.lane b { font-weight: 650; }
.lane small { display: block; color: var(--muted); font-size: .76rem; }
.lane__tag { font: 700 .66rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; padding: .35rem .5rem; border-radius: 999px; background: var(--forest); color: var(--oat); }

.console__controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; padding: 1rem 1.1rem .6rem; }
.ctl {
  display: grid; place-items: center; gap: .25rem; min-height: 60px; padding: .5rem .25rem; border-radius: 16px;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink); font: 650 .78rem/1 var(--sans); cursor: pointer;
  transition: background .2s, transform .2s var(--ease), opacity .2s; -webkit-tap-highlight-color: transparent;
}
.ctl svg { width: 1.2rem; height: 1.2rem; }
.ctl:active:not(:disabled) { transform: scale(.94); }
.ctl:disabled { opacity: .4; cursor: not-allowed; }
.ctl--go { background: var(--red); color: #fff; border-color: var(--red); }
.ctl--go:hover:not(:disabled) { background: var(--red-deep); }
.console__keys { display: none; padding: 0 1.1rem 1rem; font-size: .78rem; color: var(--muted); }

/* ---------- Studio ---------- */
.studio { display: grid; gap: 2rem; background: var(--oat); }
.studio__art { position: relative; margin: 0 auto; max-width: 420px; transform-style: preserve-3d; transition: transform .4s var(--ease); }
.studio__art img { width: 100%; height: auto; border-radius: 28px; box-shadow: 0 40px 70px -40px rgba(23, 53, 42, .6), 0 0 0 8px var(--paper); }
.studio__caption {
  position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); white-space: nowrap;
  background: var(--forest); color: var(--oat); font: 600 .78rem/1 var(--sans); padding: .6rem .9rem; border-radius: 999px;
}
.dial { margin-top: 1.6rem; padding: 1.1rem; border-radius: var(--radius); background: var(--paper); box-shadow: 0 1px 0 var(--line); }
.dial__label { display: flex; justify-content: space-between; align-items: baseline; font: 700 .76rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.dial__label output { font: 600 1.4rem/1 var(--serif); letter-spacing: 0; text-transform: none; color: var(--red); }
.dial input { width: 100%; margin: 1.1rem 0 .3rem; height: 44px; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.dial input::-webkit-slider-runnable-track { height: 10px; border-radius: 10px; background: linear-gradient(90deg, var(--glacier) 0%, var(--glacier) var(--fill, 0%), var(--oat-2) var(--fill, 0%)); }
.dial input::-moz-range-track { height: 10px; border-radius: 10px; background: var(--oat-2); }
.dial input::-moz-range-progress { height: 10px; border-radius: 10px; background: var(--glacier); }
.dial input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 40px; height: 40px; margin-top: -15px; border-radius: 50%; border: 0;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fffaf1' d='M12 1.5 13.6 4.9 15.5 4 15 8.2 17.7 5.6 18.4 7.2 21 6.7 20.1 9.6 21.5 10.5 16.9 14.3 17.5 15.9 12.6 15.3 12.8 21 11.2 21 11.4 15.3 6.5 15.9 7.1 14.3 2.5 10.5 3.9 9.6 3 6.7 5.6 7.2 6.3 5.6 9 8.2 8.5 4 10.4 4.9Z'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 6px 14px -4px rgba(200, 16, 46, .6); transform: rotate(var(--rot, 0deg));
}
.dial input::-moz-range-thumb {
  width: 40px; height: 40px; border-radius: 50%; border: 0;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fffaf1' d='M12 1.5 13.6 4.9 15.5 4 15 8.2 17.7 5.6 18.4 7.2 21 6.7 20.1 9.6 21.5 10.5 16.9 14.3 17.5 15.9 12.6 15.3 12.8 21 11.2 21 11.4 15.3 6.5 15.9 7.1 14.3 2.5 10.5 3.9 9.6 3 6.7 5.6 7.2 6.3 5.6 9 8.2 8.5 4 10.4 4.9Z'/%3E%3C/svg%3E") center / 24px no-repeat;
}
.dial__ticks { display: flex; justify-content: space-between; padding: 0 12px; font: .7rem var(--mono); color: var(--muted); }
.brief { margin: 1rem 0 0; padding: 1.2rem; border-radius: var(--radius); background: var(--forest); color: var(--oat); }
.brief__quote { margin: 0; font: italic 500 1.35rem/1.25 var(--serif); }
.brief__quote::before { content: "\201C"; color: var(--red); }
.brief__quote::after { content: "\201D"; color: var(--red); }
.brief__label { margin-top: 1rem; font: 700 .7rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--glacier); }
.brief__list { list-style: none; padding: 0; margin: .6rem 0 0; display: grid; gap: .45rem; }
.brief__list li { display: flex; gap: .55rem; align-items: flex-start; animation: panelIn .45s var(--ease) both; }
.brief__list li:nth-child(2) { animation-delay: .06s; }
.brief__list li:nth-child(3) { animation-delay: .12s; }
.brief__list li:nth-child(4) { animation-delay: .18s; }
.brief__list svg { color: var(--red); margin-top: .25rem; }

/* ---------- How ---------- */
.how { background: var(--paper); }
.how__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: none; }
.how__list li { position: relative; padding: 1.3rem 1.2rem 1.3rem 4.6rem; border-radius: var(--radius); background: var(--oat); }
.how__n { position: absolute; left: 1.1rem; top: 1.1rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--red); color: var(--paper); font: 600 1.3rem/1 var(--serif); }
.how__list h3 { font-size: 1.45rem; }
.how__list p { margin-top: .4rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq__list { display: grid; gap: .6rem; max-width: 52rem; }
.faq details { border-radius: 18px; background: var(--paper); box-shadow: 0 1px 0 var(--line); overflow: hidden; }
.faq summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px;
  padding: 1rem 1.1rem; cursor: pointer; font: 600 1.12rem/1.25 var(--serif);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: 1.6rem; height: 1.6rem; padding: .3rem; border-radius: 50%; background: var(--oat); color: var(--red); transition: transform .3s var(--ease), background .3s; }
.faq details[open] summary svg { transform: rotate(45deg); background: var(--red); color: var(--paper); }
.faq details p { padding: 0 1.1rem 1.1rem; color: var(--muted); }

/* ---------- Finale + footer ---------- */
.finale { position: relative; overflow: hidden; text-align: center; padding: 5rem var(--pad); background: var(--red); color: var(--paper); }
.finale__leaf { position: absolute; width: 140vw; height: 140vw; max-width: 900px; max-height: 900px; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); color: rgba(255, 250, 241, .08); }
.finale h2 { position: relative; font-size: clamp(2.6rem, 12vw, 6.5rem); }
.finale h2 em { font-weight: 500; }
.finale .btn { position: relative; margin-top: 2rem; }
.footer { padding: 2rem var(--pad) 2.5rem; background: var(--forest); color: rgba(244, 236, 223, .78); font-size: .88rem; display: grid; gap: .6rem; }
.footer__mark { display: flex; align-items: center; gap: .5rem; color: var(--oat); font: 600 1.2rem/1 var(--serif); }
.footer__mark svg { color: var(--red); }
.footer a { color: var(--glacier); text-underline-offset: 3px; display: inline-block; padding: .5rem 0; }
.noscript { position: fixed; left: 12px; right: 12px; bottom: calc(var(--dock-h) + 20px); padding: .8rem 1rem; border-radius: 12px; background: var(--forest); color: var(--oat); z-index: 70; }

/* ---------- Thumb dock (mobile) ---------- */
.dock {
  position: fixed; z-index: 60; left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom) + 10px);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; height: var(--dock-h); padding: 0 6px;
  border-radius: 24px; background: rgba(23, 53, 42, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .6);
}
.dock a {
  display: grid; place-items: center; gap: 3px; min-height: 52px; border-radius: 16px; text-decoration: none;
  color: rgba(244, 236, 223, .7); font: 650 .66rem/1 var(--sans); letter-spacing: .04em; -webkit-tap-highlight-color: transparent;
  transition: color .2s, background .2s;
}
.dock svg { width: 22px; height: 22px; }
.dock a[aria-current="true"] { color: var(--oat); background: rgba(244, 236, 223, .1); }
.dock .dock__main { position: relative; color: var(--paper); }
.dock .dock__main svg { width: 44px; height: 44px; padding: 9px; margin-top: -26px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px rgba(23, 53, 42, .94), 0 8px 18px -6px rgba(200, 16, 46, .8); transition: transform .4s var(--ease); }
.dock .dock__main:active svg { transform: rotate(-30deg) scale(.92); }
.dock .dock__main[aria-current="true"] { background: transparent; }

/* ---------- Larger phones / small tablets ---------- */
@media (min-width: 560px) {
  .hero__actions { display: flex; flex-wrap: wrap; }
  .mission { width: 260px; }
}

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .topnav { display: flex; gap: .3rem; }
  .topnav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border-radius: 999px; text-decoration: none; font: 600 .92rem/1 var(--sans); text-shadow: 0 1px 8px rgba(0,0,0,.3); transition: background .2s; }
  .topnav a:hover { background: rgba(255, 250, 241, .18); }
  .topbar.is-solid .topnav a { text-shadow: none; }
  .topbar.is-solid .topnav a:hover { background: var(--oat-2); }
  .topnav a[aria-current="true"] { background: var(--red); color: #fff; text-shadow: none; }

  .hero { display: grid; grid-template-columns: minmax(0, 1fr); }
  .hero__art { height: 100svh; min-height: 640px; max-height: 980px; clip-path: polygon(0 0, 100% 0, 100% 96%, 86% 100%, 70% 96%, 52% 100%, 34% 96%, 18% 100%, 0 96%); }
  .hero__img { object-position: 50% 50%; }
  .hero__art::after { background: linear-gradient(90deg, rgba(15, 30, 24, .0) 0%, rgba(15, 30, 24, 0) 100%), linear-gradient(180deg, rgba(15, 30, 24, .45) 0%, rgba(15, 30, 24, 0) 18%); }
  .hero__copy {
    position: absolute; left: var(--pad); bottom: 9%; width: min(560px, 42vw); margin: 0; padding: 2rem 2.1rem 2.2rem;
    background: rgba(255, 250, 241, .93); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-radius: 30px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .55);
  }
  .hero__title { font-size: clamp(3.4rem, 6vw, 6rem); }
  .hero__stamp { width: 110px; height: 110px; font-size: .78rem; right: 5%; bottom: 14%; }
  .ticker { margin-top: 0; }

  .section { padding: 7rem var(--pad) 6rem; }
  .guide, .play, .how, .faq { padding-inline: max(var(--pad), calc((100vw - 1200px) / 2)); }
  .guide__tabs { flex-wrap: wrap; overflow: visible; margin: 0 0 1rem; padding: 0; }
  .gpanel { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 3rem; padding: 2.6rem; }
  .gpanel > .gpanel__head { grid-column: 1; }
  .gpanel__list, .gpanel__out, .gpanel__try { grid-column: 2; }
  .gpanel__list { margin-top: 0; grid-row: 1 / span 1; }
  .gpanel__bg { width: 320px; height: 320px; }

  .play__grid { grid-template-columns: 320px 1fr; align-items: start; gap: 1.5rem; }
  .missions { flex-direction: column; overflow: visible; margin: 0; padding: 0; }
  .mission { width: 100%; max-width: none; min-height: 0; }
  .mission:hover:not([aria-checked="true"]):not(:disabled) { background: rgba(244, 236, 223, .12); transform: translateX(4px); }
  .console__keys { display: block; }
  .console__controls { grid-template-columns: repeat(4, auto); justify-content: start; }
  .ctl { grid-auto-flow: column; min-height: 48px; padding: 0 1.1rem; font-size: .9rem; gap: .5rem; }

  .studio { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: center; padding-inline: max(var(--pad), calc((100vw - 1200px) / 2)); }
  .studio__art { max-width: none; }
  .how__list { grid-template-columns: repeat(3, 1fr); }
  .how__list li { padding: 5rem 1.6rem 1.8rem; }
  .how__n { left: 1.6rem; top: 1.6rem; }
  .footer { grid-template-columns: auto 1fr auto; align-items: center; gap: 2rem; padding-inline: max(var(--pad), calc((100vw - 1200px) / 2)); }
}

@media (hover: hover) and (min-width: 960px) {
  .btn--red:hover { transform: translateY(-2px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .hero__title .line { opacity: 1; transform: none; }
  .hero__img { transform: none; }
  .ticker__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding-inline: var(--pad); }
  .hero__leaves { display: none; }
}
