*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
body { margin: 0; background-color: var(--bg); color: var(--text); font: 400 1rem/1.6 var(--font-ui); font-feature-settings: "ss01", "tnum" 0; -webkit-font-smoothing: antialiased; min-height: 100dvh; }
img, svg, video, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 var(--sp-3); text-wrap: balance; }
h1, h2 { font-family: var(--font-display); font-weight: 500; }
h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 4rem); letter-spacing: -.02em; line-height: 1.04; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.5vw, 2.25rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 var(--sp-4); text-wrap: pretty; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 3px; }
::selection { background: color-mix(in srgb, var(--cyan) 30%, transparent); }
code, kbd, samp, .mono { font-family: var(--font-mono); font-size: .92em; }
small, .small { font-size: .875rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
table { border-collapse: collapse; width: 100%; }
ul, ol { padding-left: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: var(--sp-3); top: -60px; background: var(--accent); color: var(--accent-ink); padding: var(--sp-2) var(--sp-4); border-radius: var(--r-sm); z-index: 1000; font-weight: 600; }
.skip-link:focus { top: var(--sp-3); }
.shell { width: min(100% - 2 * var(--sp-4), var(--shell)); margin-inline: auto; }
.stack > * + * { margin-top: var(--stack, var(--sp-4)); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--gap, var(--sp-3)); align-items: center; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.read { font-family: var(--font-read); font-size: 1.125rem; line-height: 1.7; max-width: var(--measure); }
.eyebrow { font: 500 .88rem/1.3 var(--font-ui); color: var(--text-3); margin: 0 0 var(--sp-2); }
.hue-cyan { color: var(--cyan-text); } .hue-violet { color: var(--violet-text); } .hue-green { color: var(--green); } .hue-blue { color: var(--blue); }
[hidden] { display: none !important; }

/* Space backdrop: the real Milky Way (NASA/Gaia, see public/observatory/CREDITS.md) under a flat scrim so text keeps >= 4.5:1. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(var(--sky-scrim), var(--sky-scrim)), var(--sky) center / cover no-repeat; }
@media (max-width: 700px) { body::before { background-position: 62% center; } }

/* Phase glyph: a planet lit by exactly the learner's mastery. A ring says every prerequisite is met (dashed: nearly), a moon says a review is due. */
.phase { display: inline-block; vertical-align: -0.2em; flex: none; overflow: visible; }
.phase .dark { fill: var(--m0); }
.phase .lit { fill: var(--c, var(--bone)); }
.phase .ring { fill: none; stroke: var(--bone); stroke-width: 1.3; }
.phase .ring.dashed { stroke-dasharray: 2.4 2.2; stroke: var(--text-2); }
.phase .moon { fill: var(--st-due); stroke: var(--bg); stroke-width: 1; }
.phase .moon.overdue { fill: var(--st-overdue); }
.phase[data-dom="mth"] { --c: var(--dom-mth); } .phase[data-dom="phy"] { --c: var(--dom-phy); }
.phase[data-dom="aiml"] { --c: var(--dom-aiml); } .phase[data-dom="ent"] { --c: var(--dom-ent); }
