/* DPDP Act Explorer.
   Binds to the Forum tokens (tokens/fig-tokens.css, dark set via html.dark)
   and the Institutional Field (.fig-field, tokens/brand.css). No raw colour
   values here: every colour is a token or a token mixed with transparency. */

@font-face {
  font-family: "Funnel Display";
  src: url("/fonts/FunnelDisplay-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --font-display: "Funnel Display", "Archivo", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --glass: color-mix(in srgb, var(--navy-900) 84%, transparent);
  --glass-strong: color-mix(in srgb, var(--navy-900) 94%, transparent);
  --hair: color-mix(in srgb, var(--blue-300) 22%, transparent);
  --hair-strong: color-mix(in srgb, var(--blue-300) 40%, transparent);
  --panel-w: 440px;
  --ease: var(--ease-standard, cubic-bezier(0.2, 0, 0, 1));
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--navy-900);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}
a { color: var(--action-default); }
a:hover { color: var(--action-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.field { position: fixed; inset: 0; z-index: 0; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; display: block; touch-action: pan-y; }
body.flat #scene { display: none; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 5;
  display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 16px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--navy-900) 70%, transparent), transparent);
}
.brand { white-space: nowrap; flex: none; display: flex; align-items: center; gap: 10px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: 0.01em; }
.brand:hover { color: var(--white); }
.brand svg { width: 22px; height: 22px; flex: none; }
@media (max-width: 420px) { .brand small { display: none; } }
.brand small { font-weight: 400; color: var(--text-secondary); font-size: 13px; }
.top .spacer { flex: 1; }
.chip-sector {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
  border: 1px solid var(--hair-strong); border-radius: 999px; padding: 4px 12px;
  font-size: 13px; color: var(--text-secondary); background: transparent; cursor: pointer;
}
.chip-sector:hover { color: var(--white); border-color: var(--action-default); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 4px;
  border: 1px solid var(--hair); background: transparent; color: var(--text-secondary); cursor: pointer;
}
.icon-btn:hover { color: var(--white); border-color: var(--action-default); }
.icon-btn svg { width: 18px; height: 18px; }

/* The passport: seven seals and the clock. A seal is stamped when its
   station's move is done; any seal jumps to its station. */
.rail { position: fixed; top: 56px; left: 16px; right: 16px; z-index: 5; display: flex; align-items: center; height: 30px; }
.rail[hidden] { display: none; }
.rail .link { flex: 1; height: 2px; min-width: 4px; background: var(--hair); border-radius: 2px; transition: background var(--motion-considered-ms, 320ms) var(--ease); }
.rail .link.past { background: color-mix(in srgb, var(--blue-300) 55%, transparent); }
.seal {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--hair-strong); background: color-mix(in srgb, var(--navy-900) 70%, transparent); color: var(--text-muted);
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), background 240ms var(--ease);
}
.seal i { font-style: normal; font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.seal svg { width: 13px; height: 13px; }
.seal:hover { border-color: var(--action-default); color: var(--white); }
.seal.now { border-color: var(--action-default); color: var(--white); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue-500) 30%, transparent); }
.seal.stamped { background: color-mix(in srgb, var(--blue-500) 45%, var(--navy-900)); border-color: var(--blue-300); color: var(--white); }
.seal.clock svg { width: 15px; height: 15px; }
.seal.just { animation: stamp 620ms var(--ease) both; }
@keyframes stamp {
  0% { transform: scale(2.1) rotate(-18deg); opacity: 0; }
  55% { transform: scale(0.9) rotate(3deg); opacity: 1; }
  100% { transform: none; }
}

