/* Rushmore Academy landing page. Needs design/tokens.css, base.css, components.css.
   One axis: every block centers on the page on the same --container / --reading / --narrow measures with the same --gutter.
   Structure: a fixed dusk-to-dawn scene; a night hero; parchment "paper" sections that scroll over the scene;
   three sky "windows" between them where one sentence sits on the scene; a dawn entry section; the footer. */
:root { --p: 0; --night: #0B1119; --paper-on-night: #F4EFE4; --muted-on-night: #C3C9D1; }
body.welcome { background: var(--night); color: var(--paper-on-night); overflow-x: hidden; }
body.welcome p { max-width: none; }
body.welcome main { max-width: none; padding: 0; }

/* The scene: a fixed depth stack behind the page (motion.css owns .lyr, .lyr-tilt, .lyr-drift and the ambient animations).
   The sky crossfades from dusk to dawn with --p (page progress, written by motion.js). Each ridge carries a .dusk and a .dawn
   path; the dawn path fades in with --p so the range warms as the reader moves down. Transform and opacity only. */
.scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.sky { position: absolute; inset: 0; }
.sky.dusk { background: linear-gradient(180deg, #070B11 0%, #0B1119 28%, #16202E 60%, #243042 84%, #2E3A4C 100%); }
.sky.dawn { background: linear-gradient(180deg, #0E1620 0%, #1C2735 30%, #3A4252 56%, #6E5F5E 76%, #A98462 90%, #D1AA74 100%); opacity: var(--p); }
.scene .art .dawn { opacity: var(--p); }
.scene .lyr-glow { opacity: 1; }
.sun { position: absolute; left: 50%; bottom: 18%; width: 70vmax; height: 70vmax; margin-left: -35vmax; border-radius: 50%; background: radial-gradient(circle, rgba(222, 186, 128, .55) 0%, rgba(222, 186, 128, .18) 30%, rgba(222, 186, 128, 0) 64%); opacity: calc(.08 + var(--p) * .92); }
.scene .lyr[data-slot="hero.hero-stars"] { opacity: calc(.95 - var(--p) * 1.1); }
.engrave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 62vh; opacity: .05; mix-blend-mode: screen; }
.grain { position: absolute; inset: 0; opacity: .07; background-size: 220px 220px; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }

/* Header: design/header.css owns the fixed top bar (full lockup at the top, compact once scrolled, a sheet on phones).
   This page runs under it (body.ra-top-over) and keeps ivory text on the night (body.ra-on-dark). */

/* Hero on the night: the arms, the name, the motto, one sentence, one door */
#story { position: relative; z-index: 1; }
.hero { min-height: 100dvh; display: grid; align-content: center; padding: calc(var(--top-h) + 6vh) var(--gutter) 10vh; }
.hero-inner { width: min(100%, var(--reading)); margin: 0 auto; display: grid; justify-items: center; text-align: center; gap: 0; }
.hero-arms { width: clamp(150px, 22vw, 236px); height: auto; filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .55)); margin-bottom: clamp(24px, 4vh, 40px); }
.monument { font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 6vw, 4.4rem); letter-spacing: .24em; text-indent: .24em; text-transform: uppercase; line-height: 1.12; margin: 0; color: var(--paper-on-night); text-shadow: 0 2px 30px rgba(0, 0, 0, .5); }
.monument-sm { font-family: var(--font-display); font-weight: 500; font-size: clamp(1.4rem, 3.2vw, 2rem); letter-spacing: .22em; text-indent: .22em; text-transform: uppercase; }
.motto { margin: clamp(16px, 3vh, 28px) 0 0; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.motto .latin, .ceremony-motto .latin { font-family: var(--font-display); font-size: clamp(.8rem, 1.5vw, 1rem); letter-spacing: .36em; text-indent: .36em; text-transform: uppercase; color: var(--gold-bright); }
.motto .gloss, .ceremony-motto .gloss { font-family: var(--font-heading); font-style: italic; font-size: var(--fs-3); color: var(--muted-on-night); }
.hero-lead { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.3rem, 2.4vw, 1.75rem); line-height: 1.4; max-width: 34ch; color: var(--paper-on-night); margin: clamp(28px, 5vh, 44px) auto 0; text-wrap: balance; }
.hero-actions { display: flex; gap: var(--s-6); align-items: center; justify-content: center; flex-wrap: wrap; margin: clamp(28px, 5vh, 44px) 0 0; }
.hero .btn-gold { color: var(--gold-bright); border-color: var(--gold-bright); }
.hero .btn-gold:hover { background: var(--gold-bright); color: var(--night); }
.hero-note { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px var(--s-4); font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .12em; font-size: var(--fs-2); color: var(--muted-on-night); margin: clamp(40px, 7vh, 64px) 0 0; }
.hero-note .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--gold-bright); opacity: .8; }
.scroll-cue { color: var(--muted-on-night); font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .08em; font-size: var(--fs-2); text-decoration: none; border-bottom: 1px solid rgba(195, 201, 209, .4); padding-bottom: 2px; }
.scroll-cue:hover { color: var(--paper-on-night); border-bottom-color: currentColor; }
.scroll-cue::after { content: ''; display: inline-block; width: 7px; height: 7px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); margin-left: 12px; position: relative; top: -4px; animation: ra-bob 2.6s var(--ease-in-out) infinite; }
@keyframes ra-bob { 0%, 100% { transform: rotate(45deg) translate(0, 0); } 50% { transform: rotate(45deg) translate(3px, 3px); } }
/* The hero rises on its own CSS clock from the first paint (no script in the way, so the first view is never late): arms, name, motto, lead, doors, note. */
.rise { animation: ra-rise-in 1300ms var(--ease-fade) both; }
.rise:nth-child(2) { animation-delay: 180ms; } .rise:nth-child(3) { animation-delay: 420ms; } .rise:nth-child(4) { animation-delay: 620ms; } .rise:nth-child(5) { animation-delay: 860ms; } .rise:nth-child(6) { animation-delay: 1060ms; }
.hero-arms.rise { animation-name: ra-rise-arms; animation-duration: 1800ms; }
@keyframes ra-rise-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }
@keyframes ra-rise-arms { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }
:root[data-motion="reduce"] .rise { animation: none; }

