/* ============================================================
   UK Youth AI Literacy Programme — Design System (branding3)
   Tokens on :root / :root[data-theme="dark"]. Fixed photo on body::before.
   ============================================================ */

:root {
  color-scheme: light;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);

  /* Light Neutral #F5F6FB — ground; white cards (branding3) */
  --bg: #f5f6fb;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f3f4fb;
  --stroke: rgba(22, 22, 26, 0.10);
  --stroke-strong: rgba(22, 22, 26, 0.18);
  --ink: #16161a;
  --ink-dim: #4a4e57;
  --ink-faint: #6b7280;
  --ink-hover: #0d0d0f;

  /* Soft Indigo #6D5DD3 — primary */
  --accent: #6d5dd3;
  --accent-rgb: 109, 93, 211;
  --accent-hover: #5c4ec4;
  --accent-shadow: rgba(109, 93, 211, 0.28);
  --on-accent: #ffffff;
  --on-accent-rgb: 255, 255, 255;

  /* Dusty Blue #94A3B8 — muted fills; #64748B for icons/text */
  --accent-2: #64748b;
  --accent-2-rgb: 148, 163, 184;
  --accent-3: #c084fc;
  --accent-3-rgb: 192, 132, 252;
  /* Correct / pass — accessible green (not neon) */
  --success: #157a3f;
  --success-rgb: 21, 122, 63;
  --on-success: #ffffff;
  /* Wrong / fail — accessible red (not neon) */
  --error: #c62828;
  --error-rgb: 198, 40, 40;
  --gold: #6d5dd3;

  --overlay-1: rgba(22, 22, 26, 0.02);
  --overlay-2: rgba(22, 22, 26, 0.035);
  --overlay-3: rgba(22, 22, 26, 0.05);
  --overlay-4: rgba(22, 22, 26, 0.07);

  --grad: linear-gradient(120deg, #6d5dd3 0%, #a78bfa 55%, #e879a8 100%);
  --grad-line: linear-gradient(90deg, #6d5dd3 0%, #e879a8 100%);
  --shadow-sm: 0 8px 24px rgba(109, 93, 211, 0.07), 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 16px 40px rgba(109, 93, 211, 0.10), 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-dd: 0 18px 44px rgba(15, 23, 42, 0.12);
  --nav-scrim: rgba(245, 246, 251, 0.88);
  --panel-solid: #ffffff;
  --code-bg: #161618;
  --code-ink: #f5f7fa;

  --btn-ghost-ink: #6d5dd3;
  --btn-ghost-border: #6d5dd3;
  --btn-primary-shadow: 0 4px 14px rgba(109, 93, 211, 0.22);
  --chip-bg: #ffffff;
  --chip-blur: none;
  --card-hover-shadow: 0 16px 40px rgba(109, 93, 211, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);

  /* Inner pages: slightly stronger wash than home so long-form type reads */
  --page-bg-image: url("../img/background-light.png");
  --page-bg-scrim:
    radial-gradient(ellipse 80% 60% at 50% 18%, rgba(245, 246, 251, 0.72), transparent 75%),
    linear-gradient(180deg, rgba(245, 246, 251, 0.42) 0%, rgba(245, 246, 251, 0.58) 48%, rgba(245, 246, 251, 0.72) 100%);

  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d0d0f;
  --bg-elev: #161618;
  --bg-card: #161618;
  --bg-card-hover: #1c1c1f;
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-strong: rgba(91, 75, 219, 0.42);
  --ink: #f5f7fa;
  --ink-dim: #c5c9d1;
  --ink-faint: #8b909c;
  --ink-hover: #ffffff;

  /* Deep Purple #5B4BDB — primary; white label on filled */
  --accent: #5b4bdb;
  --accent-rgb: 91, 75, 219;
  --accent-hover: #6e5fe3;
  --accent-shadow: rgba(91, 75, 219, 0.38);
  --on-accent: #ffffff;
  --on-accent-rgb: 255, 255, 255;

  /* Slate Blue #64748B — muted accent */
  --accent-2: #64748b;
  --accent-2-rgb: 100, 116, 139;
  --accent-3: #e879f9;
  --accent-3-rgb: 232, 121, 249;
  /* Correct / pass — muted green on dark */
  --success: #5dba7a;
  --success-rgb: 93, 186, 122;
  --on-success: #0a1f12;
  /* Wrong / fail — soft red on dark */
  --error: #e57373;
  --error-rgb: 229, 115, 115;
  --gold: #5b4bdb;

  --overlay-1: rgba(255, 255, 255, 0.02);
  --overlay-2: rgba(255, 255, 255, 0.04);
  --overlay-3: rgba(255, 255, 255, 0.06);
  --overlay-4: rgba(91, 75, 219, 0.14);

  --grad: linear-gradient(120deg, #5b4bdb 0%, #a78bfa 55%, #f472b6 100%);
  --grad-line: linear-gradient(90deg, #5b4bdb 0%, #f472b6 100%);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.55);
  --shadow-dd: 0 18px 50px rgba(0, 0, 0, 0.65);
  --nav-scrim: rgba(13, 13, 15, 0.88);
  --panel-solid: #161618;

  --btn-ghost-ink: #f5f7fa;
  --btn-ghost-border: #5b4bdb;
  --btn-primary-shadow: 0 4px 18px rgba(91, 75, 219, 0.32);
  --chip-bg: var(--bg-card);
  --chip-blur: none;
  --card-hover-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 24px rgba(91, 75, 219, 0.10);

  --page-bg-image: url("../img/background-dark.png");
  --page-bg-scrim:
    radial-gradient(ellipse 80% 60% at 50% 18%, rgba(13, 13, 15, 0.62), transparent 75%),
    linear-gradient(180deg, rgba(13, 13, 15, 0.42) 0%, rgba(13, 13, 15, 0.58) 48%, rgba(13, 13, 15, 0.72) 100%);
}

/* Material Symbols — Google's icon system, used in place of unicode glyphs. */
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--bg);
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

body {
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Fixed theme art (inertia-safe — not background-attachment).
   Image swap: --page-bg-image on :root vs :root[data-theme="dark"]. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image: var(--page-bg-scrim), var(--page-bg-image);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
:root[data-theme="dark"] body::before {
  opacity: 0.72;
}
/* Content above fixed bg when inertia wrapper is absent */
body > main,
body > footer,
body > svg {
  position: relative;
  z-index: 1;
}

/* Momentum / Inertia Scrolling vanilla.js (A) — shared overflow + page layer
   https://inertia-momentum-scroll.webflow.io/vanilla-js-a */
.ukail-inertia-viewport {
  position: relative;
}

.ukail-inertia-spacer {
  width: 1px;
  pointer-events: none;
  visibility: hidden;
}

.ukail-inertia-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  will-change: transform;
}

/* Page mode: body height drives native scrollbar; content is fixed + translated */
html.ukail-page--inertia {
  scroll-behavior: auto;
  /* Clip horizontal spill on the viewport, not body — body height must drive window scroll */
  overflow-x: hidden;
}

body.ukail-page--inertia {
  overflow-x: visible;
}

.ukail-page-inertia {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  /* Keep page paint above the tall empty body scroll canvas */
  z-index: 1;
}

/* Fixed chrome stays outside the translated layer (see momentum-scroll.js) */
.ukail-page--inertia > .nav {
  z-index: 100;
  background: var(--bg);
}

::selection { background: rgba(var(--accent-rgb), 0.18); color: var(--ink); }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Prose links: clearly clickable, but elegant — accent text + soft underline. */
main p a:not(.btn):not(.studio-note-chip),
main li a:not(.btn),
.gloss-pop a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(var(--accent-rgb), 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}
main p a:not(.btn):not(.studio-note-chip):hover,
main li a:not(.btn):hover {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}
main p a:not(.btn):not(.studio-note-chip):focus-visible,
main li a:not(.btn):focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { .wrap { padding: 0 16px; } }
@media (max-width: 480px) { .wrap { padding: 0 12px; } }

/* Flat, editorial surface — no ambient blur/glow decoration */
.aurora { display: none; }

/* ---------- Typography (hero display language site-wide) ---------- */
h1, h2, h3,
.h2, .h3,
.display {
  font-family: var(--font-display);
  font-weight: 500;
}
h1, .display { line-height: 1.05; letter-spacing: 0; }
h2, .h2 { line-height: 1.15; letter-spacing: 0; }
h3, .h3 { line-height: 1.3; letter-spacing: 0; }

.display {
  font-size: clamp(2.8rem, 6.5vw, 5.2rem);
}

h1 em, h2 em, h3 em,
.display em, .h2 em, .h3 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: inherit;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--accent);
}

.h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h2.h2 { text-align: center; }

/* Lab / sim instrument chrome — compact utility headings, not section display type */
h2.h3,
.bl-panel h2,
.cg-panel h2,
.lab-pane h2,
.lab-pane h3,
.studio-section-head h3 {
  text-align: left;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h2.h3 em,
.bl-panel h2 em,
.cg-panel h2 em,
.lab-pane h2 em,
.lab-pane h3 em,
.studio-section-head h3 em {
  font-family: inherit;
  font-style: normal;
  font-weight: 600;
  letter-spacing: inherit;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: var(--accent);
}

.h3 { font-size: 1.35rem; }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-dim);
  max-width: 62ch;
  letter-spacing: -0.012em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--accent); }

/* ---------- Nav ---------- */
/* Fixed chrome: opaque theme fill (not page art / inertia layer).
   Clean edge only — no coloured border / stroke / accent hairline. */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg);
  border-bottom: none;
  transition: box-shadow 0.4s var(--ease);
}
.nav.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 28px;
  display: flex; align-items: center; gap: 8px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; letter-spacing: -0.01em;
  min-width: 0; flex-shrink: 1;
  margin-right: auto;
}
.brand span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(42vw, 280px);
}
.brand-mark {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: block;
  flex-shrink: 0;
  object-fit: cover;
}
.brand small { display: block; font-weight: 400; font-size: 0.68rem; color: var(--ink-faint); letter-spacing: 0.08em; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  padding: 8px 14px; border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--ink-dim);
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover { color: var(--ink); background: var(--overlay-3); }
.nav-links a.active { color: var(--ink); background: var(--overlay-4); }
.nav-links a.cta {
  color: var(--on-accent); background: var(--accent); font-weight: 600; margin-left: 8px;
}
.nav-links a.cta:hover { background: var(--accent-hover); }

/* Primary tabs: quiet typographic navigation with an explicit current page. */
.nav-segment {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}
.nav-segment__pill {
  display: none;
}
.nav-segment > a {
  position: relative;
  white-space: nowrap;
  padding: 8px 0;
  border-radius: 0;
  color: var(--ink-dim);
}
.nav-segment > a:hover {
  color: var(--ink);
  background: transparent;
}
.nav-segment > a.active {
  color: var(--ink);
  background: transparent;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}
:root[data-theme="dark"] .nav-segment {
  border: 0;
  background: transparent;
  box-shadow: none;
}
:root[data-theme="dark"] .nav-segment > a {
  color: var(--ink-dim);
}
:root[data-theme="dark"] .nav-segment > a:hover,
:root[data-theme="dark"] .nav-segment > a.active {
  color: #ffffff;
}

/* Days / Start dropdown */
.nav-dd { position: relative; margin-left: 8px; list-style: none; }
.nav-dd-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600; line-height: 1;
  color: var(--on-accent); background: var(--accent);
  box-shadow:
    0 4px 12px rgba(var(--accent-rgb), 0.28),
    0 1px 3px rgba(15, 23, 42, 0.10);
  transition: background 0.25s, box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.nav-dd-btn:hover, .nav-dd.open .nav-dd-btn {
  background: var(--accent-hover);
  color: var(--on-accent);
  box-shadow:
    0 8px 18px rgba(var(--accent-rgb), 0.36),
    0 3px 6px rgba(15, 23, 42, 0.12);
}
.nav-dd-btn:hover { transform: translateY(-2px); }
.nav-dd-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 3px 8px rgba(15, 23, 42, 0.28);
}
:root[data-theme="dark"] .nav-dd-btn {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.50),
    0 1px 3px rgba(var(--accent-rgb), 0.38);
}
:root[data-theme="dark"] .nav-dd-btn:hover,
:root[data-theme="dark"] .nav-dd.open .nav-dd-btn {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.58),
    0 3px 8px rgba(var(--accent-rgb), 0.45);
}
:root[data-theme="dark"] .nav-dd-btn:active {
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.55);
}
.nav-dd-caret {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-top: 5.5px solid currentColor;
  opacity: 0.75;
  transform-origin: 50% 35%;
  transition: transform 0.25s var(--ease);
}
.nav-dd.open .nav-dd-caret { transform: rotate(180deg); }
.nav-dd-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 240px; padding: 8px; margin: 0; list-style: none;
  background: var(--panel-solid);
  border: 1px solid var(--stroke-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-dd); z-index: 120;
}
.nav-dd.open .nav-dd-menu { display: grid; gap: 2px; }
.nav-dd-menu a {
  display: block; padding: 11px 14px; border-radius: 10px;
  font-size: 0.88rem; color: var(--ink-dim); font-weight: 500;
}
.nav-dd-menu a:hover { color: var(--ink); background: var(--overlay-3); }
.nav-dd-menu a small {
  display: block; font-size: 0.7rem; color: var(--ink-faint);
  font-family: var(--font-body); letter-spacing: 0.03em; text-transform: uppercase;
  margin-top: 2px; font-weight: 500;
}

.nav-pathfinder { list-style: none; margin-left: 4px; flex-shrink: 0; }
.nav-links a.nav-pathfinder-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 16px; border-radius: 999px; white-space: nowrap;
  font-size: 0.88rem; font-weight: 600; line-height: 1;
  color: var(--btn-ghost-ink);
  background: transparent;
  border: 1.5px solid var(--btn-ghost-border);
  box-shadow: none;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.15s var(--ease);
}
.nav-links a.nav-pathfinder-btn:hover {
  color: var(--btn-ghost-ink);
  background: rgba(var(--accent-rgb), 0.10);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.nav-links a.nav-pathfinder-btn:focus-visible {
  color: var(--btn-ghost-ink);
  background: rgba(var(--accent-rgb), 0.10);
  border-color: var(--accent);
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.nav-links a.nav-pathfinder-btn:active {
  transform: translateY(1px);
}
.nav-pathfinder-btn .material-symbols-outlined {
  font-size: 16px;
  opacity: 0.78;
}

.nav-actions {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}
.nav-toggle {
  display: none; background: none; border: 1px solid var(--stroke); border-radius: 10px;
  width: 42px; height: 42px; cursor: pointer; color: var(--ink);
  font-size: 1.1rem; line-height: 1;
}
.nav-toggle .material-symbols-outlined { font-size: 22px; }
.nav-scrim { display: none; }
html.nav-locked,
body.nav-locked { overflow: hidden; }
.theme-toggle {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  border: 0; outline: none; background: var(--bg-elev); color: var(--ink); cursor: pointer;
  box-shadow:
    0 4px 12px rgba(15, 23, 42, 0.18),
    0 1px 3px rgba(15, 23, 42, 0.10);
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    box-shadow 0.2s var(--ease), transform 0.15s var(--ease);
}
.theme-toggle:hover {
  color: var(--ink);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.22),
    0 3px 6px rgba(15, 23, 42, 0.12);
}
.theme-toggle:active {
  transform: translateY(1px);
  box-shadow: inset 0 3px 8px rgba(15, 23, 42, 0.22);
}
.theme-toggle:focus-visible {
  border-radius: 50%;
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.theme-toggle .material-symbols-outlined { font-size: 22px; }
:root[data-theme="dark"] .theme-toggle {
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.55),
    0 1px 3px rgba(0, 0, 0, 0.40);
}
:root[data-theme="dark"] .theme-toggle:hover {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.62),
    0 3px 8px rgba(0, 0, 0, 0.45);
}
:root[data-theme="dark"] .theme-toggle:active {
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.60);
}

