/* ==========================================================================
   Loopz curriculum page — scrollytelling edition.
   Night chrome nav + paper reading surface (matches the blog skin).
   Full-bleed split: scrolling narrative steps (left) + a sticky tinted
   visual panel (right) with a kicker pinned top, caption pinned bottom,
   and the chart centred. Driven by an IntersectionObserver (inline script).
   Bars animate from a --w / --h custom property when their step is active.
   No external charting libs.
   ========================================================================== */

:root {
  --space:       #0B0E23;
  --neon:        #8B7FD9;
  --night-ink:   #E7ECF8;
  --night-soft:  #9FAAD0;
  --canvas:      #F4F1EA;  /* lighter cream (landing .paper) — left/text side */
  --panel:       #EDE9DF;  /* darker cream (landing .paper-alt) — right/visual side */
  --card:        #FFFFFF;
  --ink:         #1F2937;
  --ink-soft:    rgba(31, 41, 55, 0.72);
  --ink-muted:   rgba(31, 41, 55, 0.45);
  --border:      rgba(31, 41, 55, 0.12);
  --hair:        rgba(31, 41, 55, 0.1);
  --navy:        #2C3E6E;
  --navy-bar:    #B0BDD8;
  --math:        #3A8FD9;
  --coding:      #7C6BF0;

  /* categorical chart palette = the Loopz game block colours (Step / Turn /
     Push / Jump / Play), so the charts feel on-brand. Singapore is the Step
     blue standout; OECD benchmarks stay a neutral grey. */
  --c-sg:     #3B82F6;  /* Step (blue) */
  --c-teal:   #06B6D4;  /* Turn left (cyan) */
  --c-green:  #18C4A8;  /* Play (teal-green) */
  --c-purple: #A855F7;  /* Jump (purple) */
  --c-clay:   #F97316;  /* Push (orange) */
  --c-gold:   #A855F7;  /* reuses Jump purple: no chart pairs this slot with purple */
  --c-gray:   #9AA6BE;  /* neutral benchmark (OECD) */

  --font-display: 'Space Grotesk', 'Nunito', sans-serif;
  --font-body:    'Nunito', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;
  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --gutter:       max(24px, calc((100vw - 1280px) / 2 + 24px));
  /* the full-bleed finding spine aligns to a wider reference so it uses
     more of the screen than the centred intro/reading blocks */
  --gutter-wide:  max(32px, calc((100vw - 1440px) / 2 + 32px));
  --nav-h:        70px;  /* sticky nav height: the visual panel pins below it */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { font-size: 16px; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
*     { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
body  {
  font-family: var(--font-body);
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a    { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

/* ---- layout ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.narrow    { max-width: 780px; margin: 0 auto; }

/* ---- nav ---- */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 14, 35, 0.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px 0;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--night-ink); }
.nav-links { display: flex; align-items: center; gap: 34px; margin: 0 auto; }
.nav-links a { font-size: 14.5px; font-weight: 600; color: var(--night-soft); transition: color 0.15s; }
.nav-links a:hover, .nav-links a.active { color: var(--night-ink); }
.nav-cta {
  font-family: var(--font-body); font-weight: 700; font-size: 13px;
  text-transform: none; letter-spacing: normal;
  background: #8B7FD9; color: #fff;
  padding: 13px 26px; border-radius: 999px; border-bottom: 3px solid #6B5FB8;
  transition: transform 0.15s var(--ease), filter 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); filter: brightness(1.08); }

/* ---- page hero (fills the viewport so the spine starts below the fold) ---- */
.page-hero { position: relative; min-height: calc(100vh - var(--nav-h)); display: flex; align-items: center; padding: 48px 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero-text { min-width: 0; }

/* right-hand standards card */
.hero-standards { background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: 18px; padding: 28px 28px 24px; }
.std-title { font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 20px; }
.hero-standards ul { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.hero-standards li { display: flex; flex-direction: column; gap: 4px; padding-left: 16px; border-left: 3px solid var(--border); }
.hero-standards li.math { border-left-color: #3A8FD9; }
.hero-standards li.coding { border-left-color: #7C6BF0; }
.std-domain { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); }
.std-name { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.std-foot { font-size: 13px; color: var(--ink-muted); padding-top: 16px; border-top: 1px solid var(--border); margin: 0; }

/* scroll cue at the bottom of the full-screen hero */
.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); transition: color 0.15s; }
.scroll-cue:hover { color: var(--ink-soft); }
.scroll-cue span { animation: cue-bob 1.6s var(--ease) infinite; }
@keyframes cue-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.eyebrow {
  font-family: var(--font-display); font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 16px;
}
.page-hero h1 { font-size: clamp(38px, 5.5vw, 58px); color: var(--ink); margin-bottom: 18px; max-width: 560px; }
.page-hero .lead { font-size: 17.5px; color: var(--ink-soft); line-height: 1.75; max-width: 600px; margin-bottom: 32px; }
.domain-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.domain-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  font-family: var(--font-display); font-size: 13.5px; font-weight: 700;
  border: 2px solid;
}
/* inactive (translucent) tab tints */
.domain-pill.math   { background: rgba(58,143,217,.12); border-color: rgba(58,143,217,.40); color: #1F6FAA; }
.domain-pill.coding { background: rgba(124,107,240,.12); border-color: rgba(124,107,240,.40); color: #5244B8; }
/* future domains: greyed out, not interactive */
.domain-pill.soon   { background: rgba(31,41,55,.05); border-color: rgba(31,41,55,.16); color: var(--ink-muted); }

/* clickable domain tabs: translucent when inactive, solid when selected */
button.domain-pill { font: inherit; font-family: var(--font-display); }
.domain-pill.tab { cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .15s; }
.domain-pill.tab:hover { transform: translateY(-1px); }
.domain-pill.tab.math.active   { background: #3A8FD9; border-color: #3A8FD9; color: #FFFFFF; }
.domain-pill.tab.coding.active { background: #7C6BF0; border-color: #7C6BF0; color: #FFFFFF; }

/* tabbed panes: only one shows at a time once JS is on (no-JS shows both) */
.has-js .domain-pane { display: none; }
.has-js .domain-pane.active-pane { display: block; }
.domain-pane { border-top: none; }

/* ---- domain section ---- */
.domain-section { padding: 80px 0; }
.domain-section + .domain-section { border-top: 1px solid var(--border); }
.domain-header { margin-bottom: 40px; }
.station-tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: 999px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; margin-bottom: 14px;
}
.station-tag.math   { background: rgba(58,143,217,.12); color: #1F6FAA; }
.station-tag.coding { background: rgba(124,107,240,.12); color: #5244B8; }
.domain-header h2 { font-size: clamp(28px, 4vw, 40px); color: var(--ink); margin-bottom: 10px; }
.domain-header .curriculum-note { font-size: 14.5px; color: var(--ink-muted); line-height: 1.6; }
.domain-header .curriculum-note strong { color: var(--ink-soft); }

/* ---- math framing question + credibility metrics ---- */
.math-frame { max-width: 640px; margin-bottom: 12px; }
.math-frame h3 { font-size: clamp(24px, 3.4vw, 34px); color: var(--ink); margin-bottom: 14px; }
.math-frame p  { font-size: 17px; color: var(--ink-soft); line-height: 1.75; }

.metrics-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin: 40px 0 8px; padding: 28px 0;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.metric-num {
  font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 700;
  color: var(--navy); line-height: 1; letter-spacing: -0.02em; margin-bottom: 8px;
}
.metric-lab { font-size: 13px; color: var(--ink-muted); line-height: 1.4; }

/* ===========================================================================
   SCROLLYTELLING SPINE (full-bleed)
   =========================================================================== */
.scrolly {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); /* narrower text, wider visual */
  grid-template-areas: "steps viz";
  margin-top: 8px;
  position: relative;
}
.scrolly-steps  { grid-area: steps; padding-left: var(--gutter-wide); padding-right: 64px; }
.scrolly-sticky { grid-area: viz; }

/* narrative steps: tall so only one sits at the viewport centre */
.scrolly-step {
  min-height: 85vh;
  max-width: 820px;  /* keep line length readable on very wide screens */
  display: flex; flex-direction: column; justify-content: center;
  padding: 24px 0;
  opacity: 0.3; transition: opacity 0.4s var(--ease);
}

/* Snap each finding into view (desktop spine only). Proximity, not
   mandatory, so it locks in when you settle near a step but never traps
   the scroll or fights the rest of the page. */
@media (min-width: 901px) {
  html { scroll-snap-type: y proximity; }
  .scrolly-step { scroll-snap-align: center; }
  /* Trailing space so the sticky panel stays pinned (and its content stays
     centred) while the final finding is in view, instead of un-pinning early
     and floating too high. */
  .scrolly-steps { padding-bottom: 30vh; }
}

/* Shorter laptops: trim vertical chrome so every panel still fits one screen. */
@media (min-width: 901px) and (max-height: 780px) {
  .scrolly-sticky { padding-top: 24px; padding-bottom: 28px; }
  .viz-body { padding: 14px 0; }
  .viz-caption { min-height: 0; }
  .viz-progress { margin-bottom: 18px; }
  .domain-title { font-size: clamp(32px, 5vw, 46px); }
  .scrolly-step { min-height: 92vh; }
}
.scrolly-step.on { opacity: 1; }
.scrolly:not(.js-on) .scrolly-step { opacity: 1; }
.step-num {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase; color: var(--math);
  margin-bottom: 16px;
}
.step-num::before { content: ''; width: 28px; height: 2px; background: var(--math); flex-shrink: 0; }
.scrolly-step h4 { font-size: clamp(24px, 2.9vw, 30px); color: var(--ink); margin-bottom: 16px; }
.scrolly-step p  { font-size: 16.5px; color: var(--ink-soft); line-height: 1.8; margin-bottom: 16px; }
.scrolly-step p:last-child { margin-bottom: 0; }
.scrolly-step strong { color: var(--ink); font-weight: 700; }

/* sticky tinted visual panel, bleeding to the right edge of the screen */
.scrolly-sticky {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  background: var(--panel);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 40px var(--gutter-wide) 48px 64px;
  overflow: hidden;  /* a panel never spills past the viewport */
}
.viz-progress { display: flex; gap: 9px; justify-content: flex-end; width: 100%; max-width: 680px; margin-bottom: 28px; flex-shrink: 0; }
.pdot { width: 9px; height: 9px; border-radius: 50%; background: rgba(31,41,55,.18); transition: background 0.3s, transform 0.3s; }
.pdot.on { background: var(--math); transform: scale(1.15); }

.viz-stage { flex: 1; display: flex; min-height: 0; }

/* hard swap: only the active viz shows once JS is on. Visibility is driven
   by .shown; .in is added one frame later so every entrance transition fires
   reliably (display:none elements can't transition). */
.scrolly.js-on .viz { display: none; }
.scrolly.js-on .viz.shown { display: flex; }
.scrolly:not(.js-on) .viz { margin-bottom: 40px; }

/* a viz fills the stage: kicker top, body centred, caption bottom. All three
   share one capped width so every section's chart is the same size and the
   kicker rule / caption rule line up identically across panels. */
.viz { width: 100%; flex-direction: column; }
.scrolly.js-on .viz.shown { height: 100%; }
.viz-kicker, .viz-body, .viz-caption { width: 100%; max-width: 680px; }
.viz-kicker {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 1px solid var(--hair); flex-shrink: 0;
}
.viz-body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; min-height: 0; overflow: hidden; }
.viz-caption {
  font-size: 12.5px; color: var(--ink-muted); line-height: 1.55;
  padding-top: 14px; border-top: 1px solid var(--hair); flex-shrink: 0;
  min-height: 3.3em;  /* reserve 2 lines so the body centres consistently */
}

/* ---- animated bars: width driven by --w, staggered by --i ---- */
.bar-chart { display: flex; flex-direction: column; gap: 9px; }
.bar-row   { display: flex; align-items: center; gap: 12px; }
.bar-label { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--ink-soft); text-align: right; min-width: 76px; flex-shrink: 0; }
.bar-track { flex: 1; height: 22px; display: flex; align-items: center; }
.bar-fill  { width: var(--w, 0); border-radius: 4px; background: var(--navy-bar); }
.bar-fill.h { background: var(--navy); }
.bar-value { font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--ink-soft); min-width: 32px; }
.bar-value.h { color: var(--ink); font-size: 14px; }

.pct-chart { display: flex; flex-direction: column; gap: 16px; }
.pct-head  { display: flex; justify-content: space-between; margin-bottom: 6px; }
.pct-name  { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.pct-val   { font-family: var(--font-display); font-size: 14px; font-weight: 800; color: var(--ink-muted); }
.pct-val.h { color: var(--ink); }
.pct-track { height: 9px; border-radius: 5px; background: rgba(31,41,55,.08); overflow: hidden; }
.pct-fill  { width: var(--w, 0); height: 100%; border-radius: 5px; background: var(--navy-bar); }
.pct-fill.h { background: var(--navy); }

.timss-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.timss-head  { font-family: var(--font-display); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--ink-muted); margin-bottom: 14px; }
.timss-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.timss-label { font-family: var(--font-display); font-size: 11.5px; font-weight: 600; color: var(--ink-soft); text-align: right; min-width: 68px; flex-shrink: 0; }
.timss-track { flex: 1; height: 17px; display: flex; align-items: center; }
.timss-fill  { width: var(--w, 0); height: 100%; border-radius: 3px; background: var(--navy-bar); }
.timss-fill.h { background: var(--navy); }
.timss-val   { font-family: var(--font-display); font-size: 11.5px; font-weight: 700; color: var(--ink-muted); min-width: 28px; }
.timss-val.h { color: var(--ink); }

/* animate widths only when active + animation allowed */
.scrolly.js-on .viz .bar-fill,
.scrolly.js-on .viz .pct-fill,
.scrolly.js-on .viz .timss-fill { width: 0; transition: width 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
.scrolly.js-on .viz.in .bar-fill,
.scrolly.js-on .viz.in .pct-fill,
.scrolly.js-on .viz.in .timss-fill { width: var(--w); }

/* ---- CPA progression flow ---- */
.cpa-flow { display: flex; align-items: stretch; }
.cpa-step {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.6); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
}
.cpa-circle {
  width: 42px; height: 42px; border-radius: 50%; background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 17px; font-weight: 800; color: #fff;
}
.cpa-name { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.cpa-desc { font-size: 13px; color: var(--ink-muted); line-height: 1.4; }
.cpa-arrow { display: flex; align-items: center; padding: 0 6px; flex-shrink: 0; font-size: 22px; color: var(--ink-muted); }
.scrolly.js-on .viz .cpa-step { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); transition-delay: calc(var(--i,0) * 130ms); }
.scrolly.js-on .viz.in .cpa-step { opacity: 1; transform: none; }

/* ---- CPA comparison ---- */
.compare-problem { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 14px; }
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-card { border-radius: 12px; padding: 16px 14px; }
/* traditional stays deliberately flat; the CPA card carries the colour */
.compare-card.traditional { background: rgba(31,41,55,.04); border: 1px solid var(--border); }
.compare-card.singapore   { background: linear-gradient(150deg, rgba(6,179,196,.07), rgba(124,107,240,.08)); border: 1px solid rgba(59,130,246,.22); }
.compare-tag { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px; }
.compare-tag.t { color: var(--ink-muted); }
.compare-tag.s { color: var(--c-sg); }
.compare-quote { font-size: 12.5px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 10px; font-style: italic; }
.compare-formula { font-family: var(--font-mono); font-size: 17px; font-weight: 800; color: var(--ink-soft); margin-bottom: 10px; }
.compare-formula.cpa-abstract { color: var(--c-purple); }
.compare-caption { font-size: 11.5px; color: var(--ink-muted); line-height: 1.5; }
.step-label { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--ink-muted); margin-bottom: 6px; }

/* colour-coded CPA stages: Concrete teal, Pictorial blue, Abstract purple */
.cpa-stage { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cpa-stage .step-label { margin-bottom: 0; }
.cpa-badge { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 11px; font-weight: 800; color: #fff; flex-shrink: 0; }
.cpa-stage.c .cpa-badge { background: var(--c-teal); }
.cpa-stage.p .cpa-badge { background: var(--c-sg); }
.cpa-stage.a .cpa-badge { background: var(--c-purple); }
.cpa-stage.c .step-label { color: #0E8C9B; }
.cpa-stage.p .step-label { color: #2563EB; }
.cpa-stage.a .step-label { color: #7C3AED; }
.dot-groups { display: flex; gap: 8px; margin-bottom: 14px; }
.dot-group  { display: grid; grid-template-columns: repeat(2, 11px); gap: 4px; }
.dot        { width: 11px; height: 11px; border-radius: 50%; background: var(--c-teal); }
.sq-grid    { display: grid; grid-template-columns: repeat(4, 14px); gap: 4px; margin-bottom: 14px; }
.sq         { width: 14px; height: 14px; border-radius: 3px; background: var(--c-sg); }

/* ---- breadth vs depth ---- */
.depth-label { font-family: var(--font-display); font-size: 12px; font-weight: 700; margin-bottom: 10px; }
.depth-label.typical   { color: var(--ink-soft); }
.depth-label.singapore { color: var(--navy); }
.depth-bars  { display: flex; align-items: flex-end; height: 48px; }
.depth-bar   { flex: 1; height: var(--h, 0); border-radius: 2px; }
.depth-bar.t { background: rgba(44,62,110,.22); }
.depth-bar.s { background: var(--navy); border-radius: 3px; }
.depth-cap   { font-size: 12px; color: var(--ink-muted); margin-top: 7px; margin-bottom: 22px; }
.depth-cap.last { margin-bottom: 0; }
.scrolly.js-on .viz .depth-bar { height: 0; transition: height .7s var(--ease); transition-delay: calc(var(--i,0) * 45ms); }
.scrolly.js-on .viz.in .depth-bar { height: var(--h); }

/* ---------------------------------------------------------------------------
   ENTRANCE CHOREOGRAPHY — each panel assembles itself when it becomes active.
   Base = hidden start state; .in = settled end state (added one frame later).
   --------------------------------------------------------------------------- */
/* kicker drops in first, caption fades in last */
.scrolly.js-on .viz .viz-kicker,
.scrolly.js-on .viz .viz-caption { opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scrolly.js-on .viz.in .viz-kicker  { opacity: 1; transform: none; transition-delay: .04s; }
.scrolly.js-on .viz.in .viz-caption { opacity: 1; transform: none; transition-delay: .42s; }

/* value numbers fade in shortly after their bars start growing */
.scrolly.js-on .viz .bar-value,
.scrolly.js-on .viz .pct-val,
.scrolly.js-on .viz .timss-val,
.scrolly.js-on .viz .pct-name,
.scrolly.js-on .viz .bar-label,
.scrolly.js-on .viz .timss-label { opacity: 0; transition: opacity .55s var(--ease); transition-delay: .28s; }
.scrolly.js-on .viz.in .bar-value,
.scrolly.js-on .viz.in .pct-val,
.scrolly.js-on .viz.in .timss-val,
.scrolly.js-on .viz.in .pct-name,
.scrolly.js-on .viz.in .bar-label,
.scrolly.js-on .viz.in .timss-label { opacity: 1; }

/* TIMSS column headings + grade labels */
.scrolly.js-on .viz .timss-head { opacity: 0; transform: translateY(6px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.scrolly.js-on .viz.in .timss-head { opacity: 1; transform: none; transition-delay: .1s; }

/* comparison: cards rise in, then the dots + squares pop */
.scrolly.js-on .viz .compare-problem { opacity: 0; transition: opacity .4s var(--ease); }
.scrolly.js-on .viz.in .compare-problem { opacity: 1; transition-delay: .04s; }
.scrolly.js-on .viz .compare-card { opacity: 0; transform: translateY(14px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.scrolly.js-on .viz.in .compare-card.traditional { opacity: 1; transform: none; transition-delay: .12s; }
.scrolly.js-on .viz.in .compare-card.singapore   { opacity: 1; transform: none; transition-delay: .24s; }
.scrolly.js-on .viz .dot,
.scrolly.js-on .viz .sq { opacity: 0; transform: scale(.3); transition: opacity .35s var(--ease), transform .4s var(--ease); }
.scrolly.js-on .viz.in .dot { opacity: 1; transform: none; transition-delay: .42s; }
.scrolly.js-on .viz.in .sq  { opacity: 1; transform: none; transition-delay: .54s; }
.scrolly.js-on .viz .step-label { opacity: 0; transition: opacity .4s var(--ease); }
.scrolly.js-on .viz.in .step-label { opacity: 1; transition-delay: .3s; }

/* depth labels + captions fade with the bars */
.scrolly.js-on .viz .depth-label,
.scrolly.js-on .viz .depth-cap { opacity: 0; transition: opacity .5s var(--ease); }
.scrolly.js-on .viz.in .depth-label,
.scrolly.js-on .viz.in .depth-cap { opacity: 1; transition-delay: .2s; }

/* UK stat cards rise in one after the other */
.scrolly.js-on .viz .stat-card { opacity: 0; transform: translateY(12px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.scrolly.js-on .viz.in .stat-card { opacity: 1; transform: none; }
.scrolly.js-on .viz.in .stat-card:nth-child(2) { transition-delay: .14s; }

/* ---- PISA trend line chart (SVG, draws on when active) ---- */
.linechart { width: 100%; height: auto; max-height: 42vh; display: block; font-family: var(--font-display); }
.linechart .grid    { stroke: rgba(31,41,55,.1); stroke-width: 1; stroke-dasharray: 3 4; }
.linechart .axis-lbl{ fill: var(--ink-muted); font-size: 13px; }
.linechart .xlbl    { fill: var(--ink-muted); font-size: 13px; text-anchor: middle; }
.linechart .line    { fill: none; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.linechart .line.sg   { stroke: var(--navy); }
.linechart .line.oecd { stroke: var(--navy-bar); stroke-width: 3; }
.linechart .lndot      { stroke: #fff; stroke-width: 2; }
.linechart .lndot.sg   { fill: var(--navy); }
.linechart .lndot.oecd { fill: var(--navy-bar); }
.linechart .endval     { font-size: 14px; font-weight: 800; }
.linechart .endval.sg   { fill: var(--navy); }
.linechart .endval.oecd { fill: var(--ink-muted); }
.scrolly.js-on .viz .line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s var(--ease); }
.scrolly.js-on .viz.in .line.oecd { stroke-dashoffset: 0; }
.scrolly.js-on .viz.in .line.sg   { stroke-dashoffset: 0; transition-delay: .18s; }
.scrolly.js-on .viz .lndot,
.scrolly.js-on .viz .endval { opacity: 0; transition: opacity .5s var(--ease); }
.scrolly.js-on .viz.in .lndot,
.scrolly.js-on .viz.in .endval { opacity: 1; transition-delay: 1s; }
/* area-difference "lead" band + gap labels */
.linechart .gap-lbl { fill: var(--c-sg); font-size: 13px; font-weight: 800; }
.scrolly.js-on .viz .band,
.scrolly.js-on .viz .gap-lbl { opacity: 0; transition: opacity .6s var(--ease); }
.scrolly.js-on .viz.in .band { opacity: 1; transition-delay: .55s; }
.scrolly.js-on .viz.in .gap-lbl { opacity: 1; transition-delay: 1.1s; }

/* ---- waffle / dot grid (PISA top performers): X out of 100 students ---- */
.waffle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.waffle-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.waffle-name { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.waffle-pct  { font-family: var(--font-display); font-size: 17px; font-weight: 800; }
.waffle { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; max-width: 168px; }
.waffle .cell { aspect-ratio: 1; border-radius: 2px; background: rgba(31,41,55,.08); }
.waffle .cell.on { background: var(--fill); }
/* items rise in, then the coloured squares fill with a left-to-right sweep */
.scrolly.js-on .viz .waffle-item { opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scrolly.js-on .viz.in .waffle-item { opacity: 1; transform: none; }
.scrolly.js-on .viz.in .waffle-item:nth-child(2) { transition-delay: .06s; }
.scrolly.js-on .viz.in .waffle-item:nth-child(3) { transition-delay: .12s; }
.scrolly.js-on .viz.in .waffle-item:nth-child(4) { transition-delay: .18s; }
.scrolly.js-on .viz .waffle .cell.on { background: rgba(31,41,55,.08); transition: background .4s var(--ease); transition-delay: calc(var(--c,0) * 9ms); }
.scrolly.js-on .viz.in .waffle .cell.on { background: var(--fill); }

/* ---- TIMSS dumbbell (connected dot plot): Grade 4 + Grade 8 per country ---- */
.dumbbell { width: 100%; height: auto; max-height: 46vh; display: block; font-family: var(--font-display); }
.dumbbell .db-grid { stroke: rgba(31,41,55,.09); stroke-width: 1; }
.dumbbell .db-axis { fill: var(--ink-muted); font-size: 12px; text-anchor: middle; }
.dumbbell .db-name { fill: var(--ink-soft); font-size: 13px; font-weight: 600; text-anchor: end; }
.dumbbell .db-name.h { fill: var(--ink); font-weight: 700; }
.dumbbell .db-val  { fill: var(--ink-soft); font-size: 12.5px; font-weight: 700; }
.dumbbell .db-val.h { fill: var(--ink); }
.dumbbell .db-ref { stroke: var(--ink-muted); stroke-width: 1.5; stroke-dasharray: 4 5; }
.dumbbell .db-reflbl { fill: var(--ink-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; text-anchor: middle; }
.db-legend { display: flex; gap: 18px; margin-top: 16px; }
.db-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-muted); }
.db-key { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.db-key.open { background: var(--panel); border: 2px solid var(--ink-muted); }
.db-key.fill { background: var(--ink-soft); }
/* draw-on: connectors draw, then dots + values fade in */
.scrolly.js-on .viz .db-line { stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .9s var(--ease); }
.scrolly.js-on .viz.in .db-line { stroke-dashoffset: 0; }
.scrolly.js-on .viz .db-dot,
.scrolly.js-on .viz .db-val { opacity: 0; transition: opacity .5s var(--ease); }
.scrolly.js-on .viz.in .db-dot,
.scrolly.js-on .viz.in .db-val { opacity: 1; transition-delay: .55s; }

/* ---- baseline-proficiency donut rings ---- */
.rings { width: 100%; height: auto; max-height: 46vh; display: block; font-family: var(--font-display); }
.rings .ring-track { fill: none; stroke: rgba(199,91,71,.30); stroke-width: 22; }
.rings .ring-arc   { fill: none; stroke: var(--c-sg); stroke-width: 22; stroke-linecap: round; stroke-dasharray: 100 100; stroke-dashoffset: var(--off); }
.rings .ring-name  { fill: var(--ink-soft); font-size: 15px; font-weight: 600; text-anchor: middle; }
.rings .ring-pct   { fill: var(--ink); font-size: 30px; font-weight: 800; text-anchor: middle; }
.rings .ring-sub   { fill: var(--ink-muted); font-size: 12.5px; font-weight: 600; text-anchor: middle; }
/* hidden until the panel is active, then the arc sweeps in */
.scrolly.js-on .viz .ring-arc { stroke-dashoffset: 100; transition: stroke-dashoffset 1.1s var(--ease); }
.scrolly.js-on .viz.in .ring-arc { stroke-dashoffset: var(--off); }
.scrolly.js-on .viz .ring-pct,
.scrolly.js-on .viz .ring-sub { opacity: 0; transition: opacity .5s var(--ease); }
.scrolly.js-on .viz.in .ring-pct,
.scrolly.js-on .viz.in .ring-sub { opacity: 1; transition-delay: .8s; }

/* ---- baseline-proficiency stacked bars (legacy, unused) ---- */
.stack-chart { display: flex; flex-direction: column; gap: 24px; }
.stack-name  { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 8px; }
.stack-track { height: 34px; border-radius: 7px; background: rgba(193,78,60,.26); overflow: hidden; }
.stack-fill  { width: var(--w, 0); height: 100%; background: var(--navy); border-radius: 7px 0 0 7px; display: flex; align-items: center; justify-content: flex-end; padding-right: 12px; }
.stack-val   { font-family: var(--font-display); font-size: 13.5px; font-weight: 800; color: #fff; }
.stack-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 18px; }
.stack-legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-muted); }
.stack-sw { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.scrolly.js-on .viz .stack-fill { width: 0; transition: width 1s var(--ease); transition-delay: .1s; }
.scrolly.js-on .viz.in .stack-fill { width: var(--w); }

/* ===========================================================================
   COLOUR + INTERACTIVITY
   =========================================================================== */
/* PISA score bars */
.viz[data-viz="pisa"] .bar-row:nth-child(1) .bar-fill { background: var(--c-sg); }
.viz[data-viz="pisa"] .bar-row:nth-child(2) .bar-fill { background: var(--c-green); }
.viz[data-viz="pisa"] .bar-row:nth-child(3) .bar-fill { background: var(--c-gold); }
.viz[data-viz="pisa"] .bar-row:nth-child(4) .bar-fill { background: var(--c-gray); }
.viz[data-viz="pisa"] .bar-row:nth-child(5) .bar-fill { background: var(--c-clay); }
/* top-performer bars */
.viz[data-viz="prof"] .pct-row:nth-child(1) .pct-fill { background: var(--c-sg); }
.viz[data-viz="prof"] .pct-row:nth-child(2) .pct-fill { background: var(--c-gold); }
.viz[data-viz="prof"] .pct-row:nth-child(3) .pct-fill { background: var(--c-gray); }
.viz[data-viz="prof"] .pct-row:nth-child(4) .pct-fill { background: var(--c-clay); }
/* TIMSS bars (row 1 is the grade heading, so countries start at child 2) */
.viz[data-viz="timss"] .timss-row:nth-child(2) .timss-fill { background: var(--c-sg); }
.viz[data-viz="timss"] .timss-row:nth-child(3) .timss-fill { background: var(--c-teal); }
.viz[data-viz="timss"] .timss-row:nth-child(4) .timss-fill { background: var(--c-green); }
.viz[data-viz="timss"] .timss-row:nth-child(5) .timss-fill { background: var(--c-gold); }
.viz[data-viz="timss"] .timss-row:nth-child(6) .timss-fill { background: var(--c-clay); }
/* Computer Science charts: purple (Jump) is the standout */
.viz[data-viz="ef"] .bar-row:nth-child(1) .bar-fill { background: var(--coding); }
.viz[data-viz="ef"] .bar-row:nth-child(2) .bar-fill { background: var(--c-gray); }
.viz[data-viz="transfer"] .bar-row:nth-child(1) .bar-fill { background: var(--coding); }
.viz[data-viz="transfer"] .bar-row:nth-child(2) .bar-fill { background: var(--c-teal); }
.viz[data-viz="transfer"] .bar-row:nth-child(3) .bar-fill { background: var(--c-green); }

/* line chart recoloured for contrast */
.linechart .line.sg   { stroke: var(--c-sg); }
.linechart .line.oecd { stroke: var(--c-clay); }
.linechart .lndot.sg   { fill: var(--c-sg); }
.linechart .lndot.oecd { fill: var(--c-clay); }
.linechart .endval.sg   { fill: var(--c-sg); }
.linechart .endval.oecd { fill: var(--c-clay); }
/* depth + floor accents */
.depth-bar.s { background: var(--c-sg); }
.stack-fill  { background: var(--c-sg); }
.stat-num    { color: var(--c-sg); }

/* hover-to-focus: dim the chart, light up what the cursor is on */
.bar-row, .pct-row, .timss-row, .stack-row { transition: opacity .2s var(--ease); }
.bar-chart:hover  .bar-row   { opacity: .4; }
.pct-chart:hover  .pct-row   { opacity: .4; }
.timss-grid:hover .timss-row { opacity: .42; }
.stack-chart:hover .stack-row { opacity: .5; }
.bar-chart .bar-row:hover,
.pct-chart .pct-row:hover,
.timss-grid .timss-row:hover,
.stack-chart .stack-row:hover { opacity: 1; }
.bar-row:hover .bar-fill,
.pct-row:hover .pct-fill,
.timss-row:hover .timss-fill,
.stack-row:hover .stack-fill { filter: brightness(1.08) saturate(1.12); }

/* line-chart points: enlarge on hover, native tooltip via <title> */
.linechart .lndot { cursor: pointer; transition: transform .15s var(--ease); transform-box: fill-box; transform-origin: center; }
.linechart .lndot:hover { transform: scale(1.7); }

/* cards lift on hover. Base rule covers the no-JS fallback; the .in-scoped
   rule has enough specificity to beat the entrance transform reset, and
   carries its own snappy transition so the lift is immediate (the entrance
   stagger still runs because :hover is inactive while a panel animates in). */
.cpa-step:hover, .compare-card:hover, .stat-card:hover { box-shadow: 0 12px 26px -16px rgba(31,41,55,.5); }
.scrolly.js-on .viz.in .cpa-step:hover,
.scrolly.js-on .viz.in .compare-card:hover,
.scrolly.js-on .viz.in .stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px -16px rgba(31,41,55,.55);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

/* ---- intro step: section title + framing question (left column) ---- */
.intro-step .station-tag { margin-bottom: 18px; }
.domain-title { font-size: clamp(40px, 6vw, 64px); color: var(--ink); margin-bottom: 14px; letter-spacing: -0.03em; }
.intro-step .curriculum-note { font-size: 15px; color: var(--ink-muted); line-height: 1.6; margin-bottom: 30px; max-width: 560px; }
.intro-step .curriculum-note strong { color: var(--ink-soft); }
.intro-q { font-size: clamp(26px, 3.4vw, 38px); color: var(--ink); margin-bottom: 16px; letter-spacing: -0.02em; }
.intro-lead { font-size: 17px; color: var(--ink-soft); line-height: 1.75; }

/* ---- 4 headline figures (intro sticky panel) ---- */
.figure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.figure {
  background: rgba(255,255,255,.55); border: 1px solid var(--border);
  border-radius: 14px; padding: 24px 22px;
}
.figure .metric-num { font-size: clamp(30px, 4vw, 46px); margin-bottom: 10px; }
.figure .metric-lab { font-size: 13px; }
.figure:nth-child(1) .metric-num { color: var(--c-sg); }
.figure:nth-child(2) .metric-num { color: var(--c-teal); }
.figure:nth-child(3) .metric-num { color: var(--c-green); }
.figure:nth-child(4) .metric-num { color: var(--c-gold); }
/* entrance stagger + hover lift (scoped to beat the entrance transform reset) */
.scrolly.js-on .viz .figure { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scrolly.js-on .viz.in .figure { opacity: 1; transform: none; }
.scrolly.js-on .viz.in .figure:nth-child(2) { transition-delay: .08s; }
.scrolly.js-on .viz.in .figure:nth-child(3) { transition-delay: .16s; }
.scrolly.js-on .viz.in .figure:nth-child(4) { transition-delay: .24s; }
.figure:hover { box-shadow: 0 12px 26px -16px rgba(31,41,55,.5); }
.scrolly.js-on .viz.in .figure:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px -16px rgba(31,41,55,.5);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

/* ---- computational-thinking pillar cards (2x2) ---- */
.ct-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ct-card { background: rgba(255,255,255,.55); border: 1px solid var(--border); border-radius: 14px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 9px; }
.ct-badge { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 800; font-size: 15px; color: #fff; }
.ct-card:nth-child(1) .ct-badge { background: #3A8FD9; }
.ct-card:nth-child(2) .ct-badge { background: #06B6D4; }
.ct-card:nth-child(3) .ct-badge { background: #7C6BF0; }
.ct-card:nth-child(4) .ct-badge { background: #F97316; }
.ct-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); }
.ct-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

/* ---- "how young children learn" cards (stacked) ---- */
.learn-grid { display: flex; flex-direction: column; gap: 12px; }
.learn-card { background: rgba(255,255,255,.6); border: 1px solid var(--border); border-left-width: 3px; border-radius: 12px; padding: 16px 18px; }
.learn-card:nth-child(1) { border-left-color: #7C6BF0; }
.learn-card:nth-child(2) { border-left-color: #06B6D4; }
.learn-card:nth-child(3) { border-left-color: #F97316; }
.learn-name { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.learn-desc { font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }

/* ---- unit comparison (executive function: months of class) ---- */
.unit-chart { display: flex; flex-direction: column; gap: 26px; }
.unit-label { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 9px; }
.unit-cells { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 7px; }
.ucell { width: 34px; height: 34px; border-radius: 8px; background: rgba(31,41,55,.1); }
.ucell.on { background: var(--coding); }
.unit-note { font-size: 12.5px; color: var(--ink-muted); }
.scrolly.js-on .viz .ucell { opacity: 0; transform: scale(.4); transition: opacity .35s var(--ease), transform .4s var(--ease); transition-delay: calc(var(--c,0) * 70ms); }
.scrolly.js-on .viz.in .ucell { opacity: 1; transform: none; }

/* ---- "one concept, three languages" code cards (stacked) ---- */
.lang-grid { display: flex; flex-direction: column; gap: 12px; }
.lang-card { background: rgba(255,255,255,.6); border: 1px solid var(--border); border-left-width: 3px; border-radius: 12px; padding: 14px 16px; }
.lang-card.blocks { border-left-color: #7C6BF0; }
.lang-card.py     { border-left-color: #3A8FD9; }
.lang-card.js     { border-left-color: #F97316; }
.lang-tag { font-family: var(--font-display); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 8px; }
.lang-card .code { font-family: var(--font-mono); font-size: 13px; color: var(--ink); line-height: 1.5; white-space: pre; overflow-x: auto; margin: 0; }

/* entrance for the CT + language cards */
.scrolly.js-on .viz .ct-card,
.scrolly.js-on .viz .lang-card,
.scrolly.js-on .viz .learn-card { opacity: 0; transform: translateY(12px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scrolly.js-on .viz.in .ct-card,
.scrolly.js-on .viz.in .lang-card,
.scrolly.js-on .viz.in .learn-card { opacity: 1; transform: none; }
.scrolly.js-on .viz.in .ct-card:nth-child(2)    { transition-delay: .08s; }
.scrolly.js-on .viz.in .ct-card:nth-child(3)    { transition-delay: .16s; }
.scrolly.js-on .viz.in .ct-card:nth-child(4)    { transition-delay: .24s; }
.scrolly.js-on .viz.in .lang-card:nth-child(2)  { transition-delay: .1s; }
.scrolly.js-on .viz.in .lang-card:nth-child(3)  { transition-delay: .2s; }
.scrolly.js-on .viz.in .learn-card:nth-child(2) { transition-delay: .1s; }
.scrolly.js-on .viz.in .learn-card:nth-child(3) { transition-delay: .2s; }
.ct-card, .lang-card, .learn-card { transition: box-shadow .2s var(--ease); }
.ct-card:hover, .lang-card:hover, .learn-card:hover { box-shadow: 0 12px 26px -16px rgba(31,41,55,.5); }

/* ---- UK stat tiles (three stacked, full-width) ---- */
.stat-num   { font-family: var(--font-display); font-weight: 700; color: var(--navy); line-height: 1; flex-shrink: 0; }
.uk-stats   { display: flex; flex-direction: column; gap: 14px; }
.uk-stat {
  display: flex; align-items: center; gap: 22px;
  background: rgba(255,255,255,.55); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px;
}
.uk-stat .stat-num { font-size: clamp(34px, 4.4vw, 52px); min-width: 132px; }
.uk-lab { font-size: 14px; color: var(--ink-soft); line-height: 1.5; }
.uk-stat:nth-child(1) .stat-num { color: var(--c-sg); }
.uk-stat:nth-child(2) .stat-num { color: var(--c-teal); }
.uk-stat:nth-child(3) .stat-num { color: var(--c-green); }
/* entrance stagger + hover lift (scoped to beat the entrance transform reset) */
.scrolly.js-on .viz .uk-stat { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.scrolly.js-on .viz.in .uk-stat { opacity: 1; transform: none; }
.scrolly.js-on .viz.in .uk-stat:nth-child(2) { transition-delay: .1s; }
.scrolly.js-on .viz.in .uk-stat:nth-child(3) { transition-delay: .2s; }
.uk-stat:hover { box-shadow: 0 12px 26px -16px rgba(31,41,55,.5); }
.scrolly.js-on .viz.in .uk-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px -16px rgba(31,41,55,.5);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease);
}

/* ---- payoff ---- */
.payoff { max-width: 780px; margin: 72px auto 0; padding-top: 48px; border-top: 1px solid var(--border); }
.payoff h3 { font-size: 24px; color: var(--ink); margin-bottom: 16px; }
.payoff p  { font-size: 16.5px; color: var(--ink-soft); line-height: 1.78; margin-bottom: 20px; }
.pdf-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--navy); color: #fff;
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; margin-bottom: 16px; transition: filter 0.15s;
}
.pdf-btn:hover { filter: brightness(1.14); }
.sources { font-size: 12px; color: var(--ink-muted); line-height: 1.7; }

/* ---- computer science (simple block) ---- */
.cs-block p { font-size: 16.5px; color: var(--ink-soft); line-height: 1.78; margin-bottom: 24px; }
.cs-block p:last-of-type { margin-bottom: 36px; }
.coming-soon {
  background: rgba(31,41,55,.04); border: 1.5px dashed rgba(31,41,55,.12);
  border-radius: 16px; padding: 44px 36px; text-align: center;
}
.coming-soon h3 { font-size: 18px; color: var(--ink-soft); margin-bottom: 10px; }
.coming-soon p  { font-size: 15.5px; color: var(--ink-muted); line-height: 1.65; }

/* ---- CTA ---- */
.cta-section { background: var(--space); padding: 88px 0; text-align: center; }
.cta-section h2 { font-size: clamp(28px, 4vw, 42px); color: var(--night-ink); margin-bottom: 16px; }
.cta-section p  { font-size: 17px; color: var(--night-soft); line-height: 1.7; max-width: 480px; margin: 0 auto 36px; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--neon); color: #fff;
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  padding: 14px 30px; border-radius: 999px; transition: filter 0.15s;
}
.btn-cta:hover { filter: brightness(1.1); }

/* ---- footer (matches the landing 4-column footer) ---- */
footer { background: #07091B; color: var(--night-soft); padding: 56px 0 40px; font-size: 14.5px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.footer-brand .logo { display: inline-block; font-family: var(--font-display); font-weight: 700; font-size: 20px; letter-spacing: 0.02em; color: var(--night-ink); margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; max-width: 320px; }
.footer-col h4 { font-family: var(--font-body); color: var(--night-ink); font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 12px; }
.footer-col a { display: block; font-size: 14px; margin-bottom: 8px; color: var(--night-soft); transition: color 0.15s; }
.footer-col a:hover { color: var(--night-ink); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.08); font-size: 13px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .scrolly {
    grid-template-columns: 1fr;
    grid-template-areas: "viz" "steps";
  }
  .scrolly-steps  { padding: 0 24px; }
  .scrolly-sticky {
    position: sticky; top: var(--nav-h);
    height: auto; min-height: 0;
    border-left: none; border-bottom: 1px solid var(--border);
    padding: 16px 24px 18px; z-index: 5;
  }
  .viz-progress { margin-bottom: 14px; }
  .viz-body { padding: 16px 0; }
  .scrolly-step { min-height: 60vh; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); gap: 24px 20px; }
  .nav-links   { display: none; }
  .domain-section { padding: 56px 0; }
  .page-hero   { min-height: 0; padding: 64px 0 56px; }
  .hero-grid   { grid-template-columns: 1fr; gap: 36px; }
  .scroll-cue  { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .compare-grid { grid-template-columns: 1fr; }
  .stats-grid   { grid-template-columns: 1fr; }
  .timss-grid   { gap: 16px; }
  .footer-grid  { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* ---- reduced motion: no transitions, everything visible ---- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