/* Sky windows: full bleed engraved scenes with one sentence on them. .scene-flow and the layers come from motion.css. */
.window { position: relative; display: block; padding: 0; }
.window .scene-art { position: absolute; inset: 0; margin: 0; z-index: 0; }
.window .scene-copy { min-height: 100%; }
.window .eyebrow { color: var(--gold-bright); margin-bottom: var(--s-6); }
.big { font-family: var(--font-heading); font-weight: 400; font-size: clamp(1.9rem, 4.4vw, 3.4rem); line-height: 1.2; max-width: 22ch; color: var(--paper-on-night); margin: 0; text-wrap: balance; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }
.big + .big { margin-top: var(--s-6); }
.window .window-inner { --stagger: 900ms; }
.window .big .w { transition-delay: calc(var(--i, 0) * 90ms + var(--split-delay, 0ms)); }
.window .big + .big { --split-delay: 700ms; }
.lyr-glow-s { mix-blend-mode: screen; }

/* Paper: the reading surface. Sections alternate parchment and parchment-deep; every section centers its head on the narrow measure. */
.paper { position: relative; isolation: isolate; background: var(--bg); color: var(--text); box-shadow: 0 -1px 0 rgba(201, 162, 78, .35), 0 1px 0 rgba(201, 162, 78, .35); }
.sec { padding: var(--section) var(--gutter); }
.sec-alt { background: var(--bg-alt); }
/* The paper warms toward gold as the page goes on: one tint layer whose opacity follows --p (opacity only, no repaint of the text). */
.paper::before { content: ''; position: absolute; inset: 0; z-index: -1; background: #C9A24E; opacity: calc(var(--p) * .07); pointer-events: none; will-change: opacity; }
.chapter { width: min(100%, var(--container)); top: calc(var(--top-h-compact, 50px) + env(safe-area-inset-top, 0px)); }
.chapter .n { min-width: 2.2em; }
.sec > * { width: min(100%, var(--container)); margin-left: auto; margin-right: auto; }
.sec-head { width: min(100%, var(--narrow)); text-align: center; margin-bottom: var(--block); }
.sec-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); line-height: 1.12; margin: 0 0 var(--s-5); font-weight: 500; }
.sec-head .lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); margin: 0 auto; max-width: 56ch; }
.rule-caps { display: flex; align-items: center; justify-content: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.rule-caps::before, .rule-caps::after { content: ''; width: 36px; border-top: 1px solid var(--gold); opacity: .7; }
.sec h3 { font-family: var(--font-heading); font-size: var(--fs-3); font-weight: 600; margin: 0 0 var(--s-2); }
.cols { display: grid; gap: var(--s-6) var(--s-7); margin-top: var(--block); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.col p { font-family: var(--font-text); font-size: var(--fs-2); color: var(--text-soft); margin: 0; }
.col h3 { font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .1em; font-weight: 600; font-size: var(--fs-3); }
@media (min-width: 900px) { .cols-3 { grid-template-columns: repeat(3, 1fr); gap: 0; } .cols-3 .col { padding: 0 var(--s-6); border-left: 1px solid var(--line); } .cols-3 .col:first-child { border-left: 0; padding-left: 0; } .cols-3 .col:last-child { padding-right: 0; } }
.who { width: min(100%, var(--reading)); margin-top: var(--section); padding-top: var(--block); border-top: 1px solid var(--line); }
.who-title { text-align: center; margin-bottom: var(--s-5); }
.checks { list-style: none; padding: 0; margin: 0 0 var(--s-5); }
.checks li { position: relative; padding-left: 28px; margin: var(--s-3) 0; font-family: var(--font-text); font-size: var(--fs-2); color: var(--text-soft); }
.checks li::before { content: ''; position: absolute; left: 4px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.plain { font-family: var(--font-heading); font-style: italic; font-size: var(--fs-3); color: var(--muted); text-align: center; }

/* Engraved plates: ink on parchment, framed by their own hairline. Each is a slot for an approved image later (data-slot). */
.plate { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); padding: 6px; }
.plate img { width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: contain; display: block; border-radius: 2px; }
:root[data-theme="dark"] .plate img, .plate img { background: var(--parchment); }
.plate figcaption { margin: var(--s-3) var(--s-2) var(--s-1); font-family: var(--font-text); font-style: italic; text-align: center; }
.plate-wide { width: min(100%, 720px); margin: 0 auto var(--block); }
.plate-sm { width: min(100%, 300px); margin: 0 auto; }
.split-2 { display: grid; gap: var(--s-6); align-items: center; }
@media (min-width: 760px) { .split-2 { grid-template-columns: 5fr 7fr; gap: var(--s-7); } .map-head.split-2 { grid-template-columns: 1fr 220px; align-items: start; } }
@media (min-width: 1000px) { .split-2 { gap: var(--s-8); } .map-head.split-2 { grid-template-columns: 1fr 260px; } }
.who.split-2 { width: min(100%, var(--container)); }
.workshop .entries-1 { grid-template-columns: 1fr; }
.pilot.split-2 { width: min(100%, var(--container)); text-align: left; }
.pilot-text .pilot-mark { margin: 0 0 var(--s-5); }
.pilot-text p { margin-left: 0; }

/* The model: eight numbered principles, hairline rules, no boxes */
.principles { list-style: none; padding: 0; margin: 0 auto var(--section); display: grid; gap: var(--s-6) var(--s-7); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.principles li { margin: 0; padding-top: var(--s-4); border-top: 1px solid var(--line); }
.principles .num { display: block; font-family: var(--font-display); font-size: var(--fs-1); color: var(--gold-text); letter-spacing: .14em; margin-bottom: var(--s-3); }
.principles h3 { font-size: var(--fs-3); }
.principles p { font-family: var(--font-text); color: var(--text-soft); margin: 0; }
@media (min-width: 1000px) { .principles { grid-template-columns: repeat(4, 1fr); } }

/* Framed panels: a hairline with an inner hairline, the one container the page allows itself */
.frame { position: relative; background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-3); padding: 7px; color: var(--text); }
.frame-inner { border: 1px solid var(--line); border-radius: 1px; padding: clamp(24px, 4vw, 48px); }
.frame .eyebrow { color: var(--gold-text); }
.moment { width: min(100%, 920px); }
.moment-title { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 var(--s-3); }
.moment .lead { color: var(--text-soft); max-width: 58ch; margin: 0 0 var(--s-6); font-size: clamp(1.05rem, 1.6vw, 1.2rem); }

/* Balance scale */
.scale-wrap { background: var(--bg-alt); border-radius: var(--r-3); padding: var(--s-4); }
.equation { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: center; margin: 0 0 var(--s-2); letter-spacing: .02em; font-variant-numeric: lining-nums; }
.scale-svg { width: 100%; max-width: 640px; margin: 0 auto; color: var(--text); overflow: visible; touch-action: none; user-select: none; -webkit-user-select: none; }
#scale-beam { transform-origin: 320px 92px; transition: transform var(--t-slow) var(--ease-in-out); }
#scale-beam.tip-right { transform: rotate(5deg); } #scale-beam.tip-left { transform: rotate(-5deg); }
.pan { transition: transform var(--t-slow) var(--ease-in-out); }
.pan.down { transform: translateY(-18px); } .pan.up { transform: translateY(18px); }
.weights { cursor: grab; transition: opacity var(--t-base) var(--ease-out); outline: none; }
.weights .hit { fill: transparent; pointer-events: all; }
.weights:focus-visible .weight rect { stroke: var(--focus); stroke-width: 3; }
.weights.dragging { cursor: grabbing; opacity: .85; }
.weight text, .xbox text, .numeral text { font-family: var(--font-text); font-size: 20px; fill: var(--parchment); text-anchor: middle; dominant-baseline: central; pointer-events: none; font-weight: 600; }
.weight rect { fill: var(--ink); } .xbox rect { fill: var(--oxblood); } .numeral rect { fill: var(--ink); }
.numeral text { font-size: 24px; }
:root[data-theme="dark"] .weight text, :root[data-theme="dark"] .xbox text { fill: var(--ink); }
:root[data-theme="dark"] .weight rect, :root[data-theme="dark"] .numeral rect { fill: var(--parchment); }
.scale-hint { text-align: center; color: var(--muted); font-family: var(--font-ui); font-size: var(--fs-1); margin: var(--s-3) 0; min-height: 1.5em; }
.scale-actions { justify-content: center; }
.scale-actions button { font-family: var(--font-ui); }
.scale-actions .solved { color: var(--ok); font-weight: 600; font-family: var(--font-text); font-size: var(--fs-3); }

/* Curriculum: the counted figures, set like a ledger */
.figures { display: grid; gap: var(--s-5) var(--s-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 0 auto var(--block); text-align: center; }
.figures div { display: flex; flex-direction: column; align-items: center; }
.figures dd { order: 1; } .figures dt { order: 2; margin-top: var(--s-3); } .figures span { order: 3; margin-top: var(--s-2); }
.figures div { padding: var(--s-4) var(--s-2); border-top: 1px solid var(--line); }
.figures dt { font-family: var(--font-display); font-size: var(--fs-0); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-text); font-weight: 600; }
.figures dd { margin: 0; font-family: var(--font-heading); font-weight: 400; font-size: clamp(2.2rem, 3.4vw, 3rem); line-height: 1; font-variant-numeric: oldstyle-nums proportional-nums; color: var(--text); }
.figures span { font-family: var(--font-text); font-style: italic; font-size: var(--fs-1); color: var(--muted); }
.figures span b { font-weight: 600; font-style: normal; color: var(--text-soft); }
@media (min-width: 900px) { .figures { grid-template-columns: repeat(6, 1fr); } }

/* Curriculum: explore by grade */
.map { margin-bottom: var(--block); }
.map-head h3 { margin-bottom: var(--s-2); }
.map-head .meta { max-width: 70ch; margin-bottom: var(--s-5); font-family: var(--font-text); font-style: italic; font-size: var(--fs-2); }
.grade-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--s-5); }
.grade-chips button { min-width: 44px; min-height: 44px; padding: 8px 12px; border-radius: var(--r-2); font-family: var(--font-display); letter-spacing: .06em; font-size: var(--fs-1); font-weight: 600; background: transparent; border-color: var(--line); }
.grade-chips button:hover { border-color: var(--gold); }
.grade-chips button[aria-selected="true"] { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
:root[data-theme="dark"] .grade-chips button[aria-selected="true"] { background: var(--parchment); color: var(--ink); }
.map-panel { border-top: 1px solid var(--line); padding-top: var(--s-5); min-height: 200px; }
.map-fallback { font-family: var(--font-ui); font-size: var(--fs-1); color: var(--muted); margin: 0; }
.map-grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 760px) { .map-grid { grid-template-columns: 3fr 2fr; gap: var(--s-7); } }
.map-grade { font-family: var(--font-heading); font-size: var(--fs-5); font-weight: 500; margin: 0 0 var(--s-1); }
.map-core { font-family: var(--font-text); font-style: italic; font-size: var(--fs-2); color: var(--muted); margin: 0 0 var(--s-5); }
.courses { list-style: none; padding: 0; margin: 0; }
.courses li { display: grid; grid-template-columns: 1fr auto; gap: var(--s-3); align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); margin: 0; font-family: var(--font-text); font-size: var(--fs-1); }
.courses li:first-child { border-top: 0; }
.courses .strand { display: block; font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .08em; font-size: var(--fs-1); color: var(--gold-text); }
.courses .credit { font-family: var(--font-ui); font-size: var(--fs-0); color: var(--muted); white-space: nowrap; }
.weekly h4 { font-family: var(--font-display); font-size: var(--fs-0); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-text); margin: 0 0 var(--s-3); font-weight: 600; }
.bars { list-style: none; padding: 0; margin: 0; }
.bars li { display: grid; grid-template-columns: minmax(96px, 36%) 1fr auto; gap: var(--s-2); align-items: center; margin: 7px 0; font-family: var(--font-text); font-size: var(--fs-1); }
.bars .bar { height: 6px; border-radius: 0; background: var(--line); overflow: hidden; }
.bars .bar i { display: block; height: 100%; width: calc(var(--w, 0) * 1%); background: var(--gold); transition: width var(--t-slow) var(--ease-out); }
.bars .min { color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; font-family: var(--font-text); font-variant-numeric: lining-nums tabular-nums; }
.strands { width: min(100%, 880px); }
.strands-title { text-align: center; margin-bottom: var(--s-5); }
.strand-table { width: 100%; border-collapse: collapse; font-family: var(--font-text); font-size: var(--fs-2); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.strand-table th { font-family: var(--font-display); font-size: var(--fs-0); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-text); text-align: left; padding: 12px 12px; border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.strand-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.strand-table tr:last-child td { border-bottom: 0; }
.strand-table .n { text-align: right; font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.strands .caption { margin: var(--s-4) auto 0; max-width: 80ch; font-family: var(--font-text); font-style: italic; font-size: var(--fs-1); }
@media (max-width: 520px) { .strand-table { font-size: var(--fs-1); } .strand-table th, .strand-table td { padding: 8px 6px; } }

/* The strand explorer: twelve engraved emblems; hover or tap lights one and opens its line. */
.strands-explorer { width: min(100%, 980px); margin: 0 auto var(--block); }
.strands-explorer .meta { margin-bottom: var(--s-5); }
.strand-grid { display: grid; gap: var(--s-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 560px) { .strand-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .strand-grid { grid-template-columns: repeat(6, 1fr); } }
.strand { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); padding: var(--s-3) 4px; min-width: 0; text-align: center; background: transparent; border: 1px solid transparent; border-radius: var(--r-3); min-height: 44px; font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .06em; font-size: var(--fs-1); color: var(--text-soft); transition: border-color 400ms var(--ease-fade), background-color 400ms var(--ease-fade), color 400ms var(--ease-fade); }
.strand img { width: clamp(56px, 22vw, 88px); height: auto; aspect-ratio: 1; border-radius: 50%; transition: transform 700ms var(--ease-reveal), box-shadow 700ms var(--ease-reveal); }
.strand:hover, .strand:focus-visible, .strand[aria-expanded="true"] { border-color: var(--line); background: var(--card); color: var(--text); }
.strand:hover img, .strand:focus-visible img, .strand[aria-expanded="true"] img { transform: translateY(-4px) scale(1.08) rotate(-3deg); box-shadow: 0 16px 30px -18px rgba(21, 32, 43, .5), 0 0 0 2px var(--gold); }
.strand-panel { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 5.2em; font-family: var(--font-text); color: var(--text-soft); }
.strand-panel p { margin: 0; max-width: none; animation: ra-fade 700ms var(--ease-fade) both; }
.strand-panel b { color: var(--text); font-weight: 600; }

/* The journey line: a scrubbable range styled as a hairline with gold stops. */
.journey { margin: var(--s-4) 0 var(--s-5); }
.journey-range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; }
.journey-range::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--gold), var(--gold-text)); }
.journey-range::-moz-range-track { height: 2px; background: linear-gradient(90deg, var(--line-strong), var(--gold), var(--gold-text)); }
.journey-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -10px; border-radius: 50%; background: var(--card); border: 2px solid var(--gold-text); box-shadow: 0 0 0 4px var(--bg); transition: transform 300ms var(--ease-reveal); }
.journey-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--card); border: 2px solid var(--gold-text); }
.journey-range:hover::-webkit-slider-thumb, .journey-range:focus-visible::-webkit-slider-thumb { transform: scale(1.15); }
.journey-schools { display: grid; grid-template-columns: 6fr 3fr 4fr; font-family: var(--font-display); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-top: 2px; }
.journey-schools span { border-left: 1px solid var(--line); padding-left: 6px; }
.journey-schools span:first-child { border-left: 0; padding-left: 0; }
@media (max-width: 560px) { .journey-schools { font-size: 9px; letter-spacing: .08em; } }