/* Circular theme reveal — View Transitions API (origin set in main.js).
   Default old/new fades are disabled so the clip-path wipe is the only motion. */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-new(root) {
  z-index: 1;
}

/* Fallback circular wipe (no View Transitions API, or VT skipped).
   Mask radius is driven from main.js; keep this outside the inertia layer. */
.theme-wipe-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

@media (max-width: 900px) {
  .brand span { max-width: min(52vw, 200px); font-size: 0.92rem; }
  .nav-actions { position: relative; z-index: 132; }
  .nav-toggle,
  .theme-toggle {
    width: 44px; height: 44px; min-width: 44px; min-height: 44px;
  }
  .nav-toggle { display: grid; place-items: center; padding: 0; touch-action: manipulation; }
  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 90;
    background: rgba(13, 13, 15, 0.58);
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.22s var(--ease), visibility 0.22s;
  }
  .nav-scrim.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(340px, 88vw); height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 6px;
    background: var(--panel-solid);
    border-left: 1px solid var(--stroke); border-radius: 0;
    box-shadow: -12px 0 36px rgba(13, 13, 15, 0.24);
    padding: 76px 18px 24px;
    display: flex; overflow-y: auto; overscroll-behavior: contain;
    z-index: 125; visibility: hidden; pointer-events: none;
    transform: translateX(104%);
    transition: transform 0.28s var(--ease), visibility 0.28s;
  }
  .nav-links.open { visibility: visible; pointer-events: auto; transform: translateX(0); }
  .nav-links a { min-height: 44px; padding: 11px 14px; display: flex; align-items: center; }
  .nav-links a.cta { margin-left: 0; text-align: center; margin-top: 6px; }
  .nav-segment {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
  }
  .nav-segment > a {
    text-align: left;
    border-radius: 10px;
  }
  .nav-dd { margin-left: 0; margin-top: 6px; width: 100%; }
  .nav-dd-btn { width: 100%; justify-content: center; height: auto; min-height: 0; padding: 13px 16px; line-height: inherit; }
  .nav-dd-menu {
    position: static; min-width: 0; width: 100%;
    margin-top: 6px; box-shadow: none;
  }
  .nav-dd.open .nav-dd-menu { display: grid; }
  .nav-pathfinder { margin-left: 0; margin-top: 6px; width: 100%; }
  .nav-links a.nav-pathfinder-btn {
    width: 100%; height: auto; min-height: 0; padding: 13px 16px; line-height: inherit;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .nav-pathfinder-bbc { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 190px 0 110px;
  border-bottom: none;
  background: transparent;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 34px 0 0; }

.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 0; border: 0; border-radius: 0;
  font-size: 0.8rem; color: var(--ink-dim);
  background: transparent; box-shadow: none;
  font-family: var(--font-mono); user-select: none;
}
a.chip,
.chip:has(> a) {
  padding: 6px 11px; border: 1px solid var(--stroke);
  border-radius: var(--radius-sm); background: var(--chip-bg);
  cursor: pointer; user-select: auto;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
a.chip:hover,
.chip:has(> a):hover {
  background: var(--bg-elev);
  border-color: var(--stroke-strong);
  color: var(--ink);
}
.chip b { color: var(--ink); font-weight: 600; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 8px rgba(var(--success-rgb), 0.4); }

.hero-actions {
  display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px;
  align-items: center;
}

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 12px 24px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 600;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
  cursor: pointer; border: none; font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--btn-primary-shadow);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: var(--accent-hover);
  color: var(--on-accent);
  box-shadow: 0 8px 24px var(--accent-shadow);
}
.btn-ghost {
  background: transparent;
  color: var(--btn-ghost-ink);
  border: 1.5px solid var(--btn-ghost-border);
}
.btn-ghost:hover {
  background: rgba(var(--accent-rgb), 0.10);
  border-color: var(--accent);
  color: var(--btn-ghost-ink);
  transform: translateY(-1px);
}
.btn .arrow {
  display: inline-block;
  width: 0.42em;
  height: 0.42em;
  margin-left: 0.2em;
  border-right: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  transform: rotate(45deg);
  vertical-align: 0.12em;
  transition: transform 0.3s var(--ease);
}
.btn:hover .arrow { transform: rotate(45deg) translate(3px, -3px); }
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.45; cursor: not-allowed; pointer-events: none; transform: none; box-shadow: none;
}

/* ---------- Sections ---------- */
.section { padding: clamp(88px, 11vw, 128px) 0; position: relative; }
.section + .section { border-top: 1px solid transparent; }
/* Headings + under-header leads centred site-wide (home hero treatment).
   Body paragraphs in content blocks stay left-aligned. */
