/* O004 accessible pilot: local, high-contrast, no external dependencies. */
:root { color-scheme: light; --ink:#1b2430; --muted:#4b5563; --paper:#fff; --panel:#f2f6fb; --accent:#075985; --focus:#b45309; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin:0 auto; max-width:72rem; padding:0 1.2rem 4rem; color:var(--ink); background:var(--paper); font:1.05rem/1.65 system-ui, -apple-system, "Segoe UI", sans-serif; }
.itshape { font-style:italic; }
a { color:var(--accent); text-underline-offset:.15em; }
a:focus-visible, summary:focus-visible { outline:.2rem solid var(--focus); outline-offset:.15rem; }
.skip-link { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:1rem; top:1rem; width:auto; height:auto; padding:.5rem .8rem; background:#fff7ed; z-index:5; }
.site-header { border-bottom:.2rem solid var(--accent); padding:2rem 0 1rem; }
.site-header h1 { margin:.2rem 0; font-size:clamp(1.8rem,4vw,2.8rem); line-height:1.15; }
.toc { background:var(--panel); border:1px solid #cbd5e1; border-radius:.5rem; margin:1.5rem 0; padding:1rem 1.5rem; }
.toc h2 { margin-top:0; }
.front-matter, .unit { scroll-margin-top:1rem; }
.front-matter { background:#fffbeb; border-left:.4rem solid #d97706; padding:1rem 1.2rem; margin:1.5rem 0 2rem; }
.front-matter h2 { margin-top:0; }
.rights { border-top:1px solid #d1d5db; margin-top:1rem; padding-top:.5rem; }
.provenance { font-family:ui-monospace, SFMono-Regular, Consolas, monospace; }
.chapter > h1, .chapter > h2 { border-bottom:2px solid #cbd5e1; padding-bottom:.25rem; }
h2 { margin-top:2.3rem; line-height:1.25; }
h3 { margin-top:1.8rem; line-height:1.3; }
h4 { margin-top:1.4rem; }
.thm, .statement, .result, .exercise, .proof, .hint, .worked-solution { border:1px solid #cbd5e1; border-left:.35rem solid #64748b; border-radius:.35rem; padding:.7rem 1rem; margin:1rem 0; }
.statement { border-left-color:#475569; background:#f8fafc; }
.exercise { border-left-color:#0f766e; background:#f0fdfa; }
.result { border-left-color:#2563eb; background:#eff6ff; }
.proof { border-left-color:#7c3aed; background:#faf5ff; }
.worked-solution { border-left-color:#7c3aed; background:#faf5ff; }
.hint { border-left-color:#b45309; background:#fffbeb; }
.hint-link { float:right; font-weight:600; margin-left:1rem; }
.exercise-subpart { min-height:1.7rem; }
.exercise-subpart > .subpart-hint-link { display:block; float:none; width:max-content; max-width:100%; margin:.35rem 0 .1rem auto; font-size:.92rem; }
.qed { white-space:nowrap; float:right; }
.accessible-figure { border:1px solid #94a3b8; background:#f8fafc; margin:1.2rem auto; padding:1rem; max-width:55rem; }
.figure-sequence { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr)); gap:1rem; margin:1.2rem 0; }
.figure-sequence .accessible-figure { margin:0; }
.figure-placeholder { border:2px dashed #64748b; padding:.8rem; }
.figure-placeholder p { margin:.35rem 0; }
figcaption { font-size:.95rem; color:var(--muted); margin-top:.5rem; }
details { margin-top:.5rem; }
summary { cursor:pointer; font-weight:600; }
math { font-size:1.05em; }
math[display="block"] { display:block; padding-block:.1rem; }
math.spacing-macro-normalized[display="inline"] { display:inline-block; max-width:100%; overflow-x:auto; overflow-y:hidden; vertical-align:middle; }
math.book-macro-normalized[display="inline"] { display:inline-block; max-width:100%; overflow-x:auto; overflow-y:hidden; vertical-align:middle; }
.absolute-geometry-marker { font-weight:700; color:#166534; white-space:nowrap; }
.tex-fallback { display:inline-block; max-width:100%; overflow:auto; background:#f1f5f9; padding:.1rem .25rem; }
.tex-fallback.display { display:block; width:100%; margin:.65rem 0; padding:.5rem .7rem; }
.tex-fallback-code { white-space:pre-wrap; }
.formula-scroller { display:block; width:100%; max-width:100%; min-width:0; inline-size:100%; max-inline-size:100%; min-inline-size:0; contain:inline-size; overflow-x:auto; overflow-y:hidden; overscroll-behavior-inline:contain; padding-block:.1rem; }
.formula-scroller:focus-visible { outline:.2rem solid var(--focus); outline-offset:.12rem; }
.formula-scroller > math[display="block"] { display:block; width:max-content; max-width:none; min-width:max-content; overflow:visible; }
.formula-scroller > .tex-fallback.display { display:block; width:max-content; max-width:none; min-width:100%; overflow:visible; }
.scope-gap { color:var(--muted); border-bottom:1px dotted var(--muted); text-decoration:none; }
.scope-note, .pilot-boundary { color:var(--muted); font-size:.95rem; }
.change-notice { border:1px solid #cbd5e1; border-left:.35rem solid #b45309; background:#fffbeb; border-radius:.35rem; margin:1.3rem 0; padding:.8rem 1rem; }
.change-notice h3 { margin-top:0; }
footer { border-top:2px solid #cbd5e1; margin-top:3rem; padding-top:1rem; font-size:.95rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior:auto; } }
@media print { body { max-width:none; font-size:11pt; } .toc { break-after:page; } .hint-link { float:none; } }
