/* Act 08 · hydrogen spectrum and Bohr's limits: scene styles (the kit is assets/xp/xp.css).
   Type is never coloured: bone and mix greys only; colour lives in strokes, lines and swatches. */

.a08-herovis svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* the readout under the stage head: each jump's sum (the module sets its top under the head) */
.xp-a08-series .a08-read { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); top: calc(var(--xp-bar) + 120px); margin: 0; font-size: 13px; line-height: 18px; color: var(--mix-3); pointer-events: none; }
.xp-a08-series .a08-read p { margin: 0; }
.xp-a08-series .a08-read b { color: var(--bone); font-weight: 500; }
.xp-a08-series .a08-read .a08-n { font-size: clamp(1.25rem, 5.4vw, 2.4rem); line-height: 1.1; letter-spacing: -0.03em; color: var(--bone); font-weight: 500; margin-bottom: 2px; }
@media (min-width: 900px) { .xp-a08-series .a08-read { right: auto; max-width: 34%; font-size: 16px; line-height: 24px; } }
html.xp-reduced .xp-a08-series .a08-read, html:not(.xp-js) .xp-a08-series .a08-read { position: relative; left: auto; right: auto; top: auto; margin: 16px var(--xp-g) 0; }

/* strips in this act run 380 → 720 nm (positions are set to that scale in the template) */
.a08-s { margin-bottom: 4px; }
.a08-lines { display: flex; flex-wrap: wrap; gap: 4px 16px; font-variant-numeric: tabular-nums; }
.a08-lines span { white-space: nowrap; }

/* counting the lines */
.a08-count { max-width: 34rem; width: 100%; }
.a08-count .ink.a08-ha { stroke: var(--xp-ha); }
.a08-count .ink.a08-hb { stroke: var(--xp-hb); }
.a08-count .ink.a08-ir { stroke: var(--mix-4); stroke-dasharray: 3 3; }
.a08-count text.n { font-size: 15px; fill: var(--bone); }
.a08-count text.t { font-size: 14px; fill: var(--mix-3); }

/* Zeeman: a line splitting as the field grows (kit .xp-sk stage; the meter sits under the stage) */
.xp-a08-zee .a08-line { fill: var(--xp-ha); filter: drop-shadow(0 0 4px var(--xp-ha)); }
.xp-a08-zee .a08-lamp { fill: var(--xp-ha); filter: drop-shadow(0 0 8px var(--xp-ha)); }
.xp-a08-zee .a08-win { fill: #0b0b0c; stroke: var(--hairline-strong); }
.xp-a08-zee .pole { fill: color-mix(in srgb, var(--bone) 10%, var(--void)); stroke: var(--mix-5); }
.xp-a08-zee text.k { font-size: 13px; }
.xp-a08-zee .a08-meter { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); top: calc(var(--xp-bar) + 128px + 38svh + 10px); display: flex; gap: 28px; margin: 0; }
.xp-a08-zee .a08-meter p { margin: 0; display: grid; gap: 2px; }
.xp-a08-zee .a08-meter b { font-size: clamp(1.4rem, 6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; color: var(--bone); font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .xp-a08-zee .a08-meter { right: auto; top: auto; bottom: calc(clamp(24px, 6svh, 64px) + 130px); left: calc(var(--xp-g) + var(--xp-col) * .4); } }
html.xp-reduced .xp-a08-zee .a08-meter, html:not(.xp-js) .xp-a08-zee .a08-meter { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin: 16px var(--xp-g) 0; }

/* helium's sums as bars beside the measured number */
.a08-bars { display: grid; gap: 12px; width: 100%; max-width: 34rem; }
.a08-bars p { display: grid; grid-template-columns: 8.5rem 1fr 3.4rem; align-items: center; gap: 12px; margin: 0; }
.a08-bars p .xs-k { display: block; }
.a08-bars i { display: block; height: 10px; width: calc(var(--w) * 100%); border-radius: 2px; background: color-mix(in srgb, var(--bone) 30%, transparent); }
.a08-bars i.m { background: var(--xp-accent); }
.a08-bars b { font-weight: 500; color: var(--bone); text-align: right; font-variant-numeric: tabular-nums; }
.xp-a08-zee text.t { font-size: 13px; fill: var(--mix-3); letter-spacing: .02em; }
.a08-herovis { overflow: hidden; }

/* a lite "side" portrait inside a spread: one column, the photo at full height (the lite layout puts it in a 240px column) */
.xs-spread .fig.side { grid-template-columns: 1fr !important; }
@media (min-width: 900px) { .xs-spread .fig.side img { max-height: 72svh; width: auto; max-width: 100%; } }
/* "1 in 200 million" must not break between its digits on the narrow paper column */
.a08-payne { white-space: nowrap !important; overflow-wrap: normal !important; font-size: clamp(2.4rem, 10vw, 4.6rem) !important; }

/* reduced motion / no JS: the stage is in normal flow, so the head and the sketch stage join the flow too (head first) */
html.xp-reduced .xp-a08-series .xs-stagehead, html:not(.xp-js) .xp-a08-series .xs-stagehead,
html.xp-reduced .xp-a08-zee .xs-stagehead, html:not(.xp-js) .xp-a08-zee .xs-stagehead { position: relative; left: auto; right: auto; top: auto; order: -1; margin: calc(var(--xp-bar) + 14px) var(--xp-g) 12px; }
html.xp-reduced .xp-a08-zee .xp-sk-stage, html:not(.xp-js) .xp-a08-zee .xp-sk-stage { position: relative; left: auto; right: auto; top: auto; height: auto; margin: 0 max(16px, var(--xp-g)); }