.section-head {
  margin-bottom: clamp(40px, 6vw, 64px);
  display: grid;
  gap: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  justify-items: center;
}
.section-head .eyebrow { justify-content: center; }
.section-head .eyebrow::before { display: none; }
.section-head .lead,
.section-head--center .lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Stats strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--stroke); border: 1px solid var(--stroke); border-radius: var(--radius);
  overflow: hidden; margin-top: 80px; box-shadow: var(--shadow-sm);
}
.stat {
  background: var(--bg-elev); padding: 30px 26px; position: relative;
  transition: background 0.3s var(--ease);
}
.stat::before {
  content: ""; position: absolute; top: 0; left: 26px; right: 26px; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.stat:hover { background: var(--bg-card-hover); }
.stat:hover::before { transform: scaleX(1); }
.stat .num {
  font-family: var(--font-display); font-size: 2.4rem; line-height: 1; font-weight: 600;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.stat .label { font-size: 0.83rem; color: var(--ink-faint); margin-top: 10px; }
@media (max-width: 620px) { .stats { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px 28px 36px;
  box-shadow: var(--shadow-sm);
  transition: none;
  position: relative; overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
}
a.card,
.card:has(.card-cta) {
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
a.card:hover,
.card:has(.card-cta):hover {
  background: var(--bg-card-hover);
  border-color: rgba(var(--accent-rgb), 0.40);
  box-shadow: var(--card-hover-shadow);
}
.card .icon {
  width: 48px; height: 48px; border-radius: 16px; margin-bottom: 20px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  flex-shrink: 0;
}
.card .icon .material-symbols-outlined { font-size: 22px; color: var(--accent); }
.card h3 { margin-bottom: 12px; }
.card p { color: var(--ink-dim); font-size: 0.94rem; line-height: 1.6; }
.card .tag {
  font-family: var(--font-body); font-weight: 600; font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent-2); margin-bottom: 14px; display: block;
}
a.card { color: inherit; text-decoration: none; }
a.card::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 0.5em;
  height: 0.5em;
  border-right: 1.8px solid var(--accent);
  border-top: 1.8px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
a.card:hover::after { transform: rotate(45deg) translate(2px, -2px); }
a.card .card-cta,
.card .card-cta {
  margin-top: auto;
  padding-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
a.card .card-cta .arrow,
.card .card-cta .arrow {
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  border-right: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
a.card:hover .card-cta .arrow,
.card:hover .card-cta .arrow {
  transform: rotate(45deg) translate(2px, -2px);
}

/* ---------- Day journey (landing) ---------- */
.journey { display: grid; gap: 16px; }
.day-row {
  display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 28px;
  background: var(--bg-card); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 28px 32px; box-shadow: var(--shadow-sm);
  transition: background 0.35s, border-color 0.35s, transform 0.35s var(--ease), box-shadow 0.35s;
}
.day-row:hover { background: var(--bg-card-hover); border-color: var(--stroke-strong); transform: translateX(4px); box-shadow: var(--shadow-md); }
.day-row .day-num {
  font-family: var(--font-display); font-size: 0.95rem; color: var(--ink-faint);
}
.day-row .day-num strong {
  display: block; font-weight: 700; font-size: 2rem; color: var(--ink); line-height: 1.15;
}
.day-row h3 { font-size: 1.3rem; margin-bottom: 6px; }
.day-row p { color: var(--ink-dim); font-size: 0.9rem; max-width: 56ch; }
.day-row .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.day-row .go {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--stroke-strong);
  display: grid; place-items: center; font-size: 1.1rem; color: var(--ink-dim);
  transition: all 0.3s var(--ease); flex-shrink: 0;
}
.day-row:hover .go { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.mini-chip {
  font-size: 0.75rem; padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--stroke); color: var(--ink-faint);
  font-family: var(--font-body); font-weight: 500;
}
@media (max-width: 780px) {
  .day-row { grid-template-columns: 1fr; gap: 14px; }
  .day-row .go { display: none; }
}

/* ---------- Progress ring ---------- */
.ring { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.5; }
.ring .track { stroke: var(--stroke-strong); }
.ring .fill { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 0.8s var(--ease); }
.ring .pct {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 0.66rem; font-family: var(--font-body); font-weight: 600; color: var(--ink-dim);
}

/* ---------- Track split ---------- */
.tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 860px) { .tracks { grid-template-columns: 1fr; } }
.track-card {
  border-radius: var(--radius); padding: 44px 38px; position: relative; overflow: hidden;
  border: 1px solid var(--stroke);
}
.track-card.t1 { background: linear-gradient(160deg, rgba(var(--accent-rgb),0.06), rgba(var(--accent-rgb),0.01) 55%); }
.track-card.t2 { background: linear-gradient(160deg, rgba(var(--accent-2-rgb),0.06), rgba(var(--accent-2-rgb),0.01) 55%); }
.track-card h3 { font-size: 1.6rem; margin: 14px 0 14px; }
.track-card p { color: var(--ink-dim); font-size: 0.95rem; }
.track-card ul { margin: 22px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.track-card li { display: flex; gap: 12px; font-size: 0.92rem; color: var(--ink-dim); }
.track-card li::before { content: "\2192"; color: var(--accent-3); flex-shrink: 0; }

/* ---------- Partner marquee ---------- */
.partners { display: flex; flex-wrap: wrap; gap: 14px; }
.partner {
  padding: 18px 28px; border-radius: var(--radius-sm); border: 1px solid var(--stroke);
  background: var(--bg-card); font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em;
  color: var(--ink-dim); transition: all 0.3s;
}
.partner:hover { color: var(--ink); border-color: var(--stroke-strong); }
.partner span { display: block; font-weight: 400; font-size: 0.72rem; color: var(--ink-faint); margin-top: 3px; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
  position: relative; padding: clamp(140px, 16vh, 170px) 0 clamp(56px, 7vw, 72px); border-bottom: none;
  background: transparent;
}
.page-hero .wrap { position: relative; z-index: 1; }
.page-hero .eyebrow {
  justify-content: center;
  width: 100%;
}
.page-hero .eyebrow::before { display: none; }
.page-hero h1,
.hero h1,
.home-hero h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  margin: 18px auto 20px;
  text-align: center;
  max-width: min(22ch, 100%);
}
.page-hero .display {
  text-align: center;
  max-width: min(22ch, 100%);
  margin-left: auto;
  margin-right: auto;
}
.page-hero .meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

/* Centred heroes → centred chip rows, CTA groups, guide rails, day spine
   (match home hero). Do not apply to lab/form toolbars outside .page-hero. */
.page-hero .meta-row,
.page-hero .hero-actions,
.page-hero .cta-actions,
.page-hero .guide-rail,
.page-hero .day-spine {
  justify-content: center;
}
.page-hero .progress-banner {
  margin-left: auto;
  margin-right: auto;
}
.hero .hero-actions,
.hero .cta-actions,
.section-head .hero-actions,
.section-head .cta-actions {
  justify-content: center;
}

.progress-banner {
  margin-top: 40px; display: flex; align-items: center; gap: 20px;
  padding: 20px 26px; border-radius: var(--radius-sm);
  border: 1px solid var(--stroke); background: var(--bg-card); max-width: 520px;
}
.progress-banner .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--stroke); overflow: hidden; }
.progress-banner .bar i { display: block; height: 100%; width: 0%; background: var(--grad); border-radius: 99px; transition: width 0.8s var(--ease); }
.progress-banner .count { font-family: var(--font-body); font-weight: 600; font-size: 0.82rem; color: var(--ink-dim); white-space: nowrap; }

/* Day workbench: one operational surface for cross-day navigation, progress,
   programme tools, and quick references. Built from existing hero elements. */
.day-workbench {
  max-width: 1000px; margin: 36px auto 0;
  border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  background: var(--bg-card); box-shadow: var(--shadow-sm); overflow: hidden;
}
.day-workbench__primary,
.day-workbench__secondary {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 16px;
}
.day-workbench__primary { border-bottom: 1px solid var(--stroke); }
.day-workbench__secondary { background: var(--overlay-1); }
.page-hero .day-workbench .day-spine {
  justify-content: flex-start; flex-wrap: nowrap; min-width: 0; margin: 0;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.page-hero .day-workbench .day-spine::-webkit-scrollbar { display: none; }
.page-hero .day-workbench .day-spine a {
  flex: 0 0 auto; min-height: 36px; padding: 8px 11px;
  border-color: var(--stroke); border-radius: 8px; background: transparent;
}
.page-hero .day-workbench .day-spine a.is-current {
  color: var(--on-accent); border-color: var(--accent); background: var(--accent);
}
.page-hero .day-workbench .day-spine a.is-current .dot { background: var(--on-accent); }
.day-workbench .progress-banner {
  min-width: 190px; max-width: 220px; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent;
}
.day-workbench .progress-banner .bar { height: 5px; }
.day-workbench .workbench-meta,
.page-hero .day-workbench .guide-rail {
  justify-content: flex-start; margin: 0; gap: 8px; min-width: 0;
}
.day-workbench .workbench-meta { flex: 1 1 auto; }
.page-hero .day-workbench .guide-rail { flex: 0 1 auto; }
.day-workbench .workbench-meta .chip,
.day-workbench .guide-rail a {
  padding: 5px 9px; border-radius: 7px; box-shadow: none;
  font-size: 0.74rem; background: transparent;
}
.day-workbench .workbench-meta .chip { border-color: transparent; }

@media (max-width: 760px) {
  .day-workbench { margin-top: 26px; }
  .day-workbench__primary,
  .day-workbench__secondary { align-items: stretch; flex-direction: column; gap: 10px; padding: 11px 12px; }
  .day-workbench .progress-banner { min-width: 0; max-width: none; width: 100%; }
  .day-workbench .workbench-meta,
  .page-hero .day-workbench .guide-rail { width: 100%; }
  .page-hero .day-workbench .guide-rail { padding-top: 10px; border-top: 1px dashed var(--stroke); }
}

/* ---------- Activity cards ---------- */
.activities { display: grid; gap: 24px; }
.activity {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
  transition: border-color 0.35s, box-shadow 0.35s;
  box-shadow: var(--shadow-sm);
}
.activity:hover { box-shadow: var(--card-hover-shadow); }
.activity.done { border-color: rgba(var(--success-rgb), 0.35); }

/* Concept tiles — abstract gradient + icon banners (not photos), so each day
   page reads distinctly and nothing is repeated from the homepage imagery. */
.concept-strip { display: grid; gap: 18px; margin: 0 auto 48px; max-width: 1120px; }
@media (min-width: 780px) { .concept-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.concept-tile {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px;
  border: 1px solid var(--stroke); background: var(--bg-card); box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.concept-tile:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb), 0.45); box-shadow: var(--card-hover-shadow); }
.concept-tile__art {
  position: relative; height: 148px; display: grid; place-items: center; overflow: hidden;
  border-bottom: 1px solid var(--stroke);
  background:
    radial-gradient(ellipse 90% 100% at 18% 12%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    radial-gradient(ellipse 80% 90% at 88% 92%, rgba(var(--accent-3-rgb), 0.16), transparent 55%),
    rgba(var(--accent-rgb), 0.05);
}
.concept-tile--b .concept-tile__art {
  background:
    radial-gradient(ellipse 90% 100% at 18% 12%, rgba(var(--accent-2-rgb), 0.20), transparent 60%),
    radial-gradient(ellipse 80% 90% at 88% 92%, rgba(var(--accent-rgb), 0.14), transparent 55%),
    rgba(var(--accent-2-rgb), 0.05);
}
.concept-tile--c .concept-tile__art {
  background:
    radial-gradient(ellipse 90% 100% at 18% 12%, rgba(var(--accent-3-rgb), 0.22), transparent 60%),
    radial-gradient(ellipse 80% 90% at 88% 92%, rgba(var(--accent-2-rgb), 0.14), transparent 55%),
    rgba(var(--accent-3-rgb), 0.05);
}
.concept-tile__art::before,
.concept-tile__art::after {
  content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.concept-tile__art::before { width: 170px; height: 170px; top: -58px; right: -36px; }
.concept-tile__art::after { width: 100px; height: 100px; bottom: -46px; left: -26px; }
.concept-tile--b .concept-tile__art::before,
.concept-tile--b .concept-tile__art::after { border-color: rgba(var(--accent-2-rgb), 0.2); }
.concept-tile--c .concept-tile__art::before,
.concept-tile--c .concept-tile__art::after { border-color: rgba(var(--accent-3-rgb), 0.2); }
.concept-tile__icon {
  position: relative; z-index: 1; width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center; background: var(--bg-card);
  border: 1px solid rgba(var(--accent-rgb), 0.3); box-shadow: var(--shadow-sm);
}
.concept-tile__icon .material-symbols-outlined { font-size: 28px; color: var(--accent); }
.concept-tile--b .concept-tile__icon { border-color: rgba(var(--accent-2-rgb), 0.35); }
.concept-tile--b .concept-tile__icon .material-symbols-outlined { color: var(--accent-2); }
.concept-tile--c .concept-tile__icon { border-color: rgba(var(--accent-3-rgb), 0.35); }
.concept-tile--c .concept-tile__icon .material-symbols-outlined { color: var(--accent-3); }
.concept-tile__copy { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.concept-tile__copy span {
  font-family: var(--font-body); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase;
  font-weight: 700; color: var(--accent);
}
.concept-tile--b .concept-tile__copy span { color: var(--accent-2); }
.concept-tile--c .concept-tile__copy span { color: var(--accent-3); }
.concept-tile__copy strong { font-size: 1.05rem; line-height: 1.3; color: var(--ink); }

/* Epistemic Complementarity framework panel (day4.html) — animated PEC/REC
   bars + alpha/beta/gamma dials, gated on the existing .reveal/.reveal.in
   scroll-trigger (main.js) so no new JS is needed; animations stay paused
   until the panel actually scrolls into view. */
.epi-panel {
  border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  background: var(--overlay-1); padding: 26px 28px; margin-bottom: 22px;
}
.epi-bars { display: flex; flex-direction: column; gap: 16px; margin-bottom: 18px; }
.epi-bar-row { display: flex; align-items: center; gap: 14px; }
.epi-bar-label {
  width: 96px; flex-shrink: 0; font-family: var(--font-display); font-weight: 700;
  font-size: 0.95rem; color: var(--ink);
}
.epi-bar-label small {
  display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.68rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.05em;
}
.epi-bar-track { flex: 1; height: 14px; border-radius: 999px; background: var(--overlay-3); overflow: hidden; }
.epi-bar-fill {
  display: block; height: 100%; border-radius: 999px; width: 0;
  animation-duration: 1.4s; animation-timing-function: var(--ease); animation-fill-mode: forwards;
  animation-play-state: paused;
}
.epi-bar-fill.pec { background: var(--grad); animation-name: epiFillPec; animation-delay: 0.1s; }
.epi-bar-fill.rec { background: var(--accent-3); animation-name: epiFillRec; animation-delay: 0.5s; }
.reveal.in .epi-bar-fill { animation-play-state: running; }
@keyframes epiFillPec { to { width: 84%; } }
@keyframes epiFillRec { to { width: 44%; } }
.epi-gap-note { font-size: 0.86rem; color: var(--ink-dim); line-height: 1.6; margin: 0; }
.epi-gap-note strong { color: var(--ink); }
.epi-gap-note em { color: var(--ink-faint); font-style: italic; }

.epi-dials { display: grid; gap: 18px; margin-bottom: 4px; }
@media (min-width: 780px) { .epi-dials { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.epi-dial {
  text-align: center; border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  background: var(--bg-card); padding: 22px 18px 20px; box-shadow: var(--shadow-sm);
}
.epi-dial-ring { position: relative; width: 92px; height: 92px; margin: 0 auto 12px; }
.epi-dial-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.epi-dial-ring circle { fill: none; stroke-width: 7; }
.epi-dial-track { stroke: var(--overlay-3); }
.epi-dial-fill {
  stroke-linecap: round; stroke-dasharray: 264; stroke-dashoffset: 264;
  animation: epiDialFill 1.6s var(--ease) forwards; animation-play-state: paused;
}
.reveal.in .epi-dial-fill { animation-play-state: running; }
.epi-dial-fill--a { stroke: var(--accent); animation-delay: 0.1s; }
.epi-dial-fill--b { stroke: var(--accent-2); animation-delay: 0.35s; }
.epi-dial-fill--c { stroke: var(--accent-3); animation-delay: 0.6s; }
@keyframes epiDialFill { to { stroke-dashoffset: 66; } }
.epi-dial-glyph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; color: var(--ink);
}
.epi-dial h4 { font-size: 0.98rem; margin: 4px 0 10px; }
.epi-dial p { font-size: 0.8rem; color: var(--ink-dim); line-height: 1.55; text-align: left; }
.epi-dial p strong { color: var(--ink); }

/* Practical audit field kit (day4.html) — reuses .cheat-grid/.cheat-card for
   the three checks; these are the surrounding step-flow and benchmark parts. */
.audit-steps { display: grid; gap: 18px; margin-bottom: 26px; }
@media (min-width: 780px) { .audit-steps { grid-template-columns: repeat(3, 1fr); } }
.audit-method-note {
  margin: 0 0 26px; padding: 14px 18px; border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: rgba(var(--accent-rgb), 0.06);
  font-size: 0.88rem; color: var(--ink-dim); line-height: 1.55; max-width: 82ch;
}
.audit-method-note strong { color: var(--ink); }
.audit-step { position: relative; padding-left: 50px; }
.audit-step-num {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad); color: var(--on-accent); display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
}
.audit-step h4 { font-size: 0.94rem; margin-bottom: 4px; }
.audit-step p { font-size: 0.82rem; color: var(--ink-dim); line-height: 1.5; margin: 0; }
.audit-example {
  font-size: 0.82rem; font-style: italic; color: var(--ink-dim);
  background: var(--overlay-1); border-left: 3px solid var(--accent-3);
  padding: 8px 12px; border-radius: 6px; margin: 10px 0;
}
.audit-benchmark {
  border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  background: var(--overlay-1); padding: 20px 22px; margin: 8px 0 22px;
}
.audit-benchmark-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--stroke);
}
.audit-benchmark-row:last-of-type { border-bottom: none; }
.audit-benchmark-row b { display: block; font-size: 0.9rem; color: var(--ink); }
.audit-benchmark-row span { display: block; font-size: 0.78rem; color: var(--ink-faint); margin-top: 2px; }
.audit-benchmark-target {
  flex-shrink: 0; text-align: right; font-family: var(--font-display); font-weight: 700;
  font-size: 1.1rem; color: var(--accent); white-space: nowrap;
}
.audit-benchmark-target small {
  display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.66rem;
  color: var(--ink-faint); text-transform: none; white-space: normal;
}
.audit-benchmark-row.is-strict .audit-benchmark-target { color: var(--accent-3); }
.audit-benchmark-note { font-size: 0.82rem; color: var(--ink-dim); margin: 14px 0 0; line-height: 1.55; }

.audit-score {
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card);
  padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.audit-score h4 { font-size: 1.05rem; margin-bottom: 14px; }
.audit-formula {
  display: block; text-align: center; padding: 14px 18px; border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.06); border: 1px dashed rgba(var(--accent-rgb), 0.35);
  font-family: var(--font-mono); font-size: 0.92rem; color: var(--ink); margin-bottom: 18px;
}
.audit-worked {
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--overlay-1);
  padding: 18px 20px; margin-bottom: 16px;
}
.audit-worked p { font-size: 0.86rem; color: var(--ink-dim); margin: 0; line-height: 1.55; }
.audit-worked p + p { margin-top: 8px; }
.audit-worked strong { color: var(--ink); }
.audit-worked-tally { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.audit-tally-dot {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; border: 1.5px solid var(--stroke-strong);
  flex-shrink: 0;
}
.audit-tally-dot.pass { background: rgba(var(--success-rgb), 0.14); border-color: var(--success); color: var(--success); }
.audit-tally-dot.fail { background: rgba(var(--error-rgb), 0.12); border-color: var(--error); color: var(--error); }
.audit-score-why { font-size: 0.82rem; color: var(--ink-faint); line-height: 1.55; margin: 0 0 18px; }
.audit-fair-tip {
  font-size: 0.84rem; color: var(--ink-dim); line-height: 1.6; margin: 16px 0 0;
  padding-top: 16px; border-top: 1px dashed var(--stroke);
}
.audit-fair-tip strong { color: var(--ink); }

/* Interactive tally — students type passes/trials, saved on this device. */
.audit-calc {
  border: 1px solid var(--stroke); border-radius: var(--radius-sm);
  background: var(--overlay-1); padding: 20px 22px; margin: 0 0 22px;
}
.audit-calc h5 { font-size: 0.95rem; margin: 0 0 6px; }
.audit-calc-lead { font-size: 0.82rem; color: var(--ink-dim); line-height: 1.55; margin: 0 0 12px; }
.audit-calc-row {
  display: grid; grid-template-columns: 1fr; gap: 12px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--stroke);
}
@media (min-width: 760px) {
  .audit-calc-row { grid-template-columns: minmax(0, 1fr) auto 150px; gap: 18px; }
  .audit-calc-out { text-align: right; }
}
.audit-calc-row:last-of-type { border-bottom: none; }
.audit-calc-name b { display: block; font-size: 0.9rem; color: var(--ink); }
.audit-calc-name small { display: block; font-size: 0.74rem; color: var(--ink-faint); margin-top: 2px; }
.audit-calc-fields { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.audit-calc-fields label {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-faint);
}
.audit-calc-fields input {
  width: 64px; padding: 8px 10px; text-align: center;
  border: 1px solid var(--stroke-strong); border-radius: var(--radius-sm);
  background: var(--bg-elev); color: var(--ink);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
}
.audit-calc-fields input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.audit-calc-pct {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 1.25rem; line-height: 1.2; color: var(--ink-faint);
}
.audit-calc-verdict { display: block; font-size: 0.72rem; color: var(--ink-faint); margin-top: 2px; }
.audit-calc-row.is-pass .audit-calc-pct,
.audit-calc-row.is-pass .audit-calc-verdict { color: var(--success); }
.audit-calc-row.is-fail .audit-calc-pct,
.audit-calc-row.is-fail .audit-calc-verdict { color: var(--error); }
.audit-calc-row.is-incomplete .audit-calc-pct,
.audit-calc-row.is-incomplete .audit-calc-verdict { color: var(--accent-2); }
.audit-calc-row.is-invalid .audit-calc-verdict { color: var(--error); }
.audit-calc-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--stroke);
}
.audit-calc-summary { font-size: 0.82rem; color: var(--ink-dim); margin: 0; }
.audit-calc-actions { display: flex; align-items: center; gap: 12px; }
.audit-calc .saved-note { font-size: 0.74rem; color: var(--success); visibility: hidden; }
.audit-calc .saved-note.show { visibility: visible; }
.audit-calc-clear {
  background: none; border: 1px solid var(--stroke-strong); border-radius: 999px;
  padding: 6px 14px; font-family: var(--font-body); font-size: 0.76rem;
  color: var(--ink-dim); cursor: pointer;
}
.audit-calc-clear:hover { border-color: var(--accent); color: var(--accent); }

.activity-head {
  display: flex; align-items: flex-start; gap: 24px; padding: 36px 38px 0;
}
.activity-head .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex-shrink: 0; margin-top: 4px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.activity-head .icon .material-symbols-outlined { font-size: 22px; color: var(--accent); }
.activity-num {
  font-family: var(--font-display); font-weight: 700; font-size: 2.6rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--ink-faint); flex-shrink: 0; margin-top: 2px;
}
.activity.done .activity-num { -webkit-text-stroke: 1px var(--success); }
.activity-head h3 { font-size: 1.45rem; margin-bottom: 8px; }
.activity-head .layer-tag,
.layer-tag {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--accent-2); display: block; margin-bottom: 8px;
}
.activity-body { padding: 26px 38px 34px; display: grid; gap: 18px; }
@media (min-width: 880px) { .activity-body.cols { grid-template-columns: 1fr 1fr; gap: 20px; } }

.block {
  border-radius: var(--radius-sm); padding: 24px 26px; border: 1px solid var(--stroke);
  background: var(--overlay-1);
}
.block .block-label {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 12px; display: flex; align-items: center; gap: 8px;
}
.block.theory .block-label { color: var(--accent); }
.block.action .block-label { color: var(--accent-3); }
.block.theory .block-label::before {
  content: "";
  width: 0.5em;
  height: 0.5em;
  background: currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
}
.block.action .block-label::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 0.28em solid transparent;
  border-bottom: 0.28em solid transparent;
  border-left: 0.45em solid currentColor;
  flex-shrink: 0;
}
.block p { font-size: 0.92rem; color: var(--ink-dim); }
.block ol, .block ul { margin: 4px 0 0 20px; font-size: 0.92rem; color: var(--ink-dim); display: grid; gap: 8px; }

.activity-foot {
  border-top: 1px solid var(--stroke); padding: 18px 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.tool-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.check {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: 0.85rem; color: var(--ink-dim); user-select: none;
  padding: 9px 18px; border-radius: 999px; border: 1px solid var(--stroke-strong);
  transition: all 0.3s;
}
.check input { display: none; }
.check .box {
  width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--ink-faint);
  display: grid; place-items: center; color: transparent; transition: all 0.25s;
}
.check .box::after {
  content: "";
  width: 4px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}
.check:hover { border-color: var(--stroke-strong); color: var(--ink); }
.check.checked { border-color: rgba(var(--success-rgb), 0.4); color: var(--success); background: rgba(var(--success-rgb), 0.06); }
.check.checked .box { background: var(--success); border-color: var(--success); color: var(--on-success); }

