:root {
  --bg: #000104;
  --ink: #f3ece0;
  --ink-2: #b9b2a6;
  --ink-3: #7d786f;
  --gold: #e8c47e;
  --gold-hi: #fbe3ae;
  --gold-lo: #a9803f;
  --line: rgba(232, 196, 126, 0.18);
  --line-2: rgba(243, 236, 224, 0.08);
  --yes: #9fd8a8;
  --no: #f1a08f;
  --wait: #e8c47e;
  --surface: rgba(12, 16, 28, 0.72);
  --r-lg: 22px;
  --r-md: 14px;
  --f-head: "Jost", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --gutter: 16px;
  --col: 680px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 50% at 85% -5%, rgba(18, 40, 80, 0.5), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.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; }

@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } html { scroll-behavior: auto; } }

.flow { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }

/* ── intro ─────────────────────────────────────────── */
.intro {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: env(safe-area-inset-top) var(--gutter) 28px;
}
.intro__art {
  width: min(100%, 620px, 62svh);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
  animation: rise 1.6s var(--ease) both;
}
.intro__art img { width: 100%; height: 100%; object-fit: cover; }
.intro__ask {
  width: 100%; max-width: var(--col);
  margin: -9svh auto 0;
  position: relative;
  text-align: center;
  animation: fade 1.1s .3s var(--ease) both;
}
.lede { margin: 0 0 18px; font: 300 clamp(17px, 4.4vw, 21px)/1.4 var(--f-head); color: var(--ink-2); }

/* ── ask ───────────────────────────────────────────── */
.ask__field {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px -22px rgba(232, 196, 126, .3);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.ask__field:focus-within { border-color: rgba(232, 196, 126, .55); box-shadow: 0 0 0 4px rgba(232, 196, 126, .1), 0 18px 60px -18px rgba(232, 196, 126, .4); }
.ask__glyph { font: 300 20px/1 var(--f-head); color: var(--gold); flex: none; }
.ask input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--ink); font: 400 16px/1.2 var(--f-body); padding: 10px 0; }
.ask input::placeholder { color: var(--ink-3); }
.ask__go {
  flex: none; border: 0; cursor: pointer;
  padding: 12px 18px; border-radius: 999px;
  font: 500 14px/1 var(--f-head); letter-spacing: .06em;
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .15s var(--ease), filter .2s;
}
.ask__go:hover { filter: brightness(1.06); }
.ask__go:active { transform: scale(.97); }

/* ── doors ─────────────────────────────────────────── */
.doors { display: grid; gap: 8px; margin: 18px 0 0; }
@media (min-width: 620px) { .doors { grid-template-columns: repeat(3, 1fr); } }
.door {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.025); border: 1px solid var(--line-2);
  transition: border-color .2s, background .2s;
}
.door:hover { border-color: var(--line); background: rgba(232,196,126,.04); }
.door.is-on { border-color: rgba(232,196,126,.6); background: rgba(232,196,126,.07); }
.door__k { font: 400 16px/1.3 var(--f-head); color: var(--gold-hi); }
.door__d { font-size: 13px; color: var(--ink-3); }

