/* Act 12 · How do electrons fill an atom?: section and scene styles (auto-included by the builder).
   Type is never coloured here: bone and the mix greys only; colour lives in the visuals and .xs-sw swatches. */

/* orbital names, (n + l) and [Ar] keep their case inside uppercase kickers and labels */
.xp-k .o, .xs-k .o, .xa .o, .xs-spec-name .o { text-transform: none; letter-spacing: .03em; }

/* hero: the three rules above the words */
.xs-hero .xs-vis.a12-trio { display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--xp-bar) + 30px) var(--xp-g) 0; }
.a12-trio .xa-box { max-width: 560px; }
@media (min-width: 900px) { .xs-hero .xs-vis.a12-trio { justify-content: flex-end; padding-top: calc(var(--xp-bar) + 12svh); } .a12-trio .xa-box { width: 46%; } }

/* the diagonal chart: sub-shell names sit on top of the arrows with a void halo */
.a12-diag .xp-svgt text { font-size: 13px; paint-order: stroke; stroke: var(--void); stroke-width: 5px; stroke-linejoin: round; }

/* Pauli's capacities as four small spec cards */
.a12-caps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.a12-caps .xs-spec { padding: 12px 12px 10px; }
.a12-caps .xs-spec-sym { font-size: clamp(2rem, 9vw, 3.4rem); }
.a12-caps .xs-spec-name { margin-top: 4px !important; letter-spacing: .08em; }

/* orbital boxes written as type (neutral: the arrows are text, not colour) */
.a12-boxes { display: flex; flex-wrap: wrap; gap: 6px 4px; margin: 4px 0 2px !important; font-size: clamp(1.15rem, 3.4vw, 1.75rem); line-height: 1; color: var(--bone); }
.a12-boxes span { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.7em; padding: 0 .15em; border: 1px solid var(--hairline-strong); border-radius: 3px; letter-spacing: -.12em; }
.a12-boxes span + span { margin-left: -1px; }
.a12-boxes.sm { display: inline-flex; gap: 0; font-size: .95em; vertical-align: middle; margin: 0 2px !important; }
.a12-boxes.sm span { min-width: 1.7em; height: 1.45em; }
.xs-myth > div:last-child .a12-boxes span { border-color: color-mix(in srgb, var(--void) 30%, transparent); }

/* sub-shells as the "years" of the after-argon strip */
.a12-line .y { font-size: clamp(1.05rem, 3.6vw, 1.6rem); letter-spacing: -0.02em; }
.a12-line > li { grid-template-columns: 6.2rem 1fr; }
@media (min-width: 900px) { .a12-line > li { grid-template-columns: 1fr; } }

/* the copper photo, full content width with its callout */
.a12-photo img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.a12-figk { margin-top: 8px !important; font-size: 12px; color: var(--mix-3); }

/* a statement section without a visual */
.a12-why .xs-say { max-width: 14ch; }

/* the story strip inside a spread: no years-wide grid on phones */
.a12-story > li { grid-template-columns: 3.6rem 1fr; }
@media (min-width: 900px) { .xs-spread .a12-story { grid-auto-flow: row; } .xs-spread .a12-story > li { grid-template-columns: 4.4rem 1fr; padding-top: 10px; } }

/* ---- aufbau scene: the readout lives in the stage head ---- */
.a12-read { display: grid; gap: 2px; margin-top: 2px; }
.a12-read p { margin: 0; }
.a12-rl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .55em; font-size: var(--text-sm); line-height: 1.3; color: var(--mix-3); }
.a12-sym { font-size: clamp(1.4rem, 5.4vw, 2.2rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 500; color: var(--bone); min-width: 1.4em; }
.a12-name { color: var(--bone); }
.a12-tag { color: var(--mix-2); font-style: italic; }
.a12-cfg { font-size: clamp(.95rem, 3.2vw, 1.25rem); line-height: 1.3; letter-spacing: -0.01em; color: var(--bone); min-height: 2.6em; }
.a12-meta { font-size: var(--text-sm); line-height: 1.3; color: var(--mix-3); }
@media (min-width: 900px) { .a12-auf .xs-stagehead, .a12-tab .xs-stagehead { right: auto; max-width: 34rem; } .a12-cfg { min-height: 1.3em; } }

/* ---- the periodic table scene: a readout line and the block key ---- */
.a12t-read { font-size: var(--text-sm); line-height: 1.3; color: var(--mix-3); }
.a12t-read b { color: var(--bone); font-weight: 500; }
.a12t-key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 16px; letter-spacing: .04em; color: var(--mix-3); }
.a12t-key span { display: inline-flex; align-items: center; }
@media (min-width: 900px) { .a12t-read { font-size: var(--text-md); } }

/* hydrogen to neon, compact: symbol, Z, configuration, boxes (1s · 2s · 2p) */
.a12-hne { display: grid; grid-template-columns: 1fr; gap: 0; }
.a12-hne > div { display: grid; grid-template-columns: 2.2rem 1.8rem 1fr auto; align-items: center; gap: 8px; padding: 5px 0; border-top: 1px solid var(--hairline); font-size: var(--text-sm); line-height: 1.2; color: var(--mix-2); }
.a12-hne b { color: var(--bone); font-weight: 500; font-size: 1.05rem; }
.a12-hne .z { color: var(--mix-4); font-variant-numeric: tabular-nums; }
.a12-hne .c { color: var(--bone); }
.a12-hne .d { display: inline-flex; gap: 6px; justify-self: end; }
.a12-hne .a12-boxes.sm { font-size: .82rem; }
@media (min-width: 900px) { .a12-hne { grid-template-columns: 1fr 1fr; column-gap: 40px; } }
/* portraits behind a statement: full width, never cropped (contain, top) */
.a12-portrait .xs-vis img { opacity: .9; }
@media (min-width: 900px) { .a12-portrait .xs-vis img { object-position: 85% 50% !important; } }
@media (min-width: 900px) { .a12-hund { max-width: min(100%, 70svh * 607 / 894); margin: 0 auto; } }
.a12-portrait .xs-vis { top: calc(var(--xp-bar) + 8px); }

/* closed drawers take no layout (their wide tables and display maths stay out of the overflow audit);
   Rive's visually hidden head wraps instead of running off the edge */
.xs-full:not([open]) > .xs-full-in { display: none; }
.xs-full-in .table-wrap { max-width: 100%; }
g-rive .gr-quiet, g-rive .gr-quiet * { white-space: normal !important; max-width: 1px; }
@media (max-width: 899px) { .a12-portrait .xs-vis { bottom: 36%; } .a12-portrait .xs-vis::after { display: none; } }