/* ---------- Day pager ---------- */
.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 70px; }
.pager a {
  flex: 1; max-width: 380px; padding: 26px 30px; border-radius: var(--radius);
  border: 1px solid var(--stroke); background: var(--bg-card);
  transition: all 0.3s var(--ease);
}
.pager a:hover { border-color: var(--stroke-strong); background: var(--bg-card-hover); transform: translateY(-3px); }
.pager a.next { text-align: right; margin-left: auto; }
.pager small { font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); }
.pager .title { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-top: 8px; }

/* ---------- Tables (frameworks) ---------- */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--stroke); border-radius: var(--radius);
}
table.fw {
  width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 760px;
  background: var(--bg-card);
}
table.fw th {
  text-align: left; padding: 18px 22px; font-family: var(--font-body);
  font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--accent);
  border-bottom: 1px solid var(--stroke-strong); background: var(--overlay-1);
  font-weight: 700;
}
table.fw td { padding: 20px 22px; color: var(--ink-dim); border-bottom: 1px solid var(--stroke); vertical-align: top; }
table.fw tr:last-child td { border-bottom: none; }
table.fw td strong { color: var(--ink); font-weight: 600; }
table.fw tr { transition: background 0.25s; }
table.fw tbody tr:hover { background: var(--overlay-1); }

/* ---------- Judging rubric (hackathon.html) ---------- */
.rubric-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
table.rubric { width: 100%; min-width: 980px; border-collapse: collapse; }
table.rubric th, table.rubric td {
  padding: 18px 20px; vertical-align: top; text-align: left;
  border-bottom: 1px solid var(--stroke); border-right: 1px solid var(--stroke);
  font-size: 0.84rem; color: var(--ink-dim); line-height: 1.55;
}
table.rubric th:last-child, table.rubric td:last-child { border-right: none; }
table.rubric tbody tr:last-child td, table.rubric tbody tr:last-child th { border-bottom: none; }
table.rubric thead th { background: var(--bg-elev); padding: 16px 20px; border-bottom: 1px solid var(--stroke-strong); }
.rubric-criterion {
  font-family: var(--font-body); font-weight: 700; font-size: 0.92rem; color: var(--ink);
  width: 200px; background: var(--overlay-1);
}
.rubric-criterion small { display: block; font-weight: 500; font-size: 0.74rem; color: var(--ink-faint); margin-top: 6px; line-height: 1.4; }
.rubric-band {
  display: inline-block; font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px;
}
.rubric-band.is-exemplary { background: rgba(var(--success-rgb), 0.14); color: var(--success); }
.rubric-band.is-proficient { background: rgba(var(--accent-rgb), 0.12); color: var(--accent); }
.rubric-band.is-developing { background: rgba(var(--accent-2-rgb), 0.16); color: var(--accent-2); }
.rubric-band.is-beginning { background: rgba(var(--error-rgb), 0.10); color: var(--error); }
table.rubric tbody tr:hover td { background: var(--overlay-1); }

.source-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  font-size: 0.82rem; color: var(--accent); border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}
.source-link::before { content: "\2197"; font-size: 0.92em; }
.source-link:hover { border-bottom-color: var(--accent); }

/* Attribution for work that is not publicly available yet: credited, not linked. */
.source-cite {
  display: block; margin-top: 18px;
  font-size: 0.82rem; color: var(--ink-faint); line-height: 1.5;
}
.source-cite cite { font-style: italic; color: var(--ink-dim); }

/* ---------- Phase timeline (hackathon) ---------- */
.phases { display: grid; gap: 0; position: relative; }
.phase {
  display: grid; grid-template-columns: 72px 1fr; gap: 30px; padding: 40px 0;
  position: relative;
}
.phase + .phase { border-top: 1px dashed var(--stroke); }
.phase-marker {
  width: 56px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 700;
  font-size: 1.35rem; background: var(--grad); color: var(--on-accent);
}
.phase h3 { font-size: 1.5rem; margin-bottom: 10px; }
.phase p { color: var(--ink-dim); max-width: 68ch; }
.phase .tool-pills { margin-top: 18px; }

/* ---------- CTA band (branded surface over photo bg) ---------- */
.cta-band {
  position: relative; border-radius: 36px; overflow: hidden;
  padding: clamp(48px, 7vw, 80px) clamp(28px, 6vw, 64px); text-align: center;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(var(--accent-rgb), 0.14), transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(var(--accent-2-rgb), 0.10), transparent 50%),
    var(--bg-elev);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}
.cta-band::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--grad-line);
  opacity: 0.9;
}
.cta-band .eyebrow { justify-content: center; color: var(--accent); }
.cta-band .eyebrow::before { background: var(--accent); }
.cta-band h2 { font-size: clamp(1.85rem, 4vw, 3rem); margin-bottom: 16px; color: var(--ink); }
.cta-band p { color: var(--ink-dim); max-width: 54ch; margin: 0 auto 32px; }
.cta-band .cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}
.cta-band .btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--btn-primary-shadow);
}
.cta-band .btn-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
  box-shadow: 0 8px 24px var(--accent-shadow);
}
.cta-band--split {
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 40px;
}
.cta-band--split > div:first-child { flex: 1 1 280px; max-width: 640px; }
.cta-band--split h2,
.cta-band--split h2.h2 { margin-bottom: 10px; text-align: left; }
.cta-band--split p { margin: 0; max-width: 48ch; }
.cta-band--split .cta-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}
@media (max-width: 720px) {
  .cta-band--split { text-align: center; }
  .cta-band--split > div:first-child { max-width: none; }
  .cta-band--split h2,
  .cta-band--split h2.h2 { text-align: center; }
  .cta-band--split p { margin-left: auto; margin-right: auto; }
  .cta-band--split .cta-actions { justify-content: center; width: 100%; }
}

/* ---------- Experience brief ---------- */
.experience-brief { padding: 36px 0 0; }
.experience-brief > .wrap {
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}
.experience-brief__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 32px;
  align-items: end;
  padding: 25px 26px 22px;
  border-bottom: 1px solid var(--stroke);
}
.experience-brief__head .eyebrow { grid-column: 1 / -1; }
.experience-brief__head h2 {
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.25;
}
.experience-brief__head > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 54ch;
  color: var(--ink-dim);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: right;
  text-decoration-color: rgba(var(--accent-rgb), 0.42);
  text-underline-offset: 3px;
}
.experience-brief__head > a .material-symbols-outlined {
  flex: 0 0 auto;
  font-size: 16px;
}
.experience-brief__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}
.experience-brief__grid > div {
  min-width: 0;
  padding: 20px 22px;
  border-left: 1px solid var(--stroke);
}
.experience-brief__grid > div:first-child { border-left: 0; }
.experience-brief__grid dt {
  color: var(--accent);
  font: 600 0.64rem/1.3 var(--font-mono);
  text-transform: uppercase;
}
.experience-brief__grid dd {
  margin: 7px 0 0;
  color: var(--ink-dim);
  font-size: 0.76rem;
  line-height: 1.5;
}
.experience-brief__flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--stroke);
  background: var(--bg-elev);
  list-style: none;
  counter-reset: experience-flow;
}
.experience-brief__flow li {
  position: relative;
  min-width: 0;
  padding: 13px 26px 13px 34px;
  color: var(--ink-dim);
  font: 600 0.66rem/1.4 var(--font-mono);
  counter-increment: experience-flow;
}
.experience-brief__flow li::before {
  content: counter(experience-flow, decimal-leading-zero);
  position: absolute;
  left: 12px;
  color: var(--accent);
  font-size: 0.58rem;
}
.experience-brief__flow li::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--ink-faint);
  border-right: 1px solid var(--ink-faint);
  transform: translateY(-50%) rotate(45deg);
}
.experience-brief__flow li:last-child::after { display: none; }

body.executive-navigation #ukail-guide-bot {
  display: none;
}

@media (max-width: 900px) {
  .experience-brief__head {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .experience-brief__head .eyebrow { grid-column: auto; }
  .experience-brief__head > a { text-align: left; }
  .experience-brief__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .experience-brief__grid > div:nth-child(3) { border-left: 0; }
  .experience-brief__grid > div:nth-child(n + 3) { border-top: 1px solid var(--stroke); }
}
@media (max-width: 620px) {
  .experience-brief { padding-top: 20px; }
  .experience-brief__head,
  .experience-brief__grid > div { padding-inline: 18px; }
  .experience-brief__grid { grid-template-columns: 1fr; }
  .experience-brief__grid > div,
  .experience-brief__grid > div:nth-child(3) {
    border-top: 1px solid var(--stroke);
    border-left: 0;
  }
  .experience-brief__grid > div:first-child { border-top: 0; }
  .experience-brief__flow { grid-template-columns: 1fr; }
  .experience-brief__flow li {
    padding-left: 42px;
    border-top: 1px solid var(--stroke);
  }
  .experience-brief__flow li:first-child { border-top: 0; }
  .experience-brief__flow li::before { left: 18px; }
  .experience-brief__flow li::after {
    top: auto;
    right: auto;
    bottom: -4px;
    left: 20px;
    transform: rotate(135deg);
  }
}

/* ---------- Footer ---------- */
/* Solid theme bar over fixed page art; stays in document flow (not viewport-fixed). */
footer {
  border-top: 1px solid var(--stroke);
  padding: 70px 0 50px;
  margin-top: clamp(72px, 10vw, 110px);
  background: var(--bg);
  position: relative;
  z-index: 2;
  /* Opaque over fixed page art — stable in light/dark and under page inertia */
  isolation: isolate;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
@media (max-width: 980px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 780px) { .foot-grid { grid-template-columns: 1fr; } }
footer h4 { font-size: 0.78rem; font-family: var(--font-body); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 18px; font-weight: 700; }
footer ul { list-style: none; display: grid; gap: 10px; }
footer ul a { color: var(--ink-dim); font-size: 0.9rem; transition: color 0.25s; }
footer ul a:hover { color: var(--ink); }
.foot-brand p { color: var(--ink-faint); font-size: 0.86rem; max-width: 40ch; margin-top: 16px; }
.foot-bottom {
  margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--stroke);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 0.78rem; color: var(--ink-faint);
}
.foot-bottom a.foot-judging {
  color: inherit;
  font-size: inherit;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.foot-bottom a.foot-judging:hover {
  color: var(--ink-dim);
}
.foot-bottom a.foot-judging:focus-visible {
  outline: 2px solid var(--stroke);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Reveal animation ----------
   Heavy scroll reveals opt out via ?motion=0 / ukail-motion=0 (html.ukail-motion-off),
   not prefers-reduced-motion — same Windows animation-toggle caveat as theme wipe / inertia. */
.reveal {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.reveal-d1 { --reveal-delay: 0.07s; }
.reveal-d2 { --reveal-delay: 0.14s; }
.reveal-d3 { --reveal-delay: 0.21s; }

/* Hero load entrance: slightly softer rise; stagger delays set in JS / markup */
.page-hero .reveal,
.hero .reveal,
.home-hero .reveal {
  transform: translate3d(0, 16px, 0);
  transition-duration: 0.8s, 0.8s;
}
.page-hero .reveal-d1,
.hero .reveal-d1,
.home-hero .reveal-d1 { --reveal-delay: 0.08s; }
.page-hero .reveal-d2,
.hero .reveal-d2,
.home-hero .reveal-d2 { --reveal-delay: 0.16s; }
.page-hero .reveal-d3,
.hero .reveal-d3,
.home-hero .reveal-d3 { --reveal-delay: 0.24s; }

html.ukail-motion-off .reveal {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

@media (prefers-reduced-motion: reduce) {
  /* Intentionally do NOT disable .reveal here — see note above. */
  html { scroll-behavior: auto; }
  .theme-toggle, .theme-toggle:hover, .theme-toggle:active,
  .nav-dd-btn, .nav-dd-btn:hover, .nav-dd-btn:active,
  .nav-links a.nav-pathfinder-btn, .nav-links a.nav-pathfinder-btn:hover, .nav-links a.nav-pathfinder-btn:active { transform: none; }
}

/* ---------- Accessibility: skip link, focus visibility, screen-reader-only text ---------- */
.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;
}
.skip-link {
  position: absolute; top: -100px; left: 16px; z-index: 999;
  background: var(--ink); color: var(--bg);
  padding: 14px 22px; border-radius: 10px;
  font-weight: 600; font-size: 0.92rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Interactive controls with their own visual state on focus still get a clear ring */
.chip:focus-visible, .mini-chip:focus-visible, .check:focus-visible,
.day-row:focus-visible, .card:focus-visible, .ring:focus-visible {
  outline-offset: 4px;
}

/* ---------- Print ---------- */
@media print {
  .nav, .theme-toggle, .nav-toggle, .aurora, .guide-rail, .skip-link,
  footer, .day-spine, .btn, .pager, .check { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; }
  .activity { break-inside: avoid; border-color: #999; }
  .section { padding: 16px 0; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 0.75em; }
}

/* ---------- Day spine (cross-day wayfinding on day pages) ---------- */
.day-spine { display: flex; align-items: center; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.day-spine a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stroke-strong);
  font-size: 0.8rem; font-weight: 600; color: var(--ink-dim);
  background: var(--overlay-1); transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.day-spine a .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--stroke-strong); flex-shrink: 0; }
.day-spine a.is-done .dot { background: var(--success); }
.day-spine a.is-current { color: var(--ink); border-color: var(--accent); background: rgba(var(--accent-rgb), 0.08); }
.day-spine a.is-current .dot { background: var(--accent); }
.day-spine a:hover { border-color: var(--ink); color: var(--ink); }
@media (max-width: 640px) { .day-spine .label-full { display: none; } }

/* ---------- Resume wayfinding (resume.js) ---------- */
.resume-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap;
  background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02) 60%);
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: var(--radius);
  padding: 18px 22px; margin: 0 0 26px;
}
.resume-banner__text { display: flex; flex-direction: column; gap: 3px; min-width: 200px; }
.resume-banner__text .eyebrow { margin-bottom: 2px; }
.resume-banner__text strong { font-family: var(--font-display); font-size: 1.05rem; }
.resume-banner__sub { color: var(--ink-dim); font-size: 0.84rem; }
.resume-banner .btn { flex-shrink: 0; }

.next-beacon {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 4px 38px 0;
  font-size: 0.8rem; font-weight: 700; color: var(--accent);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.22);
}
.next-beacon::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  animation: nextPulse 1.6s ease-in-out infinite;
}
.next-beacon[role="note"] { cursor: default; }
@keyframes nextPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
@media (max-width: 640px) { .next-beacon { margin: 4px 22px 0; } }
@media (prefers-reduced-motion: reduce) { .next-beacon::before { animation: none; } }

/* ---------- Inline glossary popovers ---------- */
.gloss-term {
  border: none; border-bottom: 1px dashed var(--accent); color: inherit; font: inherit;
  background: none; padding: 0; cursor: help; position: relative;
}
.gloss-term:hover, .gloss-term:focus-visible { border-bottom-style: solid; }
.gloss-pop {
  position: absolute; z-index: 200; width: max-content; max-width: 280px;
  background: var(--panel-solid); border: 1px solid var(--stroke-strong);
  border-radius: 10px; padding: 12px 14px; box-shadow: var(--shadow-dd);
  font-size: 0.82rem; line-height: 1.5; color: var(--ink-dim); text-align: left;
  bottom: calc(100% + 8px); left: 0;
}
.gloss-pop b { color: var(--ink); display: block; margin-bottom: 4px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; }
.gloss-pop[hidden] { display: none; }
.gloss-pop--below { bottom: auto; top: calc(100% + 8px); }

