:root {
  color-scheme: light;
  --header-height: 74px;
  --text-body: 1.125rem;
  --text-small: 1rem;
  --text-subtitle: 1.25rem;
  --anchor-offset: calc(var(--header-height) + 28px);
  --paper: #faf9f6;
  --surface: #fff;
  --ink: #252823;
  --muted: #62675f;
  --line: #dfdfd7;
  --soft: #f0f0e9;
  --accent: #a84431;
  --accent-strong: #873323;
  --accent-tint: #f9ece6;
  --green: #276c60;
  --grid: #e8e9e2;
  --blue: #5c7c99;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1b201e;
  --surface: #232a26;
  --ink: #ecebe4;
  --muted: #b4b9ae;
  --line: #3d463f;
  --soft: #29312b;
  --accent: #f39c81;
  --accent-strong: #ffc3ad;
  --accent-tint: #3b2c27;
  --green: #8ccbbb;
  --grid: #333d35;
  --blue: #99b9d8;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--anchor-offset); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: var(--text-body); line-height: 1.75; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent-strong); }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, [tabindex="0"]:focus-visible { outline: 3px solid var(--green); outline-offset: 5px; }
::selection { background: var(--accent-tint); color: var(--accent-strong); }
[hidden] { display: none !important; }
p { margin: 0 0 22px; }
strong { font-weight: 650; }
figure { margin: 0; }
img, svg { max-width: 100%; }
.prose { max-width: 790px; margin-inline: auto; }
.section { width: min(1120px, calc(100% - 64px)); margin-inline: auto; padding-top: 96px; }
.reading-layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); column-gap: 32px; width: min(1440px, calc(100% - 64px)); margin: 64px auto 0; align-items: start; }
.article-content { min-width: 0; }
.article-content > .section { width: 100%; margin-top: 86px; padding-top: 0; }
.article-content > .section:first-child { margin-top: 0; }
.article-content .prose { max-width: 770px; }
.reading-sidebar { position: sticky; top: calc(var(--header-height) + 28px); max-height: calc(100vh - var(--header-height) - 52px); max-height: calc(100dvh - var(--header-height) - 52px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.outline summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 0 10px 18px; cursor: default; }
.outline summary::-webkit-details-marker { display: none; }
.outline-label { color: var(--muted); font-family: var(--sans); font-size: var(--text-small); letter-spacing: .015em; font-weight: 600; }
.outline-current, .outline-chevron { display: none; }
.outline-nav ol { list-style: none; padding: 0; margin: 0; }
.outline-nav li { margin: 0 0 4px; }
.outline-nav li > a { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 9px 8px 9px 10px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: var(--text-small); line-height: 1.5; border-radius: 0 4px 4px 0; }
.outline-nav li > a:hover { background: var(--soft); color: var(--ink); }
.outline-nav li > a[aria-current="location"] { color: var(--accent-strong); background: var(--accent-tint); border-left-color: var(--accent); font-weight: 600; }
.outline-number { font-size: var(--text-small); font-weight: 400; }
.outline-top { display: block; margin: 20px 10px 0; padding-top: 15px; border-top: 1px solid var(--line); color: var(--muted); text-decoration: none; font-size: var(--text-small); }
.outline-top:hover { color: var(--accent); }
.small-label, .section-kicker { font-family: var(--sans); font-size: var(--text-small); letter-spacing: .015em; font-weight: 500; line-height: 1.7; }
.small-label { color: var(--muted); }
.section-kicker { color: var(--accent); margin-bottom: 20px; }
h1, h2, h3 { margin-top: 0; }
h2 { font-family: var(--serif); font-size: clamp(32px, 4vw, 46px); line-height: 1.17; font-weight: 400; letter-spacing: -.035em; margin-bottom: 30px; }
h3 { font-size: var(--text-subtitle); font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.subheading { margin: 36px 0 15px; font-size: var(--text-subtitle); }
.after-panel .subheading { margin-top: 0; }
.site-header { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
.nav-wrap { width: min(1440px, calc(100% - 64px)); margin: auto; height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-size: var(--text-subtitle); font-weight: 650; letter-spacing: -.04em; color: var(--ink); flex-shrink: 0; }
.wordmark img { height: 32px; width: 27px; }
.nav-links { display: flex; align-items: center; gap: 27px; font-size: var(--text-small); }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-links .nav-external { color: var(--ink); }
.icon-button { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: var(--text-subtitle); padding: 0; }
.icon-button:hover { background: var(--soft); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); font-size: var(--text-small); line-height: 1; white-space: nowrap; }
.theme-toggle:hover { border-color: var(--muted); background: var(--soft); }
.theme-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.theme-moon, :root[data-theme="dark"] .theme-sun { display: none; }
:root[data-theme="dark"] .theme-moon { display: block; }
.reading-progress { position: fixed; top: 0; left: 0; width: 100%; height: 3px; z-index: 30; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.hero { padding-top: 83px; text-align: center; }
.hero h1 { font-size: clamp(64px, 7.5vw, 100px); font-family: var(--serif); font-weight: 400; letter-spacing: -.065em; line-height: 1.02; margin: 0 0 22px; }
.hero-icon { display: inline-block; width: .55em; height: auto; transform: rotate(8deg); vertical-align: -.025em; margin-left: .16em; }
.hero-title { font-family: var(--serif); font-size: clamp(25px, 3.5vw, 39px); line-height: 1.2; letter-spacing: -.025em; margin-bottom: 24px; }
.hero-deck { max-width: 760px; margin: 0 auto 25px; font-size: var(--text-body); color: var(--muted); line-height: 1.8; }
.hero-deck em { color: var(--accent); font-weight: 500; }
.authors { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 0 0 29px; font-size: var(--text-subtitle); color: var(--muted); }
.authors a { white-space: nowrap; color: var(--ink); text-decoration-color: var(--line); }
.authors a:hover { color: var(--accent); text-decoration-color: currentColor; }
.authors span { color: var(--accent); margin: 0 3px; }
.hero-actions { display: flex; justify-content: center; gap: 11px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 22px; padding: 12px 22px; font-size: var(--text-small); border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 6px; text-decoration: none; font-weight: 550; transition: background .15s ease, border-color .15s ease; }
.button:hover { color: var(--ink); border-color: var(--ink); background: var(--soft); }
.button-primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.button-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--paper); }
.button-small { font-size: var(--text-small); padding: 9px 12px; gap: 7px; }
.hero-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; max-width: 880px; margin: 57px auto 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 25px 0; text-align: left; }
.hero-summary > div { display: flex; gap: 18px; justify-content: center; align-items: center; font-size: var(--text-body); line-height: 1.7; color: var(--muted); }
.hero-summary strong { font-size: inherit; color: var(--ink); }
.summary-number { font-size: var(--text-subtitle); color: var(--accent); font-family: var(--serif); }
.intro-section { padding-top: 64px; }
.takeaway { border-left: 3px solid var(--accent); padding: 0 0 0 25px; }
.takeaway .overview-heading { margin-bottom: 14px; color: var(--accent); font-size: var(--text-subtitle); letter-spacing: -.02em; }
.takeaway p { font-size: var(--text-body); }
.takeaway .takeaway-last { color: var(--muted); font-size: var(--text-body); margin-bottom: 0; }
.equation { font-size: 1em; padding: 12px 10px; margin: 22px 0; overflow-x: auto; overflow-y: hidden; text-align: center; }
.equation .katex-display { margin: .3em 0; }
.equation-compact { margin-block: 15px; }
.equation-note { font-size: var(--text-small); line-height: 1.75; color: var(--muted); }
.inline-math { white-space: nowrap; }
.inline-math .katex { font-size: 1.04em; }
.ref { text-decoration: none; font-size: var(--text-small); vertical-align: baseline; }
.objective-box { padding: 23px 22px 15px; margin: 30px -15px; background: var(--accent-tint); border: 1px solid var(--line); border-radius: 8px; }
.objective-box > .small-label { color: var(--accent); }
.objective-box .equation { font-size: 1em; margin: 16px 0 6px; padding-inline: 0; }
.technical-detail { margin-top: 25px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--text-body); }
.technical-detail summary { cursor: pointer; padding: 16px 0; font-weight: 550; color: var(--muted); }
.technical-detail summary:hover { color: var(--accent); }
.technical-detail[open] summary { color: var(--ink); margin-bottom: 4px; }
.technical-detail p { margin-bottom: 18px; }
.interactive-panel { margin-top: 36px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.interactive-topline { border-bottom: 1px solid var(--line); padding: 17px 25px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.demo-tag { color: var(--muted); font-size: var(--text-small); }
.playground-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(340px, 1fr); }
.chart-annotations { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 4px 14px 0; color: var(--muted); font-size: var(--text-small); }
.metric-visual { display: flex; flex-direction: column; justify-content: center; padding: 15px 14px 25px; min-width: 0; }
#metric-chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart-legend { display: flex; gap: 19px; justify-content: center; color: var(--muted); font-size: var(--text-small); flex-wrap: wrap; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { width: 17px; height: 3px; display: inline-block; }
.swatch.old { height: 0; border-top: 2px dashed var(--blue); }
.swatch.new { background: var(--accent); }
.swatch.target { background: var(--green); }
.demo-controls { border-left: 1px solid var(--line); padding: 26px 24px; }
.control { margin-bottom: 23px; }
.control label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px; font-size: var(--text-small); font-weight: 550; margin-bottom: 8px; }
.control-value { color: var(--accent); font-family: var(--mono); font-size: var(--text-small); white-space: nowrap; }
input[type="range"] { display: block; width: 100%; accent-color: var(--accent); cursor: pointer; margin: 12px 0; height: 22px; }
.range-ends { display: flex; justify-content: space-between; font-size: var(--text-small); color: var(--muted); gap: 12px; line-height: 1.4; }
.preset-buttons { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 18px; }
.preset-buttons button { color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 4px; font-size: var(--text-small); padding: 6px 10px; }
.preset-buttons button:hover, .preset-buttons button[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }
.curvature-message { font-size: var(--text-small); background: var(--soft); border-left: 2px solid var(--green); padding: 11px 12px; min-height: 65px; line-height: 1.65; margin-bottom: 15px; }
.curvature-message.incompatible { background: var(--accent-tint); border-left-color: var(--accent); }
.demo-readouts > div { display: flex; justify-content: space-between; gap: 10px; font-size: var(--text-small); padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.demo-readouts output { flex-shrink: 0; color: var(--ink); font-family: var(--mono); }
.demo-actions { display: flex; align-items: center; gap: 17px; margin-top: 22px; }
.text-button { border: 0; background: transparent; padding: 5px 0; color: var(--muted); font-size: var(--text-small); text-decoration: underline; text-underline-offset: 3px; }
.interactive-footnote { margin: 0; padding: 16px 25px; font-size: var(--text-small); line-height: 1.75; color: var(--muted); border-top: 1px solid var(--line); }
.after-panel { margin-top: 29px; }
.metric-grid { stroke: var(--grid); stroke-width: 1; }
.metric-axis { stroke: var(--line); stroke-width: 1.4; }
.metric-tick { fill: var(--muted); font-size: var(--chart-label-size, var(--text-small)); font-family: var(--sans); }
.metric-label { fill: var(--ink); font-size: var(--chart-vector-size, var(--text-body)); font-family: KaTeX_Main, var(--serif); font-style: italic; paint-order: stroke; stroke: var(--surface); stroke-width: 5px; stroke-linejoin: round; }
.metric-old { stroke: var(--blue); stroke-width: 1.8; stroke-dasharray: 6 5; fill: none; }
.metric-new { stroke: var(--accent); stroke-width: 2.5; fill: var(--accent); fill-opacity: .09; }
.metric-y { stroke: var(--muted); fill: var(--muted); }
.metric-s { stroke: var(--green); fill: var(--green); }
.metric-hy { stroke: var(--accent); fill: var(--accent); }
.method-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 25px 0 12px; margin: 30px 0; }
.method-pair > div { min-width: 0; }
.method-pair > div + div { padding-left: 27px; border-left: 1px solid var(--line); }
.method-pair h3 { color: var(--accent); font-size: var(--text-subtitle); margin-bottom: 12px; }
.method-pair p { font-size: var(--text-body); margin-bottom: 10px; }
.method-pair .equation { font-size: 1em; padding-inline: 0; }
.storage-panel { margin-top: 32px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; overflow: hidden; }
.storage-heading { display: flex; justify-content: space-between; align-items: center; gap: 30px; padding: 26px 32px; border-bottom: 1px solid var(--line); }
.storage-heading p { margin: 0 0 5px; }
.storage-heading h3 { margin: 0; font-family: var(--serif); font-size: var(--text-subtitle); font-weight: 400; }
.storage-control { min-width: 200px; width: 240px; }
.storage-control label { font-size: var(--text-small); color: var(--muted); }
.storage-control input { margin: 5px 0; }
.storage-comparison { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.storage-item { position: relative; padding: 28px 32px; min-height: 205px; overflow: hidden; }
.storage-item + .storage-item { border-left: 1px solid var(--line); }
.storage-item.highlighted { background: var(--accent-tint); }
.storage-name, .storage-formula { display: block; font-size: var(--text-small); }
.storage-formula { color: var(--muted); font-size: var(--text-small); margin-top: 3px; }
.storage-item strong { display: block; position: relative; z-index: 1; font-family: var(--serif); font-size: 37px; font-weight: 400; line-height: 1.3; margin-top: 20px; letter-spacing: -.035em; }
.highlighted strong { color: var(--accent); }
.storage-motif { position: absolute; width: 84px; height: 84px; right: 24px; top: 35px; opacity: .35; }
.motif-dense { border: 1px solid var(--muted); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 7px 7px; }
.motif-diag { border: 1px solid var(--line); background: linear-gradient(45deg, transparent 48%, var(--muted) 49%, var(--muted) 51%, transparent 52%); }
.motif-kron { display: flex; align-items: center; gap: 5px; }
.motif-kron span { display: block; width: 32px; height: 32px; border: 1px solid var(--accent); background: repeating-linear-gradient(90deg, transparent 0 7px, var(--accent) 7px 8px); }
.motif-kron b { font-size: var(--text-subtitle); color: var(--accent); font-weight: 400; }
.replay-strip { border: 1px solid var(--line); border-radius: 7px; margin: 28px 0; padding: 20px 23px 16px; }
.replay-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: var(--text-small); color: var(--muted); }
.replay-cells { display: grid; overflow-x: auto; padding-block: 2px; grid-template-columns: repeat(11, minmax(28px, 1fr)); gap: 6px; margin: 18px 0; }
.replay-cells span { display: grid; place-items: center; min-width: 0; aspect-ratio: 1; background: var(--soft); font-size: var(--text-small); line-height: 1; border-radius: 3px; font-family: var(--mono); }
.replay-cells .origin-cell { outline: 1px solid var(--accent); }
.replay-cells .replay-cell { background: var(--accent); color: var(--paper); font-size: var(--text-subtitle); }
.replay-strip p { font-size: var(--text-small); color: var(--muted); margin: 0; }
.results-tabs { display: flex; justify-content: center; gap: 5px; border-bottom: 1px solid var(--line); margin-top: 34px; }
.results-tabs button { background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 14px 22px; font-size: var(--text-small); }
.results-tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.results-tabs button:hover { background: var(--soft); }
.result-panel { padding-top: 25px; }
.result-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.result-heading h3 { font-size: var(--text-subtitle); margin: 0; }
.figure-button { position: relative; display: block; width: 100%; padding: 20px 15px 12px; background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; cursor: zoom-in; }
.figure-button img { display: block; width: 100%; height: auto; }
.zoom-hint { position: static; display: inline-block; margin-top: 8px; top: 8px; right: 10px; background: #fff; border: 1px solid #dfdfd7; color: #62675f; font-size: var(--text-small); padding: 2px 7px; border-radius: 3px; opacity: 1; transition: opacity .2s; }
.figure-button:hover .zoom-hint, .figure-button:focus-visible .zoom-hint { opacity: 1; }
figcaption { font-size: var(--text-small); color: var(--muted); line-height: 1.8; margin-top: 16px; max-width: 950px; }
.result-note { margin: 20px 0 0; padding-left: 19px; border-left: 2px solid var(--accent); font-size: var(--text-body); max-width: 950px; }
.figure-protocol { margin: 25px 0 0; color: var(--muted); border-top: 1px solid var(--line); padding-top: 15px; font-size: var(--text-small); }
.try-section .prose { padding-top: 45px; border-top: 1px solid var(--line); }
.code-block { margin: 25px 0 16px; background: var(--soft); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.code-header { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; color: var(--muted); font-size: var(--text-small); padding: 10px 18px; border-bottom: 1px solid var(--line); }
.copy-button { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; font-size: var(--text-small); }
.copy-button:hover { color: var(--accent); border-color: var(--accent); }
pre { margin: 0; padding: 23px 26px; overflow-x: auto; line-height: 1.85; font-size: var(--text-small); tab-size: 4; }
code { font-family: var(--mono); }
.text-link { display: inline-flex; gap: 15px; align-items: center; font-size: var(--text-small); }
.endmatter { padding-bottom: 75px; }
.endmatter h2 { font-size: 29px; }
.references { font-size: var(--text-small); color: var(--muted); padding-left: 20px; }
.references li { padding-left: 8px; margin-bottom: 15px; scroll-margin-top: 120px; }
.citation-detail summary { color: var(--ink); }
.citation-detail summary span { float: right; font-family: var(--mono); font-size: var(--text-small); color: var(--muted); }
.citation-detail .code-block { margin-top: 3px; }
.site-footer { width: min(1280px, calc(100% - 64px)); margin: 0 auto; padding: 27px 0 35px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); }
.site-footer > span { font-size: var(--text-small); color: var(--muted); }
.site-footer > div { display: flex; gap: 22px; font-size: var(--text-small); }
.site-footer a { text-decoration: none; }
dialog { width: min(1400px, 96vw); max-width: 96vw; max-height: 94vh; padding: 20px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
dialog::backdrop { background: rgb(15 20 17 / .75); }
.dialog-toolbar { display: flex; justify-content: flex-end; align-items: center; margin-bottom: 15px; font-size: var(--text-small); }
dialog > img { display: block; width: 100%; min-width: 780px; background: #fff; border-radius: 4px; padding: 10px; }
dialog > p { margin: 12px 0 0; font-size: var(--text-small); color: var(--muted); }
.skip-link { position: fixed; left: 10px; top: -100px; background: var(--surface); color: var(--ink); padding: 12px; z-index: 100; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.noscript-note { background: var(--accent-tint); padding: 20px; text-align: center; font-size: var(--text-small); }

@media (min-width: 1450px) {
  .hero { padding-top: 98px; }
}
@media (max-width: 1099px) {
  :root { --anchor-offset: calc(var(--header-height) + 80px); }
  .reading-layout { display: block; max-width: 1120px; margin-top: 48px; }
  .reading-sidebar { top: var(--header-height); z-index: 18; max-height: none; overflow: visible; margin-bottom: 36px; }
  .outline { position: relative; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
  .outline summary { cursor: pointer; padding: 14px 18px; min-height: 53px; }
  .outline-current { display: block; margin-left: auto; color: var(--ink); font-size: var(--text-small); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .outline-chevron { display: block; flex-shrink: 0; fill: none; stroke: var(--muted); stroke-width: 1.5; transition: transform .15s ease; }
  .outline[open] .outline-chevron { transform: rotate(180deg); }
  .outline-nav { position: absolute; top: calc(100% + 5px); left: -1px; right: -1px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); box-shadow: 0 12px 28px rgb(0 0 0 / .12); max-height: calc(100vh - var(--header-height) - 80px); max-height: calc(100dvh - var(--header-height) - 80px); overflow-y: auto; }
  .outline-nav li > a { padding: 10px 12px; font-size: var(--text-small); }
  .outline-top { margin-top: 12px; padding-top: 12px; padding-bottom: 5px; }
}
@media (max-width: 1280px) {
  .nav-links { gap: 16px; }
  .playground-grid { grid-template-columns: 1fr; }
  .demo-controls { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
  .control { margin: 0; }
  .curvature-message { margin: 0; }
  .preset-buttons { align-items: center; margin: 0; }
  .demo-readouts { align-self: center; }
  .demo-actions { margin: 0; align-self: center; }
  .metric-visual { padding-top: 8px; }
  #metric-chart { max-height: 480px; }
  .storage-motif { right: 15px; width: 65px; height: 65px; opacity: .2; }
  .storage-item { padding: 25px 23px; }
  .site-footer > span { display: none; }
}
@media (max-width: 620px) {
  :root { --header-height: 64px; }
  body { font-size: var(--text-body); line-height: 1.8; }
  .section { width: calc(100% - 36px); padding-top: 67px; }
  .reading-layout { width: calc(100% - 36px); margin-top: 40px; }
  .article-content > .section { margin-top: 66px; }
  .outline summary { padding-inline: 13px; gap: 9px; }
  .outline-current { font-size: var(--text-small); }
  .nav-wrap { height: 64px; width: calc(100% - 32px); gap: 15px; }
  .nav-links { gap: 12px; font-size: var(--text-small); }
  .nav-links > a:not(.nav-home) { display: none; }
  .wordmark { font-size: var(--text-subtitle); }
  .wordmark img { width: 23px; }
  .hero { padding-top: 52px; }
  .hero h1 { font-size: 66px; margin-bottom: 24px; }
  .hero-title { font-size: 29px; line-height: 1.25; }
  .hero-deck { font-size: var(--text-body); margin: 20px auto; max-width: 380px; }
  .desktop-break { display: none; }
  .authors { font-size: var(--text-body); gap: 6px 16px; max-width: 100%; margin: 0 auto 24px; }
  .authors span { display: none; }
  .button { padding: 10px 16px; font-size: var(--text-small); gap: 15px; }
  .hero-summary { grid-template-columns: 1fr; gap: 16px; padding: 20px 0; margin-top: 38px; }
  .hero-summary > div { display: flex; justify-content: flex-start; gap: 18px; font-size: var(--text-body); line-height: 1.65; text-align: left; padding-inline: 18px; }
  .hero-summary strong { font-size: inherit; }
  .summary-number { display: block; font-size: var(--text-subtitle); margin-bottom: 0; }
  .intro-section { padding-top: 40px; }
  .takeaway { padding-left: 17px; }
  .takeaway p { font-size: var(--text-body); }
  .takeaway .takeaway-last { font-size: var(--text-body); }
  h2 { font-size: 34px; margin-bottom: 25px; }
  .section-kicker { font-size: var(--text-small); letter-spacing: .07em; }
  .equation { font-size: 1em; }
  .equation .katex-display { text-align: left; }
  .objective-box { padding: 18px 13px; margin-inline: -5px; }
  .objective-box .equation { font-size: 1em; }
  .interactive-topline { padding: 13px 16px; flex-wrap: wrap; gap: 5px; }
  .interactive-topline .small-label { font-size: var(--text-small); }
  .demo-tag { font-size: var(--text-small); }
  .metric-visual { padding-inline: 12px; padding-bottom: 20px; }
  .chart-annotations { padding-inline: 0; }
  .chart-legend { gap: 12px 18px; font-size: var(--text-small); }
  .demo-controls { display: block; padding: 24px 20px; }
  .control { margin-bottom: 25px; }
  .preset-buttons { margin-bottom: 18px; }
  .curvature-message { min-height: 0; margin-bottom: 13px; }
  .demo-actions { margin-top: 19px; }
  .interactive-footnote { padding: 14px 17px; font-size: var(--text-small); }
  .method-pair { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-bottom: 20px; }
  .method-pair > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .method-pair p { font-size: var(--text-body); }
  .method-pair .equation .katex-display { text-align: center; }
  .storage-heading { display: block; padding: 21px 18px; }
  .storage-heading h3 { font-size: var(--text-subtitle); }
  .storage-control { width: 100%; margin-top: 19px; }
  .storage-comparison { grid-template-columns: 1fr; }
  .storage-item { display: grid; grid-template-columns: 1fr auto; column-gap: 16px; padding: 20px; min-height: 0; }
  .storage-item + .storage-item { border-left: 0; border-top: 1px solid var(--line); }
  .storage-name, .storage-formula { grid-column: 1; }
  .storage-name { font-size: var(--text-small); }
  .storage-formula { font-size: var(--text-small); }
  .storage-item strong { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 28px; margin-top: 0; }
  .storage-motif { display: none; }
  .replay-strip { padding: 17px 12px; }
  .replay-title { font-size: var(--text-small); }
  .replay-title .small-label { font-size: var(--text-small); }
  .replay-cells { gap: 4px; }
  .replay-cells span { font-size: var(--text-small); }
  .replay-cells .replay-cell { font-size: var(--text-small); }
  .results-tabs { justify-content: flex-start; flex-wrap: wrap; gap: 0; }
  .results-tabs button { font-size: var(--text-small); padding: 12px; flex: 1 1 140px; }
  .result-heading { display: block; margin-bottom: 15px; }
  .result-heading h3 { font-size: var(--text-subtitle); margin-bottom: 4px; }
  .result-heading .small-label { font-size: var(--text-small); }
  .figure-button { padding: 12px 3px 5px; }
  .zoom-hint { opacity: 1; font-size: var(--text-small); padding: 1px 4px; }
  figcaption { font-size: var(--text-small); line-height: 1.8; }
  .result-note { font-size: var(--text-body); }
  pre { font-size: var(--text-small); padding: 19px 17px; }
  .site-footer { width: calc(100% - 36px); gap: 12px; flex-direction: column; align-items: flex-start; }
  .site-footer > div { gap: 16px; font-size: var(--text-small); }
  .endmatter { padding-bottom: 45px; }
  dialog { padding: 12px; }
}
@media (max-width: 420px) {
  #theme-name { display: none; }
  .theme-toggle { width: 40px; height: 40px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .site-header, .reading-progress, .hero-actions, .nav-links, .reading-sidebar, .demo-actions, .results-tabs, .copy-button, .zoom-hint, dialog { display: none !important; }
  .reading-layout { display: block; width: 100%; margin-top: 20px; }
  body { color: #222; background: #fff; font-size: 11pt; }
  .section { width: 100%; padding-top: 35px; }
  .hero { padding-top: 0; }
  .result-panel[hidden] { display: block !important; }
  .interactive-panel, .storage-panel, figure, .code-block { break-inside: avoid; }
  .result-panel { padding-top: 35px; }
}
