/* girgit.io home. A white GIRGIT intro that slides up on Enter, then a ray-traced black hole behind the hero, rails of instruments,
   a plan for launch day. Dark only below the intro, in the electron colours of Glass Half Full: near-black, gold #f2c46a (+psi)
   and cyan #6ed6f7 (-psi). Type is the games' set: Chakra Petch, Bai Jamjuree, Azeret Mono. Each subject also carries a colour of its own (physics blue, chemistry rose,
   biology green, mathematics gold) that tints its poster frames, rail glow and hover ring (see the end of this file). */
:root {
  --bg: #030304; --bg-rgb: 3 3 4; --surface: #0b0c0f; --surface-2: #14161b; --text: #edece8; --muted: rgba(237, 236, 232, .74); --faint: rgba(237, 236, 232, .56);
  --line: rgba(237, 236, 232, .1); --line-2: rgba(237, 236, 232, .2);
  --accent: #f2c46a; --accent-rgb: 242 196 106; --accent-h: #f7d48c; --on-accent: #0a0804; --glow: rgba(242, 196, 106, .2); --dot-glow: 0 0 14px rgba(242, 196, 106, .9);
  --cyan: #6ed6f7; --cyan-rgb: 110 214 247;
  --art-b: #050506; --art-line: rgba(237, 236, 232, .09); --art-line-h: rgba(242, 196, 106, .45);
  --shadow: 0 24px 70px rgba(0, 0, 0, .6); --focus: #edece8;
  --band-bg: #ffffff; --band-text: #000000; --band-muted: rgba(0, 0, 0, .66); --band-line: rgba(0, 0, 0, .14);
  --radius: 16px;
  --display: 'Chakra Petch', 'Segoe UI', system-ui, sans-serif; --sans: 'Bai Jamjuree', system-ui, -apple-system, 'Segoe UI', sans-serif; --mono: 'Azeret Mono', ui-monospace, Consolas, monospace;
  --pad: clamp(18px, 4vw, 56px); --gut: max(var(--pad), calc((100% - 1184px) / 2)); --tile-w: clamp(250px, 23vw, 330px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background-color .35s, color .35s; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; }

/* ── background ── */
#page { position: relative; z-index: 1; }

/* ── nav ── */
.nav { position: fixed; z-index: 30; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: clamp(14px, 2.4vw, 34px); padding: env(safe-area-inset-top) max(var(--gut), env(safe-area-inset-right)) 0 max(var(--gut), env(safe-area-inset-left)); height: calc(72px + env(safe-area-inset-top));
  background: linear-gradient(rgb(var(--bg-rgb) / .9), rgb(var(--bg-rgb) / 0)); transition: background-color .3s, box-shadow .3s; }
.nav.solid { background: rgb(var(--bg-rgb) / .92); box-shadow: 0 1px 0 var(--line); backdrop-filter: blur(12px); }
.logo { display: flex; align-items: center; gap: 11px; font: 500 17px/1 var(--sans); letter-spacing: .2em; text-decoration: none; margin-right: 6px; }
.logo i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: var(--dot-glow); }
.links { display: flex; gap: clamp(14px, 2vw, 28px); flex: 1; min-width: 0; }
.links a { font-size: 14px; text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .2s; }
.links a:hover, .links a[aria-current] { color: var(--text); }
.nav-r { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; transition: background-color .2s; }
.icon-btn:hover { background: rgb(var(--accent-rgb) / .12); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.search { display: flex; align-items: center; border: 1px solid transparent; border-radius: 999px; transition: border-color .2s, background-color .2s; }
.search input { width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; transition: width .3s, padding .3s; }
.search.open { border-color: var(--line-2); background: rgb(var(--bg-rgb) / .8); }
.search.open input { width: clamp(120px, 20vw, 240px); padding: 0 12px 0 4px; }
.date { text-decoration: none; color: var(--muted); padding: 12px 8px; white-space: nowrap; transition: color .2s; }
.date:hover { color: var(--text); }

/* ── hero: what Girgit is, one way in, the clock ── */
.hero { position: relative; min-height: clamp(560px, calc(100vh - 96px), 820px); min-height: clamp(560px, calc(100svh - 96px), 820px); display: flex; align-items: center; padding: calc(72px + env(safe-area-inset-top)) var(--gut) clamp(40px, 8vh, 88px); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgb(var(--bg-rgb) / .9) 0%, rgb(var(--bg-rgb) / .6) 34%, rgb(var(--bg-rgb) / 0) 66%), linear-gradient(0deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0) 30%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 30% 34% at 70% 47%, var(--glow), transparent 72%); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .5; } }
.hero-in { max-width: 600px; display: flex; flex-direction: column; gap: clamp(20px, 3.2vh, 28px); }
.hero h1 { margin: 0; font: 500 clamp(48px, 6.4vw, 96px)/.96 var(--display); letter-spacing: -.02em; }
.hero p { margin: 0; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.5; color: var(--muted); max-width: 440px; text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 4px; }
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius); font: 500 15px/1 var(--sans); text-decoration: none; transition: background-color .2s, transform .15s, box-shadow .3s; }
.btn svg { width: 12px; height: 12px; fill: currentColor; flex: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-h); box-shadow: 0 8px 30px rgb(var(--accent-rgb) / .35); }
.btn:active { transform: scale(.97); }
.textlink { font-size: 15px; color: var(--muted); text-decoration: none; padding: 14px 0; transition: color .2s; }
.textlink:hover { color: var(--cyan); }