/* ---------- Artefact capture (optional evidence box under an activity) ---------- */
.artefact-box { margin-top: 14px; }
.artefact-box label {
  display: block; font-size: 0.76rem; font-weight: 700; color: var(--ink-faint);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.04em;
}
.artefact-box textarea {
  width: 100%; min-height: 72px; resize: vertical;
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--bg-elev);
  color: var(--ink); font-family: var(--font-body); font-size: 0.88rem; padding: 12px 14px;
}
.artefact-box .saved-note { font-size: 0.74rem; color: var(--success); margin-top: 6px; visibility: hidden; }
.artefact-box .saved-note.show { visibility: visible; }

/* ---------- Guide kit (tools, probes, starters, dictionary, labs) ---------- */
.guide-rail {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px;
}
.guide-rail a {
  font-size: 0.78rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--stroke-strong); color: var(--ink-dim);
  background: var(--overlay-1); transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.guide-rail a:hover, .guide-rail a.is-here {
  color: var(--ink); border-color: var(--ink); background: var(--overlay-3);
}

.setup-list { display: grid; gap: 14px; margin-top: 8px; }
.setup-item {
  display: grid; grid-template-columns: 48px 1fr; gap: 20px; align-items: start;
  padding: 26px 28px; border-radius: var(--radius);
  border: 1px solid var(--stroke); background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.setup-item:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-1px);
}
.setup-item .n {
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  color: transparent; -webkit-text-stroke: 1px var(--accent); line-height: 1;
}
.setup-item .icon {
  width: 48px; height: 48px; border-radius: 16px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.setup-item .icon .material-symbols-outlined { font-size: 22px; color: var(--accent); }
.setup-item h3 { font-size: 1.12rem; margin-bottom: 6px; }
.setup-item p { color: var(--ink-dim); font-size: 0.92rem; line-height: 1.6; }
.setup-item ul { margin: 10px 0 0 18px; color: var(--ink-dim); font-size: 0.9rem; display: grid; gap: 6px; }

.tool-card .tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tool-card .when { margin-top: 14px; font-size: 0.82rem; color: var(--ink-faint); font-family: var(--font-body); font-weight: 500; }

/* ---------- Misalignment sorter (misalignment-sorter.html) ---------- */
.sorter-progress {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-faint); margin-bottom: 18px;
}
.sorter-card {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 32px; box-shadow: var(--shadow-sm);
}
.sorter-scenario { font-size: 1.15rem; line-height: 1.5; color: var(--ink); margin-bottom: 26px; }
.sorter-options { display: grid; gap: 10px; }
@media (min-width: 700px) { .sorter-options { grid-template-columns: repeat(2, 1fr); } }
.sorter-opt {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 13px 16px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--stroke-strong); background: var(--overlay-1); color: var(--ink);
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 500;
  transition: background 0.2s, border-color 0.2s;
}
.sorter-opt:hover:not(:disabled) { background: var(--overlay-2); border-color: var(--stroke-strong); }
.sorter-opt-num {
  flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.1); color: var(--accent); font-size: 0.76rem; font-weight: 700;
}
.sorter-opt:disabled { cursor: default; opacity: 0.6; }
.sorter-opt.is-correct { opacity: 1; border-color: rgba(var(--success-rgb), 0.5); background: rgba(var(--success-rgb), 0.1); }
.sorter-opt.is-correct .sorter-opt-num { background: rgba(var(--success-rgb), 0.2); color: var(--success); }
.sorter-opt.is-wrong { opacity: 1; border-color: rgba(var(--error-rgb), 0.5); background: rgba(var(--error-rgb), 0.08); }
.sorter-opt.is-wrong .sorter-opt-num { background: rgba(var(--error-rgb), 0.18); color: var(--error); }
.sorter-feedback { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--stroke); }
.sorter-verdict { font-weight: 700; margin-bottom: 8px; }
.sorter-verdict.is-pass { color: var(--success); }
.sorter-verdict.is-fail { color: var(--error); }
.sorter-explain { color: var(--ink-dim); font-size: 0.9rem; margin-bottom: 20px; }
.sorter-summary-score { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent); margin: 10px 0 20px; }

.probe {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.probe-head {
  padding: 26px 28px 0; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap;
}
.probe-head h3 { font-size: 1.25rem; }
.probe-head .icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.probe-head .icon .material-symbols-outlined { font-size: 20px; color: var(--accent); }
.probe-grid {
  display: grid; gap: 12px; padding: 20px 28px 26px;
}
@media (min-width: 880px) {
  .probe-grid { grid-template-columns: 1.2fr 1fr 1fr; }
}
.probe-pane {
  border-radius: var(--radius-sm); padding: 18px 18px 16px;
  border: 1px solid var(--stroke); background: var(--overlay-1);
}
.probe-pane .block-label {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.probe-pane.say .block-label { color: var(--accent); }
.probe-pane.pass .block-label { color: var(--success); }
.probe-pane.fail .block-label { color: var(--error); }
.probe-pane.say .block-label::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 0.28em solid transparent;
  border-bottom: 0.28em solid transparent;
  border-left: 0.45em solid currentColor;
  flex-shrink: 0;
}
.probe-pane.pass .block-label::before {
  content: "";
  width: 0.42em;
  height: 0.7em;
  border: solid currentColor;
  border-width: 0 0.16em 0.16em 0;
  transform: rotate(45deg);
  margin: 0 0.15em 0.2em 0.1em;
  flex-shrink: 0;
}
.probe-pane.fail .block-label::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  flex-shrink: 0;
  background:
    linear-gradient(45deg, transparent calc(50% - 0.08em), currentColor calc(50% - 0.08em), currentColor calc(50% + 0.08em), transparent calc(50% + 0.08em)),
    linear-gradient(-45deg, transparent calc(50% - 0.08em), currentColor calc(50% - 0.08em), currentColor calc(50% + 0.08em), transparent calc(50% + 0.08em));
}
.probe-pane p, .probe-pane li { font-size: 0.88rem; color: var(--ink-dim); }
.probe-foot {
  border-top: 1px solid var(--stroke); padding: 14px 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.82rem; color: var(--ink-faint);
}

.copy-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--stroke-strong); background: transparent;
  color: var(--ink-dim); font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.copy-btn:hover { color: var(--ink); border-color: var(--ink); }
.copy-btn.copied { color: var(--success); border-color: rgba(var(--success-rgb), 0.4); background: rgba(var(--success-rgb), 0.06); }

.starter {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden;
}
.starter-head { padding: 26px 28px 12px; }
.starter-head .icon {
  width: 42px; height: 42px; border-radius: var(--radius-sm); flex-shrink: 0; margin-top: 2px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.starter-head .icon .material-symbols-outlined { font-size: 20px; color: var(--accent); }
.starter-head h3 { font-size: 1.25rem; margin-bottom: 8px; }
.starter-head p { color: var(--ink-dim); font-size: 0.92rem; max-width: 68ch; }
.starter pre {
  margin: 0 28px 18px; padding: 18px 20px; border-radius: var(--radius-sm);
  border: none; background: var(--code-bg);
  font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.55;
  color: var(--code-ink); white-space: pre-wrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.starter-foot {
  border-top: 1px solid var(--stroke); padding: 14px 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
}

.dict-list { display: grid; gap: 14px; }
.dict-entry {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 26px 28px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.dict-entry:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--card-hover-shadow);
}
.dict-entry h3 { font-size: 1.15rem; margin-bottom: 8px; }
.dict-entry .plain { color: var(--ink); font-size: 0.95rem; margin-bottom: 10px; }
.dict-entry .why, .dict-entry .when { color: var(--ink-dim); font-size: 0.88rem; }
.dict-entry .when { margin-top: 8px; font-family: var(--font-body); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-2); }

.field-guide { display: grid; gap: 16px; }
.field-row {
  display: grid; gap: 12px; padding: 26px 28px;
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card);
}
@media (min-width: 900px) {
  .field-row { grid-template-columns: 1.1fr 1fr 1fr; }
}
.field-row h3 { font-size: 1.2rem; margin-bottom: 10px; grid-column: 1 / -1; }
.field-col .block-label { margin-bottom: 10px; }
.field-col ul { margin: 0 0 0 18px; color: var(--ink-dim); font-size: 0.88rem; display: grid; gap: 6px; }
.field-col.must .block-label { color: var(--accent-3); }
.field-col.ok .block-label { color: var(--accent); }
.field-col.miss .block-label { color: var(--error); }

/* ---------- Project Card studio (interactive, autosaved) ---------- */
.studio {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); overflow: hidden; margin-bottom: 28px;
}
.studio-bar {
  display: flex; align-items: center; gap: 16px; padding: 22px 28px;
  border-bottom: 1px solid var(--stroke); flex-wrap: wrap;
}
.studio-bar .bar { flex: 1; min-width: 160px; height: 8px; border-radius: 99px; background: var(--stroke); overflow: hidden; }
.studio-bar .bar i { display: block; height: 100%; width: 0%; background: var(--grad); border-radius: 99px; transition: width 0.6s var(--ease); }
.studio-bar .count { font-family: var(--font-body); font-weight: 700; font-size: 0.85rem; color: var(--ink-dim); white-space: nowrap; }
.studio-sections { display: grid; gap: 1px; background: var(--stroke); }
.studio-section { background: var(--bg-card); padding: 24px 28px; }
.studio-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.studio-section-head h3 { font-size: 1.05rem; }
.studio-section-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--stroke-strong); flex-shrink: 0; }
.studio-section.is-filled .studio-section-head .dot { background: var(--success); }
.studio-guide { font-size: 0.84rem; color: var(--ink-dim); line-height: 1.55; margin: 0 0 12px; max-width: 78ch; }
.studio-guide a { color: var(--accent); font-weight: 600; }
.studio-score-live {
  font-size: 0.78rem; font-weight: 600; color: var(--accent); margin: -4px 0 12px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  background: rgba(var(--accent-rgb), 0.07); border: 1px solid rgba(var(--accent-rgb), 0.16);
}
.studio-section textarea {
  width: 100%; min-height: 110px; resize: vertical;
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--bg-elev);
  color: var(--ink); font-family: var(--font-body); font-size: 0.9rem; padding: 14px 16px; line-height: 1.55;
}
.studio-section textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.studio-notes { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.studio-notes .studio-note-chip {
  font-size: 0.76rem; padding: 6px 12px; border-radius: 999px; cursor: pointer;
  border: 1px dashed var(--stroke-strong); color: var(--ink-dim); background: var(--overlay-1);
  transition: color 0.2s, border-color 0.2s; font-family: var(--font-body);
}
.studio-notes .studio-note-chip:hover, .studio-notes .studio-note-chip:focus-visible { color: var(--ink); border-color: var(--accent); border-style: solid; }
.studio-foot {
  padding: 20px 28px; border-top: 1px solid var(--stroke);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
}
.studio-foot .saved-note { font-size: 0.78rem; color: var(--success); visibility: hidden; }
.studio-foot .saved-note.show { visibility: visible; }

/* ---------- Framework scorecard demo ---------- */
.scorecard-demo {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm); overflow: hidden;
}
.scorecard-head {
  display: grid; gap: 24px; padding: 28px;
  border-bottom: 1px solid var(--stroke); align-items: center;
}
@media (min-width: 760px) { .scorecard-head { grid-template-columns: 1fr auto; } }
.scorecard-head h3 { font-size: 1.35rem; margin: 8px 0; }
.scorecard-head p { color: var(--ink-dim); font-size: 0.9rem; max-width: 68ch; }
.scorecard-total {
  min-width: 170px; padding: 18px 22px; border-radius: var(--radius-sm);
  border: 1px solid var(--stroke-strong); background: var(--overlay-1);
}
.scorecard-total span, .scorecard-total small { display: block; color: var(--ink-faint); font-size: 0.75rem; }
.scorecard-total strong { display: block; font-family: var(--font-display); font-size: 2.35rem; color: var(--ink); line-height: 1.1; margin: 4px 0; }
.scorecard-total.is-ready { border-color: rgba(var(--success-rgb), 0.45); background: rgba(var(--success-rgb), 0.08); }
.scorecard-total.is-ready strong { color: var(--success); }
.scorecard-total.is-revise, .scorecard-total.is-developing { border-color: rgba(161, 103, 10, 0.45); }
.scorecard-total.is-early strong { color: var(--error); }
.scorecard-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.scorecard-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.scorecard-table th, .scorecard-table td { padding: 14px 16px; border-bottom: 1px solid var(--stroke); text-align: left; vertical-align: middle; }
.scorecard-table th { color: var(--ink-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; background: var(--overlay-1); }
.scorecard-table td:first-child { min-width: 330px; }
.scorecard-table td strong, .scorecard-table td small, .scorecard-framework { display: block; }
.scorecard-table td small { color: var(--ink-faint); font-size: 0.76rem; margin-top: 4px; }
.scorecard-framework { color: var(--accent); font-size: 0.72rem; font-weight: 700; margin-bottom: 5px; }
.scorecard-gate { color: var(--error); font-size: 0.66rem; text-transform: uppercase; margin-left: 6px; }
.scorecard-table input {
  width: 76px; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--stroke-strong);
  background: var(--bg-elev); color: var(--ink); font-family: var(--font-mono); font-size: 0.88rem;
}
.scorecard-table input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.scorecard-rate { font-family: var(--font-mono); font-size: 1rem; }
.scorecard-benchmark { color: var(--ink-dim); font-size: 0.78rem; font-weight: 600; }
.scorecard-benchmark small { color: var(--error); }
.scorecard-benchmark.is-met, .scorecard-benchmark.is-met small { color: var(--success); }
.scorecard-status { padding: 16px 28px; color: var(--ink-dim); font-size: 0.86rem; background: var(--overlay-1); }
.scorecard-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 20px 28px; border-top: 1px solid var(--stroke); }

/* ---------- Probe Lab (test-your-bot heuristic scan) ---------- */
.probe-lab { border-top: 1px solid var(--stroke); padding: 22px 28px 26px; background: var(--overlay-1); }
.probe-lab-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.82rem; font-weight: 700; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; }
.probe-lab textarea {
  width: 100%; min-height: 90px; resize: vertical;
  border: 1px solid var(--stroke); border-radius: var(--radius-sm); background: var(--bg-card);
  color: var(--ink); font-family: var(--font-body); font-size: 0.88rem; padding: 12px 14px;
}
.probe-lab textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.probe-lab-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.probe-verdict { margin-top: 16px; display: none; gap: 10px; grid-template-columns: auto 1fr; }
.probe-verdict.show { display: grid; }
.probe-verdict .light { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; border: 3px solid var(--stroke-strong); }
.probe-verdict.pass .light { background: rgba(var(--success-rgb), 0.18); border-color: var(--success); }
.probe-verdict.warn .light { background: rgba(161, 103, 10, 0.18); border-color: var(--gold); }
.probe-verdict.fail .light { background: rgba(var(--error-rgb), 0.18); border-color: var(--error); }
.probe-verdict h4 { font-size: 0.95rem; margin-bottom: 6px; }
.probe-verdict.pass h4 { color: var(--success); }
.probe-verdict.warn h4 { color: var(--gold); }
.probe-verdict.fail h4 { color: var(--error); }
.probe-verdict ul { margin: 8px 0 0 18px; font-size: 0.85rem; color: var(--ink-dim); display: grid; gap: 4px; }
.probe-verdict .caveat { margin-top: 10px; font-size: 0.76rem; color: var(--ink-faint); }

