/* ==========================================================================
   Navige — onboarding experience
   --------------------------------------------------------------------------
   Page-local. site.css still supplies the nav, footer, contact modal and the
   shared reset; everything below is this page's own.

   Colour: the brief specifies Cobalt #1845C2 and Raspberry #A92962. The rest
   of the estate is built on #1259D0 (site.css --teal, and the console's
   palette.ts BLUE, deliberately unified on 6 Oct 2026). Rather than let one
   page drift a shade off every other surface, --teal is re-pointed at cobalt
   HERE ONLY, so the shared nav and buttons on this page match the page's own
   accents. No other page is affected. Flip --cobalt back to #1259D0 if the
   estate should win instead — it is one line.
   ========================================================================== */

:root {
  --cobalt:     #1845C2;
  --cobalt-d:   #11339a;
  --cobalt-l:   #e8edfb;
  --cobalt-br:  #c2d0f2;
  --rasp:       #A92962;
  --rasp-d:     #85204d;
  --rasp-l:     #fdeef4;
  --rasp-br:    #f3cedd;

  --paper:      #FAF9F6;   /* warm off-white */
  --surface:    #ffffff;
  --surface-2:  #f4f2ed;
  --ink:        #15161a;
  --ink-2:      #44474f;
  --ink-3:      #6f737d;
  --line:       #e4e1da;
  --line-soft:  #efece6;

  --ok:         #176b46;  --ok-l:   #e3f3ea;
  --warn:       #8a5410;  --warn-l: #fbf2e3;
  --stop:       #9d2f1f;  --stop-l: #faeae6;

  /* Re-point the shared token so the inherited nav matches this page. */
  --teal:       #1845C2;
  --teal-d:     #11339a;
  --teal-l:     #e8edfb;

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sansf: 'Plus Jakarta Sans', -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --monof: 'JetBrains Mono', 'SF Mono', 'Fira Code', Consolas, monospace;

  --r-sm: 8px; --r: 12px; --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(21,22,26,.04), 0 2px 8px rgba(21,22,26,.04);
  --shadow-2: 0 2px 4px rgba(21,22,26,.04), 0 12px 32px rgba(21,22,26,.08);

  /* Motion. Micro 120–220ms, transitions 250–450ms, per the brief. */
  --t-micro: 160ms;
  --t-move:  320ms;
  --ease:    cubic-bezier(.22,.61,.36,1);
}

/* site.css resets box-sizing but not the UA's 8px body margin, which showed
   as a hairline of paper above the sticky nav. */
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sansf); }

/* Any author `display` beats the UA's [hidden] rule, so `el.hidden = true`
   silently did nothing to .rail (display:flex) while it worked fine on the
   plain divs either side of it. Caught by screenshot, not by reading. */
[hidden] { display: none !important; }

/* ── Primitives ────────────────────────────────────────────────────── */

.ob-wrap { max-width: 1240px; margin: 0 auto; padding-inline: 28px; }
.eyebrow { font-family: var(--monof); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--rasp); font-weight: 600; margin: 0; }
.h-display { font-family: var(--serif); font-weight: 700; letter-spacing: -.025em;
  line-height: 1.05; color: var(--ink); margin: 0; text-wrap: balance; }
.h2 { font-family: var(--serif); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700;
  letter-spacing: -.022em; line-height: 1.14; margin: 0; text-wrap: balance; }
.h3 { font-size: 16px; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.p  { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); margin: 0; max-width: 68ch; }
.p-lead { font-size: 16.5px; line-height: 1.62; color: var(--ink-2); margin: 0; max-width: 58ch; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--monof); }

code, .code-chip { font-family: var(--monof); font-size: .875em; background: var(--cobalt-l);
  color: var(--cobalt-d); padding: 1.5px 5px; border-radius: 5px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; padding: 12px 22px;
  border-radius: var(--r-sm); text-decoration: none; transition:
  background var(--t-micro) var(--ease), transform var(--t-micro) var(--ease),
  border-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cobalt); color: #fff; }