/* launch countdown */
.countdown { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 0; margin-top: clamp(8px, 2vh, 20px); }
.countdown > div { display: flex; flex-direction: column; gap: 8px; padding: 0 clamp(14px, 2vw, 28px); border-left: 1px solid var(--line); }
.countdown > div:first-child { padding-left: 0; border-left: 0; }
.countdown b { font: 500 clamp(30px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--text); }
.countdown > div:nth-child(4) b { color: var(--cyan); }
.countdown span { font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.hero .cd-note { grid-column: 1 / -1; margin: 18px 0 0; color: var(--faint); max-width: none; font-size: 10.5px; letter-spacing: .16em; }

/* ── rails ── */
.rows { position: relative; padding: 8px 0 0; display: flex; flex-direction: column; gap: clamp(40px, 5vw, 56px); }
.row { position: relative; }
.row-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 0 var(--gut); margin-bottom: 20px; }
.row-h h2 { margin: 0; white-space: nowrap; font: 400 20px/1.2 var(--sans); letter-spacing: -.01em; }
.row-h .mono { color: var(--faint); }
.rb { position: relative; }
.scroller { display: flex; align-items: flex-start; gap: 24px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; padding: 6px var(--gut) 8px; margin-top: -6px; scroll-padding: 0 var(--gut); }
.scroller::-webkit-scrollbar { display: none; }
.arrow { position: absolute; z-index: 6; top: calc(var(--tile-w) * .28125 - 20px); width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgb(var(--bg-rgb) / .84); backdrop-filter: blur(8px); color: var(--text); display: grid; place-items: center; opacity: 0; transition: opacity .2s, border-color .2s; }
.arrow.l { left: 14px; } .arrow.r { right: 14px; }
.arrow svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.arrow:hover { border-color: var(--accent); }
.row:hover .arrow:not([hidden]), .arrow:focus-visible { opacity: 1; }
@media (hover: none) { .arrow { display: none; } }
/* the thin gold line under a rail: how much of it you see, and where */
.prog { position: relative; height: 1px; margin: 22px var(--gut) 0; background: var(--line); }
.prog[hidden] { display: none; }
.prog i { position: absolute; top: -.5px; height: 2px; border-radius: 2px; background: rgb(var(--accent-rgb) / .7); transition: left .15s linear; }

/* minis in the details modal: the picture with the name under it */
.mini { position: relative; display: flex; flex-direction: column; gap: 8px; text-align: left; border: 0; padding: 0; background: none; color: var(--text); cursor: pointer; }
.mini-t { padding: 0 2px; font: 500 13px/1.25 var(--sans); letter-spacing: -.01em; }
.mini:hover .tile-art { border-color: var(--accent); }

/* ── sections: how it teaches, what arrives, for parents ── */
.block { position: relative; padding: clamp(72px, 9vw, 120px) var(--gut) 0; }
.big { margin: 0 0 clamp(28px, 3.4vw, 40px); font: 500 clamp(34px, 4.2vw, 56px)/1 var(--display); letter-spacing: -.03em; text-wrap: balance; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: clamp(28px, 3vw, 40px); }
.col { display: flex; flex-direction: column; gap: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.col .num { color: var(--accent); font: 500 13px/1 var(--mono); letter-spacing: .04em; }
.col h3 { margin: 0; font: 500 20px/1.25 var(--sans); letter-spacing: -.01em; }
.col p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); max-width: 38ch; text-wrap: pretty; }
.status { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 8px; font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.status.on { color: var(--text); }
.status.on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 14px rgb(var(--cyan-rgb) / .9); }
.parents { position: relative; margin-top: clamp(80px, 10vw, 120px); background: var(--band-bg); color: var(--band-text); }
.parents-in { padding: clamp(64px, 8vw, 96px) var(--gut); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 40px 64px; align-items: start; }
.parents .big { margin: 0; }
.parents .cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.parents .col { border-top-color: var(--band-line); }
.parents .col h3 { font-size: 16px; }
.parents .col p { color: var(--band-muted); font-size: 14.5px; }

/* ── search results ── */
#results { display: none; padding: 112px var(--gut) 80px; min-height: 80vh; }
#results h2 { margin: 0 0 28px; font: 500 clamp(26px, 3vw, 36px)/1.15 var(--display); letter-spacing: -.02em; }
#results .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 32px 24px; padding-bottom: 40px; }
#results .tile { flex: none; }
#results .empty { color: var(--muted); font: 500 12px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; padding: 60px 0; }
body.searching .hero, body.searching .rows, body.searching .below { display: none; }
body.searching #results { display: block; }

/* ── footer ── */
.foot { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; padding: 40px var(--gut) calc(48px + env(safe-area-inset-bottom)); }
.foot-mark { font: 500 15px/1 var(--sans); letter-spacing: .2em; }
.foot-note { font-size: 13.5px; color: var(--muted); }
.foot-meta { margin-left: auto; color: var(--faint); }

