/* girgit.org "Full experience" kit: the expressive mode of the site's design language.
   Loaded after site.css, so every widget, quiz, NEET block, recall deck and figure keeps working; this file only
   restages them. Tokens first; never a hex in a rule (content palette lives in --xp-* tokens below).
   See tools/experience/KIT.md for the art direction and the component list. */

:root {
  /* the dark room: chrome is void and bone only; colour is light the science gives off */
  --xp-g: 20px;                         /* side gutter */
  --xp-col: 0px;                        /* reading column offset (editorial asymmetry on wide screens) */
  --xp-bar: 56px;
  --xp-ease: cubic-bezier(.62, .05, .01, .99);
  --xp-out: cubic-bezier(.22, 1, .36, 1);
  --xp-dim: color-mix(in srgb, var(--bone) 22%, var(--void));   /* unlit words in a scroll-lit line */
  /* content palette for Structure of Atom (real colours, used only inside scenes and figures) */
  --xp-green: #7dff8a;   /* zinc sulphide / Crookes glass phosphor */
  --xp-gold: #d9a441;    /* gold foil */
  --xp-ha: #ff3b2f;      /* H-alpha 656 nm */
  --xp-hb: #2fd2ff;      /* H-beta 486 nm */
  --xp-hg: #4a5bff;      /* H-gamma 434 nm */
  --xp-hd: #8a3dff;      /* H-delta 410 nm */
  --xp-na: #ffcf3a;      /* sodium D 589 nm */
  --xp-plus: #ff7a4d;    /* positive charge, + phase */
  --xp-minus: #5ea3ff;   /* electrons, − phase */
  --xp-accent: var(--bone);   /* each act sets its own (in the act's <main style>) */
  color-scheme: dark;
}
@media (min-width: 769px) { :root { --xp-g: 32px; --xp-bar: 64px; } }
@media (min-width: 1100px) { :root { --xp-col: max(0px, calc((100vw - 64px - var(--measure)) * .32)); } }

/* the experience is always dark (it is the dark room); the paper sections invert locally */
html.xp { background: var(--void); --void: #0b0b0c; --bone: #e9e4d8; --lift: #fff; }
html.xp body { background: var(--void); overflow-x: clip; }
html.xp ::selection { background: var(--xp-accent); color: var(--void); }

/* film grain: one static noise tile, no blend mode (cheap on phones) */
.xp-grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .055;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }

/* ---------- chrome: bar, sound, lite switch, act map ---------- */
.xp-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: var(--xp-bar); display: flex; align-items: center; gap: 4px; padding: 0 calc(var(--xp-g) - 8px) 0 var(--xp-g);
  background: linear-gradient(to bottom, var(--void) 0%, color-mix(in srgb, var(--void) 92%, transparent) 70%, color-mix(in srgb, var(--void) 0%, transparent) 100%); }
.xp-bar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -24px; height: 24px; pointer-events: none; background: linear-gradient(to bottom, color-mix(in srgb, var(--void) 70%, transparent), transparent); }
.xp-home { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-right: auto; text-decoration: none; color: var(--bone); min-width: 0; }
.xp-home svg { width: 24px; height: 24px; flex: none; }
.xp-home .t { font-size: var(--text-sm); font-weight: 500; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xp-home .n { font-size: var(--text-xs); color: var(--mix-4); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.xp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--bone); font: inherit; font-size: var(--text-sm); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background var(--t-fast); }
.xp-btn:hover { background: var(--raised); }
.xp-btn .k { color: var(--mix-4); }
.xp-lite { gap: 0; }  /* "Lite" + "&nbsp;version" are one phrase */
.xp-lite { box-shadow: inset 0 0 0 1px var(--hairline-strong); height: 32px; margin: 6px 4px; }
.xp-sound .bars { display: inline-flex; align-items: flex-end; gap: 2px; width: 16px; height: 14px; }
.xp-sound .bars i { flex: 1; height: 4px; opacity: .55; background: currentColor; border-radius: 1px; transition: height .3s var(--xp-out); }
.xp-sound .bars i:nth-child(2) { height: 9px; } .xp-sound .bars i:nth-child(3) { height: 6px; } .xp-sound .bars i:nth-child(4) { height: 11px; }
.xp-sound[aria-pressed="true"] .bars i { opacity: 1; animation: xp-eq 1.1s ease-in-out infinite alternate; }
.xp-sound[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: -.4s; } .xp-sound[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: -.8s; } .xp-sound[aria-pressed="true"] .bars i:nth-child(4) { animation-delay: -.2s; }
@keyframes xp-eq { from { height: 3px; } to { height: 14px; } }
.xp-menu .burger { width: 18px; height: 10px; position: relative; }
.xp-menu .burger::before, .xp-menu .burger::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .45s var(--xp-ease), top .45s var(--xp-ease); }
.xp-menu .burger::before { top: 1px; } .xp-menu .burger::after { top: 7.5px; }
html.xp-map-open .xp-menu .burger::before { top: 4.25px; transform: rotate(45deg); }
html.xp-map-open .xp-menu .burger::after { top: 4.25px; transform: rotate(-45deg); }
@media (max-width: 560px) { .xp-btn .lbl { display: none; } .xp-home .t { max-width: 34vw; } }
.xp-prog { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--hairline); }
.xp-prog i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--bone); }

/* act map: the whole chapter as one list of huge numbers */
.xp-map { position: fixed; inset: 0; z-index: 38; background: var(--void); padding: calc(var(--xp-bar) + 16px) var(--xp-g) 32px; overflow-y: auto; overscroll-behavior: contain; visibility: hidden; clip-path: inset(0 0 100% 0); }
.xp-map .label { display: block; margin: 0 0 12px; }
.xp-map ol { list-style: none; margin: 0; padding: 0; max-width: 1200px; }
.xp-map li { border-top: 1px solid var(--hairline); overflow: hidden; }
.xp-map a { display: grid; grid-template-columns: 3.2ch 1fr auto; gap: 12px; align-items: baseline; padding: 12px 0; min-height: 52px; text-decoration: none; color: var(--mix-3); }
.xp-map a .n { font-size: var(--text-sm); color: var(--mix-5); font-variant-numeric: tabular-nums; }
.xp-map a .t { font-size: clamp(1.25rem, 4.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; color: var(--bone); }
.xp-map a .m { font-size: var(--text-xs); color: var(--mix-5); white-space: nowrap; }
.xp-map a[aria-current="page"] .t { color: var(--bone); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; text-decoration-color: var(--mix-5); }
.xp-map a[aria-current="page"] .n::after { content: " ·"; }
.xp-map a.seen .n { color: var(--bone); }
@media (hover: hover) { .xp-map a:hover .t { transform: translateX(10px); } .xp-map a .t { transition: transform .5s var(--xp-out); } }
.xp-map .xp-map-foot { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 24px; font-size: var(--text-sm); color: var(--mix-4); }
.xp-map .xp-map-foot a { display: inline; padding: 0; min-height: 0; color: var(--mix-3); text-decoration: underline; text-decoration-color: var(--mix-6); }

/* save-data / slow network: a polite offer of the lite chapter */
.xp-slow { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 45; max-width: 520px; margin: 0 auto; padding: 14px 16px; border-radius: 12px; background: var(--raised-2); color: var(--bone); font-size: var(--text-sm); line-height: var(--leading-sm); display: flex; gap: 12px; align-items: center; }
.xp-slow p { flex: 1; margin: 0; }
.xp-slow .btn { height: 40px; }

/* ---------- page transition: the act card. Covered at first paint on arrival (inline CSS in <head> mirrors this) ---------- */
.xp-wipe { position: fixed; inset: 0; z-index: 70; pointer-events: none; visibility: hidden; }
html.xp-arriving .xp-wipe { visibility: visible; }
.xp-wipe-p { position: absolute; inset: 0; background: var(--void); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 var(--xp-g) clamp(32px, 9svh, 96px); }
.xp-wipe-k { font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--mix-4); margin: 0 0 10px; }
.xp-wipe-t { margin: 0; max-width: 18ch; font-size: clamp(2.25rem, 9vw, 6.5rem); line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; color: var(--bone); text-wrap: balance; }
.xp-wipe-line { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--hairline-strong); }

/* ---------- type ---------- */
.xp-k { font-size: var(--text-xs); line-height: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mix-4); font-weight: 500; }
.xp-k b { color: var(--bone); font-weight: 500; }
.xp-display { font-size: clamp(2.6rem, 11.2vw, 9.25rem); line-height: 1.05; letter-spacing: -0.048em; font-weight: 500; text-wrap: balance; color: var(--bone); margin: 0; }
.xp-display em { font-style: italic; font-weight: 400; color: var(--mix-3); }
.split-mask-line-mask, .xp-mask { padding-bottom: .12em; margin-bottom: -.12em; padding-inline: .06em; margin-inline: -.06em; }
html.xp-js:not(.xp-reduced) [data-xp-split]:not(.is-split) { visibility: hidden; }

/* ---------- the act opener ---------- */
.xp-main { position: relative; }
.xp-open { position: relative; }
.xp-open .xp-stick { display: grid; align-content: end; padding: calc(var(--xp-bar) + 12px) var(--xp-g) clamp(28px, 7svh, 72px); }
.xp-open .xp-k { margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.xp-open h1 { position: relative; z-index: 2; max-width: 15ch; }
.xp-open .xp-cue { position: relative; z-index: 2; margin-top: 22px; display: flex; align-items: center; gap: 12px; color: var(--mix-4); font-size: var(--text-sm); }
.xp-cue i { display: block; width: 1px; height: 32px; background: linear-gradient(var(--bone), transparent); animation: xp-cue 2.2s var(--xp-ease) infinite; transform-origin: top; }
@keyframes xp-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }
.xp-open .xp-canvas { position: absolute; inset: 0; z-index: 0; }
.xp-open .xp-cap { z-index: 2; }
@media (min-width: 900px) { .xp-open h1 { max-width: 13ch; } }

/* ---------- scenes: tall section + sticky stage; scroll is the timeline ---------- */
.xp-scene { position: relative; height: calc(var(--len, 300) * 1svh); }
.xp-stick { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.xp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.xp-canvas canvas { display: block; width: 100% !important; height: 100% !important; touch-action: pan-y; }
.xp-cap { position: absolute; left: var(--xp-g); right: var(--xp-g); bottom: clamp(24px, 6svh, 64px); max-width: 30rem; margin: 0; opacity: 0; transform: translateY(14px); visibility: hidden; transition: opacity .5s var(--xp-out), transform .7s var(--xp-out), visibility 0s linear .5s; pointer-events: none; }
.xp-cap.on { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .5s var(--xp-out), transform .7s var(--xp-out), visibility 0s; }
.xp-cap .xp-k { display: block; margin-bottom: 8px; }
.xp-cap p, .xp-cap.t { margin: 0; font-size: clamp(1.15rem, 3.6vw, 1.75rem); line-height: 1.3; letter-spacing: -0.02em; color: var(--bone); font-weight: 500; text-wrap: pretty; }
.xp-cap p + p { margin-top: 8px; font-size: var(--text-md); line-height: var(--leading-md); color: var(--mix-3); font-weight: 400; letter-spacing: 0; }
.xp-cap.top { top: calc(var(--xp-bar) + 12px); bottom: auto; }
@media (min-width: 900px) { .xp-cap { left: calc(var(--xp-g) + var(--xp-col) * .4); max-width: 34rem; } .xp-cap.right { left: auto; right: var(--xp-g); } }
.xp-cap-back { position: absolute; left: 0; right: 0; bottom: 0; height: 52%; background: linear-gradient(to top, var(--void) 18%, color-mix(in srgb, var(--void) 0%, transparent)); pointer-events: none; z-index: 1; }
.xp-scene .xp-cap { z-index: 3; }
/* a big number that the scene drives (counters, years) */
.xp-big { font-size: clamp(4rem, 24vw, 15rem); line-height: .95; letter-spacing: -0.06em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--bone); margin: 0; }
.xp-meter { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); top: calc(var(--xp-bar) + 8px); display: flex; gap: 6px; }
.xp-meter i { flex: 1; height: 2px; background: var(--hairline-strong); position: relative; overflow: hidden; }
.xp-meter i b { position: absolute; inset: 0; background: var(--bone); transform-origin: 0 50%; transform: scaleX(0); }