.btn-primary:hover { background: var(--cobalt-d); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--cobalt); color: var(--cobalt-d); }
.btn-sm { font-size: 12.5px; padding: 8px 14px; }
.btn:focus-visible, a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2.5px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }

/* ── Mode switch (Guided / Reference) ──────────────────────────────── */

.mode-bar { position: sticky; top: 60px; z-index: 50; background: rgba(250,249,246,.86);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.mode-inner { max-width: 1240px; margin: 0 auto; padding: 10px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; font-family: inherit; font-size: 12.5px;
  font-weight: 700; color: var(--ink-3); padding: 7px 16px; border-radius: 99px; cursor: pointer;
  transition: color var(--t-micro) var(--ease), background var(--t-micro) var(--ease); }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--cobalt-d);
  box-shadow: var(--shadow-1); }
.mode-right { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--ink-3); }

/* ── Stage progress rail ───────────────────────────────────────────── */

.rail { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail-step { display: inline-flex; align-items: center; gap: 7px; border: none; background: none;
  font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-3);
  padding: 6px 10px; border-radius: 99px; cursor: pointer; white-space: nowrap;
  transition: color var(--t-micro) var(--ease), background var(--t-micro) var(--ease); }
.rail-step:hover { color: var(--ink); background: var(--surface); }
.rail-step[aria-current="step"] { color: var(--cobalt-d); background: var(--cobalt-l); }
.rail-dot { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: var(--ink-3);
  background: var(--surface); flex-shrink: 0;
  transition: background var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), color var(--t-micro) var(--ease); }
.rail-step[aria-current="step"] .rail-dot { border-color: var(--cobalt); color: var(--cobalt-d); }
.rail-step.done .rail-dot { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.rail-step.done { color: var(--ink-2); }
.rail-sep { width: 14px; height: 1px; background: var(--line); flex-shrink: 0; }

/* ── Stage shell ───────────────────────────────────────────────────── */

.stage { display: none; padding-block: 48px 72px; }
.stage.on { display: block; animation: stage-in var(--t-move) var(--ease) both; }
@keyframes stage-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.stage-head { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; }
.stage-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }

/* ── Welcome ───────────────────────────────────────────────────────── */

.welcome { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr);
  gap: 56px; align-items: center; padding-block: 60px 50px; }
.welcome h1 { font-size: clamp(38px, 6vw, 62px); }
.welcome h1 .rasp { color: var(--rasp); }
.welcome-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.welcome-note { font-size: 13px; color: var(--ink-3); margin-top: 18px; }

/* ── Environment selector ──────────────────────────────────────────── */

.env-group { margin-bottom: 26px; }
.env-group-t { font-family: var(--monof); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 11px; }
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 12px; }
.env { position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--r); padding: 16px 17px; cursor: pointer; font-family: inherit; width: 100%;
  display: flex; flex-direction: column; gap: 5px;
  transition: border-color var(--t-micro) var(--ease), box-shadow var(--t-micro) var(--ease),
              transform var(--t-micro) var(--ease); }
.env:hover { border-color: var(--cobalt-br); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.env[aria-pressed="true"] { border-color: var(--cobalt); box-shadow: 0 0 0 3px var(--cobalt-l), var(--shadow-2); }
.env-name { font-size: 14px; font-weight: 800; color: var(--ink); }
.env-sub { font-size: 11.5px; color: var(--ink-3); }
.env-route { margin-top: 6px; display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--monof); font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); }
.env-route .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--cobalt); }
.env-route.r-decision .pip { background: var(--rasp); }
.env-check { position: absolute; top: 12px; right: 12px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--cobalt); display: grid; place-items: center;
  opacity: 0; transform: scale(.6); transition: opacity var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.env[aria-pressed="true"] .env-check { opacity: 1; transform: scale(1); }