/* ── modal ── */
.scrim { position: fixed; inset: 0; z-index: 60; display: none; place-items: start center; overflow-y: auto; padding: clamp(12px, 4vh, 48px) 12px 40px; background: rgb(0 0 0 / .72); backdrop-filter: blur(6px); }
.scrim.open { display: grid; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: min(880px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); animation: rise .32s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes rise { from { transform: translateY(24px) scale(.97); opacity: 0; } }
.m-art { position: relative; aspect-ratio: 16 / 7.4; background: var(--art-b); }
.m-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.m-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--surface) 0%, rgb(var(--bg-rgb) / 0) 55%); }
.m-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: -10px; position: relative; z-index: 2; }
.m-head h2 { margin: 0; font: 500 clamp(28px, 4.4vw, 46px)/1.05 var(--display); letter-spacing: -.035em; }
.m-x { position: absolute; z-index: 3; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgb(var(--bg-rgb) / .8); backdrop-filter: blur(6px); color: var(--text); display: grid; place-items: center; }
.m-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.m-body { padding: 0 clamp(18px, 4vw, 40px) clamp(22px, 4vw, 38px); display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 22px 34px; }
.m-body p { margin: 0; font-size: 16px; line-height: 1.6; color: var(--muted); }
.facts { display: grid; gap: 14px; align-content: start; font-size: 14px; }
.facts dt { color: var(--faint); font: 500 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 6px; }
.facts dd { margin: 0; }
.chip { display: inline-block; padding: 4px 10px; margin: 0 6px 6px 0; border: 1px solid var(--line-2); border-radius: 999px; font: 500 11px/1.3 var(--mono); letter-spacing: .08em; }
.more { grid-column: 1 / -1; margin-top: 8px; }
.more h3 { margin: 0 0 14px; font: 500 16px/1.2 var(--sans); }
.more .g { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px 12px; }

/* ── player ── (the instruments are dark in both themes) */
.player { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: #050506; color: #edece8; --focus: #fff;
  visibility: hidden; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .2s ease, transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s; }
