.rh-page .hero { background: radial-gradient(circle at 85% 20%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 34%); }
.rh-closure-note { margin: 1rem 0 1.35rem; line-height: 1.65; }
.rh-review-call { margin: 1rem 0 1.5rem; padding: clamp(1.1rem,2.5vw,1.8rem); border: 1px solid color-mix(in srgb, var(--gold) 42%, var(--line)); border-radius: 1rem; background: color-mix(in srgb, var(--surface-2) 72%, var(--surface)); box-shadow: var(--shadow); }
.rh-review-call h2 { margin: .35rem 0 .55rem; }
.rh-review-call p { max-width: 100ch; line-height: 1.65; }
.rh-review-call .button { margin: .35rem .35rem .1rem 0; }
.rh-status { display:flex; flex-wrap:wrap; gap:.55rem; margin:1rem 0; }
.rh-status span { padding:.35rem .65rem; border:1px solid var(--line); border-radius:999px; font-size:.78rem; font-weight:750; }
.rh-status .proved { color:var(--ok); border-color:color-mix(in srgb,var(--ok) 42%,var(--line)); background:color-mix(in srgb,var(--ok) 8%,transparent); }
.rh-status .review { color:var(--gold); border-color:color-mix(in srgb,var(--gold) 46%,var(--line)); background:color-mix(in srgb,var(--gold) 10%,transparent); }
.rh-toc { position:sticky; top:5.2rem; z-index:4; display:flex; gap:.35rem; overflow:auto; padding:.6rem; margin:0 0 2rem; border:1px solid var(--line); border-radius:1rem; background:color-mix(in srgb,var(--surface) 92%,transparent); backdrop-filter:blur(12px); }
.rh-toc a { white-space:nowrap; padding:.4rem .65rem; border-radius:.55rem; text-decoration:none; color:var(--muted); font-size:.8rem; }
.rh-toc a:hover,.rh-toc a.active { color:var(--gold); background:var(--surface-2); }
.rh-visual { border:1px solid color-mix(in srgb,var(--gold) 25%,var(--line)); border-radius:1.2rem; padding:1rem; background:linear-gradient(145deg,var(--surface),color-mix(in srgb,var(--surface-2) 75%,var(--surface))); box-shadow:var(--shadow); }
.rh-visual-grid { display:grid; grid-template-columns:minmax(13rem,.7fr) minmax(0,1.3fr); gap:1rem; align-items:stretch; }
.rh-controls { display:grid; align-content:start; gap:.7rem; }
.rh-controls label { display:grid; gap:.25rem; color:var(--muted); font-size:.86rem; }
.rh-controls input[type=range] { width:100%; accent-color:var(--gold); }
.rh-canvas { width:100%; min-height:280px; display:block; border:1px solid var(--line); border-radius:.9rem; background:var(--surface); transition:background-color .3s ease,border-color .3s ease; }
.rh-equation { padding:1rem; border-left:3px solid var(--gold); background:color-mix(in srgb,var(--gold-light) 38%,var(--surface)); overflow:auto; }
.rh-proof-step { position:relative; display:grid; grid-template-columns:2.5rem 1fr; gap:1rem; padding:1.15rem 0; border-bottom:1px solid var(--line); }
.rh-proof-step:last-child { border-bottom:0; }
.rh-proof-step .num { width:2.2rem; height:2.2rem; display:grid; place-items:center; border-radius:50%; background:var(--deep); color:var(--bg); font-weight:800; }
.rh-proof-step.is-active .num { background:var(--gold); color:#111; box-shadow:0 0 0 .35rem color-mix(in srgb,var(--gold) 16%,transparent); }
.rh-proof-step h3 { margin:.1rem 0 .35rem; }
.rh-proof-step p { margin:.2rem 0; }
.rh-flow { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.45rem; padding:1rem 0; }
.rh-flow .node { min-width:8rem; text-align:center; padding:.8rem .6rem; border:1px solid var(--line); border-radius:.8rem; background:var(--surface); transition:transform .25s, border-color .25s, background .25s; }
.rh-flow .node.active { transform:translateY(-.35rem); border-color:var(--gold); background:color-mix(in srgb,var(--gold-light) 32%,var(--surface)); }
.rh-flow .node small { display:block; color:var(--muted); }
.rh-flow .arrow { color:var(--gold); font-size:1.3rem; }
.rh-kicker { color:var(--gold); font-size:.77rem; letter-spacing:.08em; text-transform:uppercase; font-weight:800; }
.rh-source { font-size:.84rem; color:var(--muted); }
.proof-detail { margin-top:1rem; padding:1rem 1.15rem; border:1px solid var(--line); border-radius:.8rem; background:color-mix(in srgb,var(--surface-2) 70%,var(--surface)); }
.proof-detail h3 { margin-top:0; color:var(--gold); }
.formula-note { color:var(--muted); font-size:.86rem; }
.derivation-panel { border:1px solid color-mix(in srgb,var(--gold) 35%,var(--line)); border-radius:1rem; overflow:hidden; background:var(--surface); box-shadow:var(--shadow); }
.derivation-tabs { display:flex; flex-wrap:wrap; gap:.35rem; padding:.75rem; background:var(--surface-2); border-bottom:1px solid var(--line); }
.derivation-tab { border:1px solid var(--line); background:var(--surface); color:var(--muted); border-radius:.55rem; padding:.5rem .8rem; cursor:pointer; font-weight:700; }
.derivation-tab.is-active,.derivation-tab:hover { color:#111; background:var(--gold); border-color:var(--gold); }
.derivation-body { padding:1.2rem; min-height:10rem; }
.derivation-index { color:var(--gold); font-size:.75rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.derivation-body h3 { margin:.45rem 0; }
@media (max-width:850px) { .rh-visual-grid { grid-template-columns:1fr; } .rh-toc { top:4.2rem; } }
.rh-visual-wide .rh-visual-grid { grid-template-columns: 1fr; }
.rh-visual-wide .rh-controls { grid-template-columns: repeat(3, minmax(10rem, 1fr)); align-items: start; }
.rh-visual-grid > .visual-explanation,
.rh-visual-grid > .visual-explainer { grid-column: 1 / -1; width: 100%; }
.visual-explanation { margin-top: .75rem; padding: .8rem 1rem; border-left: 3px solid var(--gold); background: color-mix(in srgb, var(--gold-light) 22%, var(--surface)); color: var(--muted); }
.visual-explanation h3 { margin: 0 0 .35rem; color: var(--text); font-size: 1rem; }
.visual-explanation p { margin: 0; }
@media (max-width:850px) { .rh-visual-wide .rh-controls { grid-template-columns: 1fr; } }
.rh-gif-figure{margin:1.25rem 0 0;border:1px solid var(--line,#d7dee8);border-radius:1rem;padding:1rem;background:var(--surface,#fff)}
.rh-gif-figure img{display:block;width:100%;height:auto;border-radius:.65rem;background:#07111f;transition:filter .3s ease,background-color .3s ease}
.rh-gif-figure figcaption{margin-top:.75rem;color:var(--muted,#64748b);font-size:.9rem;line-height:1.5}
.rh-gif-hero{margin-top:1.25rem;border-color:var(--gold,#b8860b);box-shadow:0 12px 36px rgba(0,0,0,.22)}
.rh-grid-embed{margin-top:1rem;border:1px solid rgba(123,176,203,.24);border-radius:18px;overflow:hidden;background:var(--surface);box-shadow:0 18px 50px rgba(0,0,0,.18)}
.rh-grid-embed iframe{display:block;width:100%;height:min(78vh,760px);min-height:520px;border:0;background:var(--surface)}
[data-theme="light"] .rh-grid-embed{border-color:rgba(30,76,99,.24)}
@media (max-width:700px){.rh-grid-embed iframe{height:620px;min-height:620px}}
.rh-animation-toolbar{display:flex;align-items:center;gap:.8rem;flex-wrap:wrap;margin-top:1rem}
.rh-animation-toolbar [role="status"]{font-size:.9rem;color:var(--muted)}
.rh-animation-toolbar .button[aria-pressed="false"]{background:transparent;color:var(--text);border-color:var(--line)}
.rh-manuscript-provenance{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:.7rem 1rem;align-items:center;margin:1rem 0;padding:1rem;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.rh-manuscript-provenance code{min-width:0;overflow-wrap:anywhere;color:var(--gold-strong)}
.rh-manuscript-body{max-width:none;padding:clamp(1rem,2.4vw,2rem);border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.rh-manuscript-body h2{font-size:clamp(1.55rem,3vw,2.35rem)}
.rh-manuscript-body h3{margin-top:2.2rem;padding-top:.7rem;border-top:1px solid var(--line);font-size:clamp(1.25rem,2.2vw,1.7rem)}
.rh-manuscript-body p,.rh-manuscript-body li{max-width:100ch}
.rh-manuscript-body .rh-equation{max-width:100%;overflow-x:auto}
@media (max-width:760px){.rh-manuscript-provenance{grid-template-columns:1fr}.rh-manuscript-provenance a{justify-self:start}}
@media (prefers-reduced-motion:reduce){.rh-canvas,.rh-gif-figure img{transition:none}}