/* Pricing controls: monthly or annual, and how many children. */
.price-controls { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: var(--s-4); margin: 0 auto var(--s-6); }
.kids { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-2); }
.kids button { min-width: 44px; min-height: 44px; border: 0; border-radius: 0; background: transparent; font-size: var(--fs-3); font-family: var(--font-text); }
.kid-count { padding: 0 var(--s-3); font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .06em; min-width: 7ch; text-align: center; }
.plan .price { transition: opacity 300ms var(--ease-fade); }
.plan .total { font-family: var(--font-text); font-size: var(--fs-1); color: var(--muted); margin: 0 0 var(--s-4); font-style: italic; }

/* Try a lesson: the school's slope widget inside a frame (widgets.css styles .lesson #widget). */
.try-lesson { margin-top: var(--s-5); }
.try-lesson #widget { background: var(--bg-alt); border-radius: var(--r-3); padding: var(--s-4); }
.try-lesson .map-fallback { margin: var(--s-3); }

/* The week explorer */
.week { margin-bottom: var(--block); }
.week-controls { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; margin-bottom: var(--s-5); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
.seg button { min-height: 44px; padding: 6px 16px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .06em; font-size: var(--fs-2); }
.seg button:first-child { border-left: 0; }
.seg button[aria-selected="true"] { background: var(--ink); color: var(--parchment); }
:root[data-theme="dark"] .seg button[aria-selected="true"] { background: var(--parchment); color: var(--ink); }
.day-track { display: flex; gap: 3px; width: 100%; margin-bottom: var(--s-5); }
.day-track button { flex: var(--w, 1) 1 48px; min-width: 0; min-height: 56px; padding: 8px 6px; border-radius: var(--r-1); border: 1px solid var(--line); background: var(--bg); font-family: var(--font-ui); font-size: var(--fs-0); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden; }
.day-track button .n { font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .04em; font-size: 13px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.day-track button .m { color: var(--muted); font-size: 11px; white-space: nowrap; }
.day-track button img { width: 28px; height: 28px; border-radius: 50%; opacity: .9; }
@media (max-width: 640px) { .day-track button img { order: -1; } }
@media (min-width: 641px) { .day-track button img { display: none; } .day-track button:nth-child(-n+8) img { display: block; } }
.day-track button[aria-selected="true"] { background: var(--ink); color: var(--parchment); border-color: var(--ink); }
.day-track button[aria-selected="true"] .m { color: var(--gold-bright); }
:root[data-theme="dark"] .day-track button[aria-selected="true"] { background: var(--parchment); color: var(--ink); }
:root[data-theme="dark"] .day-track button[aria-selected="true"] .m { color: var(--gold-text); }
.day-track button.move { border-color: var(--gold); }
.day-detail { border-top: 1px solid var(--line); padding: var(--s-5) 0 0; min-height: 120px; }
.day-detail h3 { font-family: var(--font-heading); font-size: var(--fs-4); font-weight: 500; margin: 0; }
.day-head { display: flex; align-items: center; gap: var(--s-3); margin: 0 0 var(--s-2); }
.day-head img { width: 56px; height: 56px; border-radius: 50%; background: var(--parchment); }
.day-detail .meta { margin-bottom: var(--s-3); font-family: var(--font-text); font-style: italic; font-size: var(--fs-2); }
.day-detail p { font-family: var(--font-text); }
.day-total { color: var(--muted); font-family: var(--font-text); font-style: italic; font-size: var(--fs-2); text-align: center; margin: var(--s-5) 0 0; }
.homework { margin-top: var(--s-5); padding: var(--s-4) var(--s-5); border-left: 2px solid var(--gold); background: var(--bg-alt); font-family: var(--font-text); }
.homework:empty { display: none; }
.homework h4 { font-family: var(--font-display); font-size: var(--fs-0); letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--gold-text); margin: 0 0 var(--s-2); font-weight: 600; }
.homework p { margin: 0; color: var(--text-soft); }
.household p + p, .household ul + p { margin-top: var(--s-3); }
.household .chore-list { margin: var(--s-3) 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--s-1) var(--s-4); color: var(--text-soft); font-size: var(--fs-1); }
.household .chore-list i { color: var(--gold-text); font-style: normal; font-variant-caps: small-caps; letter-spacing: .04em; }
.household .verse { font-style: italic; }
@media (max-width: 480px) { .seg button { padding: 6px 10px; font-size: var(--fs-1); } }
@media (max-width: 640px) { .day-track { flex-direction: column; } .day-track button { flex-direction: row; justify-content: space-between; min-height: 44px; padding: 8px 12px; flex: 0 0 auto; } }