/* the reading column */
.xp-body { position: relative; padding: 0 var(--xp-g); }
.xp-body.prose > * { margin-left: var(--xp-col); }
.xp-body.prose > .xp-full { margin-left: calc(-1 * var(--xp-g)); margin-right: calc(-1 * var(--xp-g)); max-width: none; width: auto; }
.xp-body.prose > .widget, .xp-body.prose > .fig.wide, .xp-body.prose > .gallery, .xp-body.prose > .table-wrap, .xp-body.prose > .deck { margin-left: max(0px, min(var(--xp-col), calc(100% - var(--wide)))); }
.xp-body > p, .xp-body > ul, .xp-body > ol { max-width: var(--measure); }

/* the big idea: a statement lit word by word as you scroll */
.xp-body > .bigidea { max-width: 22ch; margin: clamp(56px, 14svh, 160px) 0 clamp(40px, 9svh, 96px) var(--xp-col); font-size: clamp(1.75rem, 6.6vw, 4.25rem); line-height: 1.1; letter-spacing: -0.035em; font-weight: 500; text-wrap: balance; }
.xp-body > .bigidea .label { margin-bottom: 18px; font-size: var(--text-xs); letter-spacing: .12em; line-height: 1rem; }
@media (min-width: 900px) { .xp-body > .bigidea { max-width: 20ch; } }
.xp-w { color: var(--xp-dim); transition: color .25s linear; }
.xp-w.on { color: var(--bone); }
.xp-body > .simple { background: transparent; padding: 0 0 0 20px; border-left: 1px solid var(--xp-accent); border-radius: 0; font-size: clamp(1.1rem, 2.6vw, 1.375rem); line-height: 1.55; max-width: 40rem; margin-bottom: 64px; }

/* section headings: a beat number and big kinetic type */
.xp-body > h2 { display: block; max-width: 15ch; margin-top: clamp(96px, 18svh, 200px); margin-bottom: 28px; font-size: clamp(2rem, 8.4vw, 5rem); line-height: 1.05; letter-spacing: -0.042em; font-weight: 500; text-wrap: balance; }
.xp-body > h2 .xp-beat { display: block; margin-bottom: 14px; font-size: var(--text-xs); line-height: 1rem; letter-spacing: .12em; color: var(--mix-4); font-weight: 500; }
.xp-body > h2 a.hash { display: none; }
.xp-body > .xp-full + h2, .xp-body > .xp-scene + h2 { margin-top: clamp(64px, 12svh, 140px); }

/* figures: framed, revealed by a clip; labels on the picture stay */
.xp-body .fig img, .xp-body .gallery img { border-radius: 4px; }
.xp-body .fig, .xp-body .gallery { margin-top: 40px; margin-bottom: 40px; }
html.xp-js:not(.xp-reduced) .xp-reveal { clip-path: inset(12% 6% 12% 6% round 4px); opacity: .001; }
.xp-reveal.is-in { clip-path: inset(0 0 0 0 round 4px) !important; opacity: 1 !important; transition: clip-path 1.25s var(--xp-ease), opacity .6s linear; }

/* surfaces in the dark room are a touch deeper than the lite site's, with a hairline glow on the edge */
.xp-body .widget, .xp-body .deck, .xp-body .box.example, .xp-body .keybox, .xp-body details.reveal, .xp-body .analogy { background: color-mix(in srgb, var(--lift) 4.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); }
.xp-body .analogy { padding: 20px 22px; border-radius: 12px; }
.xp-body .analogy p:last-child { font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.5; color: var(--bone); }
.xp-body .widget { border-radius: 16px; }
.xp-body button.opt.is-right { box-shadow: inset 0 0 0 1px var(--right); }

/* Just remember: memorable cards, the fact big and the hook under it */
.xp-body > .remember { max-width: var(--wide); margin-top: 96px; padding: 0; background: none; border: 0; border-radius: 0; }
.xp-body > .remember > .label { font-size: var(--text-xs); letter-spacing: .12em; margin-bottom: 8px; }
.xp-body > .remember > p { max-width: var(--measure); margin-bottom: 20px; }
.xp-body > .remember dl { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .xp-body > .remember dl { grid-template-columns: 1fr 1fr; } }
.xp-body > .remember dl > div { position: relative; padding: 22px 20px 20px; border: 0; border-radius: 14px; background: color-mix(in srgb, var(--lift) 5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.xp-body > .remember dl > div::before { content: attr(data-n); position: absolute; right: 14px; top: 8px; font-size: 3.5rem; line-height: 1; letter-spacing: -0.06em; color: color-mix(in srgb, var(--bone) 7%, transparent); font-weight: 500; }
.xp-body > .remember dt { font-size: clamp(1.1rem, 2.4vw, 1.3rem); line-height: 1.35; letter-spacing: -0.015em; padding-right: 36px; }
.xp-body > .remember dd { margin-top: 10px; font-size: var(--text-md); line-height: var(--leading-md); color: var(--mix-2); }
.xp-body > .remember dd b { color: var(--bone); }

/* ---------- the back room: the deep dive on paper ---------- */
.xp-paper { --void: #ece6d8; --bone: #121110; --lift: #000; color-scheme: light;
  --mix-1: color-mix(in srgb, var(--bone) 88%, var(--void)); --mix-2: color-mix(in srgb, var(--bone) 76%, var(--void)); --mix-3: color-mix(in srgb, var(--bone) 76%, var(--void));
  --mix-4: color-mix(in srgb, var(--bone) 64%, var(--void)); --mix-5: color-mix(in srgb, var(--bone) 52%, var(--void)); --mix-6: color-mix(in srgb, var(--bone) 28%, var(--void));
  --mix-7: color-mix(in srgb, var(--bone) 18%, var(--void)); --mix-8: color-mix(in srgb, var(--bone) 8%, var(--void));
  --hairline: color-mix(in srgb, var(--bone) 12%, transparent); --hairline-strong: color-mix(in srgb, var(--bone) 18%, transparent);
  --raised: color-mix(in srgb, var(--lift) 5%, var(--void)); --raised-2: color-mix(in srgb, var(--lift) 10%, var(--void));
  --right: #1f8f63; --wrong: #cc2f40; --xp-dim: color-mix(in srgb, var(--bone) 25%, var(--void));
  --c-membrane: #b07418; --c-nucleus: #6a55d6; --c-mito: #cf5236; --c-chloro: #3b8f3f; --c-er: #2a78bb; --c-golgi: #a8861a; --c-lyso: #c04a86; --c-vacuole: #23928d;
  background-color: var(--void); color: var(--bone);
  background-image: linear-gradient(color-mix(in srgb, var(--bone) 5%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--bone) 5%, transparent) 1px, transparent 1px);
  background-size: 24px 24px; }
.xp-body > section.deep.xp-paper { margin: 160px calc(-1 * var(--xp-g)) 0; max-width: none; padding: clamp(56px, 12svh, 120px) var(--xp-g) 96px; border-radius: 0; color: var(--mix-1); }
.xp-body > section.deep.xp-paper > * { margin-left: var(--xp-col); max-width: var(--measure); }
.xp-body > section.deep.xp-paper > .widget, .xp-body > section.deep.xp-paper > .fig, .xp-body > section.deep.xp-paper > .gallery, .xp-body > section.deep.xp-paper > .xp-full { max-width: var(--wide); }
.xp-paper .deep-head { background: none; padding: 0; color: var(--bone); }
.xp-paper .deep-head .label { color: var(--mix-4); letter-spacing: .12em; }
.prose .xp-paper .deep-head h2 { font-size: clamp(2rem, 7.6vw, 4.5rem); line-height: 1.05; letter-spacing: -0.042em; color: var(--bone); max-width: 16ch; margin: 14px 0 18px; text-wrap: balance; }
.xp-paper .deep-head p { color: var(--mix-3); font-size: var(--fs-read); line-height: var(--lh-read); max-width: 36rem; }
.xp-paper .deep-head ol a { background: var(--raised-2); color: var(--bone); }
.xp-paper .deep-head ol a:hover { background: var(--mix-8); }
.xp-paper h3 { font-size: clamp(1.4rem, 4.2vw, 2.25rem); line-height: 1.12; letter-spacing: -0.03em; margin-top: 88px; }
.xp-paper .story, .xp-paper .solve, .xp-paper .connect, .xp-paper details.faq, .xp-paper .widget, .xp-paper details.reveal { background: color-mix(in srgb, var(--lift) 4%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); }
.xp-paper .fig img { mix-blend-mode: multiply; }
.xp-paper .sources { color: var(--mix-4); }
.xp-backroom-k { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.xp-backroom-k::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ---------- sketches (hand-drawn apparatus, drawn on scroll) ---------- */
.xp-sketch svg { width: 100%; height: 100%; overflow: visible; }
.xp-sketch .ink { fill: none; stroke: var(--bone); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.xp-sketch .ink.thin { stroke-width: 1; stroke: var(--mix-4); }
.xp-sketch .ink.acc { stroke: var(--xp-accent); stroke-width: 2.2; }
.xp-sketch .fillin { fill: var(--xp-accent); stroke: none; }
.xp-sketch text, .xp-svgt { font-family: var(--font); font-size: 13px; fill: var(--bone); letter-spacing: .02em; }
.xp-sketch text.k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; fill: var(--mix-4); }
.xp-sketch .lbl { opacity: 0; transition: opacity .45s var(--xp-out); }
.xp-sketch .lbl.on { opacity: 1; }

/* ---------- footage ---------- */
.xp-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xp-film.contain { object-fit: contain; }
.xp-credit { position: absolute; z-index: 3; right: var(--xp-g); bottom: 8px; max-width: 70%; text-align: right; font-size: 11px; line-height: 14px; color: var(--mix-4); }
.xp-credit a { color: inherit; }

/* ---------- the next act ---------- */
.xp-next { position: relative; margin-top: 160px; border-top: 1px solid var(--hairline); }
.xp-next a { display: block; min-height: 72svh; padding: 40px var(--xp-g) 64px; text-decoration: none; color: var(--bone); display: flex; flex-direction: column; justify-content: space-between; gap: 32px; }
.xp-next .xp-k { display: flex; justify-content: space-between; }
.xp-next .t { font-size: clamp(2.4rem, 10vw, 8rem); line-height: 1.05; letter-spacing: -0.048em; font-weight: 500; max-width: 15ch; text-wrap: balance; margin-left: var(--xp-col); }
.xp-next .go { display: inline-flex; align-items: center; gap: 12px; margin-left: var(--xp-col); font-size: var(--text-md); color: var(--mix-3); }
.xp-next .go svg { width: 22px; height: 22px; transition: transform .5s var(--xp-out); }
@media (hover: hover) { .xp-next a:hover .go svg { transform: translateX(8px); } }
.xp-prevnext { display: flex; justify-content: space-between; gap: 16px; padding: 0 var(--xp-g); font-size: var(--text-sm); color: var(--mix-4); }
.xp-prevnext a { color: var(--mix-3); min-height: 44px; display: inline-flex; align-items: center; }
.xp-end { padding: 48px var(--xp-g) 64px; color: var(--mix-4); font-size: var(--text-sm); }
.xp-end > * { margin-left: var(--xp-col); max-width: var(--measure); }
.xp-end .cite { margin-top: 0; }

/* ---------- hub ---------- */
.xp-hub .xp-open .xp-stick { align-content: stretch; grid-template-rows: 1fr auto; }
.xp-hub-title { position: relative; z-index: 2; align-self: end; }
.xp-hub-title .xp-display { font-size: clamp(3.4rem, 17vw, 13.5rem); max-width: 9ch; }
.xp-hub-q { position: relative; z-index: 2; max-width: 30rem; margin-top: 22px; font-size: clamp(1.1rem, 2.6vw, 1.5rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--mix-2); text-wrap: pretty; }
.xp-years { position: absolute; z-index: 3; left: var(--xp-g); top: calc(var(--xp-bar) + 20px); }
.xp-years .xp-big { font-size: clamp(4.5rem, 26vw, 16rem); }
.xp-years .xp-k { margin-top: 6px; }
.xp-model { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); bottom: clamp(28px, 7svh, 72px); max-width: 30rem; }
.xp-model h2 { margin: 0 0 8px; font-size: clamp(1.75rem, 6vw, 3.5rem); line-height: 1.05; letter-spacing: -0.04em; font-weight: 500; }
.xp-model p { margin: 0; font-size: var(--fs-read); line-height: var(--lh-read); color: var(--mix-2); }
.xp-model .row { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(16px); transition: opacity .45s var(--xp-out), transform .65s var(--xp-out); }
.xp-model .row.on { opacity: 1; transform: none; }
.xp-model { height: 10.5rem; }
@media (min-width: 900px) { .xp-years { left: var(--xp-g); top: calc(var(--xp-bar) + 24px); } .xp-model { left: calc(var(--xp-g) + var(--xp-col) * .3); } }
.xp-acts { padding: clamp(96px, 18svh, 200px) var(--xp-g) 40px; }
.xp-acts > header { margin-left: var(--xp-col); max-width: 46rem; margin-bottom: 40px; }
.xp-acts h2 { font-size: clamp(2.4rem, 10vw, 7rem); line-height: 1.05; letter-spacing: -0.048em; font-weight: 500; margin: 12px 0 18px; }
.xp-acts > header p { color: var(--mix-2); font-size: var(--fs-read); line-height: var(--lh-read); max-width: 36rem; }
.xp-acts ol { list-style: none; margin: 0; padding: 0; }
.xp-acts li { border-top: 1px solid var(--hairline); }
.xp-acts li:last-child { border-bottom: 1px solid var(--hairline); }
.xp-acts a { display: grid; grid-template-columns: 2.6rem 1fr; gap: 4px 12px; padding: 18px 0 20px; text-decoration: none; color: var(--bone); position: relative; }
.xp-acts a .n { grid-row: span 2; font-size: var(--text-sm); color: var(--mix-5); font-variant-numeric: tabular-nums; padding-top: .45em; }
.xp-acts a .t { font-size: clamp(1.5rem, 5.4vw, 3.4rem); line-height: 1.08; letter-spacing: -0.035em; font-weight: 500; text-wrap: balance; transition: transform .6s var(--xp-out), color .3s; }
.xp-acts a .l { font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--mix-4); max-width: 40rem; }
.xp-acts a .l b { color: var(--mix-3); font-weight: 400; }
.xp-acts a .dot { position: absolute; left: 0; top: 0; height: 1px; width: 100%; background: var(--bone); transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--xp-ease); }
.xp-acts a.seen .n { color: var(--bone); }
@media (hover: hover) { .xp-acts a:hover .t { transform: translateX(12px); } .xp-acts a:hover .dot { transform: scaleX(1); } }
@media (min-width: 900px) { .xp-acts a { grid-template-columns: calc(var(--xp-col) + 2rem) 1fr 18rem; align-items: baseline; } .xp-acts a .n { grid-row: auto; } .xp-acts a .l { grid-column: 3; grid-row: 1; } }
.xp-hub-lite { padding: 40px var(--xp-g) 0; }
.xp-hub-lite > div { margin-left: var(--xp-col); max-width: 40rem; display: grid; gap: 14px; color: var(--mix-3); font-size: var(--text-md); line-height: var(--leading-md); }

