/* ============================================================
   TOP WHEELS — Intake Funnel styles
   Loads AFTER colors_and_type.css. Builds on brand tokens.
   ============================================================ */

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--dark);
  color: var(--text);
  overflow: hidden; /* the app owns scrolling */
}
* { box-sizing: border-box; }
button { font-family: inherit; }

/* Base icon rule (required for the sprite to paint: stroke, no fill). */
.icon { width: 1.25em; height: 1.25em; stroke: currentColor; fill: none; flex: none; }

/* ---------- Ambient layers ---------- */
.fx-grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("grain-overlay.svg");
  background-size: 256px 256px;
  opacity: 0.5; /* the svg itself is ~2.5% */
  mix-blend-mode: overlay;
}
.fx-glow {
  position: fixed; pointer-events: none; z-index: 0;
  border-radius: 50%;
  filter: blur(8px);
}
.fx-glow.g1 {
  top: -34vh; right: -16vw; width: 50vw; height: 50vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle, rgba(14,165,233,0.13) 0%, rgba(6,182,212,0.04) 44%, transparent 70%);
  animation: float1 11s ease-in-out infinite;
}
.fx-glow.g2 {
  bottom: -22vh; left: -12vw; width: 46vw; height: 46vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(circle, rgba(139,92,246,0.13) 0%, transparent 68%);
  animation: float2 13s ease-in-out infinite;
}
@keyframes float1 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(-30px,26px); } }
@keyframes float2 { 0%,100%{ transform: translate(0,0); } 50%{ transform: translate(26px,-22px); } }

@media (prefers-reduced-motion: reduce) {
  .fx-glow { animation: none !important; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.05ms !important; }
}

/* ============================================================
   SHELL — two-column on desktop, stacked on mobile
   ============================================================ */
.app {
  position: relative; z-index: 1;
  height: 100dvh; width: 100%;
  display: grid;
  grid-template-columns: minmax(420px, 38%) 1fr;
}

/* ---------- Left brand / value panel (desktop) ---------- */
.aside {
  position: relative;
  display: flex; flex-direction: column;
  padding: clamp(40px, 4vw, 64px);
  border-right: 1px solid var(--dark-border);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(14,165,233,0.10), transparent 55%),
    linear-gradient(180deg, var(--dark-elevated), var(--dark));
  overflow: hidden;
}
.aside-top { display: flex; align-items: center; justify-content: space-between; }
.aside-body { margin-top: auto; margin-bottom: auto; }
.aside-foot { display: flex; flex-direction: column; gap: var(--space-3); }

.brand-logo {
  font-family: var(--font-display); font-size: 1.75rem; letter-spacing: 0.04em;
  line-height: 1; display: inline-flex; align-items: baseline; gap: 2px; user-select: none;
}
.brand-logo .top { color: var(--cyan); }
.brand-logo .wheels { color: var(--white); font-size: 0.85em; }
.brand-logo .io { color: var(--text-muted); font-size: 0.62em; }
a.brand-logo { text-decoration: none; cursor: pointer; transition: opacity var(--t-fast); }
a.brand-logo:hover { opacity: 0.78; }

.aside-eyebrow {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 12px;
}
.aside-eyebrow::before { content:''; width: 30px; height: 1px; background: var(--cyan); }

.aside-headline {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 3.6vw, 3.5rem);
  line-height: 1.0; letter-spacing: 0.02em; color: var(--white);
  margin: var(--space-6) 0 var(--space-6);
  text-wrap: balance;
}
.aside-headline .cy { color: var(--cyan); }
.aside-sub { color: var(--text-dim); font-size: 1.0625rem; max-width: 30ch; line-height: 1.6; }

/* contextual "what happens next" list in the aside */
.aside-steps { list-style: none; padding: 0; margin: var(--space-8) 0 0; display: flex; flex-direction: column; gap: 2px; }
.aside-steps li {
  display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: var(--space-3);
  padding: 11px 0; color: var(--text-dim); font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: color var(--t-medium);
}
.aside-steps li .num {
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.aside-steps li.done { color: var(--text-dim); }
.aside-steps li.done .num { color: var(--green); }
.aside-steps li.active { color: var(--white); }
.aside-steps li.active .num { color: var(--cyan); }

.trust-line {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--text-dim);
}
.trust-line .icon { width: 14px; height: 14px; color: var(--cyan); flex: none; }

/* ============================================================
   Right column — progress + step stage + footer nav
   ============================================================ */
.main { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100dvh; }