/* Entries: headed paragraphs on hairline rules (safety facts; the paper, ledger and workshop) */
.entries { display: grid; gap: var(--s-6) var(--s-7); }
.entries-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.entries-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); width: min(100%, 980px); }
.entry { padding-top: var(--s-4); border-top: 1px solid var(--line); }
.entry h3 { font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .08em; font-weight: 600; font-size: var(--fs-3); }
.entry p { font-family: var(--font-text); color: var(--text-soft); margin: 0 0 var(--s-3); }
.entry p:last-child { margin-bottom: 0; }
.entry b { color: var(--text); }

/* The ledger: built, in progress, not claimed */
.ledger { list-style: none; padding: 0; margin: 0 auto; width: min(100%, 920px); border-top: 1px solid var(--line-strong); }
.ledger li { display: grid; grid-template-columns: 148px 1fr; gap: var(--s-5); align-items: start; padding: var(--s-5) 0; border-bottom: 1px solid var(--line); margin: 0; }
.ledger p { font-family: var(--font-text); color: var(--text-soft); margin: 0; }
.ledger h3 { font-size: var(--fs-3); }
.pill { display: inline-block; font-family: var(--font-display); font-size: var(--fs-0); letter-spacing: .14em; text-transform: uppercase; font-weight: 600; padding-top: 6px; white-space: nowrap; }
.pill.ok { color: var(--ok); } .pill.wait { color: var(--gold-text); } .pill.no { color: var(--no); }
@media (max-width: 560px) { .ledger li { grid-template-columns: 1fr; gap: var(--s-2); } }