.cheat-grid { display: grid; gap: 14px; margin-bottom: 28px; }
@media (min-width: 800px) { .cheat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .cheat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .cheat-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.cheat-card {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 24px 22px 22px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.cheat-card:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-1px);
}
.cheat-card .icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm); margin-bottom: 16px;
  display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.18);
}
.cheat-card .icon .material-symbols-outlined { font-size: 20px; color: var(--accent); }
.cheat-card .tag {
  font-family: var(--font-display); font-weight: 700; font-size: 0.8rem;
  color: var(--accent); display: block; margin-bottom: 10px;
}
.cheat-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.cheat-card .bad, .cheat-card .chk, .cheat-card .fix {
  font-size: 0.86rem; color: var(--ink-dim); margin-top: 8px;
}
.cheat-card strong { color: var(--ink); font-weight: 600; }

/* ---------- Daily agenda (curriculum.html) ---------- */
.agenda-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.agenda-table { width: 100%; min-width: 880px; border-collapse: collapse; }
.agenda-table th, .agenda-table td {
  border: 1px solid var(--stroke); padding: 10px; vertical-align: top;
}
.agenda-table thead th {
  background: var(--bg-elev); text-align: left; padding: 16px 14px;
  font-family: var(--font-display); font-size: 0.95rem; color: var(--ink);
}
.agenda-table thead th .agenda-day-num {
  display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px;
}
.agenda-time {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint);
  white-space: nowrap; background: var(--bg-elev); text-align: left; font-weight: 500;
}
.agenda-lunch td {
  text-align: center; font-size: 0.85rem; font-weight: 600; color: var(--ink-dim);
  background: var(--overlay-2);
}
.agenda-session {
  display: flex; flex-direction: column; gap: 6px; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 0.82rem; line-height: 1.35; font-weight: 600; color: var(--ink);
  border: 1px solid var(--stroke); background: var(--overlay-1); height: 100%;
}
.agenda-session .material-symbols-outlined { font-size: 18px; margin-bottom: 2px; }
.agenda-session small { display: block; font-weight: 500; color: var(--ink-dim); }
.agenda-session ul { margin: 2px 0 0; padding-left: 16px; font-weight: 500; font-size: 0.76rem; color: var(--ink-dim); display: grid; gap: 2px; }
.agenda-session.is-core .material-symbols-outlined { color: var(--ink-faint); }
.agenda-session.is-tech {
  background: rgba(var(--accent-rgb), 0.12); border-color: rgba(var(--accent-rgb), 0.4);
}
.agenda-session.is-tech .material-symbols-outlined { color: var(--accent); }
.agenda-session.is-partner {
  background: rgba(var(--accent-2-rgb), 0.18); border-color: rgba(var(--accent-2-rgb), 0.45);
}
.agenda-session.is-partner .material-symbols-outlined { color: var(--accent-2); }
.agenda-session.is-build {
  background: rgba(var(--success-rgb), 0.12); border-color: rgba(var(--success-rgb), 0.4);
}
.agenda-session.is-build .material-symbols-outlined { color: var(--success); }
.agenda-session.is-present {
  background: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.45);
}
.agenda-session.is-present .material-symbols-outlined { color: var(--accent); }
.agenda-empty { text-align: center; color: var(--ink-faint); }
.agenda-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Agenda mobile view (built by agenda-mobile.js) ---------- */
/* Hidden by default; JS generates it and CSS swaps it in under 720px. */
.agenda-cards { display: none; }
@media (max-width: 720px) {
  .agenda-wrap { display: none; }
  .agenda-cards { display: grid; gap: 14px; }
}
.agenda-daycard {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm); overflow: hidden;
}
.agenda-daycard__head {
  padding: 14px 16px; background: var(--bg-elev); border-bottom: 1px solid var(--stroke);
  font-family: var(--font-display); font-size: 1rem; color: var(--ink);
}
.agenda-daycard__head small {
  display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.72rem;
  color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px;
}
.agenda-daycard__list { list-style: none; margin: 0; padding: 6px 0; }
.agenda-daycard__list li {
  display: flex; gap: 12px; padding: 10px 16px; align-items: baseline;
}
.agenda-daycard__list li + li { border-top: 1px solid var(--stroke); }
.agenda-daycard__time {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint);
  white-space: nowrap; flex-shrink: 0; padding-top: 1px;
}
.agenda-daycard__list .agenda-session { flex: 1; }

.lab-compare {
  display: grid; gap: 16px;
}
@media (min-width: 900px) { .lab-compare { grid-template-columns: 1fr 1fr; } }
.lab-pane {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 28px 26px 24px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: var(--shadow-sm);
}
.lab-pane.is-bad { border-color: rgba(var(--error-rgb), 0.3); }
.lab-pane.is-good { border-color: rgba(var(--success-rgb), 0.3); }
.lab-pane h3 { font-size: 1.2rem; }
.lab-bubble {
  border-radius: var(--radius-sm); padding: 16px 18px;
  background: var(--overlay-1); border: 1px solid var(--stroke);
  font-size: 0.9rem; color: var(--ink-dim); line-height: 1.55;
}
.lab-bubble.user { border-color: rgba(var(--accent-rgb), 0.3); color: var(--ink); }
.lab-note { font-size: 0.82rem; color: var(--ink-faint); }

.pitch-steps { display: grid; gap: 12px; }
.pitch-step {
  display: grid; grid-template-columns: 88px 1fr; gap: 18px; align-items: start;
  padding: 22px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--stroke); background: var(--bg-card);
}
.pitch-step .t {
  font-family: var(--font-body); font-weight: 700; font-size: 0.74rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent-3); padding-top: 4px;
}
.pitch-step h3 { font-size: 1.1rem; margin-bottom: 6px; }
.pitch-step p { color: var(--ink-dim); font-size: 0.9rem; }

.timer-box {
  margin-top: 28px; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--stroke-strong); background: var(--bg-elev);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.timer-box .clock {
  font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em; min-width: 4.5ch;
}
.timer-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.activity-links {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px;
}
.activity-links a {
  font-size: 0.74rem; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--stroke); color: var(--accent); font-family: var(--font-body);
  font-weight: 600; transition: border-color 0.25s, background 0.25s;
}
.activity-links a:hover { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.06); }

/* ---------- Demo embed (hackathon example companion) ---------- */
.demo-frame {
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.demo-frame-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-elev);
}
.demo-embed {
  display: block;
  width: 100%;
  height: min(78vh, 820px);
  min-height: 560px;
  border: 0;
  background: var(--bg-elev);
}
@media (max-width: 680px) {
  .demo-embed { min-height: 480px; height: 70vh; }
}

/* ---------- Flagship pair (hackathon.html: Companion + Project Card) ---------- */
.flagship-band { position: relative; overflow: hidden; }
.flagship-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 900px 460px at 12% 0%, rgba(var(--accent-rgb), 0.08), transparent 60%),
    radial-gradient(ellipse 800px 420px at 100% 10%, rgba(var(--accent-2-rgb), 0.07), transparent 60%);
}
.flagship-grid { display: grid; gap: 24px; position: relative; z-index: 1; }
@media (min-width: 980px) { .flagship-grid { grid-template-columns: 1fr 1fr; align-items: stretch; } }
.flagship-card {
  display: flex; flex-direction: column; gap: 20px;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  padding: clamp(28px, 4vw, 40px); position: relative; overflow: hidden;
}
.flagship-card:hover {
  border-color: rgba(var(--accent-rgb), 0.40);
  box-shadow: var(--card-hover-shadow);
}
.flagship-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad);
}
.flagship-card .flagship-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: rgba(var(--accent-rgb), 0.1); border: 1px solid rgba(var(--accent-rgb), 0.22);
}
.flagship-card .flagship-icon .material-symbols-outlined { font-size: 26px; color: var(--accent); }
.flagship-card h3 { font-size: 1.5rem; margin: 4px 0 2px; }
.flagship-card > p { color: var(--ink-dim); font-size: 0.95rem; max-width: 60ch; }
.flagship-body { flex: 1; }
.flagship-card .demo-frame { margin-top: 4px; }
.flagship-card .demo-embed { height: 420px; min-height: 340px; }
.flagship-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.card-preview-list { display: grid; gap: 1px; background: var(--stroke); border: 1px solid var(--stroke); border-radius: var(--radius-sm); overflow: hidden; }
.card-preview-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--bg-elev); }
.card-preview-row .num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(var(--accent-2-rgb), 0.12); color: var(--accent-2); font-family: var(--font-mono); font-size: 0.76rem; font-weight: 700;
}
.card-preview-row strong { display: block; font-size: 0.88rem; color: var(--ink); }
.card-preview-row small { display: block; color: var(--ink-faint); font-size: 0.76rem; margin-top: 2px; }

/* ============================================================
   Education-inspired layout patterns (site-wide)
   Soft grids, dual cards, highlight cards, text links, calm rhythm.
   Brand tokens stay Soft Indigo / Deep Purple — no third-party colours.
   ============================================================ */

.card-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .card-grid { grid-template-columns: 1fr; }
}
.grid.card-grid.grid-3 { gap: 20px; }

.dual-cards {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 860px) {
  .dual-cards { grid-template-columns: 1fr; }
}
.dual-cards > .card,
.dual-cards > .flagship-card,
.dual-cards > .track-card {
  min-height: 100%;
}
.flagship-grid.dual-cards,
.tracks.dual-cards { gap: 24px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.35);
  transition: border-color 0.25s, color 0.25s;
}
.text-link .arrow {
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  border-right: 1.6px solid currentColor;
  border-top: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.text-link:hover { border-bottom-color: var(--accent); }
.text-link:hover .arrow { transform: rotate(45deg) translate(2px, -2px); }

/* More row: pale wash + top accent bar + illustration shelf */
.highlight-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) {
  .highlight-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .highlight-grid { grid-template-columns: 1fr; }
}
.highlight-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
  color: inherit;
  text-decoration: none;
  height: 100%;
  box-sizing: border-box;
}
.highlight-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent);
  flex-shrink: 0;
}
.highlight-card--a::before { background: var(--accent); }
.highlight-card--b::before { background: var(--accent-2); }
.highlight-card--c::before { background: var(--accent-3); }
.highlight-card:hover {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-2px);
}
.highlight-card__art {
  min-height: 88px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse 80% 90% at 70% 20%, rgba(var(--accent-rgb), 0.12), transparent 60%),
    rgba(var(--accent-rgb), 0.04);
  border-bottom: 1px solid var(--stroke);
}
.highlight-card--b .highlight-card__art {
  background:
    radial-gradient(ellipse 80% 90% at 70% 20%, rgba(var(--accent-2-rgb), 0.14), transparent 60%),
    rgba(var(--accent-2-rgb), 0.05);
}
.highlight-card--c .highlight-card__art {
  background:
    radial-gradient(ellipse 80% 90% at 70% 20%, rgba(var(--accent-3-rgb), 0.14), transparent 60%),
    rgba(var(--accent-3-rgb), 0.05);
}
.highlight-card__art .material-symbols-outlined {
  font-size: 36px;
  color: var(--accent);
  opacity: 0.9;
}
.highlight-card--b .highlight-card__art .material-symbols-outlined { color: var(--accent-2); }
.highlight-card--c .highlight-card__art .material-symbols-outlined { color: var(--accent-3); }
.highlight-card__body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
}
.highlight-card__body h3 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}
.highlight-card__body p {
  margin: 0;
  color: var(--ink-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  flex: 1;
}
.highlight-card__body .text-link { margin-top: 8px; }
.highlight-card__body .tag {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0;
  display: block;
}
.highlight-card__body .h3 { font-size: 1.15rem; }

.surface {
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--stroke);
  background: var(--bg-elev);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}
.surface .journey { gap: 12px; margin: 0; }
.surface .day-row { box-shadow: none; }

.cta-band-wrap { margin-top: clamp(48px, 7vw, 72px); }

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.page-hero .lead,
.home-hero .lead {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.page-hero .meta-row { margin-top: 28px; }
.page-hero .hero-actions { margin-top: 34px; }

.grid > a.card,
.card-grid > a.card,
.dual-cards > a.card {
  min-height: 100%;
}

.phase-marker { border-radius: 16px; }

@media (prefers-reduced-motion: reduce) {
  .card,
  .highlight-card,
  .setup-item,
  .cheat-card,
  .flagship-card,
  .day-row {
    transition: none;
  }
}

/* ============================================================
   XP badge, popover, toast + confetti celebration
   Injected by assets/js/shared/xp-ui.js into every .nav-actions;
   safe to keep here even on pages that never mount the badge.
   ============================================================ */
.xp-badge {
  appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center;
  gap: 7px; height: 42px; padding: 0 14px; border-radius: 999px; border: 0;
  background: var(--bg-elev); color: var(--ink); cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18), 0 1px 3px rgba(15, 23, 42, 0.10);
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.xp-badge:hover { transform: translateY(-2px); }
.xp-badge:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.xp-badge-level {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12); border-radius: 999px; padding: 3px 8px;
}
.xp-badge-xp { font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.xp-badge-xp b { color: var(--accent); font-family: var(--font-mono); }

.xp-pop {
  position: fixed; top: 74px; right: 18px; z-index: 400; width: min(320px, calc(100vw - 32px));
  background: var(--bg-card); border: 1px solid var(--stroke); border-radius: var(--radius, 16px);
  box-shadow: var(--shadow-dd); padding: 20px; display: grid; gap: 10px;
  animation: xp-pop-in 0.18s var(--ease);
}
@keyframes xp-pop-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.xp-pop-head { display: flex; align-items: center; justify-content: space-between; }
.xp-pop-kicker {
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2);
}
.xp-pop-close {
  appearance: none; border: 0; background: none; color: var(--ink-faint); font-size: 1.3rem;
  line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px;
}
.xp-pop-close:hover { color: var(--ink); background: var(--overlay-2); }
.xp-pop-level { display: flex; align-items: baseline; justify-content: space-between; }
.xp-pop-level-num { font-size: 1.2rem; font-weight: 700; }
.xp-pop-xp { font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.xp-pop-track { height: 8px; border-radius: 999px; background: var(--overlay-3); overflow: hidden; }
.xp-pop-track i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.5s var(--ease); }
.xp-pop-note { font-size: 0.78rem; color: var(--ink-dim); margin: 0; }
.xp-pop-label { font-size: 0.76rem; font-weight: 600; color: var(--ink); margin-top: 4px; }
.xp-pop input#xp-pop-name {
  width: 100%; min-height: 40px; padding: 8px 12px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 10px; font-size: 0.86rem;
}
.xp-pop input#xp-pop-name:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.xp-pop-id { font-size: 0.72rem; color: var(--ink-faint); margin: 0; }
.xp-pop-id code { font-family: var(--font-mono); }
.xp-pop-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.xp-pop-reset {
  appearance: none; border: 0; background: none; color: var(--ink-faint); font-size: 0.74rem;
  text-decoration: underline; cursor: pointer; padding: 0;
}
.xp-pop-reset:hover { color: var(--ink); }