/* mobile header (logo + progress), hidden on desktop */
.mobile-head { display: none; }

.progress-wrap {
  padding: clamp(22px, 3vw, 38px) clamp(24px, 5vw, 80px) 0;
  display: flex; flex-direction: column; gap: 10px;
}
.progress-meta { display: flex; justify-content: space-between; align-items: baseline; }
.progress-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); white-space: nowrap; }
.progress-name { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--text-dim); }
.progress-saved { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--green);
  display: inline-flex; align-items: center; gap: 6px; animation: savedFade 0.4s var(--ease-out-quart) both; }
.progress-saved .icon { width: 13px; height: 13px; }
@keyframes savedFade { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: translateY(0); } }
.progress-track { height: 3px; background: var(--dark-border); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan-deep), var(--cyan-light));
  box-shadow: 0 0 12px var(--cyan-glow);
  transition: width 0.6s var(--ease-out-quart);
}

/* scrollable stage that holds the active step */
.stage {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  padding: clamp(28px, 4vh, 52px) clamp(24px, 5vw, 80px);
  scrollbar-width: thin; scrollbar-color: var(--dark-subtle) transparent;
}
.stage::-webkit-scrollbar { width: 8px; }
.stage::-webkit-scrollbar-thumb { background: var(--dark-subtle); border-radius: 999px; }

.step { max-width: 640px; }
.step.wide { max-width: 760px; }

/* ---------- step header ---------- */
.step-eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan);
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: var(--space-4);
}
.step-eyebrow::before { content:''; width: 26px; height: 1px; background: var(--cyan); }
.step-title {
  font-family: var(--font-display); font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1.02; letter-spacing: 0.02em; color: var(--white); margin: 0 0 var(--space-3);
  text-wrap: balance;
}
.step-title .cy { color: var(--cyan); }
.step-lead { color: var(--text-dim); font-size: 1.0625rem; line-height: 1.6; margin: 0 0 var(--space-8); max-width: 52ch; }

/* ---------- question group ---------- */
.qgroup { display: flex; flex-direction: column; gap: var(--space-8); }
.qblock { display: flex; flex-direction: column; gap: var(--space-4); }
.qlabel {
  font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; color: var(--white);
  display: flex; align-items: baseline; gap: 10px;
}
.qlabel .opt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
.qhint { font-size: 0.9rem; color: var(--text-dim); margin: -6px 0 2px; }
.consent { font-size: 0.78rem; line-height: 1.5; color: var(--text-muted); margin: 8px 0 0; max-width: 60ch; }

/* ============================================================
   CHOICE CARDS — big tappable radio cards
   ============================================================ */
.choices { display: grid; gap: var(--space-3); }
.choices.cols-2 { grid-template-columns: 1fr 1fr; }
.choices.cols-3 { grid-template-columns: repeat(3, 1fr); }

.choice {
  position: relative; text-align: left; cursor: pointer;
  background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: var(--radius-md); padding: 16px 18px;
  display: flex; align-items: center; gap: 14px; min-height: 60px;
  color: var(--text); transition: all var(--t-medium);
}
.choice .ic {
  width: 38px; height: 38px; flex: none; border-radius: 9px;
  display: grid; place-items: center; background: var(--dark-elevated);
  border: 1px solid var(--dark-border); color: var(--text-dim);
  transition: all var(--t-medium);
}
.choice .ic .icon { width: 20px; height: 20px; }
.choice .ctext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.choice .ctitle { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.choice .csub { font-size: 0.82rem; color: var(--text-dim); line-height: 1.35; }
.choice .tick {
  margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--dark-subtle); display: grid; place-items: center;
  transition: all var(--t-medium);
}
.choice .tick .icon { width: 13px; height: 13px; color: var(--dark); opacity: 0; transform: scale(0.5); transition: all var(--t-fast); }

.choice:hover {
  border-color: rgba(14,165,233,0.4); transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(14,165,233,0.08);
}
.choice:hover .ic { color: var(--cyan); border-color: rgba(14,165,233,0.3); }

.choice.sel {
  border-color: var(--cyan); background: rgba(14,165,233,0.07);
  box-shadow: 0 0 0 1px var(--cyan), 0 8px 28px rgba(14,165,233,0.12);
}
.choice.sel .ic { background: var(--cyan); border-color: var(--cyan); color: var(--dark); }
.choice.sel .tick { background: var(--cyan); border-color: var(--cyan); }
.choice.sel .tick .icon { opacity: 1; transform: scale(1); }
.choice:focus-visible { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }

/* compact choices for short single-word triplets */
.choice.compact { justify-content: center; text-align: center; padding: 18px 10px; min-height: 64px; }
.choice.compact .ctext { align-items: center; }
.choice.compact .tick { display: none; }

/* ============================================================
   TEXT / SELECT FIELDS
   ============================================================ */
.fields { display: grid; gap: var(--space-4); }
.fields.cols-2 { grid-template-columns: 1fr 1fr; }
.fields.cols-3 { grid-template-columns: repeat(3, 1fr); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.col-span-2 { grid-column: span 2; }
.field.col-span-full { grid-column: 1 / -1; }

.flabel {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--cyan);
  display: flex; align-items: center; gap: 8px;
}
.flabel .optional { color: var(--text-muted); letter-spacing: 0.08em; }

.control {
  background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: var(--radius-md); padding: 13px 15px;
  color: var(--white); font-family: var(--font-body); font-size: 1rem; line-height: 1.3;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  width: 100%;
}
.control::placeholder { color: var(--text-muted); }
.control:hover { border-color: var(--dark-subtle); }
.control:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); background: var(--dark-elevated); }
.control.mono { font-family: var(--font-mono); letter-spacing: 0.06em; }
.control.invalid { border-color: var(--red); box-shadow: 0 0 0 3px rgba(248,113,113,0.12); }

select.control {
  appearance: none; cursor: pointer; padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2338BDF8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
select.control option { background: var(--dark-elevated); color: var(--white); }
select.control.placeholder { color: var(--text-muted); }

.ferror { display: flex; align-items: center; gap: 6px; color: var(--red); font-size: 0.8rem; font-family: var(--font-body); }
.ferror .icon { width: 13px; height: 13px; }

/* input with leading affix (e.g. $) */
.affix { position: relative; display: flex; align-items: center; }
.affix .pfx { position: absolute; left: 15px; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.95rem; pointer-events: none; }
.affix .control { padding-left: 32px; }

/* phone field: country select + number */
.phone { display: grid; grid-template-columns: 116px 1fr; gap: 8px; }
.phone .cc {
  appearance: none; cursor: pointer; background: var(--dark-card); border: 1px solid var(--dark-border);
  border-radius: var(--radius-md); padding: 13px 30px 13px 13px; color: var(--white);
  font-family: var(--font-mono); font-size: 0.92rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238494A7' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.phone .cc:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px var(--cyan-glow); }
.phone .cc option { background: var(--dark-elevated); }

/* ============================================================
   BUTTONS / footer nav
   ============================================================ */
.foot {
  display: flex; align-items: center; gap: var(--space-4);
  padding: clamp(18px, 2.4vh, 26px) clamp(24px, 5vw, 80px);
  border-top: 1px solid var(--dark-border);
  background: linear-gradient(180deg, transparent, rgba(4,8,16,0.5));
}
.foot .spacer { flex: 1; }

.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem; letter-spacing: 0.03em;
  border-radius: var(--radius-md); border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: all var(--t-medium); white-space: nowrap;
}
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--amber); color: var(--dark); padding: 15px 30px; }
.btn-primary:hover { background: var(--amber-light); box-shadow: 0 8px 30px var(--amber-glow); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--dark-subtle); color: var(--text-muted); cursor: not-allowed; box-shadow: none; transform: none; }

.btn-cyan { background: var(--cyan); color: var(--dark); padding: 15px 30px; font-weight: 700; }
.btn-cyan:hover { background: var(--cyan-light); box-shadow: var(--shadow-cyan-glow); transform: translateY(-1px); }

.btn-lg { padding: 17px 38px; font-size: 1.0625rem; }
.btn-ghost { background: transparent; color: var(--text-dim); border: 1px solid var(--dark-border); padding: 14px 22px; }
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-back { background: transparent; color: var(--text-dim); border: none; padding: 14px 14px; }
.btn-back:hover { color: var(--cyan); }
.btn-link { background: none; border: none; color: var(--cyan); cursor: pointer; font-weight: 600; padding: 0; }
.btn-link:hover { color: var(--cyan-light); }

.foot-hint { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; color: var(--text-muted); }

/* ============================================================
   WELCOME (full-bleed within stage)
   ============================================================ */