/* Pilot: a centered page of text under the monogram */
.pilot { width: min(100%, var(--reading)); text-align: center; }
.pilot-mark { width: 72px; height: 72px; margin: 0 auto var(--s-5); }
.pilot h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin: 0 0 var(--s-5); }
.pilot p { font-family: var(--font-text); color: var(--text-soft); margin: 0 auto var(--s-4); max-width: 60ch; }
.pilot .caption { font-style: italic; font-family: var(--font-text); font-size: var(--fs-1); }

/* Pricing, rendered from /pricing-data.json */
.draft-banner { width: min(100%, 760px); font-family: var(--font-text); font-size: var(--fs-1); border: 1px solid var(--gold); border-radius: var(--r-3); padding: 12px 18px; margin: 0 auto var(--s-6); color: var(--text-soft); text-align: center; }
.draft-banner b { font-family: var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-right: 10px; font-size: var(--fs-0); }
.plans { display: grid; gap: var(--s-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); align-items: stretch; width: min(100%, 1080px); }
.plan { position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-3); padding: var(--s-6) var(--s-5) var(--s-5); text-align: center; }
.plan.highlight { border-color: var(--gold); box-shadow: inset 0 0 0 4px var(--card), inset 0 0 0 5px var(--line); }
.plan.draft::after { content: 'Draft'; position: absolute; top: 12px; right: 12px; font-family: var(--font-display); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-text); }
.plan h3 { font-family: var(--font-display); font-size: var(--fs-1); letter-spacing: .2em; text-transform: uppercase; font-weight: 600; color: var(--gold-text); margin: 0 0 var(--s-2); }
.plan .tagline { font-family: var(--font-heading); font-style: italic; font-size: var(--fs-3); color: var(--text); margin: 0 0 var(--s-5); }
.plan .price { font-family: var(--font-heading); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1; color: var(--text); margin: 0; font-variant-numeric: lining-nums; }
.plan .price.tbd { font-size: var(--fs-3); font-style: italic; color: var(--text-soft); }
.plan .period { font-family: var(--font-text); font-style: italic; font-size: var(--fs-1); color: var(--muted); margin: 6px 0 var(--s-4); min-height: 1.3em; }
.plan .avail { align-self: center; font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .1em; font-size: var(--fs-1); color: var(--gold-text); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 0; margin: 0 0 var(--s-5); min-width: 120px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 var(--s-6); flex: 1; text-align: left; }
.plan li { position: relative; padding-left: 20px; margin: 8px 0; font-family: var(--font-text); font-size: var(--fs-1); color: var(--text-soft); }
.plan li::before { content: ''; position: absolute; left: 2px; top: .66em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.plan .btn { width: 100%; }
.plan.highlight .btn { background: var(--ink); color: var(--parchment); border-color: var(--ink); font-family: var(--font-display); letter-spacing: .16em; text-transform: uppercase; font-size: var(--fs-0); font-weight: 600; }
.plan.highlight .btn:hover { background: var(--gold-text); border-color: var(--gold-text); }
:root[data-theme="dark"] .plan.highlight .btn { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }
.pricing-foot { margin: var(--s-6) auto 0; max-width: 76ch; text-align: center; font-family: var(--font-text); font-style: italic; font-size: var(--fs-1); }

/* FAQ: hairline rows */
.faq { width: min(100%, var(--reading)); border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); margin: 0; padding: 0; }
.faq summary { font-family: var(--font-heading); font-weight: 500; font-size: var(--fs-3); color: var(--text); padding: 18px 32px 18px 0; cursor: pointer; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; border-right: 1px solid var(--gold-text); border-bottom: 1px solid var(--gold-text); transform: translateY(-70%) rotate(45deg); transition: transform var(--t-fast) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { font-family: var(--font-text); color: var(--text-soft); padding: 0 0 var(--s-5); margin: 0; max-width: 62ch; }

/* Enter the school: three doors on the dawn */
.cta { padding: 14vh var(--gutter) 12vh; background: #05080E; }
.cta .scene-art { position: absolute; inset: 0; margin: 0; z-index: 0; }
.cta .cta-frame { position: relative; z-index: 2; }
.cta-frame { width: min(100%, 1000px); margin: 0 auto; box-shadow: 0 48px 96px -40px rgba(0, 0, 0, .8); }
.cta-inner { text-align: center; }
.cta-seal { width: 64px; height: auto; margin: 0 auto var(--s-5); }
.doors { display: grid; gap: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); margin-top: var(--s-7); text-align: center; }
.door { display: flex; flex-direction: column; padding: 0 var(--s-4); }
.door h3 { font-family: var(--font-text); font-variant-caps: small-caps; letter-spacing: .1em; font-size: var(--fs-3); font-weight: 600; margin: 0 0 var(--s-2); }
.door p { font-family: var(--font-text); color: var(--text-soft); margin: 0 0 var(--s-4); }
.door p:last-child { margin: auto 0 0; }
.door .btn-gold { width: 100%; }
@media (min-width: 760px) { .doors { gap: 0; } .door { border-left: 1px solid var(--line); padding: 0 var(--s-5); } .door:first-child { border-left: 0; } }

.foot { position: relative; z-index: 1; background: linear-gradient(180deg, rgba(5, 8, 14, 0), rgba(5, 8, 14, .85) 30%); text-align: center; padding: var(--s-8) var(--gutter) calc(var(--s-8) + env(safe-area-inset-bottom)); color: var(--muted-on-night); font-family: var(--font-text); font-size: var(--fs-2); }
.foot-seal { width: 96px; height: 96px; margin: 0 auto var(--s-4); opacity: .9; }
.foot-laurel { width: min(100%, 360px); height: auto; margin: 0 auto var(--s-4); opacity: .85; }
.foot-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px var(--s-4); margin: 0 0 var(--s-4); }
@media (max-width: 560px) { .foot-line { flex-direction: column; gap: 4px; } .foot .dot { display: none; } }
.foot .caps { color: var(--gold-bright); letter-spacing: .22em; } .foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--gold-bright); opacity: .7; } .foot a { color: var(--paper-on-night); }
.foot .sc { color: var(--paper-on-night); }
.foot-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; margin: var(--s-3) 0 var(--s-5); }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; padding: 6px 2px; font-variant-caps: small-caps; letter-spacing: .08em; color: var(--muted-on-night); border-bottom: 1px solid transparent; }
.foot-nav a:hover { color: var(--paper-on-night); border-bottom-color: var(--gold-bright); }
.foot .caption { margin: 0 auto; color: var(--muted-on-night); max-width: 64ch; font-family: var(--font-text); font-style: italic; font-size: var(--fs-1); }