/* ---------- reduced motion and no-JS: final states, nothing pinned, every caption readable ---------- */
html.xp-reduced .xp-scene, html:not(.xp-js) .xp-scene { height: auto; }
html.xp-reduced .xp-stick, html:not(.xp-js) .xp-stick { position: relative; height: auto; min-height: 88svh; overflow: visible; display: flex; flex-direction: column; justify-content: flex-end; }
html.xp-reduced .xp-scene .xp-canvas, html:not(.xp-js) .xp-scene .xp-canvas { position: relative; height: 62svh; inset: auto; }
html.xp-reduced .xp-cap, html:not(.xp-js) .xp-cap { visibility: visible; position: relative; left: auto; right: auto; bottom: auto; top: auto; opacity: 1; transform: none; margin: 16px var(--xp-g) 0; }
html.xp-reduced .xp-cap-back, html:not(.xp-js) .xp-cap-back { display: none; }
html.xp-reduced .xp-open .xp-stick { min-height: 100svh; }
html.xp-reduced .xp-model .row, html:not(.xp-js) .xp-model .row { position: relative; opacity: 1; transform: none; margin-top: 18px; }
html.xp-reduced .xp-model, html:not(.xp-js) .xp-model { position: relative; height: auto; left: auto; right: auto; bottom: auto; margin: 0 var(--xp-g) 40px; }
html.xp-reduced .xp-years, html:not(.xp-js) .xp-years { display: none; }
html.xp-reduced .xp-sketch .lbl, html:not(.xp-js) .xp-sketch .lbl { opacity: 1; }
html.xp-reduced .xp-w { color: inherit; }
@media (prefers-reduced-motion: reduce) { .xp-cue i { animation: none; } .xp-sound .bars i { animation: none !important; } }
.xp-years { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--xp-out), transform .8s var(--xp-out); }
.xp-years.on { opacity: 1; transform: none; }

/* sketch stage inside a sticky scene: phone = top band, desktop = right two thirds */
.xp-sk-stage { position: absolute; z-index: 2; left: var(--xp-g); right: var(--xp-g); top: calc(var(--xp-bar) + 24px); height: 44svh; display: grid; place-items: center; }
.xp-sk-stage svg { max-height: 100%; }
@media (min-width: 900px) { .xp-sk-stage { left: 40%; right: var(--xp-g); top: 16svh; height: 58svh; } .xp-sk-stage svg { max-width: 560px; } .xp-sk .xp-cap { max-width: 26rem; } }
.xp-sketch .beam .spot { fill: var(--xp-accent); filter: drop-shadow(0 0 6px var(--xp-accent)); }
.xp-sketch .beamline { stroke: var(--xp-accent); stroke-width: 2; }
.xp-sketch text.sign { font-size: 16px; fill: var(--mix-3); }
.xp-sketch text.n { fill: var(--bone); font-weight: 500; }
/* an inline sketch figure, scrubbed while it passes */
.xp-body > figure.xp-sketch { max-width: 40rem; margin-top: 48px; margin-bottom: 48px; }
.xp-body > figure.xp-sketch figcaption { margin-top: 14px; font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--mix-3); }
html.xp-reduced .xp-sketch [data-draw] { stroke-dashoffset: 0 !important; }
html.xp-reduced .xp-sketch .beam { opacity: 1; }
/* a counter that rides in a scene */
.xp-count { position: absolute; z-index: 3; left: var(--xp-g); top: calc(var(--xp-bar) + 16px); opacity: 0; transition: opacity .5s var(--xp-out); }
.xp-count.on { opacity: 1; }
.xp-count .xp-big { font-size: clamp(3.5rem, 18vw, 10rem); }
@media (min-width: 900px) { .xp-count { top: auto; bottom: clamp(28px, 7svh, 72px); left: auto; right: var(--xp-g); text-align: right; } }
html.xp-reduced .xp-count { position: relative; opacity: 1; left: auto; top: auto; margin: 0 var(--xp-g); }
.xp-open-in { position: relative; z-index: 2; }
.xp-lite { height: 44px; margin: 0 2px; box-shadow: none; position: relative; }
.xp-lite::before { content: ""; position: absolute; inset: 6px 0; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline-strong); pointer-events: none; }

.xp-sketch [data-draw].xp-undrawn { visibility: hidden; }
html.xp-reduced .xp-sketch [data-draw].xp-undrawn { visibility: visible; }

/* =====================================================================================================================
   SECTION GRAMMAR (2026-11-20). An act is a sequence of composed sections: the visual and its words are one
   composition. Every section: a kicker, a headline (≤ 8 words), ≤ ~40 words in short lines, a visual, and an
   optional "Full text" drawer that pulls the lite passage in by reference. Catalogue and rules: KIT.md §11.
   ===================================================================================================================== */
.xp-body.prose > .xs { margin-left: calc(-1 * var(--xp-g)); margin-right: calc(-1 * var(--xp-g)); max-width: none; }
.xs { position: relative; min-height: 100svh; padding: calc(var(--xp-bar) + 28px) var(--xp-g) 40px; display: grid; align-content: center; gap: 22px; }
.xs.short { min-height: 72svh; }
.xs-k { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--text-xs); line-height: 1rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mix-4); font-weight: 500; }
.xs-k b { color: var(--bone); font-weight: 500; }
.prose .xs .xs-h, .xs-h { margin: 0; max-width: 14ch; font-size: clamp(2rem, 8.6vw, 4.75rem); line-height: 1.05; letter-spacing: -0.042em; font-weight: 500; color: var(--bone); text-wrap: balance; display: block; }
.prose .xs .xs-h a.hash { display: none; }
.prose .xs p, .prose .xs ul, .prose .xs ol, .prose .xs dl, .prose .xs figure { margin: 0; }
.prose .xs ul, .prose .xs ol { padding: 0; list-style: none; }
.prose .xs li { margin: 0; }
.xs-lede { max-width: 34ch; font-size: clamp(1.05rem, 2.3vw, 1.3rem); line-height: 1.45; color: var(--mix-2); text-wrap: pretty; }
.xs-lede b, .xs b.t { color: var(--bone); font-weight: 500; }
.xs-words { display: grid; gap: 14px; align-content: end; position: relative; z-index: 2; }
.xs-vis { position: relative; min-width: 0; }
.xs-vis img { width: 100%; height: auto; border-radius: 4px; }
.xs .katex { font-size: 1.05em; }

/* entrance: words and parts arrive in order when the section comes in (not on every scroll) */
html.xp-js:not(.xp-reduced) .xs [data-in] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--xp-out), transform .9s var(--xp-out); transition-delay: calc(var(--i, 0) * 90ms); }
html.xp-js:not(.xp-reduced) .xs.is-in [data-in] { opacity: 1; transform: none; }

/* hero statement: words over the object */
.xs-hero { align-content: end; }
.xs-hero .xs-vis { position: absolute; inset: 0; }
.xs-hero .xs-vis::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to top, var(--void) 10%, transparent); pointer-events: none; }
.xs-say { max-width: 18ch; font-size: clamp(2.1rem, 8.4vw, 6.4rem); line-height: 1.06; letter-spacing: -0.045em; font-weight: 500; color: var(--bone); text-wrap: balance; }
.xs-say em { font-style: italic; font-weight: 400; color: inherit; }

/* split feature: visual + 2–4 numbered points */
.xs-split { grid-template-columns: 1fr; align-content: center; }
.xs-split .xs-vis { max-height: 46svh; display: grid; place-items: center; }
.xs-split .xs-vis > * { max-height: 46svh; }
@media (min-width: 900px) { .xs-split { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; } .xs-split .xs-vis, .xs-split .xs-vis > * { max-height: 72svh; } .xs-split.flip .xs-vis { order: 2; } }
.xs-pts { display: grid; gap: 12px; counter-reset: pt; }
.xs-pts > li { position: relative; padding-left: 34px; font-size: var(--text-md); line-height: 1.45; color: var(--mix-2); max-width: 38ch; }
.xs-pts > li::before { counter-increment: pt; content: counter(pt, decimal-leading-zero); position: absolute; left: 0; top: .2em; font-size: 11px; letter-spacing: .1em; color: var(--mix-4); font-variant-numeric: tabular-nums; }
.xs-pts > li > b:first-child { display: block; color: var(--bone); font-weight: 500; }

/* big number beside what it measures */
.xs-stat { grid-template-columns: 1fr; align-content: center; }
.xs-num { margin: 0; font-size: clamp(4.5rem, 25vw, 17rem); line-height: .92; letter-spacing: -0.06em; font-weight: 500; color: var(--bone); font-variant-numeric: tabular-nums; white-space: nowrap; }
.xs-num small { font-size: .26em; letter-spacing: -0.01em; color: var(--mix-3); margin-left: .12em; vertical-align: .9em; }
.xs-num sup { font-size: .42em; vertical-align: 1.1em; letter-spacing: -0.02em; }
@media (min-width: 900px) { .xs-stat { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 48px; align-items: end; } .xs-stat .xs-vis { grid-column: 1 / -1; } }