/* ── path / steps ──────────────────────────────────── */
.path { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.step { padding-top: 48px; scroll-margin-top: 8px; animation: fade .55s var(--ease) both; }
.step__k { margin: 0 0 8px; font: 400 12px/1.4 var(--f-head); letter-spacing: .28em; text-transform: uppercase; color: var(--gold); overflow-wrap: anywhere; }
.step__q { margin: 0 0 18px; font: 300 clamp(24px, 6.4vw, 34px)/1.2 var(--f-head); }

.choices { display: grid; gap: 8px; }
.choice {
  display: flex; flex-direction: column; gap: 2px; text-align: left; cursor: pointer;
  padding: 15px 16px; border-radius: var(--r-md);
  background: rgba(255,255,255,.025); border: 1px solid var(--line-2);
  transition: border-color .2s, background .2s;
}
.choice:hover { border-color: var(--line); }
.choice.is-on { border-color: rgba(232,196,126,.6); background: rgba(232,196,126,.07); }
.choice__t { font: 400 17px/1.3 var(--f-head); }
.choice__h { font-size: 13px; color: var(--ink-3); }

.fields { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field__l { font-size: 13px; color: var(--ink-2); }
.field__l em { font-style: normal; color: var(--ink-3); }
.field input {
  width: 100%; padding: 14px 16px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line-2); outline: 0;
  color: var(--ink); font: 400 16px/1.2 var(--f-mono);
  transition: border-color .2s;
}
.field input:focus { border-color: rgba(232,196,126,.55); }
.field input[aria-invalid] { border-color: rgba(241,160,143,.6); }
.field input::placeholder { color: var(--ink-3); font-family: var(--f-body); }
.field__e { font-size: 12.5px; color: var(--no); min-height: 0; }
.field__e:empty { display: none; }
.field__n { font-size: 12px; color: var(--ink-3); }
.fields__go { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.link { border: 0; background: none; cursor: pointer; color: var(--ink-2); font-size: 14px; padding: 6px 0; border-bottom: 1px dotted var(--ink-3); }
.link:hover { color: var(--ink); }

/* ── answer ────────────────────────────────────────── */
.card { border-radius: var(--r-lg); background: linear-gradient(180deg, rgba(16, 20, 34, .9), rgba(8, 10, 18, .9)); border: 1px solid var(--line-2); padding: 20px; }
.card--loading { display: flex; align-items: center; gap: 14px; }
.card__muted { color: var(--ink-3); margin: 0; font-size: 14px; }
.pulse span { display: inline-block; font: 300 28px/1 var(--f-head); color: var(--gold); animation: spin 2.4s linear infinite; }

.verdict { display: flex; gap: 14px; align-items: flex-start; }
.verdict__badge { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 400 20px/1 var(--f-head); border: 1px solid currentColor; }
.verdict--yes .verdict__badge { color: var(--yes); background: rgba(159,216,168,.07); }
.verdict--no .verdict__badge { color: var(--no); background: rgba(241,160,143,.07); }
.verdict--wait .verdict__badge, .verdict--info .verdict__badge { color: var(--wait); background: rgba(232,196,126,.07); }
.verdict__head { margin: 2px 0 4px; font: 400 clamp(19px, 4.8vw, 24px)/1.25 var(--f-head); overflow-wrap: anywhere; }
.verdict__sub { margin: 0; color: var(--ink-2); font-size: 14px; overflow-wrap: anywhere; }

.facts, .plug__rows { margin: 18px 0 0; display: grid; grid-template-columns: minmax(96px, auto) 1fr; border-top: 1px solid var(--line-2); }
.facts dt, .facts dd, .plug__rows dt, .plug__rows dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.facts dt, .plug__rows dt { color: var(--ink-3); padding-right: 14px; }
.facts dd, .plug__rows dd { font-family: var(--f-mono); font-size: 12.5px; overflow-wrap: anywhere; white-space: pre-wrap; }
.prov { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 14px 0 0; font-size: 12px; color: var(--ink-3); }
.prov a { color: var(--ink-2); border-bottom: 1px dotted var(--ink-3); }
.thumb { margin: 16px 0 0; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); background: #000; max-width: 240px; }
.thumb img { width: 100%; image-rendering: pixelated; }
.need { margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: rgba(255,255,255,.03); border-radius: 999px; padding: 8px 13px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.chip:hover { border-color: var(--line); color: var(--ink); }

/* ── plugs ─────────────────────────────────────────── */
.plug { position: relative; padding: 0 0 0 22px; margin: 0 0 26px; border-left: 1px solid var(--line); }
.plug:last-child { margin-bottom: 0; }
.plug__h { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.plug__n {
  flex: none; margin-left: -41px;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font: 400 13px/1 var(--f-head); color: #1a1206;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 60%, var(--gold-lo));
  box-shadow: 0 0 0 5px var(--bg);
}
.plug__h h3 { margin: 6px 0 2px; font: 400 18px/1.3 var(--f-head); }
.plug__h p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.plug__rows { margin: 0 0 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-2); }
.tab { border: 0; background: none; cursor: pointer; padding: 9px 12px; font-size: 13px; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.code { position: relative; }
.code pre { margin: 0; padding: 16px; max-height: 380px; overflow: auto; background: rgba(0,0,0,.5); border-radius: var(--r-md); font: 12.5px/1.6 var(--f-mono); color: #e6dfd2; }
.tabs + .code pre { border-top-left-radius: 0; border-top-right-radius: 0; }
.copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--line); background: rgba(10,12,20,.92); color: var(--gold); border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; }
.copy:hover { background: rgba(232,196,126,.12); }
.tok-k { color: #e8c47e; } .tok-t { color: #9cc3ff; } .tok-c { color: #6f6a62; font-style: italic; } .tok-s { color: #b7dba0; } .tok-n { color: #f0b48a; }

/* ── done ──────────────────────────────────────────── */
.step--done { text-align: center; padding-top: 64px; }
.done__mark { margin: 0 0 6px; font: 300 40px/1 var(--f-head); color: var(--gold); }
.done__go { display: flex; flex-direction: column; align-items: center; gap: 12px; }

@media (min-width: 900px) { :root { --gutter: 28px; } }

/* ── docs link ─────────────────────────────────────── */
.corner {
  position: fixed; z-index: 5;
  top: calc(14px + env(safe-area-inset-top)); right: 14px;
  display: flex; align-items: center; gap: 8px;
}
.wallet {
  height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 400 13px/1 var(--f-body); color: var(--gold);
  background: rgba(0, 1, 4, .55); border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  display: inline-flex; align-items: center; gap: 8px;
  transition: border-color .2s, background .2s, color .2s;
}
.wallet:hover { border-color: rgba(232,196,126,.55); background: rgba(232,196,126,.08); color: var(--gold-hi); }
.wallet[hidden] { display: none; }
.wallet.is-on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 8px rgba(159,216,168,.7); }
.wallet.is-on { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink); }
.info {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font: 400 16px/1 var(--f-head); font-style: italic;
  color: var(--gold); background: rgba(0, 1, 4, .55);
  border: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transition: border-color .2s, color .2s, background .2s;
}
.info:hover { color: var(--gold-hi); border-color: rgba(232,196,126,.55); background: rgba(232,196,126,.08); }

/* ── arrow submit ──────────────────────────────────── */
.go {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; border: 0; cursor: pointer;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 6px 18px -6px rgba(232,196,126,.55);
  transition: transform .15s var(--ease), filter .2s, box-shadow .2s;
}
.go svg { width: 20px; height: 20px; fill: none; stroke: #1a1206; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.go:hover { filter: brightness(1.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 22px -6px rgba(232,196,126,.7); }
.go:active { transform: scale(.94); }
.go:disabled { opacity: .55; cursor: progress; }

/* ── suggestion card ───────────────────────────────── */
.tip {
  display: flex; align-items: center; gap: 14px;
  margin: 14px 0 0; padding: 14px 14px 14px 16px;
  border-radius: 18px; text-align: left;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2);
  animation: fade .6s .5s var(--ease) both;
}
.tip[hidden] { display: none; }
.tip.is-leaving { animation: none; opacity: 0; transform: translateY(-4px); transition: opacity .25s, transform .25s; }
.tip__icon { flex: none; width: 34px; height: 34px; display: grid; place-items: center; color: var(--gold); }
.tip__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tip__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tip__t { font: 500 15px/1.3 var(--f-head); color: var(--ink); letter-spacing: .01em; }
.tip__s { font-size: 13px; line-height: 1.4; color: var(--ink-3); }
.tip__act { flex: none; display: flex; align-items: center; gap: 6px; }
.tip__no { border: 0; background: none; cursor: pointer; padding: 8px 10px; font-size: 13.5px; color: var(--ink-2); border-radius: 999px; }
.tip__no:hover { color: var(--ink); }
.tip__go {
  border: 0; cursor: pointer; padding: 9px 16px; border-radius: 999px;
  font: 500 13.5px/1 var(--f-head); letter-spacing: .04em; color: #1a1206;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.tip__go:hover { filter: brightness(1.06); }
@media (max-width: 460px) {
  .tip { flex-wrap: wrap; row-gap: 8px; }
  .tip__text { flex-basis: calc(100% - 48px); }
  .tip__act { flex-basis: 100%; justify-content: flex-end; }
}

/* ══ conversation stage (Typeform-style) ══════════════ */
.stage { min-height: 100svh; display: flex; flex-direction: column; }
.stage[hidden], .flow[hidden], .corner[hidden] { display: none; }
.stage__bar {
  position: sticky; top: 0; z-index: 4;
  display: flex; align-items: center; gap: 14px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px;
  background: linear-gradient(to bottom, var(--bg) 60%, rgba(0,1,4,0));
}
.stage__btn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.03); border: 1px solid var(--line-2); color: var(--ink-2);
  transition: border-color .2s, color .2s;
}
.stage__btn:hover { border-color: var(--line); color: var(--gold); }
.stage__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stage__close { font: 300 18px/1 var(--f-head); color: var(--gold); }
.stage__progress { flex: 1; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.stage__progress span { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width .5s var(--ease); }

.screen { flex: 1; display: flex; justify-content: center; padding: clamp(20px, 11svh, 120px) var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.screen__in { width: 100%; max-width: 640px; }
.screen--fwd .screen__in { animation: inUp .5s var(--ease) both; }
.screen--back .screen__in { animation: inDown .5s var(--ease) both; }
.screen.is-out-up .screen__in { animation: none; opacity: 0; transform: translateY(-26px); transition: opacity .2s ease-in, transform .2s ease-in; }
.screen.is-out-down .screen__in { animation: none; opacity: 0; transform: translateY(26px); transition: opacity .2s ease-in, transform .2s ease-in; }
@keyframes inUp { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes inDown { from { opacity: 0; transform: translateY(-34px); } to { opacity: 1; transform: none; } }

.q__n { margin: 0 0 10px; display: flex; align-items: center; gap: 6px; font: 400 14px/1 var(--f-head); color: var(--gold); letter-spacing: .04em; }
.q__n span { font-size: 13px; opacity: .8; }
.q__t { margin: 0 0 10px; font: 300 clamp(25px, 6.6vw, 36px)/1.22 var(--f-head); color: var(--ink); overflow-wrap: anywhere; }
.q__s { margin: 0 0 26px; font-size: 16px; line-height: 1.5; color: var(--ink-2); }
.q__s--echo { margin-bottom: 14px; font-size: 13px; color: var(--ink-3); letter-spacing: .02em; }

.opts { display: grid; gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 14px; text-align: left; cursor: pointer;
  padding: 14px 16px; border-radius: var(--r-md);
  background: rgba(232,196,126,.035); border: 1px solid var(--line);
  transition: background .18s, border-color .18s, transform .12s;
}
.opt:hover { background: rgba(232,196,126,.08); border-color: rgba(232,196,126,.45); }
.opt:active { transform: scale(.99); }
.opt kbd {
  flex: none; width: 26px; height: 26px; margin-top: 1px; border-radius: 7px;
  display: grid; place-items: center;
  font: 500 12px/1 var(--f-body); color: var(--gold);
  border: 1px solid rgba(232,196,126,.5); background: rgba(0,0,0,.3);
}
.opt__t { display: flex; flex-direction: column; gap: 3px; font: 400 17px/1.3 var(--f-head); color: var(--ink); }
.opt__t small { font: 400 13.5px/1.4 var(--f-body); color: var(--ink-3); }
.opt.is-on { background: rgba(232,196,126,.12); border-color: var(--gold); }
.opt.is-on kbd { background: var(--gold); color: #1a1206; border-color: var(--gold); }
.opt.is-picked { animation: blink .3s steps(2, start) 1; }
@keyframes blink { 50% { background: rgba(232,196,126,.22); } }

.ans__in {
  width: 100%; padding: 8px 0 12px;
  background: transparent; border: 0; border-bottom: 2px solid var(--line); border-radius: 0; outline: 0;
  font: 300 clamp(21px, 5.6vw, 28px)/1.3 var(--f-head); color: var(--gold-hi);
  transition: border-color .2s;
}
.ans__in::placeholder { color: rgba(232,196,126,.28); }
.ans__in:focus { border-bottom-color: var(--gold); }
.ans__in[aria-invalid] { border-bottom-color: var(--no); }
.ans__err { margin: 10px 0 0; font-size: 14px; color: var(--no); min-height: 0; }
.ans__err:empty { display: none; }
.ans__go { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.ok {
  border: 0; cursor: pointer; padding: 12px 22px; border-radius: 12px;
  font: 500 16px/1 var(--f-head); letter-spacing: .03em; color: #1a1206;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 8px 22px -10px rgba(232,196,126,.6);
  transition: filter .2s, transform .12s;
}
.ok:hover { filter: brightness(1.06); }
.ok:active { transform: scale(.97); }
.ans__hint { font-size: 12.5px; color: var(--ink-3); }
.ans__hint b { font-weight: 500; color: var(--ink-2); }
@media (hover: none) { .ans__hint { display: none; } }
.ans__more { display: flex; gap: 20px; margin-top: 18px; }

#answer .verdict { margin-top: 2px; }
#answer .facts { margin-top: 22px; }
.stage .plug { padding: 0; border: 0; margin: 0; }
.stage .plug__rows { margin: 0 0 14px; }
.done { text-align: center; padding-top: 6svh; }
.done .done__go { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 22px; }