/* The ceremony: the seal draws itself on the night. Hidden until motion.js runs it; CSS owns the drawing (pathLength="1" on the rings and the shield outline). */
.ceremony { position: fixed; inset: 0; z-index: 100; background: #05080E; display: grid; place-items: center; padding: var(--gutter); transition: opacity 700ms var(--ease-in-out); }
.ceremony[hidden] { display: none; }
.ceremony.done { opacity: 0; pointer-events: none; }
.ceremony-inner { display: grid; justify-items: center; gap: var(--s-6); text-align: center; }
.seal-draw { width: clamp(220px, 46vmin, 340px); height: auto; }
.seal-draw .c-text { font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: .2em; }
.seal-draw .c-year-t { font-size: 12px; letter-spacing: .26em; }
.seal-draw .c-rings circle { stroke-dasharray: 1; stroke-dashoffset: 1; }
.seal-draw .c-outline path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.seal-draw .c-legend, .seal-draw .c-shield, .seal-draw .c-laurel, .seal-draw .c-year { opacity: 0; }
.ceremony-motto, .ceremony-enter { opacity: 0; }
.ceremony-motto { display: grid; gap: 8px; margin: 0; }
.ceremony-enter { color: var(--gold-bright); border-color: var(--gold-bright); }
.ceremony-enter:hover { background: var(--gold-bright); color: var(--night); }
.ceremony.run .c-rings circle { animation: ra-draw 1400ms var(--ease-ceremony) forwards; }
.ceremony.run .c-rings circle:nth-child(2) { animation-delay: 120ms; }
.ceremony.run .c-rings circle:nth-child(3) { animation-delay: 240ms; }
.ceremony.run .c-rings circle:nth-child(4) { animation-delay: 360ms; }
.ceremony.run .c-legend { animation: ra-appear 900ms var(--ease-out) 700ms forwards; }
.ceremony.run .c-outline path { animation: ra-draw 1100ms var(--ease-ceremony) 600ms forwards; }
.ceremony.run .c-shield { animation: ra-appear 900ms var(--ease-out) 1300ms forwards; }
.ceremony.run .c-laurel { animation: ra-appear 800ms var(--ease-out) 1700ms forwards; }
.ceremony.run .c-year { animation: ra-appear 600ms var(--ease-out) 1900ms forwards; }
.ceremony.run .ceremony-motto { animation: ra-rise 900ms var(--ease-out) 1800ms forwards; }
.ceremony.run .ceremony-enter { animation: ra-rise 700ms var(--ease-out) 2400ms forwards; }
@keyframes ra-draw { to { stroke-dashoffset: 0; } }
@keyframes ra-appear { to { opacity: 1; } }
@keyframes ra-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Reduced motion: scenery static and still layered (motion.css), no bob; bars and the header do not animate. */
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } .bars .bar i { transition: none; } .strand img, .strand-panel p, .plan .price { transition: none; animation: none; } }
:root[data-motion="reduce"] .scroll-cue::after { animation: none; } :root[data-motion="reduce"] .strand img, :root[data-motion="reduce"] .strand-panel p { transition: none; animation: none; }
:root[data-motion="reduce"] .bars .bar i, :root[data-motion="reduce"]