/* ── Route preview ─────────────────────────────────────────────────── */

.preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-1); }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 13px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.preview-title { font-size: 13px; font-weight: 800; }
.preview-body { padding: 10px 14px 4px; }
.preview svg { display: block; width: 100%; height: auto; }
.preview-teach { padding: 4px 18px 16px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.preview-state { display: inline-flex; align-items: center; gap: 7px; font-family: var(--monof);
  font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.preview-state .led { width: 7px; height: 7px; border-radius: 50%; background: var(--line);
  transition: background var(--t-micro) var(--ease); }
.preview-state[data-s="preview"] .led { background: var(--ink-3); }
.preview-state[data-s="ready"]   .led { background: var(--cobalt); }
.preview-state[data-s="attention"] .led { background: var(--warn); }

/* diagram parts */
.nd-box { fill: var(--surface-2); stroke: var(--line); stroke-width: 1.2; }
.nd-box.is-hub { fill: var(--cobalt-l); stroke: var(--cobalt-br); }
.nd-box.is-dim { opacity: .38; }
.nd-t  { font-family: var(--sansf); font-size: 12px; font-weight: 800; fill: var(--ink); }
.nd-t.is-hub { fill: var(--cobalt-d); }
.nd-s  { font-family: var(--monof); font-size: 8.5px; letter-spacing: .08em; fill: var(--ink-3); text-transform: uppercase; }
.nd-dim { opacity: .34; transition: opacity var(--t-move) var(--ease); }
.lnk { fill: none; stroke: var(--line); stroke-width: 2; stroke-linecap: round;
  transition: stroke var(--t-move) var(--ease), opacity var(--t-move) var(--ease); }
.lnk.on { stroke: var(--cobalt-br); }
.lnk.on.is-rasp { stroke: var(--rasp-br); }
.lnk.off { opacity: .3; }
.sig { fill: var(--cobalt); }
.sig.is-rasp { fill: var(--rasp); }

/* ── Capability matrix ─────────────────────────────────────────────── */

.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 10px; }
.cap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 15px; display: flex; flex-direction: column; gap: 4px; }
.cap-n { font-size: 12.5px; font-weight: 800; }
.cap-v { font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.cap-v.yes { color: var(--ok); } .cap-v.no { color: var(--ink-3); } .cap-v.part { color: var(--warn); }
.cap-d { font-size: 11.5px; color: var(--ink-3); line-height: 1.5; }

/* ── Steps ─────────────────────────────────────────────────────────── */

.steps { display: flex; flex-direction: column; gap: 16px; }
.step { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; }
.step-n { width: 26px; height: 26px; border-radius: 50%; background: var(--cobalt-l);
  color: var(--cobalt-d); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.step-t { font-size: 14.5px; font-weight: 800; margin-bottom: 4px; }
.step-d { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }

.open-in { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px;
  background: var(--cobalt-l); border: 1px solid var(--cobalt-br); border-radius: var(--r-sm);
  padding: 7px 12px; font-size: 12px; font-weight: 700; color: var(--cobalt-d); text-decoration: none; }
.open-in:hover { background: #dfe7fa; }

/* ── Notes ─────────────────────────────────────────────────────────── */

.note { border-left: 3px solid var(--cobalt); background: var(--cobalt-l);
  border-radius: 0 var(--r) var(--r) 0; padding: 14px 18px; margin: 16px 0; }
.note.warn { border-left-color: var(--rasp); background: var(--rasp-l); }
.note.ok   { border-left-color: var(--ok);   background: var(--ok-l); }
.note-t { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  color: var(--cobalt-d); margin-bottom: 6px; }
.note.warn .note-t { color: var(--rasp-d); } .note.ok .note-t { color: var(--ok); }
.note p { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); margin: 0; max-width: none; }

/* ── Code ──────────────────────────────────────────────────────────── */

.code { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  background: var(--surface); margin: 14px 0; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--surface-2); border-bottom: 1px solid var(--line); padding: 0 10px 0 0; }
.code-tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.code-tabs::-webkit-scrollbar { display: none; }
.code-tab { border: none; background: none; font-family: var(--monof); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--ink-3);
  padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease); }
