/* Review (chem-11-02): section and scene styles (linked by the builder). Moved out of the old inline <style>.
   Type is never coloured here: bone and the mix greys only; colour lives in the visuals and swatches. */
.xp-k .o, .xs-k .o, .xa .o, .xs-spec-name .o { text-transform: none; letter-spacing: .03em; }

/* ---- the film: five models, the numbers each one leaves you ---- */
.rv-film .xp-canvas { z-index: 0; }
.rv-panel { position: absolute; z-index: 3; left: var(--xp-g); right: var(--xp-g); bottom: clamp(22px, 5svh, 56px); max-width: 34rem; height: 18.5rem; }
.rv-m { position: absolute; left: 0; right: 0; bottom: 0; opacity: 0; transform: translateY(16px); transition: opacity .45s var(--xp-out), transform .65s var(--xp-out); pointer-events: none; }
.rv-m.on { opacity: 1; transform: none; pointer-events: auto; }
.rv-m .xp-k { display: flex; gap: 10px; margin: 0 0 8px; }
.rv-m .xp-k b { color: var(--bone); font-weight: 500; }
.rv-m .rv-say { margin: 0; font-size: clamp(1.35rem, 5vw, 2.4rem); line-height: 1.12; letter-spacing: -0.03em; font-weight: 500; color: var(--bone); text-wrap: balance; }
.rv-m .rv-broke { margin: 8px 0 0; font-size: var(--text-sm); line-height: var(--leading-sm); color: var(--mix-3); }
.rv-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--hairline-strong); }
.rv-nums > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; opacity: .12; transition: opacity .5s var(--xp-out); }
.rv-nums > div.on { opacity: 1; }
.rv-nums dd { margin: 0; font-size: clamp(1rem, 4vw, 1.6rem); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; color: var(--bone); }
.rv-nums dt { margin-top: 3px; font-size: 12px; line-height: 15px; letter-spacing: .01em; color: var(--mix-4); }
@media (min-width: 900px) { .rv-panel { left: calc(var(--xp-g) + var(--xp-col) * .3); max-width: 38rem; height: 23rem; } .rv-nums { gap: 18px 28px; } }
html.xp-reduced .rv-panel { position: relative; height: auto; left: auto; right: auto; bottom: auto; margin: 0 var(--xp-g) 40px; }
html.xp-reduced .rv-m { position: relative; opacity: 1; transform: none; margin-top: 36px; }
html.xp-reduced .rv-nums > div { opacity: 1; }

/* summary 1–3: a long timeline, kept tight on phones */
.rv-line > li { padding: 8px 0; }
.rv-line .y { font-size: clamp(1.15rem, 4.2vw, 2rem); }
@media (min-width: 900px) { .rv-line { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 20px; } }

/* summary 6–7: two equation rows, letters in a serif italic */
.xs-eq .xs-eqrow i { font-family: "Times New Roman", Times, serif; font-style: italic; letter-spacing: 0; }
.xs-eq .xs-eqrow + .xs-eqrow { margin-top: 6px; }

/* summary 8–9: hydrogen's lines over the two spec cards */
.rv-strip { max-width: 40rem; }
@media (min-width: 720px) { .rv-specs { grid-template-columns: 1fr 1fr; } }
.rv-specs .xs-spec dl > div { grid-template-columns: 7.5rem 1fr; }

/* summary 11: four small cards */
.rv-qn { grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .rv-qn { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rv-qn .xs-spec-sym { font-size: clamp(2rem, 8vw, 3rem); }

/* common questions in two columns on wide screens */
.rv-faqs { max-width: var(--wide); font-size: var(--text-sm); line-height: 1.5; }
@media (min-width: 900px) { .rv-faqs { columns: 2; column-gap: 40px; } .rv-faqs > details { break-inside: avoid; } }

/* the recall deck: one card at a time, the cue big */
.xp-body g-recall.widget { max-width: var(--wide); margin: 0 !important; padding: clamp(18px, 4vw, 36px); border-radius: 20px; background: color-mix(in srgb, var(--lift) 3.5%, var(--void)); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.xp-body g-recall .w-title { font-size: clamp(1.25rem, 4vw, 2rem); letter-spacing: -0.03em; }
.xp-body g-recall .rc-card { min-height: clamp(220px, 34svh, 400px); margin-top: 14px; padding: clamp(20px, 5vw, 44px); border-radius: 16px; background: var(--void); box-shadow: inset 0 0 0 1px var(--hairline-strong); align-content: center; gap: 14px; transition: box-shadow .3s var(--xp-out); }
@media (hover: hover) { .xp-body g-recall .rc-card:hover { box-shadow: inset 0 0 0 1px var(--mix-5); } }
.xp-body g-recall .rc-card:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.xp-body g-recall .rc-q { font-size: clamp(1.4rem, 5.4vw, 2.8rem); line-height: 1.12; letter-spacing: -0.035em; text-wrap: balance; }
.xp-body g-recall .rc-a { font-size: clamp(1.05rem, 3.4vw, 1.6rem); line-height: 1.35; letter-spacing: -0.015em; color: var(--bone); padding-top: 14px; animation: rv-in .55s var(--xp-out) both; }
.xp-body g-recall .rc-hook { font-size: var(--text-md); line-height: var(--leading-md); animation: rv-in .55s .08s var(--xp-out) both; }
.xp-body g-recall .rc-tap { letter-spacing: .1em; text-transform: uppercase; font-size: 11px; }
.xp-body g-recall .w-controls { margin-top: 14px; }
.xp-body g-recall .w-controls .btn { min-height: 48px; padding: 0 20px; font-size: var(--text-md); }
.xp-body g-recall .rc-bar { gap: 2px; margin-top: 16px; }
.xp-body g-recall .rc-bar i { height: 3px; border-radius: 0; background: var(--mix-8); transition: background .4s; }
.xp-body g-recall .rc-bar i.ok { background: var(--bone); }
.xp-body g-recall .rc-bar i.miss { background: var(--mix-5); }
.xp-body g-recall .rc-count { margin-top: 10px; font-size: var(--text-sm); color: var(--mix-3); font-variant-numeric: tabular-nums; }
.rv-recall g-recall:not(.widget) { display: block; min-height: 420px; }
@keyframes rv-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .xp-body g-recall .rc-a, .xp-body g-recall .rc-hook { animation: none; } }
html.xp-reduced .xp-body g-recall .rc-a, html.xp-reduced .xp-body g-recall .rc-hook { animation: none; }

/* the puzzle: one wide solve card */
.rv-puzzle { grid-template-columns: 1fr !important; max-width: 46rem; }
.rv-credit { font-size: 11px; color: var(--mix-4); margin: 0 !important; }
.rv-qn .xs-spec dl > div { grid-template-columns: 1fr; } .rv-qn .xs-spec dt { display: none; }

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