/* Touch screens (phones and tablets): the fixed scene keeps its depth but drops the costly extras. No live blur, no screen-blended
   grain or engraving over the whole viewport, no rays or birds, no fog ellipses: five crisp layers move instead of eight soft ones,
   which is what a phone GPU can composite through a momentum scroll without dropping frames. */
@media (hover: none) and (pointer: coarse) {
  .grain, .engrave, .rays, .birds, .scene .lyr-fog { display: none; }
  .scene .lyr-frame .art, .scene .lyr-frame .lyr-img { filter: none; }
  .window .lyr-fog { display: none; }
  .hero-arms { filter: none; }
  .big { text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
}
/* Short landscape phones: the ceremony fits in the height, and scrolls if it must. */
.ceremony { overflow: auto; }
@media (max-height: 520px) { .seal-draw { width: clamp(120px, 36vmin, 220px); } .ceremony-inner { gap: var(--s-3); } .ceremony-motto { gap: 2px; } }
/* Print: the words on white, no scene, no overlays. */
@media print {
  body.welcome { background: #fff; color: #000; }
  .scene, #ceremony, .ra-settings-btn, .ra-panel, .ra-progress, .window, .cta .scene-art, .chapter, .skip-link { display: none !important; }
  .paper, .sec, .hero, .cta, .foot { background: #fff !important; color: #000 !important; box-shadow: none !important; }
  .hero, .hero-lead, .big, .monument, .foot, .foot a, .motto .latin { color: #000 !important; text-shadow: none !important; }
  .hero { min-height: 0; padding-top: 24pt; }
  .reveal, .rise { opacity: 1 !important; transform: none !important; animation: none !important; }
  .frame { box-shadow: none; }
}
/* Wide screens: more air, the same widths */
@media (min-width: 1800px) { .big { font-size: 3.8rem; } :root { --section: 192px; } }
/* Phones: the framed panels give their width to the content (the balance and the lesson need it for finger-sized handles). */
@media (max-width: 480px) { .frame { padding: 5px; } .frame-inner { padding: 18px 12px; } .scale-wrap { padding: var(--s-2); } .try-lesson #widget { padding: var(--s-3) var(--s-2); } }