.xp-toast-stack {
  position: fixed; top: 74px; right: 18px; z-index: 500; display: grid; gap: 10px;
  pointer-events: none;
}
.xp-toast {
  display: flex; align-items: center; gap: 10px; background: var(--bg-card); border: 1px solid var(--stroke);
  border-radius: 14px; padding: 12px 16px; box-shadow: var(--shadow-dd); min-width: 180px;
  opacity: 0; transform: translateX(24px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.xp-toast.is-in { opacity: 1; transform: translateX(0); }
.xp-toast .material-symbols-outlined { color: var(--accent); font-size: 22px; }
.xp-toast b { display: block; font-size: 0.9rem; }
.xp-toast span { display: block; font-size: 0.74rem; color: var(--ink-dim); }
.xp-toast.is-levelup { border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.06); }
.xp-toast.is-levelup .material-symbols-outlined { color: var(--accent-3); }
.xp-toast.is-quiet {
  padding: 8px 12px; min-width: 0; box-shadow: none; border-color: var(--overlay-4);
}
.xp-toast.is-quiet .material-symbols-outlined { font-size: 16px; }
.xp-toast.is-quiet b { font-size: 0.78rem; }
.xp-toast.is-quiet span { display: none; }

.xp-confetti-canvas {
  position: fixed; inset: 0; z-index: 600; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .xp-pop { animation: none; }
  .xp-toast { transition: none; }
}

/* ============================================================
   Leaderboard page
   ============================================================ */
.lb-section-kicker {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2);
}
.lb-you {
  display: grid; gap: 14px; border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 28px; margin-bottom: 40px;
}
.lb-you-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.lb-you-name { margin: 2px 0 0; font-size: 1.3rem; }
.lb-you-stats { display: flex; gap: 32px; }
.lb-you-stats div { display: flex; flex-direction: column; }
.lb-you-stats b { font-size: 1.6rem; font-family: var(--font-mono); color: var(--accent); }
.lb-you-stats span { font-size: 0.72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.lb-you-track { height: 10px; border-radius: 999px; background: var(--overlay-3); overflow: hidden; }
.lb-you-track i { display: block; height: 100%; background: var(--grad); border-radius: 999px; }
.lb-you-note { font-size: 0.84rem; color: var(--ink-dim); margin: 0; }

.lb-board { border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card); padding: 28px; }
.lb-loading { color: var(--ink-faint); font-size: 0.9rem; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.lb-row {
  display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 14px;
  padding: 12px 14px; border-radius: 12px;
}
.lb-row:nth-child(odd) { background: var(--overlay-1); }
.lb-row.is-you { background: rgba(var(--accent-rgb), 0.08); border: 1px solid rgba(var(--accent-rgb), 0.3); }
.lb-rank { font-family: var(--font-mono); font-weight: 700; color: var(--ink-dim); text-align: center; }
.lb-rank .material-symbols-outlined { font-size: 20px; color: var(--accent-3); }
.lb-name { font-weight: 600; }
.lb-you-tag {
  font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--on-accent); background: var(--accent); border-radius: 999px; padding: 2px 7px; margin-left: 6px;
}
.lb-level { font-size: 0.78rem; color: var(--ink-faint); font-family: var(--font-mono); }
.lb-xp { font-family: var(--font-mono); font-weight: 700; color: var(--accent); }
.lb-empty { text-align: center; padding: 32px 12px; display: grid; gap: 8px; justify-items: center; }
.lb-empty .material-symbols-outlined { font-size: 34px; color: var(--accent-2); }
.lb-empty h2 { margin: 0; font-size: 1.1rem; }
.lb-empty p { margin: 0; color: var(--ink-dim); max-width: 48ch; font-size: 0.88rem; }
.lb-empty code { font-family: var(--font-mono); font-size: 0.82rem; }

@media (max-width: 620px) {
  .lb-row { grid-template-columns: 30px 1fr auto; }
  .lb-level { display: none; }
}

/* ============================================================
   Survey pages (baseline / summative)
   ============================================================ */
.survey-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.survey-progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--overlay-3); overflow: hidden; }
.survey-progress-track i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.4s var(--ease); }
.survey-progress span { font-size: 0.78rem; color: var(--ink-faint); white-space: nowrap; font-family: var(--font-mono); }

.survey-section {
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card);
  padding: 28px; margin-bottom: 24px;
}
.survey-kicker {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2);
}
.survey-section h2 { margin: 2px 0 22px; }
.survey-scale-key { font-size: 0.8rem; color: var(--ink-faint); margin: -10px 0 20px; }

.survey-field { margin-bottom: 24px; }
.survey-field:last-child { margin-bottom: 0; }
.survey-field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 10px; }
.survey-field label span { color: var(--ink-faint); font-weight: 400; }
.survey-prompt { color: var(--ink-dim); font-size: 0.86rem; margin: -6px 0 10px; }
.survey-field input[type="text"] {
  width: 100%; min-height: 44px; padding: 10px 14px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 10px; font-size: 0.92rem;
}
.survey-field input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 2px; }

.survey-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.survey-choice {
  appearance: none; border: 1px solid var(--stroke); background: var(--bg-elev); color: var(--ink);
  border-radius: 999px; padding: 9px 16px; font-size: 0.86rem; cursor: pointer; transition: all 0.15s var(--ease);
}
.survey-choice:hover { border-color: var(--accent); }
.survey-choice.is-selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.survey-scale { display: flex; gap: 8px; }
.survey-scale-btn {
  appearance: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--stroke);
  background: var(--bg-elev); color: var(--ink); font-weight: 700; font-family: var(--font-mono);
  cursor: pointer; transition: all 0.15s var(--ease);
}
.survey-scale-btn:hover { border-color: var(--accent); }
.survey-scale-btn.is-selected { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.survey-scale-labels { display: flex; justify-content: space-between; margin-top: 6px; font-size: 0.72rem; color: var(--ink-faint); }

.survey-matrix-wrap { overflow-x: auto; }
.survey-matrix table { border-collapse: collapse; width: 100%; min-width: 560px; }
.survey-matrix th, .survey-matrix td { padding: 8px 10px; text-align: center; font-size: 0.78rem; border-bottom: 1px solid var(--stroke); }
.survey-matrix thead th { color: var(--ink-faint); font-weight: 600; vertical-align: bottom; }
.survey-matrix tbody th { text-align: left; font-weight: 600; color: var(--ink); white-space: nowrap; }
.survey-matrix select {
  min-width: 52px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--stroke);
  background: var(--bg-elev); color: var(--ink); font-family: var(--font-mono);
}

.survey-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.survey-submit-status { font-size: 0.82rem; color: var(--ink-dim); }

.survey-consent {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 2px 0 12px; padding: 7px 0; border-top: 1px solid var(--stroke);
  color: var(--ink-dim); font-size: 0.75rem; line-height: 1.35;
}
.survey-consent-actions { display: flex; gap: 6px; flex: none; }
.survey-consent-choice {
  min-width: 42px; padding: 5px 10px; border: 1px solid var(--stroke); border-radius: 999px;
  background: transparent; color: var(--ink-dim); font: 600 0.75rem var(--font-body); cursor: pointer;
}
.survey-consent-choice:hover { border-color: var(--accent); color: var(--accent); }
.survey-consent-choice.is-selected { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

@media (max-width: 560px) {
  .survey-consent { align-items: flex-start; }
}

.survey-done { text-align: center; padding: 48px 12px; display: grid; gap: 10px; justify-items: center; }
.survey-done .material-symbols-outlined { font-size: 40px; color: var(--success); }
.survey-done h2 { margin: 0; }
.survey-done p { margin: 0; color: var(--ink-dim); max-width: 52ch; }

/* ============================================================
   Research consent gate
   ============================================================ */
.rg-overlay {
  position: fixed; inset: 0; z-index: 800; display: grid; place-items: center;
  background: rgba(13, 13, 15, 0.55); padding: 20px;
}
.rg-card {
  width: min(440px, 100%); background: var(--bg-card); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-dd); display: grid; gap: 14px;
}
.rg-kicker {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2);
}
.rg-card h2 { margin: 0; font-size: 1.2rem; }
.rg-card p { margin: 0; color: var(--ink-dim); font-size: 0.9rem; line-height: 1.55; }
.rg-field { display: grid; gap: 6px; }
.rg-field label { font-size: 0.82rem; font-weight: 600; }
.rg-field label span { color: var(--ink-faint); font-weight: 400; }
.rg-field input {
  min-height: 42px; padding: 9px 13px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 10px; font-family: var(--font-mono);
}
.rg-field input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.rg-error { font-size: 0.76rem; color: var(--error); min-height: 1em; display: block; }
.rg-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   Return-home wayfinding (shared/return-home.js)
   ============================================================ */
.rh-strip {
  border-bottom: 1px solid var(--stroke);
  background: var(--bg-elev);
}
.rh-strip-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap;
}
.rh-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.86rem; color: var(--ink-dim); text-decoration: none;
}
.rh-back b { color: var(--accent); font-weight: 600; }
.rh-back .material-symbols-outlined { font-size: 18px; }
.rh-back:hover b { text-decoration: underline; }
.rh-progress {
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint);
}

/* ============================================================
   Facilitator room dashboard
   ============================================================ */
.dash-hero h1 { margin-bottom: 10px; }
.dash-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-dim);
}
.dash-live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--success);
  animation: dash-pulse 1.6s ease-in-out infinite;
}
@keyframes dash-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}
.dash-section { padding-top: 12px; }

.dash-totals {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 26px;
}
.dash-total-card {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 20px 22px; display: grid; gap: 2px;
}
.dash-total-card.is-hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.dash-total-num { font-family: var(--font-mono); font-size: 2.2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.dash-total-label { font-size: 0.8rem; color: var(--ink-dim); }

.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px; margin-bottom: 20px;
}
.dash-panel {
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 22px; margin-bottom: 20px;
}
.dash-grid .dash-panel { margin-bottom: 0; }
.dash-panel-title { margin: 0 0 4px; font-size: 1.05rem; }
.dash-panel-sub { margin: 0 0 16px; font-size: 0.82rem; color: var(--ink-faint); }

.dash-act { margin-bottom: 12px; }
.dash-act-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 5px;
}
.dash-act-name { font-size: 0.86rem; font-weight: 600; }
.dash-act-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim); white-space: nowrap; }
.dash-act-count b { color: var(--ink); }
.dash-act-track {
  height: 8px; border-radius: 99px; background: var(--bg-elev);
  border: 1px solid var(--stroke); overflow: hidden;
}
.dash-act-track i {
  display: block; height: 100%; border-radius: 99px;
  background: var(--accent); transition: width 0.5s ease;
}
.dash-act.is-mid .dash-act-track i { background: var(--accent-2); }
.dash-act.is-done .dash-act-track i { background: var(--success); }
.dash-act.is-done .dash-act-count b { color: var(--success); }

.dash-page {
  display: grid; grid-template-columns: 170px 1fr 32px;
  align-items: center; gap: 12px; margin-bottom: 9px;
}
.dash-page-name { font-size: 0.84rem; }
.dash-page-track {
  height: 7px; border-radius: 99px; background: var(--bg-elev);
  border: 1px solid var(--stroke); overflow: hidden;
}
.dash-page-track i { display: block; height: 100%; background: var(--accent-2); border-radius: 99px; }
.dash-page-count { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-dim); text-align: right; }

.dash-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.dash-feed-item {
  display: grid; grid-template-columns: 90px 1fr; gap: 12px;
  padding: 7px 4px; border-bottom: 1px dashed var(--stroke); font-size: 0.84rem;
}
.dash-feed-item:last-child { border-bottom: 0; }
.dash-feed-time { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); padding-top: 2px; }
.dash-feed-body { color: var(--ink-dim); }
.dash-feed-body b { color: var(--ink); font-weight: 600; }
.dash-feed-body code {
  font-family: var(--font-mono); font-size: 0.78rem; background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 6px; padding: 1px 6px;
}
.dash-empty { color: var(--ink-faint); font-size: 0.86rem; }

.dash-blocked {
  text-align: center; padding: 48px 12px; display: grid; gap: 10px; justify-items: center;
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card);
}
.dash-blocked .material-symbols-outlined { font-size: 40px; color: var(--ink-faint); }
.dash-blocked h2 { margin: 0; }
.dash-blocked p { margin: 0; color: var(--ink-dim); max-width: 52ch; }
.dash-auth-wrap { padding-top: 64px; padding-bottom: 64px; }
.dash-auth-form { width: min(340px, 100%); display: grid; gap: 10px; margin-top: 8px; text-align: left; }
.dash-auth-form label { font-size: 0.82rem; font-weight: 600; }
.dash-auth-form input {
  min-height: 48px; padding: 10px 14px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 8px; font-family: var(--font-mono);
  font-size: 1.05rem; text-align: center;
}
.dash-auth-form input:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.dash-auth-error { min-height: 1.2em; color: var(--error); font-size: 0.78rem; text-align: center; }
.dash-auth-form .btn { justify-self: center; }

@media (max-width: 640px) {
  .dash-page { grid-template-columns: 120px 1fr 28px; }
  .dash-feed-item { grid-template-columns: 70px 1fr; }
}

/* ============================================================
   Dashboard tabs + expandable rows
   ============================================================ */
.dash-tabs {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 22px;
  border-bottom: 1px solid var(--stroke); padding-bottom: 0;
}
.dash-tab {
  border: 1px solid var(--stroke); border-bottom: 0; background: var(--bg-elev);
  color: var(--ink-dim); font-size: 0.85rem; font-weight: 600;
  padding: 9px 18px; border-radius: 10px 10px 0 0; cursor: pointer;
}
.dash-tab.is-active {
  background: var(--bg-card); color: var(--accent); position: relative;
}
.dash-tab.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent);
}

.dash-act-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  width: 100%; background: none; border: 0; padding: 0; margin-bottom: 5px;
  font: inherit; text-align: left; color: inherit; cursor: default;
}
.dash-act.is-expandable .dash-act-head { cursor: pointer; }
.dash-act.is-expandable .dash-act-head:hover .dash-act-name { color: var(--accent); }
.dash-act-detail {
  border-top: 1px dashed var(--stroke); margin-top: 8px; padding-top: 8px;
  display: grid; gap: 3px; max-height: 180px; overflow-y: auto;
}
.dash-act-detail[hidden], .dash-game-detail[hidden], .dash-sv-detail[hidden] { display: none; }
.dash-act-detail-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 0.78rem; color: var(--ink-dim);
}
.dash-act-detail-row code { font-family: var(--font-mono); font-size: 0.74rem; }

.dash-game { border: 1px solid var(--stroke); border-radius: 12px; margin-bottom: 10px; overflow: hidden; }
.dash-game-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; background: var(--bg-card); border: 0; padding: 14px 18px;
  font: inherit; text-align: left; cursor: pointer; color: inherit;
}
.dash-game-head:hover { background: var(--bg-elev); }
.dash-game-name { font-weight: 600; font-size: 0.95rem; }
.dash-game-name small { color: var(--ink-faint); font-weight: 400; margin-left: 6px; }
.dash-game-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-dim); white-space: nowrap; }
.dash-game-detail { border-top: 1px solid var(--stroke); padding: 8px 14px 14px; overflow-x: auto; }
.dash-g-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.dash-g-table th, .dash-g-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--stroke); }
.dash-g-table th { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-faint); }
.dash-g-table code { font-family: var(--font-mono); font-size: 0.76rem; }
.dash-g-table tr.is-done td:first-child { border-left: 2px solid var(--success); }
.dash-g-table tr.is-mid td:first-child { border-left: 2px solid var(--accent-2); }
.dash-g-status { font-size: 0.78rem; color: var(--ink-dim); }
.dash-g-when { display: block; font-size: 0.7rem; color: var(--ink-faint); }
.dash-g-empty { color: var(--ink-faint); }