.welcome { max-width: 720px; }
.welcome .badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: var(--space-8); }
.pill {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 7px 13px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 7px; color: var(--cyan-light);
  background: var(--dark-card); border: 1px solid rgba(14,165,233,0.35);
  box-shadow: 0 2px 10px rgba(4,8,16,0.5);
}
.pill .icon { width: 13px; height: 13px; }
.welcome h1 {
  font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5rem); line-height: 0.96;
  letter-spacing: 0.02em; color: var(--white); margin: 0 0 var(--space-6);
}
.welcome h1 .cy { color: var(--cyan); }
.welcome .lead { font-size: 1.18rem; color: var(--text-dim); line-height: 1.65; max-width: 46ch; margin: 0 0 var(--space-10); }
.welcome .meta-row { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-10); }
.meta-item { display: flex; align-items: center; gap: 10px; color: var(--text-dim); font-size: 0.9rem; }
.meta-item .icon { width: 18px; height: 18px; color: var(--cyan); flex: none; }

/* ============================================================
   TERMINAL / branch + success screens
   ============================================================ */
.terminal { max-width: 600px; text-align: left; }
.terminal .glyph {
  width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center;
  margin-bottom: var(--space-6); border: 1px solid var(--dark-border);
}
.terminal .glyph .icon { width: 34px; height: 34px; }
.glyph.success { background: rgba(52,211,153,0.10); border-color: rgba(52,211,153,0.3); color: var(--green); box-shadow: 0 0 40px rgba(52,211,153,0.12); }
.glyph.info    { background: rgba(14,165,233,0.10); border-color: rgba(14,165,233,0.3); color: var(--cyan); }
.glyph.soft    { background: rgba(139,92,246,0.10); border-color: rgba(139,92,246,0.3); color: var(--violet-muted); }
.glyph.warn    { background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.3); color: var(--amber); }

.terminal h2 { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.02; color: var(--white); margin: 0 0 var(--space-4); letter-spacing: 0.02em; }
.terminal h2 .cy { color: var(--cyan); }
.terminal .lead { font-size: 1.0625rem; color: var(--text-dim); line-height: 1.65; max-width: 52ch; margin: 0 0 var(--space-8); }

.next-card {
  background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius-lg);
  padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4);
}
.next-card .nc-label { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--cyan); }
.nc-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.nc-list li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; color: var(--text-dim); font-size: 0.95rem; line-height: 1.5; }
.nc-list li .icon { width: 18px; height: 18px; color: var(--cyan); margin-top: 2px; }
.nc-list a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(14,165,233,0.4); transition: color var(--t-fast), border-color var(--t-fast); }
.nc-list a:hover { color: var(--cyan-light); border-color: var(--cyan-light); }

/* calendar embed slot */
.cal-slot {
  margin-top: var(--space-6);
  background: var(--dark-card); border: 1px dashed var(--dark-subtle); border-radius: var(--radius-lg);
  min-height: 420px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--space-3); color: var(--text-muted); text-align: center; padding: var(--space-8);
}
.cal-slot .icon { width: 38px; height: 38px; color: var(--text-dim); }
.cal-slot .cs-title { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); }
.cal-slot .cs-note { font-size: 0.85rem; max-width: 40ch; }
.cal-slot code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--cyan); background: rgba(14,165,233,0.08); padding: 2px 7px; border-radius: 5px; }

/* summary chips (book step) */
.summary { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-6) 0 0; }
.chip {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em;
  padding: 7px 12px; border-radius: 999px; color: var(--text-dim);
  background: var(--dark-card); border: 1px solid var(--dark-border);
  display: inline-flex; align-items: center; gap: 7px;
}
.chip b { color: var(--white); font-weight: 600; }
.chip .icon { width: 13px; height: 13px; color: var(--cyan); }

/* ============================================================
   ENTRANCE MOTION — step transitions + staggered fields
   ============================================================ */
@keyframes stepIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes numIn { from { opacity: 0; transform: translateY(22px) scale(0.92); filter: blur(3px); } to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); } }

/* Entrance motion is ENHANCEMENT-ONLY. Content is fully visible by default;
   animations apply only when <html> has .anim-ok (set by JS once the
   animation clock is confirmed to advance AND to actually progress). This
   guarantees content never gets stuck hidden if the timeline is throttled. */
html.anim-ok .step,
html.anim-ok .terminal,
html.anim-ok .welcome { animation: stepIn 0.58s var(--ease-out-quart) both; }
html.anim-ok .dir-back .step,
html.anim-ok .dir-back .terminal { animation: stepInBack 0.58s var(--ease-out-quart) both; }