/* ---------- hero (arrival only) ---------- */
.hero {
  position: fixed; z-index: 3; left: 16px; right: 16px; top: 100px;
  pointer-events: none;
}
.hero { transition: opacity 400ms var(--ease); }
.hero h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 10vw, 76px); line-height: 1.02; letter-spacing: -0.01em;
  margin: 0; max-width: 15ch; color: var(--white);
  text-wrap: balance;
}
.scope-m { display: none; margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); }
@media (max-width: 899px) { .hero-sub { display: none; } .scope-m { display: block; } }
.hero-sub { margin: 14px 0 0; max-width: 46ch; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.hero-cite { white-space: nowrap; color: var(--text-muted); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
/* The station marker: a large numeral set over the scene. */
.mark { position: absolute; right: 0; top: 0; text-align: right; color: var(--white); }
.mark span { display: block; font-family: var(--font-display); font-weight: 400; font-size: 64px; line-height: 0.9; color: color-mix(in srgb, var(--blue-200) 34%, transparent); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mark b { display: none; font-family: var(--font-display); font-weight: 500; font-size: 32px; letter-spacing: -0.01em; }
.sector-note { margin: -6px 0 18px; padding: 10px 12px; border-radius: 8px; background: color-mix(in srgb, var(--blue-500) 10%, transparent); font-size: 14px; color: var(--text-secondary); }
.sector-note b { color: var(--white); font-weight: 600; }
.eyebrow { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 14px; }
.eyebrow::before { content: ""; width: 24px; height: 2px; background: var(--accent-rule); flex: none; }

/* ---------- the panel ---------- */
/* Phone: a floating inset sheet over the scene, collapsible so the scene can
   be seen whole. Desktop: a fixed column on the left. */
.panel {
  position: fixed; z-index: 4; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  max-height: 58svh; display: flex; flex-direction: column;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.1); backdrop-filter: blur(16px) saturate(1.1);
  border: 1px solid var(--hair);
  border-radius: 20px;
  box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--ink-950) 80%, transparent);
  transition: transform 460ms var(--ease), max-height 460ms var(--ease);
}
.grab {
  display: grid; place-items: center; width: 100%; height: 22px; padding: 0; margin: 0;
  background: none; border: 0; cursor: pointer; flex: none;
}
.grab::before { content: ""; width: 40px; height: 4px; border-radius: 999px; background: var(--hair-strong); }
.grab:hover::before { background: var(--text-muted); }
.panel.peek { transform: translateY(calc(100% - 128px)); }
.panel.peek .panel-body { overflow: hidden; }
.panel-body { overflow-y: auto; padding: 4px 16px 12px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.panel-foot {
  display: flex; gap: 8px; align-items: center;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--hair);
}
.panel-foot .grow { flex: 1; }
.panel.enter .panel-body > * { animation: rise 520ms var(--ease) both; }
.panel.enter .panel-body > *:nth-child(2) { animation-delay: 60ms; }
.panel.enter .panel-body > *:nth-child(3) { animation-delay: 120ms; }
.panel.enter .panel-body > *:nth-child(4) { animation-delay: 180ms; }
.panel.enter .panel-body > *:nth-child(n+5) { animation-delay: 240ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (min-width: 900px) {
  .panel {
    left: 24px; right: auto; top: 84px; bottom: 24px; width: var(--panel-w);
    max-height: none; border-radius: 12px;
  }
  .grab { display: none; }
  .panel.peek { transform: none; }
  .panel-body { padding: 28px 28px 16px; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .panel-foot { padding: 14px 28px 18px; }
  .hero { left: calc(var(--panel-w) + 80px); top: 128px; right: 48px; }
  .hero { transition: opacity 400ms var(--ease); }
.hero h1 { font-size: clamp(40px, 4.6vw, 72px); }
  .rail { left: 24px; right: 24px; }
  .top { padding: 0 24px; }
}

/* ---------- type inside the panel ---------- */
.kicker { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-secondary); margin: 0 0 8px; display: flex; gap: 10px; align-items: center; }
.kicker::before { content: ""; width: 16px; height: 2px; background: var(--accent-rule); }
.title { font-family: var(--font-display); font-weight: 500; font-size: clamp(26px, 6.6vw, 36px); line-height: 1.1; margin: 0 0 10px; color: var(--white); letter-spacing: -0.005em; }
.lead { font-size: 17px; color: var(--text-secondary); margin: 0 0 18px; }
.muted { color: var(--text-muted); font-size: 13px; }

/* Sector picker: a two-by-two grid of tiles, each carrying the line-drawing
   of the form that business takes in the scene. */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sector-btn {
  width: 100%; height: 100%; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--navy-800) 60%, transparent);
  border: 1px solid var(--hair);
  transition: border-color var(--motion-base-ms, 200ms) var(--ease), background var(--motion-base-ms, 200ms) var(--ease), transform var(--motion-base-ms, 200ms) var(--ease);
}
.sector-btn:hover, .sector-btn:focus-visible { border-color: var(--action-default); background: color-mix(in srgb, var(--navy-700) 55%, transparent); }
.sector-btn:active { transform: scale(0.98); }
.sector-btn[aria-current="true"] { border-color: var(--action-default); }
.sector-btn .glyph { width: 100%; height: 56px; color: var(--blue-300); margin-bottom: 4px; }
.sector-btn .glyph svg { width: 100%; height: 100%; }
.sector-btn b { font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--white); }
@media (max-width: 899px) {
  .sector-btn > span:not(.glyph) { display: none; }
  .sector-btn .glyph { height: 40px; }
  .sector-btn { padding: 12px; min-height: 104px; justify-content: space-between; }
}
.sector-btn span { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.alt-link { display: inline-block; margin-top: 16px; font-size: 14px; background: none; border: 0; padding: 0; color: var(--action-default); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Points */
.points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.point { padding: 14px; border-radius: 6px; border: 1px solid var(--hair); background: color-mix(in srgb, var(--navy-800) 45%, transparent); }
.point p { margin: 0 0 10px; font-size: 15.5px; line-height: 1.5; color: var(--white); }
.point-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cite {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
  padding: 4px 9px; border-radius: 2px; cursor: pointer;
  color: var(--text-secondary); background: transparent; border: 1px solid var(--hair-strong);
}
.cite:hover { color: var(--white); border-color: var(--action-default); }
.cite svg { width: 13px; height: 13px; }
.tag { font-size: 12px; color: var(--text-muted); }
.tag.sector { color: var(--accent-eyebrow); }

/* Owner: the share hook */
.owner {
  display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center;
  padding: 14px; border-radius: 6px;
  border: 1px dashed var(--hair-strong);
}
.owner p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.owner p b { color: var(--white); font-weight: 600; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 16px; border-radius: 4px; cursor: pointer;
  font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background var(--motion-quick-ms, 120ms) var(--ease), border-color var(--motion-quick-ms, 120ms) var(--ease), color var(--motion-quick-ms, 120ms) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--action-default); color: var(--action-on-action); border: 1px solid var(--action-default); }
.btn-primary:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--action-on-action); }
.btn-ghost { background: transparent; color: var(--white); border: 1px solid var(--hair-strong); }
.btn-ghost:hover { border-color: var(--action-default); color: var(--white); }
.btn-text { background: none; border: 0; color: var(--text-secondary); padding: 10px 8px; min-height: 44px; cursor: pointer; font-weight: 500; }
.btn-text:hover { color: var(--white); }
.btn[disabled] { opacity: 0.4; cursor: default; }
.stack { display: grid; gap: 8px; }