.dash-sv { border: 1px solid var(--stroke); border-radius: 10px; margin-bottom: 8px; overflow: hidden; }
.dash-sv-head {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--bg-card); border: 0; padding: 10px 14px;
  font: inherit; text-align: left; cursor: pointer; color: inherit;
}
.dash-sv-head:hover { background: var(--bg-elev); }
.dash-sv-head code { font-family: var(--font-mono); font-size: 0.78rem; }
.dash-sv-meta { flex: 1; font-size: 0.8rem; color: var(--ink-dim); }
.dash-warn { color: var(--error); font-size: 0.72rem; font-weight: 600; }
.dash-sv-detail {
  border-top: 1px dashed var(--stroke); padding: 10px 14px;
  display: grid; gap: 4px; max-height: 320px; overflow-y: auto;
}
.dash-sv-answer { display: grid; grid-template-columns: 150px 1fr; gap: 10px; font-size: 0.78rem; }
.dash-sv-code { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-faint); }

.dash-survey-analysis { display: grid; gap: 34px; margin-top: 22px; }
.dash-survey-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px;
}
.dash-survey-stat {
  min-height: 116px; padding: 18px; border: 1px solid var(--stroke); border-radius: 10px;
  background: var(--bg-elev); display: flex; flex-direction: column; justify-content: center;
}
.dash-survey-stat strong { font: 700 2rem/1 var(--font-display); color: var(--ink); }
.dash-survey-stat span { margin-top: 8px; color: var(--ink); font-size: 0.84rem; font-weight: 600; }
.dash-survey-stat small { margin-top: 3px; color: var(--ink-faint); font-size: 0.72rem; }
.dash-survey-stat.is-primary { border-top: 3px solid var(--accent); }
.dash-survey-stat.is-consent { border-top: 3px solid var(--success); }
.dash-survey-stat.is-response-no { border-top: 3px solid var(--accent-2); }

.dash-survey-group { border-top: 1px solid var(--stroke); padding-top: 26px; }
.dash-survey-group-head {
  display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 16px;
}
.dash-survey-group-head h3 { margin: 2px 0 0; font-size: 1.12rem; }
.dash-survey-group-head > p { margin: 0; max-width: 58ch; color: var(--ink-dim); font-size: 0.78rem; text-align: right; }
.dash-survey-kicker {
  color: var(--accent); font: 500 0.64rem/1.3 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase;
}

.dash-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dash-chart-grid.is-featured { grid-template-columns: minmax(0, 1fr); }
.dash-chart-grid.is-featured .dash-chart-card { max-width: none; }
.dash-chart-card {
  min-width: 0; padding: 16px; border: 1px solid var(--stroke); border-radius: 10px; background: var(--bg-card);
}
.dash-chart-card.is-consent { border-left: 4px solid var(--success); }
.dash-chart-copy { min-height: 48px; }
.dash-chart-copy h4 { margin: 0; font-size: 0.9rem; color: var(--ink); }
.dash-chart-copy p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  margin: 4px 0 0; color: var(--ink-faint); font-size: 0.7rem; line-height: 1.4;
}
.dash-donut-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 14px; margin-top: 14px; }
.dash-donut {
  width: 108px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--dash-donut));
  display: grid; place-items: center; position: relative;
}
.dash-donut::after {
  content: ""; position: absolute; inset: 19px; border-radius: 50%; background: var(--bg-card); box-shadow: 0 0 0 1px var(--stroke);
}
.dash-donut > span { position: relative; z-index: 1; display: grid; justify-items: center; }
.dash-donut b { font: 700 1.35rem/1 var(--font-display); color: var(--ink); }
.dash-donut small { margin-top: 3px; color: var(--ink-faint); font-size: 0.6rem; }
.dash-chart-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; min-width: 0; }
.dash-chart-legend li {
  display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 6px;
  min-width: 0; font-size: 0.7rem;
}
.dash-chart-legend i { width: 8px; height: 8px; border-radius: 2px; }
.dash-chart-legend span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-dim); }
.dash-chart-legend b { color: var(--ink); }
.dash-chart-legend small { width: 30px; text-align: right; color: var(--ink-faint); }

@media (min-width: 1180px) {
  .dash-chart-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-chart-grid.is-featured { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .dash-survey-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-chart-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-survey-group-head { align-items: start; flex-direction: column; gap: 6px; }
  .dash-survey-group-head > p { text-align: left; }
}

@media (max-width: 480px) {
  .dash-survey-stats { grid-template-columns: minmax(0, 1fr); }
  .dash-survey-stat { min-height: 92px; }
  .dash-donut-row { grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
  .dash-donut { width: 92px; }
  .dash-donut::after { inset: 17px; }
  .dash-sv-answer { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

.dash-nemo-q, .dash-nemo-a { display: grid; grid-template-columns: 54px 1fr; gap: 10px; margin-bottom: 6px; }
.dash-nemo-who {
  font-family: var(--font-mono); font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-faint); padding-top: 3px;
}
.dash-nemo-q p, .dash-nemo-a p {
  margin: 0; font-size: 0.82rem; color: var(--ink); line-height: 1.5;
  background: var(--bg-elev); border: 1px solid var(--stroke); border-radius: 10px; padding: 8px 12px;
}
.dash-nemo-a p { background: var(--bg-card); border-color: var(--accent-2); }

/* ============================================================
   Review mode (shared/review-mode.js) — stored-result view
   ============================================================ */
.rv-banner {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--stroke); border-left: 3px solid var(--accent-2);
  border-radius: var(--radius); background: var(--bg-card);
  padding: 14px 18px; margin: 0 auto 22px; max-width: 640px;
  font-size: 0.88rem; color: var(--ink-dim);
}
.rv-banner .material-symbols-outlined { color: var(--accent-2); font-size: 22px; }
.rv-banner b { color: var(--ink); }

/* ============================================================
   A4 retention probe
   ============================================================ */
.rp-prompt {
  border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--bg-card);
  padding: 22px; margin-bottom: 22px;
}
.rp-prompt-kicker {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent-2); display: block; margin-bottom: 8px;
}
.rp-prompt p { margin: 0; font-size: 1.05rem; line-height: 1.6; }
.rp-field label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 8px; }
.rp-field textarea {
  width: 100%; padding: 14px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 12px; font-size: 0.95rem; line-height: 1.6; resize: vertical;
}
.rp-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.78rem; color: var(--ink-faint); font-family: var(--font-mono); }
.rp-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; }
.rp-submit-status { font-size: 0.82rem; color: var(--ink-dim); }
.rp-done { text-align: center; padding: 48px 12px; display: grid; gap: 10px; justify-items: center; }
.rp-done .material-symbols-outlined { font-size: 40px; color: var(--success); }
.rp-done h2 { margin: 0; }
.rp-done p { margin: 0; color: var(--ink-dim); max-width: 48ch; }

/* ============================================================
   Transcript donation
   ============================================================ */
.td-field { margin-bottom: 22px; }
.td-field label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 6px; }
.td-field label span { color: var(--ink-faint); font-weight: 400; }
.td-note { color: var(--ink-dim); font-size: 0.84rem; margin: 0 0 10px; }
.td-field input[type="text"] {
  width: 100%; min-height: 44px; padding: 10px 14px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 10px; font-size: 0.92rem;
}
.td-field textarea {
  width: 100%; padding: 14px; color: var(--ink); background: var(--bg-elev);
  border: 1px solid var(--stroke); border-radius: 12px; font-size: 0.9rem; line-height: 1.6; resize: vertical;
}
.td-submit-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.td-submit-status { font-size: 0.82rem; color: var(--ink-dim); }
.td-done { text-align: center; padding: 48px 12px; display: grid; gap: 12px; justify-items: center; }
.td-done .material-symbols-outlined { font-size: 40px; color: var(--success); }
.td-done h2 { margin: 0; }
.td-done p { margin: 0; color: var(--ink-dim); max-width: 48ch; }

/* ============================================================
   Research check-in hub — ordered, progress-aware checklist
   ============================================================ */
.ch-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.ch-progress-track { flex: 1; height: 8px; border-radius: 999px; background: var(--overlay-3); overflow: hidden; }
.ch-progress-track i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width 0.4s var(--ease); }
.ch-progress span { font-size: 0.8rem; color: var(--ink-faint); white-space: nowrap; font-family: var(--font-mono); }

.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch-step {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px;
  border: 1px solid var(--stroke); border-radius: 14px; background: var(--bg-card);
}
.ch-step.is-done { border-color: rgba(var(--success-rgb), 0.35); background: rgba(var(--success-rgb), 0.05); }
.ch-step-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--overlay-3); font-family: var(--font-mono); font-weight: 700; font-size: 0.9rem; color: var(--ink-dim);
}
.ch-step.is-done .ch-step-num { background: var(--success); color: var(--on-success); }
.ch-step.is-done .ch-step-num .material-symbols-outlined { font-size: 18px; }
.ch-step-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ch-step-title { font-weight: 600; }
.ch-step-meta { font-size: 0.78rem; color: var(--ink-faint); }
.ch-step.is-done .ch-step-meta { color: var(--success); }

/* ============================================================
   Layer concept panels (day1.html) — vivid, non-interactive
   intro to the Three Layered Sociotechnical Safety Framework
   ============================================================ */
.layer-grid { display: grid; gap: 16px; }
@media (min-width: 900px) { .layer-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 700px) { .layer-grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1200px) { .layer-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 700px) { .layer-grid.cols-8 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .layer-grid.cols-8 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.layer-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--stroke); border-radius: var(--radius);
  background: var(--bg-card); padding: 24px 22px 20px;
  box-shadow: var(--shadow-sm);
}
.framework-card {
  min-height: 100%;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(var(--accent-rgb), 0.04) 100%);
  border-color: rgba(var(--accent-rgb), 0.2);
}
.framework-card .layer-card-icon {
  width: 46px; height: 46px; margin-bottom: 12px;
}
.framework-card h4 {
  font-size: 1rem; margin-bottom: 8px;
}
.framework-card p {
  font-size: 0.82rem; line-height: 1.5; margin-bottom: 0;
}
/* Reflection lives once, below the grid, so all 8 cards stay the same shape. */
.framework-reflect {
  margin-top: 22px; padding: 22px 24px; border-radius: var(--radius-sm);
  border: 1px solid var(--stroke); background: var(--overlay-1);
}
.framework-reflect > .block-label {
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-3); margin-bottom: 10px; display: block;
}
.framework-reflect > p { font-size: 0.88rem; color: var(--ink-dim); margin-bottom: 14px; }
.framework-reflect .artefact-box label,
.framework-reflect .artefact-box .saved-note { font-size: 0.8rem; }
.layer-card-icon {
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 14px;
  display: grid; place-items: center;
  background: radial-gradient(circle at 30% 30%, rgba(var(--accent-rgb), 0.24), rgba(var(--accent-rgb), 0.06));
  border: 1px solid rgba(var(--accent-rgb), 0.25);
}
.layer-card-icon .material-symbols-outlined { font-size: 26px; color: var(--accent); }
.layer-card-tag { font-family: var(--font-display); font-weight: 700; font-size: 0.78rem; color: var(--accent); display: block; margin-bottom: 8px; }
.layer-card h4 { font-size: 1.05rem; margin-bottom: 10px; }
.layer-card p { font-size: 0.88rem; color: var(--ink-dim); line-height: 1.55; }
.layer-card-foot { margin: 12px 0 14px; }
.layer-card-foot a { font-size: 0.82rem; font-weight: 600; color: var(--accent); text-decoration: none; }
.layer-card-foot a:hover { text-decoration: underline; }
.layer-card .artefact-box { margin-top: auto; }

/* Automatic-save note, replaces the old manual "Save this session" panels.
   One quiet line with an icon; nothing to fill in, nothing to press. */
.cg-autosave-note, .cb-autosave-note, .ld-autosave-note, .so-autosave-note {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: var(--ink-dim); font-size: 0.88rem; text-align: center; margin: 0;
}
.cg-autosave-note .material-symbols-outlined,
.cb-autosave-note .material-symbols-outlined,
.ld-autosave-note .material-symbols-outlined,
.so-autosave-note .material-symbols-outlined {
  font-size: 20px; color: var(--accent); flex: none;
}
.cg-autosave-note [data-measure-status],
.cb-autosave-note [data-measure-status],
.ld-autosave-note [data-measure-status],
.so-autosave-note [data-measure-status] { font-weight: 600; color: var(--ink-soft); }

/* Flagship game orientation: concise enough to scan, and intentionally tagged
   as baseline guidance so raw Day 1 measurement remains untaught. */
.mission-brief {
  margin: 0 0 28px; padding: 18px 20px;
  border: 1px solid var(--stroke); border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm); background: var(--bg-card); box-shadow: var(--shadow-sm);
}
.mission-brief__head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.mission-brief__head .material-symbols-outlined { font-size: 21px; color: var(--accent); }
.mission-brief__head h2 {
  margin: 0; font: 700 0.78rem/1.3 var(--font-mono);
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink);
}
.mission-brief ol {
  list-style: none; counter-reset: mission; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.mission-brief li {
  counter-increment: mission; position: relative; padding-left: 32px;
  color: var(--ink-dim); font-size: 0.86rem; line-height: 1.5;
}
.mission-brief li::before {
  content: counter(mission, decimal-leading-zero); position: absolute; left: 0; top: 1px;
  font: 700 0.72rem/1.5 var(--font-mono); color: var(--accent);
}
.mission-brief li strong { display: block; color: var(--ink); font-weight: 650; }
@media (max-width: 720px) {
  .mission-brief { padding: 16px; }
  .mission-brief ol { grid-template-columns: 1fr; gap: 10px; }
}

/* Check-in mode (Day 1 baseline / Day 5 final): raw assessment, no guidance.
   Hides the coaching rails, cheat cards, meta chips, and coach panels so the
   student's first response is untaught. */
.is-baseline-checkin .guide-rail,
.is-baseline-checkin .meta-row,
.is-baseline-checkin .baseline-guidance,
.is-baseline-checkin .cg-side,
.is-baseline-checkin .cg-coach,
.is-baseline-checkin .cg-rule-help,
.is-baseline-checkin .ukail-guide,
.is-baseline-checkin .so-signal-choice small,
.is-baseline-checkin .cb-technique-opt small,
.is-baseline-checkin .cb-category-opt small,
.is-baseline-checkin .ld-style-opt small {
  display: none !important;
}

.ci-return {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 28px; padding: 14px 16px; border: 1px solid var(--stroke);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
}
.ci-return .btn { flex: none; display: inline-flex; align-items: center; gap: 7px; }
.ci-return .material-symbols-outlined { font-size: 19px; }
.ci-return > span { color: var(--ink-dim); font-size: 0.86rem; }

.rh-strip--starting-point {
  position: sticky; top: var(--nav-h, 64px); z-index: 80;
}

@media (max-width: 640px) {
  .ci-return { align-items: stretch; flex-direction: column; }
  .ci-return .btn { justify-content: center; width: 100%; }
}
/* End contextual check-in navigation. */

/* End main stylesheet. */