/* the step header reads as part of the staggered cascade */
html.anim-ok .step-eyebrow { animation: riseIn 0.5s var(--ease-out-quart) both; animation-delay: 0.05s; }
html.anim-ok .step-title   { animation: riseIn 0.5s var(--ease-out-quart) both; animation-delay: 0.11s; }
html.anim-ok .step-lead    { animation: riseIn 0.5s var(--ease-out-quart) both; animation-delay: 0.17s; }

html.anim-ok .stagger > * { animation: riseIn 0.5s var(--ease-out-quart) both; }
html.anim-ok .stagger > *:nth-child(1) { animation-delay: 0.20s; }
html.anim-ok .stagger > *:nth-child(2) { animation-delay: 0.26s; }
html.anim-ok .stagger > *:nth-child(3) { animation-delay: 0.32s; }
html.anim-ok .stagger > *:nth-child(4) { animation-delay: 0.38s; }
html.anim-ok .stagger > *:nth-child(5) { animation-delay: 0.44s; }
html.anim-ok .stagger > *:nth-child(6) { animation-delay: 0.50s; }

/* oversized editorial numeral re-animates on each step (keyed remount) */
html.anim-ok .edi-num { animation: numIn 0.6s var(--ease-out-quart) both; }

/* ============================================================
   RESPONSIVE — stack to single column (portrait / narrow)
   ============================================================ */
@media (max-width: 900px) {
  body { overflow: auto; }
  .app { grid-template-columns: 1fr; height: auto; min-height: 100dvh; }
  .aside { display: none; }
  .main { height: 100dvh; }

  .mobile-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px clamp(18px, 6vw, 28px) 0;
  }
  .mobile-head .brand-logo { font-size: 1.3rem; }
  .mobile-head .trust-line { font-size: 0.66rem; }

  .progress-wrap { padding: 14px clamp(18px, 6vw, 28px) 0; }
  .stage { padding: 24px clamp(18px, 6vw, 28px) 28px; }
  .foot { padding: 16px clamp(18px, 6vw, 28px); }
  .foot-hint { display: none; }

  .choices.cols-2, .choices.cols-3, .choices.triplet { grid-template-columns: 1fr; }
  .fields.cols-2, .fields.cols-3 { grid-template-columns: 1fr; }
  .field.col-span-2 { grid-column: auto; }
  .step-title, .welcome h1 { font-size: clamp(2rem, 9vw, 2.8rem); }
}

@media (max-width: 420px) {
  .choices.triplet { grid-template-columns: 1fr; }
  .btn-primary, .btn-cyan { padding: 15px 22px; }
}

/* landscape phone: keep it usable, no aside */
@media (max-height: 560px) and (min-width: 901px) {
  .aside-steps { display: none; }
}

/* ============================================================
   DIRECTION B — Centered Focus
   Single column, big type, generous whitespace, slim top bar.
   ============================================================ */
.dir-b.app { grid-template-columns: 1fr; }
.dir-b .main { max-width: 1100px; margin: 0 auto; width: 100%; }
.dir-b .mobile-head {
  display: flex; width: 100%; max-width: 760px; margin: 0 auto;
  padding: clamp(22px, 3vw, 34px) clamp(24px, 5vw, 40px) 0;
}
.dir-b .mobile-head .brand-logo { font-size: 1.6rem; }
.dir-b .mobile-head .trust-line { font-size: 0.72rem; }
.dir-b .progress-wrap { width: 100%; max-width: 760px; margin: 0 auto; padding-left: clamp(24px,5vw,40px); padding-right: clamp(24px,5vw,40px); }
.dir-b .stage { display: flex; justify-content: center; }
.dir-b .step { max-width: 660px; width: 100%; }
.dir-b .step.wide { max-width: 660px; }
.dir-b .welcome { max-width: 660px; text-align: center; }
.dir-b .welcome .badge-row, .dir-b .welcome .meta-row { justify-content: center; }
.dir-b .welcome .lead { margin-left: auto; margin-right: auto; }
.dir-b .step-title { font-size: clamp(2.4rem, 4.2vw, 3.6rem); }
.dir-b .step-lead { max-width: 56ch; }
.dir-b .foot { width: 100%; max-width: 760px; margin: 0 auto; }
/* centered direction uses a softer rise-in instead of horizontal slide */
html.anim-ok .dir-b .step,
html.anim-ok .dir-b .terminal,
html.anim-ok .dir-b .welcome { animation: riseIn 0.55s var(--ease-out-quart) both; }