/* spec sheet cards: a particle as a product spec */
.xs-specs { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .xs-specs { grid-template-columns: repeat(3, 1fr); } }
.xs-spec { position: relative; padding: 18px 18px 14px; border-radius: 14px; background: color-mix(in srgb, var(--lift) 4.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.xs-spec-sym { font-size: clamp(2.6rem, 9vw, 4rem); line-height: 1; letter-spacing: -0.04em; font-weight: 500; color: var(--bone); }
.xs-spec-sym sup { font-size: .45em; color: var(--mix-3); }
.xs-spec-name { margin-top: 6px !important; font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--mix-4); }
.xs-spec dl { margin-top: 14px !important; display: grid; }
.xs-spec dl > div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 8px; padding: 7px 0; border-top: 1px solid var(--hairline); font-size: var(--text-sm); line-height: 1.35; }
.xs-spec dt { color: var(--mix-4); }
.xs-spec dd { margin: 0; color: var(--bone); }
@media (max-width: 719px) { .xs-specs.compact .xs-spec { padding: 12px 14px 8px; } .xs-specs.compact .xs-spec-sym { font-size: 2.2rem; } .xs-specs.compact dl { margin-top: 6px !important; } .xs-specs.compact dl > div { padding: 4px 0; grid-template-columns: 6.5rem 1fr; } }

/* comparison / myth vs fact */
.xs-pair { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.xs-pair > div { position: relative; padding: 16px; border-radius: 14px; background: color-mix(in srgb, var(--lift) 4.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); display: grid; gap: 10px; align-content: start; }
.xs-pair .xs-vis { min-height: 140px; }
.xs-pair h3 { margin: 0 !important; font-size: clamp(1.15rem, 3.4vw, 1.75rem); line-height: 1.12; letter-spacing: -0.025em; font-weight: 500; display: block !important; }
.xs-pair p { font-size: var(--text-sm); line-height: 1.45; color: var(--mix-2); }
.xs-myth > div:first-child h3 { color: var(--mix-4); text-decoration: line-through; text-decoration-color: var(--wrong); text-decoration-thickness: 1px; }
.xs-myth > div:last-child { background: var(--bone); color: var(--void); box-shadow: none; }
.xs-myth > div:last-child h3 { color: var(--void); }
.xs-myth > div:last-child p { color: color-mix(in srgb, var(--void) 78%, var(--bone)); }
.xs-myth > div:last-child .xs-k { color: color-mix(in srgb, var(--void) 60%, var(--bone)); }
@media (max-width: 560px) { .xs-pair.stack { grid-template-columns: 1fr; } }

/* timeline strip */
.xs-line { display: grid; gap: 0; position: relative; }
.xs-line > li { display: grid; grid-template-columns: 4.6rem 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--hairline); align-items: baseline; }
.xs-line .y { font-size: clamp(1.4rem, 5vw, 2.2rem); letter-spacing: -0.04em; line-height: 1; color: var(--bone); font-variant-numeric: tabular-nums; }
.xs-line .w { font-size: var(--text-sm); line-height: 1.4; color: var(--mix-2); }
.xs-line .w b { display: block; font-size: var(--text-md); color: var(--bone); font-weight: 500; }
@media (min-width: 900px) { .xs-line { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 16px; } .xs-line > li { grid-template-columns: 1fr; border-top: 1px solid var(--hairline-strong); padding-top: 16px; } }

/* interactive panel: a lite widget framed by its headline and live caption */
.xs-panel { align-content: center; }
.xs-panel .widget { margin: 0 !important; max-width: var(--wide); }
@media (min-width: 1000px) { .xs-panel { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; } }

/* editorial spread: a big quote beside a historic picture */
.xs-quote { margin: 0; max-width: 20ch; font-size: clamp(1.7rem, 6.6vw, 4rem); line-height: 1.12; letter-spacing: -0.035em; font-style: italic; font-weight: 400; color: var(--bone); text-wrap: balance; }
.xs-quote::before { content: "\201C"; color: var(--mix-4); margin-right: .04em; }
.xs-quote::after { content: "\201D"; color: var(--mix-4); }
.xs-spread .fig { margin: 0 !important; }
.xs-spread .fig img { max-height: 46svh; width: auto; }
@media (min-width: 900px) { .xs-spread { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; } .xs-spread .fig img { max-height: 70svh; } }

/* the equation that builds itself: each term points at what it means */
.xs-eq { --t-gap: 18px; }
.xs-eqrow { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px var(--t-gap); font-size: clamp(1.6rem, 7vw, 3.6rem); line-height: 1.2; color: var(--bone); }
.xs-term { position: relative; display: inline-grid; justify-items: center; gap: 10px; }
.xs-term > .xs-tlab { font-size: 10.5px; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--mix-3); font-weight: 500; max-width: 12ch; text-align: center; padding-top: 10px; position: relative; }
.xs-term > .xs-tlab::before { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 8px; background: color-mix(in srgb, var(--bone) 55%, transparent); }
.xs-term > .xs-tlab b { display: block; color: var(--bone); font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 13px; }
.xs-term.op > .xs-tlab { visibility: hidden; }

/* collectible cards (Just remember): the fact on the front, the hook on the back */
.xs-cards { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .xs-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .xs-cards { grid-template-columns: repeat(3, 1fr); } }
.xs-flip { position: relative; display: block; width: 100%; min-height: 150px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; perspective: 900px; -webkit-tap-highlight-color: transparent; }
.xs-flip > span { position: absolute; inset: 0; display: grid; align-content: space-between; gap: 12px; padding: 18px 18px 14px; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .8s var(--xp-ease); }
.xs-flip .f { background: color-mix(in srgb, var(--lift) 5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); }
.xs-flip .b { background: var(--bone); color: var(--void); transform: rotateY(180deg); }
.xs-flip.is-flipped .f { transform: rotateY(-180deg); }
.xs-flip.is-flipped .b { transform: rotateY(0); }
.xs-flip .f b, .xs-flip .f .fx { font-size: clamp(1.05rem, 2.4vw, 1.25rem); line-height: 1.35; letter-spacing: -0.015em; font-weight: 500; color: var(--bone); }
.xs-flip .b .fx { font-size: var(--text-md); line-height: 1.45; }
.xs-flip .b b { font-weight: 500; }
.xs-flip .n { display: flex; justify-content: space-between; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mix-4); }
.xs-flip .b .n { color: color-mix(in srgb, var(--void) 55%, var(--bone)); }
.xs-flip .sizer { position: relative; visibility: hidden; display: block; padding: 18px 18px 14px; }
html.xp-reduced .xs-flip .b { position: relative; transform: none; margin-top: 6px; }
html.xp-reduced .xs-flip .f { position: relative; transform: none; }
html.xp-reduced .xs-flip .sizer { display: none; }

/* glossary strip: terms with their meaning, always visible */
.xs-gloss { display: grid; gap: 0; grid-template-columns: 1fr; }
@media (min-width: 720px) { .xs-gloss { grid-template-columns: 1fr 1fr; column-gap: 32px; } }
.xs-gloss > div { display: grid; grid-template-columns: minmax(7rem, 38%) 1fr; gap: 12px; padding: 9px 0; border-top: 1px solid var(--hairline); font-size: var(--text-sm); line-height: 1.4; }
.xs-gloss dt { color: var(--bone); font-weight: 500; }
.xs-gloss dd { margin: 0; color: var(--mix-3); }

/* quiz card, at the moment it tests */
.xs-quiz .quiz, .xs-quiz .deck { margin: 0 !important; max-width: 40rem; }
.xs-quiz { align-content: center; }
@media (min-width: 900px) { .xs-quiz { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; } }

/* the "Full text" drawer: the lite passage, by reference, one tap away */
.xs-full { position: relative; z-index: 3; justify-self: start; max-width: var(--measure); }
.xs-full > summary { list-style: none; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline-strong); font-size: var(--text-xs); letter-spacing: .14em; text-transform: uppercase; color: var(--mix-3); cursor: pointer; background: color-mix(in srgb, var(--void) 70%, transparent); }
.xs-full > summary::-webkit-details-marker { display: none; }
.xs-full > summary::before { content: "+"; width: 18px; text-align: center; font-size: 15px; letter-spacing: 0; color: var(--bone); }
.xs-full[open] > summary::before { content: "−"; }
.xs-full > summary:hover { color: var(--bone); }
.xs-full-in { margin-top: 16px; padding: 4px 0 8px 18px; border-left: 1px solid var(--hairline-strong); font-size: var(--fs-read); line-height: var(--lh-read); color: var(--mix-1); }
.xs-full-in > * { max-width: var(--measure); }
.xs-full-in p, .xs-full-in ul, .xs-full-in ol { margin: 0 0 16px !important; }
.xs-full-in ul, .xs-full-in ol { padding-left: 1.2em !important; list-style: revert !important; }
.xs-full-in li { margin: 0 0 6px !important; }
.xs-full-in h2, .xs-full-in h3 { display: block !important; font-size: var(--text-lg) !important; line-height: 1.3 !important; margin: 0 0 10px !important; letter-spacing: -0.01em; }
.xs-full-in .fig, .xs-full-in .gallery, .xs-full-in .widget { display: none; }

/* the back room on paper keeps the grammar: sections, not pages */
.xp-paper .xs { min-height: 86svh; }
.xp-paper .xs-spec, .xp-paper .xs-pair > div, .xp-paper .xs-flip .f { background: color-mix(in srgb, var(--lift) 3%, var(--void)); }
.xp-paper .xs-myth > div:last-child, .xp-paper .xs-flip .b { background: var(--bone); color: var(--void); }
.xp-paper .xs-full > summary { background: transparent; }

/* =====================================================================================================================
   ANNOTATIONS: one component for callouts on photos, sketches, diagrams and the 3D atom (canvas twin: assets/xp/anno.js)
   <div class="xa-layer"> over the visual (same box) holds <span class="xa" data-x="31" data-y="44" data-d="56,-38"
   [data-dm="40,-30"] [data-at=".2,2"] [data-anchor="n|e|x,y,z"]><b class="xa-t">Tag</b><em class="xa-v">value</em>
   <small class="xa-s">short line</small></span>. x/y in % of the layer; d = leader dx,dy in px (dm on phones).
   ===================================================================================================================== */
.xa-layer { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.xa { position: absolute; inset: 0; pointer-events: none; }
.xa > svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.xa .xa-ring { fill: none; stroke: var(--bone); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .35s var(--xp-out), transform .6s var(--xp-out); }
.xa .xa-lead { fill: none; stroke: color-mix(in srgb, var(--bone) 58%, transparent); stroke-width: 1; stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset .7s var(--xp-ease) .12s; }
.xa .xa-lab { position: absolute; display: grid; gap: 3px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .45s var(--xp-out) .5s, transform .6s var(--xp-out) .5s; text-shadow: 0 0 6px var(--void), 0 0 2px var(--void), 0 1px 1px var(--void); }
.xa .xa-lab.l { text-align: right; }
.xa .xa-lab .xa-row { display: inline-flex; align-items: baseline; gap: 8px; }
.xa .xa-lab.l .xa-row { justify-content: flex-end; }
.xa .xa-t { font-size: 10.5px; line-height: 1.2; letter-spacing: .15em; text-transform: uppercase; color: var(--bone); font-weight: 500; }
.xa .xa-v { font-style: normal; font-size: 13px; line-height: 1.2; color: var(--mix-2); font-weight: 500; letter-spacing: 0; }
.xa .xa-s { display: block; font-size: 12px; line-height: 1.3; color: var(--mix-3); white-space: normal; max-width: 19ch; }
.xa.on .xa-ring { opacity: 1; transform: none; }
.xa.on .xa-lead { stroke-dashoffset: 0; }
.xa.on .xa-lab { opacity: 1; transform: none; }
html.xp-reduced .xa .xa-ring, html.xp-reduced .xa .xa-lab, html.xp-reduced .xa .xa-lead { transition: none; }
html.xp-reduced .xa.on .xa-ring, html.xp-reduced .xa.on .xa-lab { opacity: 1; transform: none; }
.xp-paper .xa .xa-ring { stroke: var(--bone); }
.xp-paper .xa .xa-lab { text-shadow: 0 0 6px var(--void), 0 0 2px var(--void); }
/* a visual box that annotations share coordinates with: give it the visual's aspect ratio */
.xa-box { position: relative; width: 100%; }
.xa-box > img, .xa-box > svg, .xa-box > video, .xa-box > canvas { display: block; width: 100%; height: 100%; }

/* section helpers */
.xs-stagehead { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); top: calc(var(--xp-bar) + 14px); display: grid; gap: 10px; pointer-events: none; }
.xs-stagehead .xs-h { font-size: clamp(1.75rem, 7vw, 3.6rem); }
@media (min-width: 900px) { .xs-stagehead { top: calc(var(--xp-bar) + 32px); } }
.xs-scrub .xp-cap p { font-size: clamp(1.05rem, 3.2vw, 1.45rem); }
.xs-num-s { font-size: clamp(2.6rem, 12vw, 6.5rem); }
.xs-pts.xs-3 { grid-template-columns: 1fr; }
@media (min-width: 900px) { .xs-pts.xs-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.xs-photo { max-width: 560px; }
.xs-photo .fig { margin: 0 !important; }
.xs-photo .fig img, .xs-split .xs-vis .fig img { max-height: 40svh; width: auto; max-width: 100%; }
@media (min-width: 900px) { .xs-split .xs-vis .fig img { max-height: 64svh; } }
.xs .fig figcaption { font-size: var(--text-xs); line-height: 1.45; color: var(--mix-4); max-width: 46ch; margin-top: 8px; }
.xs .gallery { margin: 0 !important; }
.xs-figk { margin-top: 10px !important; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mix-4); }
.xs-cardstack { display: grid; gap: 10px; align-content: center; }
.xs-cardstack .box.example { margin: 0 !important; font-size: var(--text-sm); line-height: 1.5; }
.xs-solves { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .xs-solves { grid-template-columns: 1fr 1fr; } }
.xs-solves .solve { margin: 0 !important; font-size: var(--text-sm); line-height: 1.5; }
.xs-two { display: grid; gap: 16px; grid-template-columns: 1fr; font-size: var(--text-sm); line-height: 1.5; }
@media (min-width: 900px) { .xs-two { grid-template-columns: 1fr 1fr; gap: 40px; } }
.xs-two .connect, .xs-two .faqs { margin: 0 !important; }
.xs .sources { font-size: var(--text-xs); line-height: 1.5; color: var(--mix-4); }
.xs .sources ol { padding-left: 1.2em !important; list-style: decimal !important; }
.xs-dots { height: 36svh; }
.xs-dots .xp-canvas { position: absolute; inset: 0; }
@media (min-width: 900px) { .xs-stat .xs-dots { grid-column: auto; height: 62svh; } .xs-stat:has(.xs-dots) { align-items: center; } }
.xs-quanta svg { width: 100%; max-width: 520px; }
.xs-quanta .xp-svgt { font-size: 13px; fill: var(--mix-3); }
.xs-paperhero { min-height: 70svh; }
.xs-line-s .xs-line > li .w { max-width: 40ch; }
.xs .examfacts { margin: 0 !important; max-width: 46rem; }
.xs .reveal { margin: 0 !important; max-width: 30rem; }