.player.open { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition-delay: 0s; }
.p-bar { flex: 0 0 calc(56px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: env(safe-area-inset-top) clamp(8px, 2vw, 24px) 0; border-bottom: 1px solid rgb(237 236 232 / .12); background: #0e0f0d; }
.p-btn { min-height: 40px; min-width: 40px; padding: 0 14px; border: 1px solid rgb(237 236 232 / .2); border-radius: 999px; background: transparent; color: #edece8; font: 500 11px/1 var(--mono); letter-spacing: .14em; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: border-color .2s; }
.p-btn:hover { border-color: rgb(237 236 232 / .6); }
.p-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.p-now { display: flex; align-items: center; gap: 10px; min-width: 0; font: 500 11px/1 var(--mono); letter-spacing: .14em; color: rgb(237 236 232 / .8); white-space: nowrap; }
.p-now i { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent); box-shadow: 0 0 12px rgb(var(--accent-rgb) / .9); }
.p-now b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; color: #edece8; }
.p-nav { display: flex; gap: 6px; }
.p-frame { flex: 1 1 auto; min-height: 0; border: 0; width: 100%; background: #050506; }
.p-load { position: absolute; inset: calc(56px + env(safe-area-inset-top)) 0 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px; background: #050506; pointer-events: none; transition: opacity .3s, visibility 0s linear .3s; }
.p-load.done { opacity: 0; visibility: hidden; }
.p-load img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .32; filter: blur(3px) saturate(1.1); }
.p-load-name, .p-load-msg { position: relative; }
.p-load-name { font: 500 clamp(22px, 5vw, 30px)/1.1 var(--display); letter-spacing: -.03em; color: #edece8; text-align: center; }
.p-load-msg { display: flex; align-items: center; gap: 4px; font: 500 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: rgb(237 236 232 / .6); }
.p-load-msg i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: dots 1.1s ease-in-out infinite; }
.p-load-msg i:nth-child(2) { animation-delay: .15s; } .p-load-msg i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
body.locked { overflow: hidden; }
/* the player bar's buttons never shrink when a long title squeezes in */
.p-btn, .p-btn svg { flex: none; }
.p-now { flex: 1 1 auto; justify-content: center; }

/* ── touch: a tap opens the instrument; the small (i) opens the details ── */
.tile-i { display: none; position: absolute; z-index: 5; top: 8px; right: 8px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgb(var(--bg-rgb) / .72); color: var(--text); backdrop-filter: blur(6px); place-items: center; }
.tile-i svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: none) {
  .tile-i { display: grid; }
  .go { opacity: 1; transform: none; }
  .tile:active { transform: scale(.985); }
  .btn:active, .go:active { transform: scale(.95); }
  .search input { font-size: 16px; } /* iOS zooms inputs under 16px */
  .search.open input { width: min(46vw, 220px); }
}

/* the details open as a bottom sheet on phones, with the Play button always in reach */
.m-bar { display: none; grid-column: 1 / -1; }
@media (max-width: 640px) {
  .scrim { padding: 0; place-items: end stretch; overflow: hidden; }
  .modal { width: 100%; max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; border-radius: 22px 22px 0 0; animation: sheet .34s cubic-bezier(.2, .8, .2, 1) both; }
  .m-art { aspect-ratio: 16 / 7; }
  .m-head .btn { display: none; }
  .m-bar { display: block; position: sticky; bottom: 0; z-index: 4; margin: 8px calc(-1 * clamp(18px, 4vw, 40px)) 0; padding: 12px clamp(18px, 4vw, 40px) calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(0deg, var(--surface) 72%, rgb(var(--bg-rgb) / 0)); }
  .m-bar .btn { width: 100%; justify-content: center; min-height: 52px; }
  .m-x { top: 12px; right: 12px; }
}
@keyframes sheet { from { transform: translateY(48px); opacity: .5; } }

@media (max-width: 860px) {
  .nav { flex-wrap: wrap; height: auto; row-gap: 0; padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: 2px; gap: 10px; }
  .links { order: 3; flex: 1 0 100%; overflow-x: auto; gap: 22px; scrollbar-width: none; padding: 2px 0 10px; }
  .links::-webkit-scrollbar { display: none; }
  .hero { align-items: flex-end; min-height: 92vh; min-height: 92svh; padding-top: 150px; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 6%, rgb(var(--bg-rgb) / .7) 42%, rgb(var(--bg-rgb) / .1) 100%); }
  .m-body { grid-template-columns: 1fr; }
  .parents-in { grid-template-columns: 1fr; gap: 28px; }
  :root { --tile-w: 76vw; }
}
@media (max-width: 480px) {
  .p-now span { display: none; }
  .countdown > div { padding: 0 clamp(10px, 3vw, 16px); }
  .countdown span { font-size: 9px; letter-spacing: .1em; }
  .foot-meta { margin-left: 0; }
}
@media (max-width: 400px) { .date { display: none; } }
/* the open search box takes the links' place on narrower desktops */
@media (min-width: 861px) and (max-width: 1220px) {
  .nav:has(.search.open) .links { opacity: 0; pointer-events: none; }
  .search.open input { width: min(36vw, 260px); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .player { transition: none; }
}

/* ── chapter map ── */
.lede { margin: -12px 0 24px; max-width: 56ch; font-size: 16px; line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.exam-tabs { display: inline-flex; gap: 6px; padding: 4px; margin-bottom: 30px; border: 1px solid var(--line-2); border-radius: 999px; }
.exam-tabs[hidden] { display: none; }
.exam-tabs button { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 500 14px/1 var(--sans); transition: background-color .2s, color .2s; }
.exam-tabs button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.map { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 34px clamp(24px, 3vw, 44px); }
.m-sub[hidden], .m-ch[hidden], .m-links a[hidden] { display: none; }
.m-sub h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); font: 500 20px/1.2 var(--sans); letter-spacing: -.01em; }
.m-sub h3 .mono { font-size: 10.5px; color: var(--faint); }
.m-list { list-style: none; margin: 0; padding: 0; display: grid; }
.m-ch { display: grid; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.m-ch b { font: 500 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.m-links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.m-links a { position: relative; min-height: 32px; display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--text); text-decoration: none; transition: color .2s; }
.m-links a:hover { color: var(--cyan); }
.m-links a[data-state]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--accent); }
.m-links a[data-state="proved"]::before { background: var(--accent); box-shadow: var(--dot-glow); }
.mine { margin: -6px 0 0; color: var(--accent); font-size: 11px; letter-spacing: .14em; }
.mine[hidden] { display: none; }
.tile[data-state] .tile-art::after { content: attr(data-state); position: absolute; z-index: 3; top: 10px; left: 12px; padding: 4px 8px; border-radius: 999px; background: rgb(var(--bg-rgb) / .7); border: 1px solid var(--accent); color: var(--accent); font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.chip-btn { min-height: 36px; padding: 0 14px; border: 1px solid rgb(237 236 232 / .24); border-radius: 999px; background: transparent; color: #edece8; font: 500 13px/1 var(--sans); }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── player: the Learn panel (a side panel on a laptop, a bottom sheet on a phone; the player is always dark) ── */
.p-learn { gap: 8px; }
.p-learn.has::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgb(var(--accent-rgb) / .9); }
.p-learn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.learn { position: absolute; z-index: 5; top: calc(56px + env(safe-area-inset-top)); right: 0; bottom: 0; width: min(420px, 100%); overflow-y: auto; overscroll-behavior: contain; background: #0b0c0f; color: #edece8; border-left: 1px solid rgb(237 236 232 / .16); box-shadow: -24px 0 60px rgb(0 0 0 / .5); animation: learn-in .22s ease both; }
.learn[hidden] { display: none; }
@keyframes learn-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes learn-up { from { transform: translateY(28px); opacity: 0; } to { transform: none; opacity: 1; } }
.l-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; background: #0b0c0f; border-bottom: 1px solid rgb(237 236 232 / .12); }
.l-head .mono { color: rgb(237 236 232 / .55); font-size: 10px; letter-spacing: .14em; }
.l-head h2 { margin: 6px 0 0; font: 500 22px/1.2 var(--sans); letter-spacing: -.01em; }
.l-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid rgb(237 236 232 / .2); border-radius: 50%; background: transparent; color: #edece8; }
.l-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.l-body { display: grid; gap: 16px; padding: 18px 20px 40px; }
.l-body p { margin: 0; font-size: 15px; line-height: 1.6; color: rgb(237 236 232 / .82); }
.l-sec { display: grid; gap: 6px; }
.l-sec .mono { font-size: 10.5px; letter-spacing: .14em; color: rgb(237 236 232 / .5); }
.l-sec.try, .l-sec.trap { padding: 12px 14px; border-left: 2px solid var(--accent); background: rgb(var(--accent-rgb) / .07); border-radius: 0 8px 8px 0; }
.l-sec.try .mono, .l-sec.trap .mono { color: var(--accent); }
.l-body .l-src { font: 500 10.5px/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgb(237 236 232 / .5); }
.l-prove { margin: 10px 0 0; padding-top: 18px; border-top: 1px solid rgb(237 236 232 / .14); font: 500 20px/1.2 var(--sans); }
.l-quiz { display: grid; gap: 12px; }
.l-qh { font-size: 10.5px; letter-spacing: .14em; color: var(--accent); }
.l-body .l-q { font-size: 16px; line-height: 1.55; color: #edece8; }
.l-opts { display: grid; gap: 8px; }
.l-opt { display: flex; gap: 12px; align-items: flex-start; min-height: 48px; padding: 12px 14px; text-align: left; border: 1px solid rgb(237 236 232 / .2); border-radius: 10px; background: transparent; color: #edece8; font: 400 15px/1.45 var(--sans); }
.l-opt i { flex: none; font: 500 12px/1.6 var(--mono); font-style: normal; color: rgb(237 236 232 / .55); }
.l-opt:not(:disabled):hover { border-color: var(--accent); }
.l-opt:disabled { cursor: default; color: #edece8; }
.l-opt.ok { border-color: #5fd08a; background: rgb(95 208 138 / .1); }
.l-opt.no { border-color: #ff6b6b; background: rgb(255 107 107 / .1); }
.l-fb { display: grid; gap: 10px; }
.l-fb:empty { display: none; }
.l-fb b { font: 500 15px/1.2 var(--sans); }
.l-fb .btn, .l-act .btn { justify-self: start; }
.l-act { display: flex; flex-wrap: wrap; gap: 10px; }
.l-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.l-more .mono { width: 100%; font-size: 10.5px; color: rgb(237 236 232 / .5); }
.l-body .l-draft { padding-top: 6px; font-size: 13px; line-height: 1.5; color: rgb(237 236 232 / .5); }
.learn .btn.ghost { background: transparent; border: 1px solid rgb(237 236 232 / .3); color: #edece8; }
@media (max-width: 760px) {
  .learn { top: auto; left: 0; width: 100%; max-height: 74%; border-left: 0; border-top: 1px solid rgb(237 236 232 / .2); border-radius: 18px 18px 0 0; box-shadow: 0 -24px 60px rgb(0 0 0 / .55); animation-name: learn-up; padding-bottom: env(safe-area-inset-bottom); }
  .p-learn span { display: none; }
}

/* ═════ rails: poster tiles ═════ */
.scroller { padding: 22px var(--gut) 16px; margin-top: -22px; }
.row-h h2 { font: 500 clamp(20px, 1.9vw, 26px)/1.2 var(--sans); letter-spacing: -.015em; }
.tile { position: relative; flex: 0 0 var(--tile-w); scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; }
.tile-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: #050506; box-shadow: inset 0 0 0 1px var(--line); transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.tile-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: brightness(1.38) contrast(1.1); transition: transform .8s cubic-bezier(.2, .8, .2, 1), filter .4s; }
.tile-art::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / 0) 58%); opacity: 0; transition: opacity .35s; }
.tile-more { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; display: grid; gap: 8px; padding: 14px 54px 12px 14px; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .35s; pointer-events: none; }
.tile-more p { margin: 0; font-size: 12.5px; line-height: 1.4; color: #edece8; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-chips { display: flex; gap: 6px; }
.tile-chips span { font: 500 9.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 4px 7px; border: 1px solid rgb(237 236 232 / .38); border-radius: 3px; color: #edece8; }
.tile-info { display: flex; flex-direction: column; gap: 3px; padding: 0 2px; }
.t-name { margin: 0; font: 500 15.5px/1.25 var(--sans); letter-spacing: -.01em; }
.t-sub { font-size: 13px; line-height: 1.35; color: var(--muted); }
.tile-hit { position: absolute; inset: 0; z-index: 4; border: 0; background: none; border-radius: 10px; cursor: pointer; }
.tile-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.go { position: absolute; z-index: 5; right: 12px; bottom: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; }
.go svg { width: 12px; height: 12px; fill: currentColor; margin-left: 2px; }
@media (hover: hover) {
  .tile:hover { z-index: 3; }
  .tile:hover .tile-art, .tile:has(:focus-visible) .tile-art { transform: scale(1.07); box-shadow: 0 22px 50px rgb(0 0 0 / .7), 0 0 0 1px rgb(var(--accent-rgb) / .85); }
  .tile:hover .tile-art img, .tile:has(:focus-visible) .tile-art img { filter: brightness(1.6) contrast(1.1); transform: scale(1.03); }
  .tile:hover .tile-art::before, .tile:has(:focus-visible) .tile-art::before { opacity: 1; }
  .tile:hover .tile-more, .tile:has(:focus-visible) .tile-more { opacity: 1; transform: none; }
  .tile:hover .go, .tile:has(:focus-visible) .go { opacity: 1; transform: none; }
}
@media (hover: none) { .tile-more { display: none; } }
.tile[data-state="tried"] .tile-art::after, .tile[data-state="proved"] .tile-art::after { position: absolute; z-index: 3; top: 10px; left: 10px; padding: 4px 8px; border-radius: 999px; background: rgb(var(--bg-rgb) / .78); border: 1px solid var(--accent); color: var(--accent); font: 500 9.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.tile[data-state="tried"] .tile-art::after { content: "Tried"; }
.tile[data-state="proved"] .tile-art::after { content: "Proved"; background: var(--accent); color: var(--on-accent); }
.mini .tile-art { border-radius: 8px; }
.mini .tile-art img { filter: brightness(1.1); }

/* Start here: ranked like a top ten */
.rank-row .tile { margin-left: clamp(44px, 5vw, 64px); }
.rank { position: absolute; z-index: 0; left: calc(-1 * clamp(44px, 5vw, 64px)); bottom: 40px; font: 700 clamp(88px, 9vw, 128px)/.78 var(--sans); letter-spacing: -.08em; color: transparent; -webkit-text-stroke: 2px rgb(237 236 232 / .4); pointer-events: none; }
.rank-row .tile-art { z-index: 1; }

/* ═════ sections: cards instead of bare columns ═════ */
.cols .col { padding: 24px 22px 22px; border: 1px solid var(--line); border-top-color: var(--line-2); border-radius: 14px; background: linear-gradient(180deg, rgb(237 236 232 / .04), rgb(237 236 232 / 0)); transition: border-color .3s; }
.cols .col:hover { border-color: rgb(var(--accent-rgb) / .5); }
.col .num { font: 500 40px/1 var(--display); letter-spacing: -.02em; color: var(--accent); }
.parents .cols .col { padding: 24px 0 0; border: 0; border-top: 1px solid var(--band-line); border-radius: 0; background: none; }
.m-sub { padding: 22px 22px 8px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, rgb(237 236 232 / .035), rgb(237 236 232 / 0)); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.foot-links a:hover { color: var(--text); }

@media (max-width: 860px) {
  .rank { font-size: 88px; bottom: 36px; }
}
@media (prefers-reduced-motion: reduce) { .tile-art, .tile-art img { transition: none; } }

/* ═════ a colour per subject ═════ */
[data-subject="physics"] { --sc: 92 168 255; --hr: 188deg; }
[data-subject="chemistry"] { --sc: 240 96 154; --hr: -52deg; }
[data-subject="biology"] { --sc: 70 210 146; --hr: 126deg; }
[data-subject="mathematics"] { --sc: 246 192 72; --hr: 16deg; }
.tile-art img { filter: hue-rotate(var(--hr, 0deg)) saturate(1.18) brightness(1.38) contrast(1.1); }
.row[data-subject] { isolation: isolate; }
.row[data-subject]::before { content: ""; position: absolute; z-index: -1; inset: -36px 0 -8px; pointer-events: none; background: radial-gradient(55% 80% at 14% 18%, rgb(var(--sc) / .16), transparent 72%), radial-gradient(40% 60% at 92% 92%, rgb(var(--sc) / .09), transparent 75%); -webkit-mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 74%, transparent); }
.row[data-subject] .row-h h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 12px; border-radius: 50%; vertical-align: .12em; background: rgb(var(--sc)); box-shadow: 0 0 16px rgb(var(--sc) / .85); }
.row[data-subject] .row-h .mono { color: rgb(var(--sc) / .9); }
.row[data-subject] .prog i { background: rgb(var(--sc) / .85); }
.tile[data-subject] .tile-art { box-shadow: inset 0 0 0 1px rgb(var(--sc) / .22); }
.tile[data-subject] .t-sub { color: rgb(var(--sc) / .9); }
.tile[data-subject] .go { background: rgb(var(--sc)); }
.tile[data-subject][data-state] .tile-art::after { border-color: rgb(var(--sc)); color: rgb(var(--sc)); }
.tile[data-subject][data-state="proved"] .tile-art::after { background: rgb(var(--sc)); color: #0a0804; }
@media (hover: hover) {
  .tile[data-subject]:hover .tile-art, .tile[data-subject]:has(:focus-visible) .tile-art { box-shadow: 0 22px 50px rgb(0 0 0 / .7), 0 0 44px rgb(var(--sc) / .28), 0 0 0 1px rgb(var(--sc) / .9); }
  .tile[data-subject]:hover .tile-art img, .tile[data-subject]:has(:focus-visible) .tile-art img { filter: hue-rotate(var(--hr, 0deg)) saturate(1.2) brightness(1.6) contrast(1.1); }
}

/* ═════ stories ═════ */
[data-subject="story"], [data-subject="stories"] { --sc: 242 196 106; --hr: 0deg; }
.tile.story .tile-art img { filter: none; }
@media (hover: hover) { .tile.story:hover .tile-art img, .tile.story:has(:focus-visible) .tile-art img { filter: brightness(1.08); } }
a.tile-hit { display: block; text-decoration: none; }
.tile.story .go { pointer-events: none; }

/* ═════ games (a game tile is a story tile with its own colour and a Beta mark) ═════ */
[data-subject="game"], [data-subject="games"] { --sc: 110 214 247; --hr: 0deg; }
.tile-beta { position: absolute; top: 10px; left: 10px; z-index: 2; padding: 4px 7px 3px; border: 1px solid var(--accent); border-radius: 4px; background: rgb(3 3 4 / .72); color: var(--accent); font: 600 10px/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; pointer-events: none; }

/* ═════ intro: black GIRGIT on white; Enter slides it up and off the home ═════ */
.intro { display: none; }
html.intro-on { overflow: hidden; }
html.intro-on .intro { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(18px, 3vh, 30px);
  padding: 24px; background: #fff; color: #000; transition: transform .6s cubic-bezier(.76, 0, .18, 1); will-change: transform; }
.intro-mark { width: min(76vw, 560px); height: auto; display: block; overflow: visible; }
.intro-mark .letters { fill: none; stroke: #000; stroke-width: 4.8; stroke-linecap: butt; stroke-linejoin: miter; }
/* the first G is a black hole, after the halftone mark the user chose: a ring with a G's mouth at the upper right, its top end cut parallel to the disc so it hooks down, crossed by one
   straight tapered disc (tilted 12.5deg) that melts into the ring on both sides through exact tangent fillets and carries on inside from
   the right as the crossbar. Proportions follow the user's 16 Oct sketch. Static. Geometry from scripts/gmark.mjs (scripts/put-gmark.mjs writes it in). */
.intro-mark .g-fill { fill: #000; }
.intro-mark .dot { fill: var(--accent); }
.intro-build { position: absolute; left: 16px; bottom: 12px; margin: 0; font: 400 11px/1 var(--mono); color: rgba(0, 0, 0, .4); }
.intro-sub:not(.ready) { opacity: 0; }
.intro-sub { transition: opacity .2s; }
.intro-sub { margin: 0; font: 400 clamp(19px, 2.1vw, 27px)/1.4 var(--sans); letter-spacing: .04em; color: rgba(0, 0, 0, .62); text-align: center; }
/* the first word cycles Plan, Play, Practice, Interact and settles on Learn, right-aligned in a slot as wide as the widest word,
   so ", your way" stays exactly where it is */
.iw { position: relative; display: inline-block; height: 1.4em; overflow: hidden; vertical-align: bottom; }
.iw-w { position: absolute; right: 0; top: 0; white-space: nowrap; color: #000; }
.iw-bang { display: inline-block; opacity: 0; transform: translateY(.2em); transition: opacity .25s, transform .25s cubic-bezier(.2, .8, .2, 1); }
.intro-sub.done .iw-bang { opacity: 1; transform: none; }
html.intro-on .intro.away { transform: translateY(-100%); }
html.intro-leaving { overflow: hidden; }
html.intro-leaving .hero-in { animation: hero-rise .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes hero-rise { from { opacity: 0; transform: translateY(8vh); } }
@media (prefers-reduced-motion: reduce) { html.intro-on .intro { transition: opacity .3s; } html.intro-on .intro.away { transform: none; opacity: 0; } html.intro-leaving .hero-in { animation: none; } }

/* ═════ restructure (16 Oct 2026): hero promise + waitlist, four ways in, how it learns you, try it now, launch, parents, join ═════ */
.hero p { max-width: 520px; }
.nav-join { padding: 10px 16px; border-radius: 999px; border: 1px solid rgb(var(--accent-rgb) / .55); color: var(--accent); font-size: 14px; text-decoration: none; white-space: nowrap; transition: background-color .2s, color .2s; }
.nav-join:hover { background: var(--accent); color: var(--on-accent); }
@media (max-width: 640px) { .nav-join { display: none; } }

/* the waitlist form (hero and end) */
.join { display: flex; flex-direction: column; gap: 10px; max-width: 520px; }
.join-row { display: flex; gap: 10px; flex-wrap: wrap; }
.join input[type=email] { flex: 1 1 240px; min-width: 0; min-height: 52px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--radius); background: rgb(var(--bg-rgb) / .6); color: var(--text); font: 400 16px/1 var(--sans); transition: border-color .2s; }
.join input[type=email]::placeholder { color: var(--faint); }
.join input[type=email]:focus { outline: none; border-color: var(--accent); }
.join .btn { min-height: 52px; flex: 0 0 auto; }
.join .btn:disabled { opacity: .6; cursor: default; }
.join .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.join-msg { margin: 0; font-size: 14px; color: var(--faint); min-height: 1.4em; }
.join[data-state="done"] .join-msg { color: var(--cyan); }
.join[data-state="error"] .join-msg { color: #ff8a7a; }
.join[data-state="error"] input[type=email] { border-color: #ff8a7a; }
.join[data-state="done"] .join-row { display: none; }

/* four ways in */
.way-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
@media (max-width: 760px) { .way-grid { grid-template-columns: 1fr; } }
.way { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); transition: border-color .25s; }
.way:hover { border-color: rgb(var(--accent-rgb) / .45); }
.way-art { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--art-b); border-bottom: 1px solid var(--line); }
.way-art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.way:hover .way-art img { transform: scale(1.04); }
.way-text { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; }
.way-text .num { color: var(--accent); font-size: 12px; }
.way-text h3 { margin: 0; font: 500 clamp(30px, 3vw, 40px)/1 var(--display); letter-spacing: -.01em; }
.way-text p { margin: 0; font-size: 15.5px; line-height: 1.55; color: var(--muted); max-width: 46ch; text-wrap: pretty; }
.way-go { align-self: flex-start; margin-top: 4px; color: var(--accent); font-size: 15px; text-decoration: none; border-bottom: 1px solid rgb(var(--accent-rgb) / .4); padding-bottom: 2px; }
.way-go:hover { border-bottom-color: var(--accent); }
.way-text .status { margin-top: 4px; padding-top: 0; }
/* Plan: a path of concepts, done (gold), now (cyan) and next (outline) */
.way-plan svg { width: 100%; height: 100%; }
.wp-path { fill: none; stroke: rgb(var(--accent-rgb) / .35); stroke-width: 2; stroke-dasharray: 4 6; }
.wp-done { fill: var(--accent); }
.wp-now { fill: var(--cyan); filter: drop-shadow(0 0 10px rgb(var(--cyan-rgb) / .8)); }
.wp-next { fill: var(--bg); stroke: var(--line-2); stroke-width: 2; }
/* Practice: one question card */
.way-practice { display: grid; place-items: center; }
.wq { width: min(78%, 360px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.wq .mono { grid-column: 1 / -1; color: var(--faint); font-size: 10px; }
.wq b { grid-column: 1 / -1; font: 500 15px/1.35 var(--sans); margin-bottom: 4px; }
.wq-o { font: 500 13px/1 var(--mono); font-style: normal; text-align: center; padding: 10px 0; border: 1px solid var(--line-2); border-radius: 8px; color: var(--muted); }
.wq-o.on { border-color: var(--cyan); color: var(--cyan); }
.wq .wq-m { text-align: right; color: var(--accent); }
.method-note { margin: 22px 0 0; color: var(--faint); }

/* try it now: a heading block above the rails, and the chapter list folded away below them */
.try { padding-bottom: 8px; }
.try .lede { margin: -16px 0 0; }
.chapters details { border-top: 1px solid var(--line); padding-top: 18px; }
.chapters summary { display: flex; align-items: baseline; gap: 16px; cursor: pointer; list-style: none; }
.chapters summary::-webkit-details-marker { display: none; }
.chapters summary h2 { margin: 0; font: 500 clamp(20px, 2vw, 26px)/1.2 var(--display); }
.chapters summary h2::after { content: " +"; color: var(--accent); }
.chapters details[open] summary h2::after { content: " −"; }
.chapters summary .mono { color: var(--faint); }
.chapters details[open] .exam-tabs { margin-top: 24px; }
.chapters details[open] .map { margin-top: 24px; }

/* join at the end */
.join-end { padding-bottom: clamp(48px, 6vw, 80px); }
.join-end .big { margin-bottom: 24px; }

/* ── hero picture: the black hole sits to the right, fading into the page on its left and bottom edges ── */
.hero { isolation: isolate; overflow: hidden; }
.hero-art { position: absolute; z-index: -2; top: 50%; right: -12%; width: min(78%, 1180px); height: auto; transform: translateY(-46%); pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 56% 50%, #000 52%, transparent 100%); mask-image: radial-gradient(ellipse 62% 62% at 56% 50%, #000 52%, transparent 100%);
  animation: art-in 1.6s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes art-in { from { opacity: 0; transform: translateY(-46%) scale(1.04); } }
.hero::after { display: none; }
@media (max-width: 860px) { .hero-art { top: 96px; right: -30%; width: 150%; transform: none; animation-name: art-in-m; } }
@keyframes art-in-m { from { opacity: 0; transform: scale(1.04); } }
/* phones: the picture sits above the headline, not behind it */
@media (max-width: 560px) { .hero { padding-top: calc(96px + 60vw); } .hero-art { top: 92px; right: -22%; width: 130%; } }

/* ── chapter tiles: one picture per chapter, colourful on black; the chip colour is the subject ── */
.topics .lede { max-width: none; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.topic { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #000; color: inherit; text-decoration: none;
  outline: 1px solid rgb(255 255 255 / .06); outline-offset: -1px; }
.topic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .5s; }
.topic::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(3 3 4 / 0) 40%, rgb(3 3 4 / .94)); pointer-events: none; }
.t-meta { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: flex; flex-direction: column; gap: 5px; }
.t-meta b { font: 600 clamp(16px, 1.3vw, 19px)/1.15 var(--display); text-wrap: balance; text-shadow: 0 1px 12px rgb(0 0 0 / .7); }
.t-ex { font-size: 10px; letter-spacing: .14em; color: var(--accent); }
.s-chem .t-ex { color: var(--cyan); } .s-bio .t-ex { color: #9be38a; } .s-math .t-ex { color: #c9a2ff; }
.t-hook { color: #c9c8c3; font-size: 13.5px; line-height: 1.4; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .45s, opacity .35s; }
.t-go { font-size: 10px; letter-spacing: .14em; color: var(--text); opacity: .9; }
a.topic .t-go::after { content: " →"; }
.topic.soon .t-go { color: var(--faint); }
@media (hover: hover) {
  .topic:hover img { transform: scale(1.07); filter: saturate(1.15) brightness(1.08); }
  .topic:hover .t-hook { max-height: 40px; opacity: 1; }
}
a.topic:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a.topic:focus-visible .t-hook { max-height: 40px; opacity: 1; }
@media (hover: none) { .t-hook { max-height: 40px; opacity: 1; } }
@media (max-width: 1100px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .topic-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .hero-art { animation: none; } .topic img, .t-hook { transition: none; } }