/* ============================================================
   DIRECTION C — Editorial Index
   Oversized numeral + navigational index on the left.
   ============================================================ */
.dir-c.app { grid-template-columns: minmax(340px, 33%) 1fr; }
.aside-edi {
  justify-content: flex-start;
  background:
    linear-gradient(180deg, var(--dark-elevated), var(--dark));
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.05) 1px, transparent 0),
    linear-gradient(180deg, var(--dark-elevated), var(--dark));
  background-size: 22px 22px, cover;
}
.aside-edi .aside-top { margin-bottom: var(--space-12); }
.aside-edi .aside-body { margin: 0 0 var(--space-12); flex: none; }
.edi-num {
  font-family: var(--font-display); font-size: clamp(7rem, 16vw, 13rem);
  line-height: 0.8; color: var(--cyan); letter-spacing: 0.01em;
  text-shadow: 0 0 60px var(--cyan-glow);
}
.edi-label {
  font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim); margin-top: var(--space-4);
}
.edi-index { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; }
.edi-index li {
  display: grid; grid-template-columns: 14px 28px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 8px 11px 0; color: var(--text-muted); border-top: 1px solid rgba(255,255,255,0.05);
  transition: background var(--t-medium), padding var(--t-medium);
  border-radius: 8px;
}
.edi-index li:last-child { border-bottom: 1px solid rgba(255,255,255,0.05); }
.edi-index .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dark-subtle); justify-self: center; }
.edi-index .edi-i-num { font-family: var(--font-mono); font-size: 0.72rem; display: inline-flex; align-items: center; }
.edi-index .edi-i-name { font-size: 0.9rem; }
.edi-index .edi-i-go { width: 15px; height: 15px; color: var(--cyan); opacity: 0; transform: translateX(-6px); transition: opacity var(--t-medium), transform var(--t-medium); justify-self: end; }

.edi-index li.done { color: var(--text-dim); }
.edi-index li.done .dot { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,0.5); }
.edi-index li.done .edi-i-num { color: var(--green); }
.edi-index li.clickable { cursor: pointer; }
.edi-index li.clickable:hover { color: var(--white); background: rgba(14,165,233,0.06); padding-left: 8px; }
.edi-index li.clickable:hover .dot { background: var(--cyan); box-shadow: 0 0 10px var(--cyan); }
.edi-index li.clickable:hover .edi-i-go { opacity: 1; transform: translateX(0); }
.edi-index li.clickable:focus-visible { outline: none; background: rgba(14,165,233,0.10); box-shadow: 0 0 0 1px rgba(14,165,233,0.4) inset; }

.edi-index li.active { color: var(--white); }
.edi-index li.active .dot { background: var(--cyan); box-shadow: 0 0 0 4px rgba(14,165,233,0.18), 0 0 12px var(--cyan); }
.edi-index li.active .edi-i-num { color: var(--cyan); }

.edi-index li.locked { color: var(--text-muted); opacity: 0.55; }
.edi-index li.locked .dot { background: var(--dark-subtle); }
/* editorial step header gets a heavier eyebrow rule */
.dir-c .step-title { font-size: clamp(2.3rem, 3.8vw, 3.3rem); }

/* ============================================================
   DIRECTION SWITCHER (design-review chrome; hidden when ?embed=1)
   In-flow strip at the top of the main column so it never overlaps content.
   ============================================================ */
.dir-switch {
  display: flex; align-items: center; gap: 4px; align-self: flex-end;
  margin: clamp(14px, 2vw, 20px) clamp(24px, 5vw, 80px) 0;
  background: rgba(10,16,32,0.82); backdrop-filter: blur(14px);
  border: 1px solid var(--dark-border); border-radius: 999px;
  padding: 5px 7px 5px 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.dir-b .dir-switch { margin-right: auto; margin-left: auto; }
.ds-label { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--text-muted); margin-right: 4px; }
.ds-btn {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em;
  border: none; background: transparent; color: var(--text-dim);
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: all var(--t-fast);
}
.ds-btn:hover { color: var(--text); }
.ds-btn.on { background: var(--cyan); color: var(--dark); font-weight: 600; }

@media (max-width: 900px) {
  .dir-c.app { grid-template-columns: 1fr; }
  .aside-edi { display: none; }
  .dir-b .main { max-width: 100%; }
  .dir-switch { margin-left: clamp(18px,6vw,28px); margin-right: clamp(18px,6vw,28px); align-self: stretch; justify-content: center; }
}