/* phone fit: a section is one screen; visuals give way to words */
.xs-num { font-variant-numeric: normal; }
.xs-num[data-xp-num] { font-variant-numeric: tabular-nums; }
@media (max-width: 899px) {
  .xs { gap: 18px; padding-bottom: 32px; }
  .xs-split .xs-vis, .xs-split .xs-vis > *, .xs-photo .fig img, .xs-split .xs-vis .fig img, .xs-spread .fig img { max-height: 30svh; }
  .xs .fig figcaption { display: none; }
  .xs-spread .gallery { grid-template-columns: 1fr 1fr; }
  .xs-spread .gallery img { max-height: 26svh; object-fit: contain; }
  .xs-pts { gap: 9px; }
  .xs-pts > li { font-size: var(--text-sm); line-height: 1.4; }
  .xp-sk .xp-sk-stage { top: calc(var(--xp-bar) + 128px); height: 38svh; }
  /* the equation becomes a term table: each term beside what it means */
  .xs-eqrow { flex-direction: column; align-items: stretch; gap: 10px; font-size: clamp(1.5rem, 7vw, 2.2rem); }
  .xs-term { display: grid; grid-template-columns: minmax(0, 46%) 1fr; justify-items: start; align-items: center; gap: 14px; }
  .xs-term > .xs-tlab { text-align: left; padding: 0 0 0 14px; max-width: none; }
  .xs-term > .xs-tlab::before { left: 0; top: 50%; width: 8px; height: 1px; }
  .xs-term.op { display: none; }
}
/* on paper the accent is ink: colour stays in content */
.xp-paper .xs-k b, .xp-paper .xs-tlab b, .xp-paper .xs-line .y, .xp-paper .xs-pts > li::before, .xp-paper .xa .xa-v, .xp-paper .xs-full > summary::before { color: var(--bone); }
.xs .katex-display { overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.xs .box.example, .xs .solve, .xs-cardstack, .xs-solves { min-width: 0; max-width: 100%; }
.xs-words, .xs > div { min-width: 0; }
/* figures inside sections never outgrow their slot (the lite label wrapper included) */
.xs .lab-wrap { display: inline-block; max-width: 100%; vertical-align: top; }
.xs .fig .lab-wrap > img, .xs .fig > img, .xs .gallery img { width: auto; max-width: 100%; max-height: 62svh; }
@media (max-width: 899px) { .xs .fig .lab-wrap > img, .xs .fig > img, .xs .gallery img { max-height: 30svh; } .xs-twoup .fig img, .xs-twoup .vid video { max-height: 24svh !important; } }
.xs-vis .vid video { max-height: 40svh; width: auto; max-width: 100%; border-radius: 4px; }
.xs-twoup { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.xs-twoup .fig { margin: 0 !important; }
/* a spectrum strip (content colour: real wavelengths, 400 → 750 nm left to right) */
.xs-strip { position: relative; height: 38px; border-radius: 4px; background: #050506; box-shadow: inset 0 0 0 1px var(--hairline); overflow: hidden; }
.xs-strip.cont { background: linear-gradient(90deg, #7a2cff 0%, #3c4cff 12%, #22c4ff 26%, #2ee07a 42%, #e9f03a 52%, #ffb02a 62%, #ff4a24 76%, #b3101a 100%); }
.xs-strip i { position: absolute; top: 0; bottom: 0; left: calc(var(--l) * 100%); width: 3px; background: var(--c, #fff); box-shadow: 0 0 10px var(--c, #fff); }
.xs-strip.cont i { background: #070708; box-shadow: none; width: 3px; }
/* galleries inside sections: two-up, small; split visuals size to their content (no overlap with the words) */
.xs .gallery { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px; }
.xs .gallery figure { margin: 0 !important; }
.xs .gallery figcaption { display: none; }
.xs-split .xs-vis { max-height: none !important; }
.xs-split .xs-vis > * { max-height: none !important; }
@media (max-width: 899px) { .xs .gallery img { max-height: 22svh; width: 100%; object-fit: contain; } }
.xs-pair .xs-num { font-size: clamp(2.4rem, 11vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; color: var(--bone); }
.xa .xa-lab { width: max-content; }
.xa .xa-s { white-space: nowrap; max-width: none; }
.prose h2.xs-h { display: block; margin: 0; }
.xp-sk-stage .xa-box { width: 100%; max-width: 640px; max-height: 100%; }
.xp-sk-stage .xa-box > svg { max-width: none; max-height: none; width: 100%; height: 100%; }
@media (min-width: 900px) { .xp-sk-stage .xa-box { max-width: min(680px, calc(58svh * 400 / 230)); } }
.prose h2.xs-h { line-height: 1.05; font-weight: 500; }
.xp-mask-line-mask { padding-bottom: .12em; margin-bottom: -.12em; padding-inline: .06em; margin-inline: -.06em; }
.xs-vis .xs-num { white-space: normal; font-size: clamp(2.2rem, 6vw, 5rem); }
@media (min-width: 900px) { .xs-num { font-size: clamp(4.5rem, 16vw, 12.5rem); } .xs-stat .xs-num small { display: block; margin: .3em 0 0; vertical-align: 0; font-size: .2em; } }
.xs-num-s { white-space: normal; overflow-wrap: anywhere; }
.xs-num small { white-space: normal; }


/* ===== phone fixes (2026-11-20, from the user's phone) ===== */
/* 1 · photos are never thumbnails on phones: full content width; galleries and two-ups stack */
@media (max-width: 899px) {
  .xs .lab-wrap { display: block; width: 100%; }
  .xs .fig, .xs .gallery figure, .xs .vid { width: 100%; }
  .xs .fig img, .xs .fig .lab-wrap > img, .xs .fig > img, .xs .gallery img, .xs-split .xs-vis .fig img, .xs-photo .fig img, .xs-spread .fig img, .xs .vid video { width: 100% !important; height: auto !important; max-height: none !important; max-width: 100% !important; object-fit: contain; }
  .xs-twoup .fig img, .xs-twoup .vid video { width: 100% !important; max-height: none !important; }
  .xs .gallery, .xs-twoup { grid-template-columns: 1fr !important; }
  .xs-photo { max-width: none; }
  .xs-split .xs-vis { justify-items: stretch; }
}
/* desktop split: the visual gets at least half the width */
@media (min-width: 900px) { .xs-split, .xs-spread { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } .xs .fig img, .xs .fig .lab-wrap > img { max-height: 72svh; } }
/* 2 · sketches always fit their container (viewBox + width 100%, 16 px safe margin) */
.xp-sk-stage { display: flex; flex-direction: column; justify-content: center; align-items: stretch; left: max(16px, var(--xp-g)); right: max(16px, var(--xp-g)); }
.xp-sk-stage .xa-box { width: 100%; max-width: min(640px, 100%); margin: 0 auto; height: auto; max-height: none; }
.xp-sk-stage .xa-box > svg { display: block; width: 100%; height: 100%; overflow: hidden; }
.xs .xa-box { max-width: 100%; }
.xs .xa-box > svg { overflow: hidden; }
/* 3 · media before labels: a poster image under every scrubbed video; callouts wait for media */
.xp-film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xp-film-poster.contain { object-fit: contain; }
.xp-film-v { opacity: 0; transition: opacity .4s linear; }
.xp-film-v.has-data { opacity: 1; }
.xp-await-media .xa-layer, .xa-layer.xa-wait { visibility: hidden; }
/* 5 · big maths and numbers never widen the page */
.xs .katex-display, .xs-eqrow .katex { max-width: 100%; }
.xs-eqrow > .xs-term > span:first-child { max-width: 100%; overflow-x: auto; overflow-y: hidden; }
.xs-numh { white-space: normal; }
/* KaTeX's hidden MathML copy (for screen readers) must not count as page overflow */
.katex .katex-mathml { overflow: hidden; max-width: 1px; }

/* TYPE IS NEVER COLOURED; COLOUR BELONGS TO THE VISUAL (user, 2026-11-20). The --xp-* content tokens are for strokes,
   glows, fills and swatches only. To tie words to a colour in the visual, put a swatch beside neutral text: */
.xs-sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--c, var(--bone)); box-shadow: 0 0 8px var(--c, transparent); vertical-align: .35em; margin-right: 8px; }
.xs-sw.dot { width: 8px; height: 8px; border-radius: 50%; vertical-align: .1em; }

/* ===== kit pass after the conversion (workers' reports) ===== */
/* symbols keep their case inside uppercase labels: wrap them in .o (ψ, λ, l, 1s, Fe, eV, µm …) */
.o, .xs-k .o, .xp-k .o, .xa-t .o, .xs-spec-name .o, .xs-tlab .o, .xs-figk .o { text-transform: none; letter-spacing: 0; }
/* flip-card backs and inverted cards: emphasis stays readable (site.css makes .prose b bone) */
.prose .xs-flip .b b, .prose .xs-flip .b strong, .prose .xs-myth > div:last-child b, .prose .examfacts b { color: var(--void); }
/* a closed drawer takes no layout */
.xs-full:not([open]) > .xs-full-in { display: none; }
/* small stats stay small on desktop */
.xs-num.xs-num-s { font-size: clamp(2.4rem, 9vw, 5.5rem); }
@media (min-width: 900px) { .xs-num.xs-num-s { font-size: clamp(2.8rem, 5vw, 5.5rem); } }
/* reduced motion: pinned-stage headings and sketch stages join the normal flow */
html.xp-reduced .xs-stagehead, html:not(.xp-js) .xs-stagehead { position: relative; inset: auto; left: auto; right: auto; top: auto; margin: calc(var(--xp-bar) + 16px) var(--xp-g) 12px; }
html.xp-reduced .xp-sk-stage, html:not(.xp-js) .xp-sk-stage { position: relative; inset: auto; left: auto; right: auto; top: auto; height: auto; margin: 0 max(16px, var(--xp-g)); }
/* lite "side" figures inside sections drop their 240 px column */
.xs .fig.side { display: block !important; max-width: none; grid-template-columns: none !important; }
.xs .fig.side img, .xs .fig.side .lab-wrap { width: 100%; max-width: 100%; }
@media (min-width: 900px) { .xs .fig.side img { width: auto; max-width: 100%; max-height: 72svh; } }
/* the back room's sections use the page width, like the main flow */
.xp-body > section.deep.xp-paper > .xs { max-width: none; margin-left: calc(-1 * var(--xp-g)); margin-right: calc(-1 * var(--xp-g)); }

/* =====================================================================================================================
   UI PASS (2026-11-20, user: "the ui of interactives, worked examples, answer buttons looks bad; the unit after a big
   number is tiny"). Everything here is scoped to experience pages (html.xp); the lite site is untouched.
   ===================================================================================================================== */

/* ---- A · a big number and its unit are one typographic unit; the description is its own line ---- */
html.xp .xs-num small, html.xp .xs-stat .xs-num small, html.xp .xs-num.xs-num-s small { display: inline; font-size: max(18px, .38em); vertical-align: baseline; margin: 0 0 0 .14em; letter-spacing: -0.015em; font-weight: 500; color: var(--mix-2); white-space: nowrap; }
html.xp .xs-num-desc { margin: 10px 0 0 !important; font-size: max(15px, var(--fs-read)); line-height: 1.45; color: var(--mix-2); max-width: 34ch; }

/* ---- the type floor: no text under 13 px in the flow (credits 11 px) ---- */
html.xp .xs-k, html.xp .xp-k, html.xp .xp-cap .xp-k, html.xp .xa .xa-t, html.xp .xs-term > .xs-tlab, html.xp .xs-spec-name, html.xp .xs-figk,
html.xp .xs-flip .n, html.xp .xs-full > summary, html.xp .xp-body .label, html.xp .guess-tag, html.xp .xs-pair .xs-k { font-size: 13px; letter-spacing: .1em; line-height: 1.3; }
html.xp .xa .xa-s, html.xp .xs-term > .xs-tlab b { font-size: 13px; }
html.xp .xa .xa-v { font-size: 14px; }
html.xp .xs-pts > li::before { font-size: 13px; }
html.xp .xs-spec dl > div, html.xp .xs-gloss > div, html.xp .xs-line .w, html.xp .xs-pair p { font-size: 15px; }
html.xp .xp-credit, html.xp .credit, html.xp .credits, html.xp .cite .credits-wrap { font-size: 11px; }

/* ---- C · hint / answer: proper buttons, the answer opens with motion ---- */
html.xp .xp-body details.reveal, html.xp .xs .reveal { background: none !important; box-shadow: none !important; padding: 0 !important; margin: 14px 0 0 !important; max-width: none; }
html.xp details.reveal > summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; height: auto; padding: 0 18px 0 14px; border-radius: 999px; background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--hairline-strong); font-size: 15px; font-weight: 500; letter-spacing: 0; text-transform: none; cursor: pointer; transition: background var(--t-fast), color var(--t-fast); -webkit-tap-highlight-color: transparent; }
html.xp details.reveal > summary::before { content: ""; width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .4s var(--xp-ease); }
html.xp details.reveal[open] > summary::before { transform: rotate(-135deg) translate(-2px, -2px); }
html.xp details.reveal > summary:hover { background: color-mix(in srgb, var(--bone) 6%, transparent); }
html.xp details.reveal > summary:active, html.xp details.reveal[open] > summary { background: color-mix(in srgb, var(--bone) 10%, transparent); color: var(--bone); }
html.xp details.reveal > div { margin-top: 14px !important; padding: 2px 0 2px 16px; border-left: 1px solid var(--hairline-strong); font-size: 16px; line-height: 1.55; color: var(--mix-1); }
html.xp details.reveal + details.reveal { margin-left: 8px !important; display: inline-block; vertical-align: top; }
html.xp .xp-body .solve details.reveal { display: inline-block; margin-right: 8px !important; vertical-align: top; }
html.xp .xp-body .solve details.reveal[open] { display: block; }

/* ---- B · worked examples: header, given, steps (one per row, equations never break), result ---- */
html.xp .xw { position: relative; padding: 4px 0 0; max-width: 40rem; }
html.xp .xw-head { display: grid; gap: 6px; margin-bottom: 14px; }
html.xp .xw-k { margin: 0 !important; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mix-4); font-weight: 500; }
html.xp .xw-t { margin: 0 !important; font-size: clamp(1.25rem, 4.6vw, 1.6rem) !important; line-height: 1.2 !important; letter-spacing: -0.025em; font-weight: 500; color: var(--bone); display: block !important; }
html.xp .xw-given { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px !important; }
html.xp .xw-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 2px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline-strong); font-size: 14px; color: var(--mix-1); white-space: nowrap; max-width: 100%; overflow: hidden; }
html.xp .xw-find { margin: 0 0 14px !important; font-size: 16px; line-height: 1.5; color: var(--mix-1); }
html.xp .xw-find > .xw-k2 { display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--mix-4); font-weight: 500; }
html.xp ol.xw-steps { list-style: none !important; margin: 0 !important; padding: 0 !important; counter-reset: xw; border-top: 1px solid var(--hairline); }
html.xp .xw-step { position: relative; margin: 0 !important; padding: 12px 0 12px 40px; border-bottom: 1px solid var(--hairline); font-size: 16px; line-height: 1.5; color: var(--mix-1); counter-increment: xw; }
html.xp .xw-step::before { content: counter(xw); position: absolute; left: 0; top: 12px; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hairline-strong); display: grid; place-items: center; font-size: 13px; color: var(--mix-3); }
html.xp .xw-step p { margin: 0 !important; }
html.xp .xw-step b { color: var(--bone); }
html.xp .xw .katex, html.xp .xw .katex .base { white-space: nowrap; }
html.xp .xw-eq { display: block; margin: 6px 0 2px; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
html.xp .xw-eq::-webkit-scrollbar { display: none; }
html.xp .xw-eq .katex-display { margin: 0 !important; text-align: left; }
html.xp .xw-eq .katex-display > .katex { text-align: left; }
html.xp .xw-step.is-hidden { display: none; }
html.xp .xw-step.is-new { animation: xw-in .55s var(--xp-out); }
@keyframes xw-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.xp .xw-res { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: 16px 0 4px; }
html.xp .xw-res .xw-k { flex-basis: 100%; }
html.xp .xw-res .xs-num { font-size: clamp(2.6rem, 11vw, 4.6rem); line-height: 1; letter-spacing: -0.045em; color: var(--bone); }
html.xp .xw-res.is-hidden { display: none; }
html.xp .xw-ctl { display: flex; gap: 8px; margin-top: 14px; }
html.xp .xw-ctl[hidden] { display: none; }
/* worked answers inside "Solve it" use the step rhythm too */
html.xp .xw-ans .katex { white-space: nowrap; }
html.xp .xp-body .box.example:not(.xw-done) { background: none; box-shadow: none; padding: 0; }
html.xp .xs-cardstack { gap: 32px; }

/* ---- D · interactives: a widget is a section, not a grey card ---- */
html.xp .xp-body .widget { background: none !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; margin: 0 0 8px; color: var(--mix-1); font-size: 16px; }
html.xp .xp-body .widget .w-head { gap: 8px; margin-bottom: 18px; }
html.xp .xp-body .widget .w-head h3, html.xp .xp-body .widget .w-title { font-size: clamp(1.25rem, 4.6vw, 1.6rem) !important; line-height: 1.2 !important; letter-spacing: -0.025em; }
html.xp .xp-body .widget .w-head p, html.xp .xp-body .widget .w-prompt { font-size: 16px; line-height: 1.5; color: var(--mix-2); }
html.xp .xp-body .guess-tag { color: var(--mix-4); }
html.xp .xp-body .guess-tag::before { width: 7px; height: 7px; background: none; box-shadow: inset 0 0 0 1px var(--bone); }
html.xp .xp-body .widget .w-stage { background: transparent; border-radius: 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 8px 0; }
html.xp .xp-body .widget .w-out, html.xp .xp-body .widget .gx-s { margin-top: 14px; font-size: 17px; line-height: 1.5; color: var(--mix-1); }
html.xp .xp-body .widget .w-out b { color: var(--bone); }
html.xp .xp-body .w-controls { gap: 8px; margin-top: 14px; }

/* choice options: full-width rows, hairlines, a 28 px letter ring, a drawn ✓ / ✗, neutral tint */
html.xp .xp-body .opts { display: block !important; grid-template-columns: 1fr !important; gap: 0 !important; margin: 14px 0 0 !important; padding: 0 !important; border-bottom: 1px solid var(--hairline); list-style: none !important; }
html.xp .xp-body .opts > li { margin: 0 !important; }
html.xp .xp-body button.opt { position: relative; display: grid !important; grid-template-columns: 28px minmax(0, 1fr) 22px !important; gap: 14px !important; align-items: center; width: 100%; min-height: 52px !important; padding: 12px 4px !important; border: 0; border-top: 1px solid var(--hairline); border-radius: 0 !important; background: transparent !important; color: var(--mix-1) !important; font-size: 16px !important; line-height: 1.4 !important; text-align: left; transition: background var(--t-fast); }
html.xp .xp-body button.opt .k { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--hairline-strong); font-size: 13px; color: var(--mix-3) !important; font-weight: 500; }
html.xp .xp-body button.opt:hover:not([disabled]) { background: color-mix(in srgb, var(--bone) 4%, transparent) !important; }
html.xp .xp-body button.opt[aria-pressed="true"] { background: color-mix(in srgb, var(--bone) 6%, transparent) !important; }
html.xp .xp-body button.opt.is-right { background: color-mix(in srgb, var(--bone) 7%, transparent) !important; color: var(--bone) !important; box-shadow: none !important; }
html.xp .xp-body button.opt.is-right .k { background: var(--bone); color: var(--void) !important; box-shadow: none; }
html.xp .xp-body button.opt.is-wrong { background: transparent !important; color: var(--mix-4) !important; }
html.xp .xp-body button.opt.is-wrong .k { box-shadow: inset 0 0 0 1px var(--mix-5); }
html.xp .xp-body button.opt.is-right::after, html.xp .xp-body button.opt.is-wrong::after { content: ""; grid-column: 3; width: 20px; height: 20px; background: currentColor; animation: xp-mark .45s var(--xp-out) both;
  -webkit-mask: var(--mk) center / contain no-repeat; mask: var(--mk) center / contain no-repeat; }