/* Clock */
.dates { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 10px; }
.date { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--hair); cursor: default; }
.date:hover, .date:focus-within { border-color: var(--hair-strong); }
@media (max-width: 899px) { .date { grid-template-columns: 1fr; gap: 4px; } }
.date b { font-family: var(--font-display); font-weight: 500; font-size: 19px; color: var(--white); line-height: 1.2; }
.date p { margin: 0; font-size: 14px; color: var(--text-secondary); }
.date .count { display: block; margin-top: 6px; font-size: 13px; color: var(--text-muted); }

/* Challenge */
.q-count { font-variant-numeric: tabular-nums; }
.options { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.opt {
  width: 100%; text-align: left; padding: 13px 14px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--hair); background: color-mix(in srgb, var(--navy-800) 55%, transparent); color: var(--white); font-size: 15px;
}
.opt:hover:not([disabled]) { border-color: var(--action-default); }
.opt[disabled] { cursor: default; }
.opt { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.opt i { font-style: normal; font-weight: 600; font-size: 12px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--hair-strong); color: var(--text-secondary); }
.opt.right i { border-color: var(--mint-400); color: var(--mint-300); }
.opt.right { border-color: var(--mint-400); background: color-mix(in srgb, var(--mint-700) 40%, transparent); }
.opt.wrong { border-color: var(--hair-strong); opacity: 0.7; text-decoration: line-through; text-decoration-color: var(--text-muted); }
.opt.dim { opacity: 0.5; }
.opt.right.pop { animation: chip-on 420ms var(--ease); }
.opt.right i svg { width: 14px; height: 14px; }
.opt.wrong.shake { animation: shake 360ms var(--ease); }
@keyframes shake { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }
.pips { display: flex; gap: 4px; margin: 0 0 14px; }
.pips span { flex: 1; height: 4px; border-radius: 4px; background: var(--hair); }
.pips span.now { background: var(--action-default); }
.pips span.hit { background: var(--blue-300); }
.pips span.miss { background: color-mix(in srgb, var(--text-muted) 50%, transparent); }
.streak { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; letter-spacing: 0.06em; color: var(--white); border: 1px solid var(--blue-300); background: color-mix(in srgb, var(--blue-500) 30%, transparent); }
.streak.pop { animation: chip-on 420ms var(--ease); }
.explain.is-right { border-left-color: var(--blue-300); }
.score-wrap { position: relative; width: 168px; height: 168px; margin: 4px 0 14px; display: grid; place-items: center; }
.score-wrap .ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.ring path { fill: none; stroke: var(--hair-strong); stroke-width: 6; stroke-linecap: butt; }
.ring path.hit { stroke: var(--blue-300); animation: seg 500ms var(--ease) var(--d, 0ms) both; }
@keyframes seg { from { stroke: var(--hair-strong); opacity: 0.4; } to { opacity: 1; } }
.score-wrap .score { margin: 0; font-size: 64px; }
.explain { padding: 12px 14px; border-left: 2px solid var(--accent-rule); margin: 0 0 14px; font-size: 14.5px; color: var(--text-secondary); }
.explain b { color: var(--white); }
.score { font-family: var(--font-display); font-weight: 500; font-size: 88px; line-height: 1; color: var(--white); margin: 6px 0 10px; font-variant-numeric: tabular-nums; }
.score small { font-size: 0.4em; color: var(--text-muted); }
.review { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; font-size: 14px; }
.review li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: baseline; color: var(--text-secondary); }
.review .ok { color: var(--mint-300); }
.review .no { color: var(--text-muted); }
.review.only-missed li.hit { display: none; }
.review-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 8px; }