.code-tab[aria-selected="true"] { color: var(--cobalt-d); border-bottom-color: var(--cobalt); }
.copy { border: 1px solid var(--line); background: var(--surface); border-radius: 6px;
  font-family: inherit; font-size: 11px; font-weight: 700; color: var(--ink-3);
  padding: 4px 11px; cursor: pointer; flex-shrink: 0;
  transition: color var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease); }
.copy:hover { color: var(--cobalt-d); border-color: var(--cobalt); }
.copy.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.code pre { margin: 0; padding: 15px 17px; overflow-x: auto; font-family: var(--monof);
  font-size: 12.5px; line-height: 1.62; color: var(--ink); }
.code pre .ph { background: #fdf0d6; color: #7a4e00; border-radius: 3px; padding: 0 3px; font-weight: 600; }
.code pre .str { color: var(--ok); }
.code pre .kw  { color: var(--rasp-d); }
.code pre .cm  { color: var(--ink-3); font-style: italic; }

/* ── Verify checklist ──────────────────────────────────────────────── */

.checks { display: flex; flex-direction: column; gap: 10px; }
.check { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 13px; align-items: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 15px 17px; cursor: pointer; text-align: left; width: 100%; font-family: inherit;
  transition: border-color var(--t-micro) var(--ease), background var(--t-micro) var(--ease); }
.check:hover { border-color: var(--cobalt-br); }
.check[aria-pressed="true"] { border-color: var(--ok); background: var(--ok-l); }
.check-box { width: 20px; height: 20px; border: 1.5px solid var(--line); border-radius: 6px;
  display: grid; place-items: center; margin-top: 1px; background: var(--surface);
  transition: background var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease); }
.check[aria-pressed="true"] .check-box { background: var(--ok); border-color: var(--ok); }
.check-box svg { opacity: 0; transform: scale(.5); transition: opacity var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.check[aria-pressed="true"] .check-box svg { opacity: 1; transform: scale(1); }
.check-t { font-size: 13.5px; font-weight: 700; }
.check-d { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; margin-top: 3px; }

/* ── Controls ──────────────────────────────────────────────────────── */

.ctrl { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ctrl-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ctrl-n { font-size: 14px; font-weight: 800; }
.ctrl-state { font-family: var(--monof); font-size: 10px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line);
  border-radius: 99px; padding: 2px 9px; white-space: nowrap; }
.ctrl-state.on { color: var(--ok); border-color: var(--ok); background: var(--ok-l); }
.ctrl-d { font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.ctrl-note { font-size: 12.5px; line-height: 1.55; color: var(--warn); }
.ctrl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px,1fr)); gap: 12px; }

/* ── Milestone ─────────────────────────────────────────────────────── */

.milestone { text-align: center; padding-block: 24px 10px; }
.milestone h2 { font-size: clamp(27px,4.4vw,42px); }
.ms-ring { width: 86px; height: 86px; margin: 0 auto 26px; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr));
  gap: 12px; margin-top: 32px; text-align: left; }
.next { display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 18px; text-decoration: none;
  transition: border-color var(--t-micro) var(--ease), transform var(--t-micro) var(--ease); }
.next:hover { border-color: var(--cobalt); transform: translateY(-2px); }
.next-t { font-size: 13.5px; font-weight: 800; color: var(--ink); margin-bottom: 3px; }
.next-d { font-size: 12px; color: var(--ink-3); line-height: 1.5; }

/* ── Reference mode ────────────────────────────────────────────────── */

.ref-shell { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 44px;
  padding-block: 36px 80px; }
