/* Act 11 · Shapes and energies of orbitals: 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 shapes above the words */
.xs-hero .xs-vis.a11-trio { display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--xp-bar) + 30px) var(--xp-g) 0; }
.a11-trio .xa-box { max-width: 560px; }
@media (min-width: 900px) { .xs-hero .xs-vis.a11-trio { justify-content: flex-end; padding-top: calc(var(--xp-bar) + 12svh); } .a11-trio .xa-box { width: 46%; } }

/* ψ and ψ² minis inside the comparison cards (two up, even on phones) */
.a11-mini { max-width: 300px; margin-bottom: 6px; }
.a11-psi { grid-template-columns: 1fr 1fr; }
.a11-psi > div { padding: 14px 12px; }

/* stage-head key: swatches beside neutral words */
.a11-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: var(--text-sm); line-height: 1.3; color: var(--mix-3); }
.a11-key span { display: inline-flex; align-items: center; }

/* the boundary-surface cloud (an inline canvas figure) */
.xs-stat .a11-bound { height: 34svh; min-height: 220px; }
@media (min-width: 900px) { .xs-stat .a11-bound { grid-column: auto; height: 58svh; } .xs-stat:has(.a11-bound) { align-items: center; } }

/* the node rule's terms: plain HTML, italic letters */
.a11-eq .xs-term > span:first-child { white-space: nowrap; }
.a11-eq i { font-style: italic; font-family: "Times New Roman", Times, serif; letter-spacing: 0; }

/* ---- the 3D orbital explorer ---- */
.a11-read { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 4px 18px; }
.a11-name { margin: 0; grid-row: 1 / span 2; font-size: clamp(2.2rem, 10vw, 4.5rem); line-height: 1; letter-spacing: -0.045em; font-weight: 500; color: var(--bone); }
.a11-name sub { font-size: .45em; letter-spacing: 0; vertical-align: baseline; position: relative; top: .1em; margin-left: .04em; }
.a11-nodes { display: flex; gap: 16px; margin: 0; }
.a11-nodes > div { display: grid; gap: 2px; }
.a11-nodes dt { order: 2; font-size: 10.5px; line-height: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--mix-4); }
.a11-nodes dt span { display: block; letter-spacing: .02em; text-transform: none; color: var(--mix-5); }
.a11-nodes dd { order: 1; margin: 0; font-size: clamp(1.35rem, 5vw, 2rem); line-height: 1; letter-spacing: -0.03em; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--bone); }
.a11-nodes .nl dt { text-transform: none; letter-spacing: .04em; }
.a11-nodes dd, .a11-nodes dd span { font-family: var(--font); }
.a11-nodes .nl dd { font-size: clamp(1rem, 3.6vw, 1.35rem); padding-top: .25em; color: var(--mix-2); }
.a11-say { margin: 0; grid-column: 2; font-size: var(--text-sm); line-height: 1.35; color: var(--mix-3); min-height: 1.35em; }
.a11-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.a11-chips button { min-width: 48px; height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: color-mix(in srgb, var(--lift) 6%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline-strong); color: var(--mix-2); font: 500 15px/1 var(--font); letter-spacing: -0.01em; cursor: pointer; transition: background .3s var(--xp-out), color .3s, box-shadow .3s; }
.a11-chips button sub { font-size: 11px; vertical-align: baseline; position: relative; top: .25em; }
.a11-chips button[aria-pressed="true"] { background: var(--bone); color: var(--void); box-shadow: none; }
@media (hover: hover) { .a11-chips button:hover { box-shadow: inset 0 0 0 1px var(--bone); color: var(--bone); } .a11-chips button[aria-pressed="true"]:hover { color: var(--void); } }
.a11-chips button:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
/* captions stack in one grid cell above the readout (only the live one shows) */
.a11-caps { display: grid; }
.a11-orbit .a11-caps > .xp-cap { position: relative; grid-area: 1 / 1; left: auto; right: auto; bottom: auto; top: auto; max-width: 34rem; }
.a11-foot { display: grid; gap: 12px; }

/* phone: a column. Stage head on top, the cloud in the middle (the canvas is a flex row), caption + readout + chips below */
@media (max-width: 899px) {
  html:not(.xp-reduced) .a11-orbit .xp-stick { display: flex; flex-direction: column; }
  html:not(.xp-reduced) .a11-orbit .xs-stagehead { position: relative; left: auto; right: auto; top: auto; margin: calc(var(--xp-bar) + 14px) var(--xp-g) 0; }
  html:not(.xp-reduced) .a11-orbit .xp-canvas { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; height: auto; }
  .a11-orbit .a11-foot { position: relative; z-index: 3; margin: 0 var(--xp-g) 16px; }
  .a11-chips button { flex: 1 0 calc((100% - 5 * 6px) / 6); padding: 0 4px; min-width: 0; }
  .a11-orbit .xs-scrub .xp-cap p, .a11-orbit .xp-cap p { font-size: 1.05rem; }
}
@media (max-width: 899px) and (max-height: 700px) { .a11-chips button { height: 40px; } .a11-foot { gap: 8px; } }
/* desktop: words in the left column, the cloud on the right */
@media (min-width: 900px) {
  .a11-orbit .a11-foot { position: absolute; z-index: 3; left: var(--xp-g); bottom: 32px; width: min(40rem, 46vw); }
}
html.xp-reduced .a11-orbit .a11-foot { margin: 16px var(--xp-g) 0; }
html.xp-reduced .a11-orbit .a11-caps { display: block; }

/* ---- the (n + l) staircase: a readout line in the stage head ---- */
.a11-lad-read { font-size: var(--text-sm); line-height: 1.35; color: var(--mix-3); min-height: 2.7em; }
.a11-lad-read b { color: var(--bone); font-weight: 500; }
@media (min-width: 900px) { .a11-lad .xs-stagehead { right: auto; max-width: 30rem; } .a11-lad-read { font-size: var(--text-md); } }

/* the penetration sketch: a small key line under it */
.a11-figk { margin-top: 8px !important; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--mix-3); }

/* worked example 1's node table: five narrow columns that fit a phone */
.a11-ex table.t { font-size: 13px; }
.a11-ex table.t th, .a11-ex table.t td { padding: 7px 5px; }
.a11-ex table.t thead th { letter-spacing: .02em; text-transform: none; font-size: 12px; }
.a11-ex .table-wrap { margin: 8px 0 0; }

/* 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; }