/* Ending */
.next-steps { display: grid; gap: 8px; margin: 0 0 18px; }
.forum-links { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--hair); }
.forum-links a { display: flex; justify-content: space-between; gap: 12px; text-decoration: none; color: var(--white); font-weight: 500; }
.forum-links a span { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.fineprint { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.fineprint a { color: var(--text-secondary); }

/* ---------- moves ---------- */
.move {
  position: relative; margin: 0 0 18px; padding: 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--blue-400) 45%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--blue-500) 14%, transparent), color-mix(in srgb, var(--navy-800) 40%, transparent));
}
.move.is-done { border-color: var(--hair-strong); background: color-mix(in srgb, var(--navy-800) 45%, transparent); }
.move.stamp-in { animation: landed 700ms var(--ease) both; }
@keyframes landed { 0% { transform: scale(0.97); box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue-400) 60%, transparent); } 60% { transform: scale(1.01); box-shadow: 0 0 0 10px color-mix(in srgb, var(--blue-400) 0%, transparent); } 100% { transform: none; } }
.move-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-200); }
.move-kicker .stamp { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: color-mix(in srgb, var(--blue-500) 45%, var(--navy-900)); border: 1px solid var(--blue-300); color: var(--white); }
.move-kicker .stamp svg { width: 12px; height: 12px; }
.move.stamp-in .move-kicker .stamp { animation: stamp 620ms var(--ease) both; }
.move-prompt { margin: 0 0 12px; font-size: 15px; line-height: 1.45; color: var(--white); font-weight: 500; }
.move-done { margin: 10px 0 10px; font-size: 14.5px; color: var(--text-secondary); }
.move-done.late { color: var(--white); }
.move-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.move .options { margin-bottom: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 13px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--white);
  border: 1px solid var(--hair-strong); background: color-mix(in srgb, var(--navy-900) 55%, transparent);
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}
.chip svg { width: 14px; height: 14px; }
.chip:hover:not([disabled]) { border-color: var(--action-default); }
.chip:active:not([disabled]) { transform: scale(0.95); }
.chip.on { border-color: var(--blue-300); background: color-mix(in srgb, var(--blue-500) 32%, transparent); animation: chip-on 360ms var(--ease); }
.chip[disabled] { opacity: 0.38; cursor: default; }
@keyframes chip-on { 0% { transform: scale(0.9); } 60% { transform: scale(1.05); } 100% { transform: none; } }

