/* Act 10 · quantum numbers (scenes: the address sketch, the orbital explorer chem1102-a10-explorer on chem1102-atom).
   Type is never coloured: colour lives in strokes, fills and the atom only. */

/* the address: four numbers in the stage head that light up (grey → bone) as the sketch narrows down */
.a10-addr { margin: 2px 0 0; display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 1.125rem; line-height: 1.35; letter-spacing: -0.01em; font-weight: 500; font-variant-numeric: tabular-nums; }
.a10-addr span { color: var(--mix-5); transition: color .4s var(--xp-out); }
.a10-addr span.on { color: var(--bone); }
.a10-addr sub { font-size: .6em; }
@media (min-width: 900px) {
  .a10-ad .xs-stagehead { right: auto; max-width: min(34%, 28rem); }
  .a10-addr { flex-direction: column; gap: 0; font-size: clamp(1.6rem, 2.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.03em; margin-top: 10px; }
  .a10-ad .xp-cap { left: var(--xp-g); max-width: min(32%, 24rem); }
}
html.xp-reduced .a10-addr span, html:not(.xp-js) .a10-addr span { color: var(--bone); }

/* the tree: under the stage head, above the captions; the box keeps the viewBox's square */
.a10-tree { position: absolute; z-index: 2; left: max(16px, var(--xp-g)); right: max(16px, var(--xp-g)); top: calc(var(--xp-bar) + 128px); bottom: 150px; display: grid; place-items: start center; }
.a10-tree .xa-box { width: min(100%, calc(100svh - var(--xp-bar) - 128px - 150px)); }
.a10-tree svg { display: block; width: 100%; height: 100%; overflow: hidden; }
@media (min-width: 900px) {
  .a10-tree { left: 38%; right: var(--xp-g); top: calc(var(--xp-bar) + 4svh); bottom: 4svh; place-items: center; }
  .a10-tree .xa-box { width: min(100%, calc(92svh - var(--xp-bar)), 680px); }
}
html.xp-reduced .a10-tree, html:not(.xp-js) .a10-tree { position: relative; top: auto; left: auto; right: auto; bottom: auto; margin: calc(var(--xp-bar) + 150px) var(--xp-g) 0; }
html.xp-reduced .a10-tree .xa-box, html:not(.xp-js) .a10-tree .xa-box { width: min(100%, 480px); }
.a10-tree text { fill: var(--bone); }
.a10-tree text.k { font-size: 12.5px; fill: var(--mix-3); letter-spacing: .08em; }
.a10-tree text.big { font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.a10-tree text.v { font-size: 13px; fill: var(--mix-3); letter-spacing: .01em; }
.a10-tree text.c { text-anchor: middle; }
.a10-tree text.tot { font-size: 13px; fill: var(--bone); }
.a10-tree .q { text-transform: none; letter-spacing: 0; }
.a10-tree .no text { fill: var(--mix-5); }
.a10-tree .ink { stroke-linecap: butt; }
.a10-tree .ink.ghost { stroke-dasharray: 3 4; }
.a10-tree .pick rect { fill: var(--xp-accent); fill-opacity: .14; stroke: var(--xp-accent); stroke-width: 2; }
.a10-tree .ink.arrow { stroke-width: 1.6; }
.a10-tree .e path { fill: none; stroke: var(--bone); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.a10-tree .e path.me { stroke: var(--xp-accent); stroke-width: 2.2; }

/* l: the sub-shell letters as a spec strip */
.a10-l { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 46rem; }
.a10-l > div { display: grid; gap: 4px; padding: 12px 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--lift) 4.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline); font-size: 12px; line-height: 1.3; color: var(--mix-3); }
.a10-l .s { font-size: clamp(1.9rem, 8vw, 3.2rem); line-height: 1; letter-spacing: -0.04em; color: var(--bone); font-weight: 500; }
.a10-l b { color: var(--bone); font-weight: 500; }
.xs .a10-lnote { font-size: var(--text-sm); line-height: 1.45; color: var(--mix-3); max-width: 46rem; }
@media (max-width: 420px) { .a10-l > div { padding: 10px 6px 8px; font-size: 11px; } .a10-l > div span:last-child { font-size: 10.5px; } }

/* the worked checks */
.a10-sets { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.a10-sets li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 8px; font-size: var(--text-sm); line-height: 1.4; color: var(--mix-2); padding: 0 !important; margin: 0 !important; }
.a10-sets li::before { display: none; }
.a10-sets span { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--mix-4); padding-top: .25em; }
.a10-sets span.ok { color: var(--bone); }