html.xp .xp-body button.opt.is-right::after { --mk: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M3.5 10.5l4.2 4.2L16.5 5.5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>"); }
html.xp .xp-body button.opt.is-wrong::after { --mk: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5 5l10 10M15 5L5 15' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'/></svg>"); }
@keyframes xp-mark { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
html.xp .xp-body button.opt[disabled] { cursor: default; }
html.xp .xp-body .why { margin: 0 !important; padding: 4px 4px 16px 46px !important; border-radius: 0 !important; background: none !important; font-size: 15px !important; line-height: 1.5 !important; color: var(--mix-2) !important; animation: xp-why .55s var(--xp-out); }
html.xp .xp-body .why b { color: var(--bone); }
@keyframes xp-why { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
html.xp .xp-body .quiz .q, html.xp .xp-body .neet .q { font-size: 17px; line-height: 1.5; color: var(--bone); }

/* one control style: outline at rest, bone when active; 44 px; segmented for exclusive choices, chips for toggles */
html.xp .xp-body :is(.btn, .chip, .gx-chip, .deck-go, .rc-bar button) { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; height: auto; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--hairline-strong); font: inherit; font-size: 15px; font-weight: 500; line-height: 1.2; letter-spacing: 0; cursor: pointer; transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast); -webkit-tap-highlight-color: transparent; }
html.xp .xp-body :is(.btn, .chip, .gx-chip, .deck-go):hover { background: color-mix(in srgb, var(--bone) 6%, transparent); }
html.xp .xp-body :is(.btn, .chip, .gx-chip, .seg button)[aria-pressed="true"], html.xp .xp-body :is(.btn, .chip, .gx-chip).on, html.xp .xp-body .chip[aria-checked="true"] { background: var(--bone) !important; color: var(--void) !important; box-shadow: none !important; }
html.xp .xp-body :is(.btn, .chip, .gx-chip):active { background: color-mix(in srgb, var(--bone) 12%, transparent); }
html.xp .xp-body .btn[disabled] { opacity: .4; }
html.xp .xp-body .seg:has(> button) { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--hairline-strong); }
html.xp .xp-body .seg button { min-height: 38px; padding: 0 16px; border-radius: 999px; font-size: 15px; color: var(--mix-2); background: transparent; }
html.xp .xp-body .deck .icon-btn { width: 44px; height: 44px; }
html.xp .xp-body .deck { background: none !important; box-shadow: none !important; padding: 0 !important; }
html.xp .xp-body .deck-dots i { background: var(--mix-7); }
html.xp .xp-body .deck-dots i.now, html.xp .xp-body .deck-dots i.done { background: var(--bone); }

/* scrubbable numbers: bone, a dotted underline, a ↔ glyph, a 44 px hit area, a value tooltip while dragging */
html.xp .xp-body .gx-num { position: relative; color: var(--bone) !important; background: transparent !important; border-bottom: 1px dotted var(--mix-3) !important; padding: 0 1px !important; border-radius: 0 !important; font-weight: 500; touch-action: none; }
html.xp .xp-body .gx-num::before { content: ""; position: absolute; left: -6px; right: -6px; top: -12px; bottom: -12px; }
html.xp .xp-body .gx-num::after { content: "↔"; margin-left: 4px; font-size: 13px; font-weight: 400; color: var(--mix-4); }
html.xp .xp-body .gx-num.gx-drag { background: color-mix(in srgb, var(--bone) 10%, transparent) !important; }
html.xp .xp-tip { position: fixed; z-index: 80; padding: 6px 10px; border-radius: 6px; background: var(--bone); color: var(--void); font-size: 14px; font-weight: 500; pointer-events: none; transform: translate(-50%, calc(-100% - 14px)); white-space: nowrap; }

/* charts inside widgets: hairline frame, data keeps its colour, no card */
html.xp .xp-body .widget svg text { font-family: var(--font); }

/* ---- F · no voids on phones: sections size to their content; heroes keep the screen ---- */
@media (max-width: 899px) {
  html.xp .xs { min-height: 0; padding-top: calc(var(--xp-bar) + 40px); padding-bottom: 48px; }
  html.xp .xs.xs-hero { min-height: 86svh; }
  html.xp .xs.short { padding-top: 40px; }
  html.xp .xs + .xs { padding-top: 32px; }
  html.xp .xp-scene { height: calc(var(--len, 300) * .86 * 1svh); }
}
/* grid tracks never grow to an unbreakable child (equations, chips): minmax(0, 1fr), not 1fr.
   Scoped (kit merge, 2026-11-20): on phones every section is one column; on desktop only the one-column types are,
   so splits, spreads, stats, panels and quizzes keep their two-column rules above (:where keeps this rule weak). */
@media (max-width: 899px) { html.xp .xs { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 900px) {
  html.xp .xs:where(:not(.xs-split, .xs-spread, .xs-stat, .xs-panel, .xs-quiz)) { grid-template-columns: minmax(0, 1fr); }
  html.xp :where(.xs-split, .xs-spread, .xs-stat, .xs-panel, .xs-quiz) > .xs-full { grid-column: 1 / -1; }
}
@media (max-width: 899px) { html.xp .xs-split, html.xp .xs-stat, html.xp .xs-panel, html.xp .xs-quiz, html.xp .xs-spread { grid-template-columns: minmax(0, 1fr); } }
html.xp .xs-cardstack, html.xp .xs-solves, html.xp .xs-two, html.xp .xs-specs, html.xp .xs-pair { min-width: 0; }
html.xp .xs-cardstack > *, html.xp .xs-solves > *, html.xp .xw, html.xp .xw-step, html.xp .xw-find { min-width: 0; }
html.xp .xw-t::first-letter { text-transform: uppercase; }
html.xp .xw .katex.katex-wide, html.xp .xw-ans .katex.katex-wide { overflow: visible; max-width: none; }
html.xp .xw-step, html.xp .xw-ans { overflow-x: clip; }
html.xp .xs[hidden] { display: none !important; }
/* quizzes, NEET questions and solve boxes: no grey card; a hairline frames the question */
html.xp .xp-body .quiz, html.xp .xp-body .neet, html.xp .xp-body .deck-slide > .quiz, html.xp .xp-body .deck-slide > .neet { margin: 0; padding: 0; border-radius: 0; background: none !important; box-shadow: none !important; }
html.xp .xp-body .quiz .q, html.xp .xp-body .neet .q { margin: 0 0 4px; font-weight: 500; }
html.xp .xp-body .solve { padding: 18px 0 20px; border-radius: 0; background: none !important; box-shadow: none !important; border-top: 1px solid var(--hairline-strong); }
html.xp .xp-body .solve > p { font-size: 16px; line-height: 1.55; color: var(--mix-1); }
html.xp .xp-body .neet-head { margin-bottom: 10px; }
html.xp .xp-body .neet-badge { background: none; box-shadow: inset 0 0 0 1px var(--hairline-strong); color: var(--bone); }
html.xp .xs-num { white-space: normal; }
html.xp .xs-num small { white-space: nowrap; display: inline-block; }

html.xp .xs-num { min-width: 0; max-width: 100%; }
/* a widget's row of four or more controls wraps instead of squeezing (e.g. the five series in the Rydberg widget) */
html.xp .xp-body .widget :is(div, p):has(> :is(.btn, .chip, .gx-chip) ~ :is(.btn, .chip, .gx-chip) ~ :is(.btn, .chip, .gx-chip) ~ :is(.btn, .chip, .gx-chip)) { display: flex !important; flex-wrap: wrap; gap: 8px; }
html.xp .xp-body .widget :is(.btn, .chip, .gx-chip) { min-width: 0; max-width: 100%; padding: 0 14px; white-space: normal; text-align: center; }
@media (max-width: 899px) {
  html.xp .xp-body > section.deep.xp-paper { margin-top: 72px; padding-top: 8px; padding-bottom: 48px; }
  html.xp .xs.xs-paperhero, html.xp .xp-paper .xs.xs-hero { min-height: 0; padding-top: 72px; padding-bottom: 32px; }
  html.xp .xp-paper .xs { min-height: 0; }
  html.xp .xp-next a { min-height: 54svh; }
  html.xp .xp-next { margin-top: 72px; }
}
@media (max-width: 899px) {
  html.xp .xp-next a { min-height: 0; justify-content: flex-start; gap: 22px; padding-top: 32px; padding-bottom: 48px; }
  html.xp .xs.xs-paperhero, html.xp .xp-paper .xs.xs-hero { padding-top: 48px; }
  html.xp .xp-body > section.deep.xp-paper { margin-top: 56px; }
}
/* a hero statement without a background visual is a statement, not a screen: no forced height, words not pinned low */
html.xp .xs.xs-hero:not(:has(> .xs-vis)) { min-height: 0; align-content: start; }
@media (min-width: 900px) { html.xp .xs.xs-hero:not(:has(> .xs-vis)) { min-height: 60svh; align-content: center; } }
@media (max-width: 899px) {
  html.xp .xp-body > section.deep.xp-paper { padding-bottom: 8px; }
  html.xp .xp-paper > .xs:last-child { padding-bottom: 24px; }
  html.xp .xp-next { margin-top: 40px; }
}
/* type in widgets is neutral too: inline-coloured output numbers and labels (outside the chart itself) go bone */
html.xp .xp-body .widget :is(p, div, span, b, strong, em, output, button, label):not(svg *)[style*="color"] { color: var(--bone) !important; }
html.xp .xp-body .widget :is(.gx-s, .w-out, .w-foot) :is(b, span, output) { color: var(--bone); }
/* plain buttons inside widgets (guess tiles, steppers…) share the one control style */
html.xp .xp-body .widget button:not(.opt):not(.gx-num):not(.icon-btn):not(.btn):not(.chip):not(.gx-chip):not([class*="rc-"]):not(svg *) { min-height: 44px; border-radius: 999px !important; background: transparent !important; color: var(--bone) !important; box-shadow: inset 0 0 0 1px var(--hairline-strong); border: 0; font: inherit; font-size: 15px; font-weight: 500; padding: 6px 14px; cursor: pointer; }
html.xp .xp-body .widget button:not(.opt):not(.gx-num):not(.icon-btn):not(svg *)[aria-pressed="true"], html.xp .xp-body .widget button.on:not(.opt) { background: var(--bone) !important; color: var(--void) !important; box-shadow: none; }
html.xp .xp-body .widget button:not(.opt):not(.gx-num):not(.icon-btn):not(svg *):disabled { opacity: .45; }

/* =====================================================================================================================
   THE BACK ROOM, COLLAPSIBLE AND DARK (2026-11-20). Closed by default; the same void/bone language as the act, on a
   quieter raised surface under a hairline rule. While closed the body keeps its real width (height 0, hidden), so
   widgets, KaTeX and canvases measure correctly; xp.js animates it open and re-measures everything.
   ===================================================================================================================== */
html.xp .xp-body.prose > section.deep.xs-back { margin: clamp(80px, 14svh, 140px) calc(-1 * var(--xp-g)) 0; max-width: none; padding: 0; border-top: 1px solid var(--hairline-strong); background: color-mix(in srgb, var(--lift) 2.5%, var(--void)); color: var(--mix-1); }
html.xp .xs-back .xb-head { display: grid; gap: 12px; width: 100%; padding: clamp(40px, 8svh, 72px) var(--xp-g) clamp(36px, 7svh, 64px); border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
html.xp .xs-back .xb-head > * { margin-left: var(--xp-col); }
html.xp .xs-back .xb-title { display: block; max-width: 18ch; font-size: clamp(1.9rem, 7.4vw, 4rem); line-height: 1.06; letter-spacing: -0.04em; font-weight: 500; color: var(--bone); text-wrap: balance; }
html.xp .xs-back .xb-line { display: block; max-width: 38ch; font-size: max(16px, var(--fs-read)); line-height: 1.5; color: var(--mix-2); }
html.xp .xs-back .xb-list { display: block; max-width: 40ch; font-size: 14px; line-height: 1.5; color: var(--mix-4); }
html.xp .xs-back .xb-btn, html.xp .xs-back .xb-close { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; padding: 0 16px 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--bone); box-shadow: inset 0 0 0 1px var(--hairline-strong); font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; transition: background var(--t-fast); }
html.xp .xs-back .xb-btn svg, html.xp .xs-back .xb-close svg { width: 18px; height: 18px; transition: transform .45s var(--xp-ease); }
html.xp .xs-back:not(.is-closed) .xb-btn svg, html.xp .xs-back .xb-close svg { transform: rotate(180deg); }
html.xp .xs-back .xb-head:hover .xb-btn, html.xp .xs-back .xb-close:hover { background: color-mix(in srgb, var(--bone) 7%, transparent); }
html.xp .xs-back .xb-head:focus-visible { outline: 1px solid var(--bone); outline-offset: -4px; }
html.xp .xs-back .xb-body { overflow: hidden; }
html.xp .xs-back.is-closed .xb-body { height: 0; visibility: hidden; }
html.xp .xs-back:not(.is-closed):not(.is-anim) .xb-body { overflow: visible; }
html.xp .xs-back .xb-body > .xs:first-child { padding-top: 24px; }
html.xp .xs-back .xb-foot { padding: 16px var(--xp-g) 56px; }
html.xp .xs-back .xb-foot > * { margin-left: var(--xp-col); }
html.xp .xs-back .xs { min-height: 0; }
html.xp .xs-back .xs + .xs { border-top: 1px solid var(--hairline); }
html.xp .xs-back .xs-spec, html.xp .xs-back .xs-pair > div, html.xp .xs-back .xs-flip .f { background: color-mix(in srgb, var(--lift) 4%, var(--void)); }
@media (max-width: 899px) { html.xp .xp-body.prose > section.deep.xs-back { margin-top: 64px; } }

/* ---- the next act: its big title is the visual; Continue is the one primary button ---- */
html.xp .xp-next { margin-top: 0; border-top: 1px solid var(--hairline); }
html.xp .xp-next .xn-in { display: grid; gap: 18px; padding: clamp(48px, 9svh, 96px) var(--xp-g) clamp(40px, 7svh, 72px); }
html.xp .xp-next .xn-in > * { margin-left: var(--xp-col); }
html.xp .xp-next .xn-in .xp-k { display: flex; justify-content: space-between; gap: 16px; max-width: 46rem; margin-top: 0; margin-bottom: 0; }
html.xp .xp-next .xn-in .t { margin: 0; max-width: 15ch; font-size: clamp(2.2rem, 9.4vw, 7rem); line-height: 1.05; letter-spacing: -0.048em; font-weight: 500; color: var(--bone); text-wrap: balance; }
html.xp .xp-next a.xn-go { justify-self: start; display: inline-grid; grid-template-columns: minmax(0, auto) 22px; align-items: center; column-gap: 16px; row-gap: 2px; min-height: 56px; max-width: min(100%, 34rem); margin-top: 8px; padding: 10px 22px 10px 26px; border-radius: 999px; background: var(--bone); color: var(--void); text-decoration: none; box-shadow: none; transition: background var(--t-fast), transform .3s var(--xp-out); }
html.xp .xp-next a.xn-go:hover { background: color-mix(in srgb, var(--bone) 88%, var(--void)); }
html.xp .xp-next a.xn-go:active { transform: scale(.98); }
html.xp .xp-next .xn-go-l { grid-column: 1; font-size: 17px; line-height: 1.2; font-weight: 500; }
html.xp .xp-next .xn-go-s { grid-column: 1; font-size: 13px; line-height: 1.3; color: color-mix(in srgb, var(--void) 70%, var(--bone)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.xp .xp-next a.xn-go svg { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; transition: transform .45s var(--xp-out); }
html.xp .xp-next a.xn-go:hover svg { transform: translateX(4px); }
html.xp .xp-prevnext { padding-top: 8px; }

/* =====================================================================================================================
   USER PASS 2026-11-20: labels as small cards on a plain line; logo goes home; a calmer menu; a title-only act list
   ===================================================================================================================== */
/* ---- annotations: no marker; a 1 px bone line ends exactly at the point; the label is a small squared card ---- */
html.xp .xa .xa-ring { display: none; }
html.xa-x {}
html.xp .xa .xa-lead { stroke: color-mix(in srgb, var(--bone) 72%, transparent); stroke-width: 1; }
html.xp .xa .xa-lab { padding: 6px 10px; border-radius: 4px; background: color-mix(in srgb, var(--void) 76%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px var(--hairline-strong); text-shadow: none; gap: 2px; }
html.xp .xa .xa-t { font-size: 13px; letter-spacing: .1em; }
html.xp .xa .xa-v { font-size: 14px; color: var(--mix-2); }
html.xp .xa .xa-s { font-size: 14px; color: var(--mix-3); }
html.xp .xa .xa-lab.l { text-align: left; }
html.xp .xa .xa-lab.l .xa-row { justify-content: flex-start; }

/* ---- the bar: logo (home), Sound, Lite, menu ---- */
html.xp .xp-home { min-width: 44px; margin-right: auto; }
html.xp .xp-home svg { width: 26px; height: 26px; }

/* ---- the menu: the chapter title on top (link to the hub), a calm act list, three links at the foot ---- */
html.xp .xp-map .xm-title { display: block; max-width: 18ch; margin: 0 0 28px; font-size: clamp(1.75rem, 6.4vw, 3.2rem); line-height: 1.06; letter-spacing: -0.04em; font-weight: 500; color: var(--bone); text-decoration: none; text-wrap: balance; }
html.xp .xp-map .xm-title:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
html.xp .xp-map .xm-acts { max-width: 40rem; border-bottom: 1px solid var(--hairline); }
html.xp .xp-map .xm-acts a { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 10px; align-items: baseline; min-height: 48px; padding: 12px 0; }
html.xp .xp-map .xm-acts a .t { font-size: 17px; line-height: 1.35; letter-spacing: -0.01em; font-weight: 400; color: var(--mix-2); }
html.xp .xp-map .xm-acts a .n { font-size: 13px; color: var(--mix-5); }
html.xp .xp-map .xm-acts a[aria-current="page"] .t { color: var(--bone); font-weight: 500; }
html.xp .xp-map .xm-acts a[aria-current="page"] .n { color: var(--bone); }
html.xp .xp-map .xm-acts a[aria-current="page"] .n::after { content: ""; }
html.xp .xp-map .xm-acts a[aria-current="page"]::before { content: ""; position: absolute; left: -12px; width: 3px; height: 18px; margin-top: 3px; background: var(--bone); border-radius: 2px; }
html.xp .xp-map .xm-acts li { position: relative; }
@media (hover: hover) { html.xp .xp-map .xm-acts a:hover .t { color: var(--bone); transform: none; } }
html.xp .xp-map .xp-map-foot { gap: 6px; margin-top: 24px; }
html.xp .xp-map .xp-map-foot a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hairline-strong); text-decoration: none; color: var(--bone); font-size: 15px; }
html.xp .xp-map .xp-map-foot a[aria-current="page"] { background: var(--bone); color: var(--void); }

/* ---- hub: the act list is titles only, tighter rows ---- */
html.xp .xp-acts a { padding: 14px 0 15px; gap: 2px 12px; }
html.xp .xp-acts a .t { font-size: clamp(1.2rem, 4.2vw, 2.1rem); line-height: 1.15; letter-spacing: -0.025em; }
html.xp .xp-acts a .n { padding-top: .3em; }
@media (min-width: 900px) { html.xp .xp-acts a { grid-template-columns: calc(var(--xp-col) + 2rem) 1fr; } }

/* ---- 16. NCERT: "From the textbook" panel on each act, the hub's quiet line and textbook map (user, 2026-11-20).
   Closed by default; a 44 px summary with a chevron; rows = section number, heading, printed page; a row links to the
   section of the act that teaches it when the builder could map it. Neutral type only. ---- */
html.xp .xs-ncert-wrap { max-width: 40rem; margin-top: 8px; margin-bottom: clamp(32px, 6svh, 64px); }
html.xp .xs-ncert-wrap:empty { display: none; }
html.xp details.xs-ncert { margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }
html.xp details.xs-ncert > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0; cursor: pointer; color: var(--bone); font-size: 15px; font-weight: 500; line-height: 1.3; -webkit-tap-highlight-color: transparent; }
html.xp details.xs-ncert > summary::-webkit-details-marker { display: none; }
html.xp details.xs-ncert > summary::marker { content: ""; }
html.xp details.xs-ncert > summary .pg { color: var(--mix-4); font-weight: 400; }
html.xp details.xs-ncert > summary svg { width: 18px; height: 18px; margin-left: auto; flex: none; color: var(--mix-4); transition: transform .4s var(--xp-ease); }
html.xp details.xs-ncert[open] > summary svg { transform: rotate(180deg); }
html.xp details.xs-ncert > summary:hover svg { color: var(--bone); }
html.xp details.xs-ncert > summary:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }
html.xp .xs-ncert .xn-body { padding: 2px 0 16px; }
html.xp .xs-ncert .xn-book { margin: 0 0 8px; max-width: none; font-size: 14px; line-height: 1.45; color: var(--mix-4); }
html.xp .xs-ncert .xn-rows { list-style: none; margin: 0; padding: 0; max-width: none; }
html.xp .xs-ncert .xn-rows li { margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
html.xp .xs-ncert .xn-rows li::before { content: none; }
html.xp .xs-ncert .xn-rows a, html.xp .xs-ncert .xn-rows li > span { display: grid; grid-template-columns: 3.4em minmax(0, 1fr) auto; gap: 4px 12px; align-items: baseline; min-height: 44px; padding: 11px 0; color: var(--bone); text-decoration: none; font-size: 15px; line-height: 1.4; }
html.xp .xs-ncert .xn-rows a:hover .tt { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; text-decoration-color: var(--mix-5); }
html.xp .xs-ncert .xn-rows .no, html.xp .xs-ncert .xn-rows .pg, html.xp .xs-ncert .xn-rows .act { color: var(--mix-4); font-size: 14px; }
html.xp .xs-ncert .xn-rows .pg, html.xp .xs-ncert .xn-rows .act { text-align: right; white-space: nowrap; }
html.xp .xs-ncert .xn-rows li > span { color: color-mix(in srgb, var(--bone) 78%, var(--void)); }
html.xp .xs-ncert-map { margin-top: 24px; max-width: 46rem; }
html.xp .xs-ncert-map .xn-rows a { grid-template-columns: 3.4em minmax(0, 1fr) auto auto; }
html.xp .xs-ncert-map .xn-rows .act { min-width: 4.2em; }
html.xp .xp-hub-ncert { margin: 14px 0 0; max-width: 40rem; font-size: 14px; line-height: 1.5; color: var(--mix-4); }
@media (max-width: 560px) {
  html.xp .xs-ncert-map .xn-rows a { grid-template-columns: 3.2em minmax(0, 1fr) auto; }
  html.xp .xs-ncert-map .xn-rows .act { grid-column: 2; text-align: left; min-width: 0; }
}

/* a label whose part has panned off the screen (XP.anno.reclamp) */
html.xp .xa.xa-off { opacity: 0 !important; transition: opacity .25s; pointer-events: none; }
html.xp .xa { transition: opacity .25s; }

/* ---- 17. Kit merge (2026-11-20): shared pieces the wave-1 chapters had each built for themselves ---- */
/* live readouts in a pinned scene: <div class="xs-readout"><p><span class="xs-k">Speed</span><b data-xp-num="…">0</b><small>m/s</small></p>…</div>.
   Sits over the stage (absolute; the chapter sets top / bottom), stacks in the left column on desktop with .col,
   .big for the larger numbers; under reduced motion it falls into the flow. Type stays neutral. */
html.xp .xs-readout { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); display: flex; flex-wrap: wrap; gap: 22px; margin: 0; pointer-events: none; }
html.xp .xs-readout.inline { position: relative; left: auto; right: auto; }
html.xp .xs-readout p { margin: 0; display: grid; grid-template-columns: auto auto; justify-content: start; align-items: baseline; column-gap: 6px; }
html.xp .xs-readout .xs-k { grid-column: 1 / -1; margin-bottom: 4px; }
html.xp .xs-readout b { font-size: clamp(1.6rem, 7vw, 3rem); line-height: 1; letter-spacing: -0.04em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--bone); }
html.xp .xs-readout.big b { font-size: clamp(2.2rem, 9vw, 3.6rem); letter-spacing: -0.05em; }
html.xp .xs-readout small { font-size: 18px; color: var(--mix-3); }
@media (min-width: 900px) { html.xp .xs-readout.col { right: auto; flex-direction: column; gap: 24px; } }
html.xp.xp-reduced .xs-readout { position: relative; inset: auto; margin: 16px var(--xp-g) 0; }
/* widget formula selectors wrap (long formulas on phones) */
html.xp .xp-body .fsel { flex-wrap: wrap; }
html.xp .xp-body .fsel button { white-space: normal; min-width: 0; max-width: 100%; line-height: 1.3; padding-block: 8px; }
/* reduced motion: a pinned scene has nothing to scrub, so it takes only its stage's height (no empty screens) */
html.xp.xp-reduced .xp-scene, html.xp.xp-reduced .xp-scene.xs-scrub { height: auto !important; min-height: 0 !important; }
html.xp.xp-reduced .xp-scene > .xp-stick { position: relative !important; top: auto; }
/* a lite Textbook check placed by reference ({{lite:tbcheck:N}}): the site's three rows, set in the dark room */
html.xp .xp-body details.tbcheck { max-width: 46rem; margin: 24px 0; padding: 0 18px; border-radius: 4px; background: color-mix(in srgb, var(--lift) 4.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); }
html.xp .xp-body details.tbcheck > summary { list-style: none; display: grid; gap: 4px; min-height: 48px; padding: 14px 28px 14px 0; position: relative; cursor: pointer; }
html.xp .xp-body details.tbcheck > summary::-webkit-details-marker { display: none; }
html.xp .xp-body details.tbcheck > summary::after { content: "+"; position: absolute; right: 0; top: 14px; color: var(--mix-3); }
html.xp .xp-body details.tbcheck[open] > summary::after { content: "−"; }
html.xp .xp-body details.tbcheck > summary .label { margin: 0; font-size: var(--text-xs); letter-spacing: .12em; text-transform: uppercase; color: var(--mix-4); }
html.xp .xp-body details.tbcheck > summary .label::before { display: none; }
html.xp .xp-body details.tbcheck > summary .fold-title { font-size: 17px; line-height: 1.35; color: var(--bone); font-weight: 500; }
html.xp .xp-body details.tbcheck dl { padding: 0 0 16px; }