/* Press and hold: the ring fills while held and drains when let go. */
.hold {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 8px 16px 8px 8px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--hair-strong); background: color-mix(in srgb, var(--navy-900) 55%, transparent); color: var(--white);
  font-weight: 600; font-size: 15px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: none;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease);
}
.hold svg { width: 56px; height: 56px; flex: none; transform: rotate(-90deg); }
.hold .track { fill: none; stroke: var(--hair-strong); stroke-width: 3; }
.hold .fill { fill: none; stroke: var(--blue-300); stroke-width: 4; stroke-linecap: round; }
.hold:hover { border-color: var(--action-default); }
.hold.holding { transform: scale(0.98); border-color: var(--blue-300); }

/* The 72-hour race */
.race-clock { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 10px; margin: 0 0 12px; }
.race-clock b { font-family: var(--font-display); font-weight: 500; font-size: 44px; line-height: 1; color: var(--white); font-variant-numeric: tabular-nums; min-width: 2ch; }
.race-clock span { font-size: 13px; color: var(--text-secondary); }
.race-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--hair); overflow: hidden; }
.race-bar i { display: block; height: 100%; background: var(--blue-300); transform-origin: left; }
.race-clock.warn b, .race-clock.warn span { color: var(--white); }
.race-clock.warn .race-bar i { background: var(--white); }
.race-step { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; margin: 0 0 12px; border-radius: 8px; cursor: pointer; border: 1px solid var(--blue-300); background: color-mix(in srgb, var(--blue-500) 22%, transparent); color: var(--white); font-size: 14.5px; font-weight: 500; }
.race-step.on { border-color: var(--hair-strong); background: transparent; color: var(--text-secondary); }
.race-step svg { width: 16px; height: 16px; flex: none; }
.race-step i, .race-then i { font-style: normal; display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--hair-strong); font-size: 12px; font-weight: 600; }
.race-then { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; color: var(--text-secondary); }
.race-then.off { opacity: 0.45; }
.move [data-race="send"], .move [data-race="start"] { width: 100%; margin-top: 12px; }
.move [data-race="start"] { margin-top: 0; }

/* Guess the ceiling */
.guess output { display: block; font-family: var(--font-display); font-weight: 500; font-size: 40px; line-height: 1.1; color: var(--white); font-variant-numeric: tabular-nums; margin: 0 0 8px; }
.guess input[type="range"] { width: 100%; height: 32px; margin: 0; accent-color: var(--action-default); background: transparent; cursor: pointer; }
.guess-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }
.guess .btn { width: 100%; }
.reveal { display: grid; gap: 2px; }
.reveal-num { font-family: var(--font-display); font-weight: 500; font-size: 44px; line-height: 1.1; color: var(--white); font-variant-numeric: tabular-nums; }

.btn-primary.quiet { background: transparent; color: var(--white); border-color: var(--hair-strong); }
.btn-primary.quiet:hover { border-color: var(--action-default); background: transparent; }
.btn-primary.ready { animation: ready 1.6s var(--ease) 2; }
@keyframes ready { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--blue-500) 55%, transparent); } 60% { box-shadow: 0 0 0 10px color-mix(in srgb, var(--blue-500) 0%, transparent); } }