/* the orbital explorer: the hero atom under your fingers, framed as a section */
.xs.a10-ex { align-content: start; gap: 16px; }
.a10-ex-stage { position: relative; height: min(46svh, 100vw); margin: 0 calc(-1 * var(--xp-g)); }
.a10-ex-stage .xp-canvas { position: absolute; inset: 0; }
.a10-ex-hint { position: absolute; left: var(--xp-g); bottom: 4px; margin: 0; font-size: 12px; color: var(--mix-4); pointer-events: none; }
.a10-ex-ui { display: grid; gap: 12px; align-content: start; }
.a10-ex-note { margin: 0; font-size: 13px; line-height: 1.45; color: var(--mix-4); max-width: 36rem; }
.a10-ex-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: stretch; }
.xp-body .a10-ex .a10-ex-n { flex: 0 0 100%; margin: 4px 0 0; font-size: 13px; color: var(--mix-4); }
.a10-ex-n b { color: var(--bone); font-weight: 500; }
.a10-ex button { min-height: 48px; min-width: 64px; padding: 6px 10px; display: grid; gap: 1px; justify-items: start; align-content: center; background: var(--raised); color: var(--bone); border: 0; border-radius: 6px; font: inherit; cursor: pointer; transition: background-color .25s var(--xp-out), color .25s var(--xp-out); }
.a10-ex button b { font-size: 1rem; font-weight: 500; line-height: 1.2; }
.a10-ex button span { font-size: 11px; line-height: 1.2; color: var(--mix-4); white-space: nowrap; }
.a10-ex button sub { font-size: .7em; }
.a10-ex button[aria-pressed="true"] { background: var(--bone); color: var(--void); }
.a10-ex button[aria-pressed="true"] b { color: var(--void); }
.a10-ex button[aria-pressed="true"] span { color: color-mix(in srgb, var(--void) 72%, var(--bone)); }
.a10-ex button:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
@media (hover: hover) { .a10-ex button:not([aria-pressed="true"]):hover { background: var(--raised-2); } }
.xp-body .a10-ex p { margin: 0; }
@media (min-width: 900px) {
  .xs.a10-ex { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 48px; align-content: center; }
  .a10-ex .xs-words { grid-column: 2; grid-row: 1; align-content: end; }
  .a10-ex-stage { grid-column: 1; grid-row: 1 / span 2; height: min(78svh, 720px); margin: 0; }
  .a10-ex-ui { grid-column: 2; grid-row: 2; }
}

/* two Rive pieces side by side, even on a phone (each opens full screen with Interact) */
.xs g-rive .gr-stage { width: auto; margin-left: 0; }
.xs g-rive .gr-frame { width: min(100%, calc(54svh * var(--gr-ratio))); border-radius: 12px; }
@media (min-width: 900px) { .xs g-rive .gr-frame { width: min(100%, calc(74svh * var(--gr-ratio))); } }
.a10-rives { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
.a10-rives g-rive .gr-frame { width: min(100%, calc(60svh * var(--gr-ratio))); }
.a10-rives g-rive .gr-open { padding: 0 14px 0 12px; font-size: 13px; }

/* the back room's node sketch: a string's standing wave and a drum's node lines */
.a10-nodes .a10-nd-w { fill: none; stroke: var(--xp-minus); stroke-width: 2; }
.a10-nodes .a10-nd-w.o { stroke-opacity: .4; }
.a10-nodes .a10-nd-fix { stroke: var(--bone); stroke-width: 2; }
.a10-nodes .a10-nd-drum { fill: color-mix(in srgb, var(--xp-minus) 12%, transparent); stroke: var(--bone); stroke-opacity: .7; }
.a10-nodes .a10-nd-node { fill: none; stroke: var(--bone); stroke-dasharray: 3 4; stroke-opacity: .8; }

/* closed drawers and answers lay out nothing (Chrome lays out closed <details> content, so a wide equation inside
   would count as page overflow); the Rive piece's visually hidden title and prompt stay inside their 1px box */
.xp-body details:not([open]) > :not(summary) { display: none; }
.xs g-rive .gr-quiet > * { max-width: 1px; white-space: normal; overflow: hidden; }

/* smaller stat numbers stay small on desktop too (the kit's desktop .xs-num size would win otherwise); a Rive piece
   fills its visual column instead of shrinking to nothing in a centred grid */
.xs .xs-num.xs-num-s { font-size: clamp(2.6rem, 9vw, 5.5rem); }
.xs-vis > g-rive, .xs-vis g-rive { width: 100%; justify-self: stretch; }

/* the back room is a 680 px column on desktop: two-column sections there get a headline sized for half of it */
@media (min-width: 900px) {
  .xp-paper .xs-split .xs-h, .xp-paper .xs-spread .xs-h, .xp-paper .xs-stat .xs-h { font-size: clamp(1.9rem, 2.6vw, 2.6rem); max-width: none; }
  .xp-paper .xs-spread .xs-quote { font-size: clamp(1.4rem, 2vw, 1.9rem); max-width: none; }
}

/* the hero's orbital sits in the top of the screen, the statement under it */
.a10-hero .xp-canvas { position: absolute; inset: 0; }

/* reduced motion: the stage head joins the flow above the tree */
html.xp-reduced .a10-ad .xs-stagehead, html:not(.xp-js) .a10-ad .xs-stagehead { position: relative; top: auto; left: auto; right: auto; order: -1; margin: calc(var(--xp-bar) + 16px) var(--xp-g) 0; max-width: none; }
html.xp-reduced .a10-tree, html:not(.xp-js) .a10-tree { margin-top: 16px; }

/* a flipped card's hook: bold words keep the card's ink (site.css makes .prose b bone, which vanishes on a bone card) */
.xs-flip .b b { color: inherit; }