.ref-side { position: sticky; top: 118px; align-self: start; max-height: calc(100vh - 150px); overflow-y: auto; }
.ref-search { width: 100%; font-family: inherit; font-size: 13px; padding: 9px 12px;
  border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--surface);
  color: var(--ink); margin-bottom: 14px; transition: border-color var(--t-micro) var(--ease); }
.ref-search:focus { outline: none; border-color: var(--cobalt); }
.ref-link { display: block; padding: 7px 11px; font-size: 12.5px; line-height: 1.4;
  color: var(--ink-3); text-decoration: none; border-left: 2px solid var(--line);
  transition: color var(--t-micro) var(--ease), background var(--t-micro) var(--ease), border-color var(--t-micro) var(--ease); }
.ref-link:hover { color: var(--ink); background: var(--surface); }
.ref-link.on { color: var(--cobalt-d); background: var(--cobalt-l); border-left-color: var(--cobalt); font-weight: 700; }
.ref-link[hidden] { display: none; }
.ref-empty { font-size: 12.5px; color: var(--ink-3); padding: 8px 11px; }
.ref-sec { scroll-margin-top: 130px; padding-bottom: 42px; }
.ref-sec h2 { margin-bottom: 10px; }
.ref-n { font-family: var(--monof); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--rasp); font-weight: 600; margin-bottom: 8px; }

/* ── Drawer / accordion ────────────────────────────────────────────── */

.drawer { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  overflow: hidden; margin: 12px 0; }
.drawer-btn { width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; background: none; border: none; font-family: inherit; font-size: 13.5px;
  font-weight: 700; color: var(--ink); padding: 14px 17px; cursor: pointer; text-align: left; }
.drawer-btn:hover { background: var(--surface-2); }
.drawer-btn svg { flex-shrink: 0; transition: transform var(--t-move) var(--ease); }
.drawer-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.drawer-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-move) var(--ease); }
.drawer-body > div { overflow: hidden; }
.drawer-btn[aria-expanded="true"] + .drawer-body { grid-template-rows: 1fr; }
.drawer-inner { padding: 0 17px 16px; }

/* ── Tables ────────────────────────────────────────────────────────── */

.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); margin: 14px 0; }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13.2px; }
.tbl th { text-align: left; padding: 10px 15px; background: var(--surface-2); font-size: 10.5px;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); font-weight: 700;
  white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: 11px 15px; border-bottom: 1px solid var(--line-soft); vertical-align: top;
  color: var(--ink-2); line-height: 1.55; }
.tbl tr:last-child td { border-bottom: none; }

/* ── Progress / misc ───────────────────────────────────────────────── */

.bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 300;
  background: linear-gradient(90deg, var(--cobalt), var(--rasp)); transition: width 90ms linear; }
.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; }

/* ── Responsive ────────────────────────────────────────────────────── */

@media (max-width: 1040px) {
  .welcome { grid-template-columns: 1fr; gap: 36px; padding-block: 40px 30px; }
  .ref-shell { grid-template-columns: 1fr; gap: 0; }
  .ref-side { position: static; max-height: none; margin-bottom: 26px; }
}
@media (max-width: 900px) {
  /* This nav variant has no hamburger; its items overflowed at a fixed
     height and dragged the page sideways. */
  nav { padding: 10px 18px; height: auto; min-height: 60px; flex-wrap: wrap; row-gap: 8px; }
  nav .nav-item, nav .nav-demo { display: none; }
  .nav-links { gap: 14px; }
  .mode-bar { top: 0; position: static; }
}
@media (max-width: 680px) {
  .ob-wrap { padding-inline: 18px; }
  .mode-inner { padding: 10px 18px; }
  .env-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 1fr; gap: 10px; }
  .welcome h1 { font-size: 34px; }
}

/* ── Reduced motion: the finished state, immediately ───────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .stage.on { animation: none; }
}