/* Passport at the clock, and on the picker */
.passport { margin: 0 0 22px; padding: 14px; border-radius: 12px; border: 1px solid var(--hair-strong); background: color-mix(in srgb, var(--navy-800) 45%, transparent); }
.passport.complete { border-color: var(--blue-300); background: linear-gradient(180deg, color-mix(in srgb, var(--blue-500) 18%, transparent), color-mix(in srgb, var(--navy-800) 40%, transparent)); }
.passport-seals { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin: 0 0 12px; }
.pseal { display: grid; justify-items: center; gap: 6px; text-align: center; }
.pseal i { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-style: normal; font-size: 12px; font-weight: 600; color: var(--text-muted); border: 1px dashed var(--hair-strong); }
.pseal.stamped i { color: var(--white); border: 1px solid var(--blue-300); background: color-mix(in srgb, var(--blue-500) 45%, var(--navy-900)); animation: stamp 620ms var(--ease) var(--d, 0ms) both; }
.pseal svg { width: 15px; height: 15px; }
.pseal small { font-size: 10.5px; line-height: 1.2; color: var(--text-muted); }
.pseal.stamped small { color: var(--text-secondary); }
@media (max-width: 479px) { .pseal small { display: none; } .passport-seals { margin-bottom: 14px; } }
.passport-head { margin: 0 0 2px; font-family: var(--font-display); font-weight: 500; font-size: 22px; color: var(--white); }
.passport .muted { display: block; margin: 0 0 10px; }
.passport .btn { width: 100%; }
.passport-line { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 14px; font-size: 13.5px; color: var(--text-secondary); }
.passport-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--blue-300); }
.sector-btn { position: relative; }
.walked-mark { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; font-style: normal; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--blue-200); }
.walked-mark svg { width: 12px; height: 12px; }
.sector-btn.walked { border-color: color-mix(in srgb, var(--blue-300) 50%, transparent); }

/* ---------- sheet (quotes, sharing, card) ---------- */
.scrim { position: fixed; inset: 0; z-index: 8; background: color-mix(in srgb, var(--ink-950) 55%, transparent); opacity: 0; pointer-events: none; transition: opacity 260ms var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; max-height: 86svh; overflow-y: auto;
  background: var(--glass-strong); border-top: 1px solid var(--hair-strong); border-radius: 12px 12px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(102%); transition: transform 360ms var(--ease);
}
.sheet.on { transform: none; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; bottom: 50%; width: 560px; border: 1px solid var(--hair-strong); border-radius: 8px; transform: translate(-50%, 60%) scale(0.98); opacity: 0; transition: transform 300ms var(--ease), opacity 300ms var(--ease); }
  .sheet.on { transform: translate(-50%, 50%); opacity: 1; }
}
.sheet h2 { font-family: var(--font-display); font-weight: 500; font-size: 24px; margin: 0 0 10px; color: var(--white); }
.sheet .close { position: absolute; top: 12px; right: 12px; }
blockquote.quote { margin: 0 0 14px; padding: 14px 16px; border-left: 2px solid var(--accent-rule); background: color-mix(in srgb, var(--navy-800) 60%, transparent); font-size: 15px; line-height: 1.6; color: var(--white); }
.src { font-size: 13px; color: var(--text-muted); margin: 0 0 6px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.share-grid .btn { width: 100%; }
.card-preview { width: 100%; height: auto; display: block; border-radius: 4px; border: 1px solid var(--hair); margin: 6px 0 12px; }
.caption { width: 100%; min-height: 96px; resize: vertical; border-radius: 4px; border: 1px solid var(--hair-strong); background: color-mix(in srgb, var(--navy-800) 70%, transparent); color: var(--white); font: inherit; font-size: 14px; padding: 10px 12px; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: all 240ms var(--ease); background: var(--white); color: var(--ink-950); padding: 10px 16px; border-radius: 4px; font-size: 14px; font-weight: 600; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- team mode: a presenter view ---------- */
body.team .panel { width: min(640px, 46vw); }
body.team .title { font-size: 44px; }
body.team .lead { font-size: 21px; }
body.team .point p { font-size: 19px; }
body.team .grab, body.team .owner, body.team .share-only, body.team .alt-link { display: none !important; }
body.team .team-hint { display: block; }
.team-hint { display: none; position: fixed; z-index: 5; right: 24px; bottom: 20px; font-size: 13px; color: var(--text-muted); }

/* ---------- no WebGL / reduced motion ---------- */
body.flat .hero { transition: opacity 400ms var(--ease); }
.hero h1 { max-width: 18ch; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

noscript p { position: fixed; z-index: 6; inset: auto 16px 24px; padding: 16px; border-radius: 8px; background: var(--glass-strong); color: var(--white); }
