:root{color-scheme:only light;--bg:#e8e9eb;--surface:#eff0f2;--text:#292b30;--muted:#555b64;--line:#bfc3ca;--accent:#a12735;--on-accent:#fff;--focus:#125ba5;--brand-red:#d20d13;--header-height:68px;--gutter:clamp(16px,4vw,48px);--rail:1024px;--card-pad:clamp(16px,2.6vw,28px)}
@media(prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--bg:#2c2e33;--surface:#35383e;--text:#dedfe4;--muted:#c1c5cc;--line:#666b75;--accent:#eda5ad;--on-accent:#292b30;--focus:#9ac8ff}}
:root[data-theme=dark]{color-scheme:dark;--bg:#2c2e33;--surface:#35383e;--text:#dedfe4;--muted:#c1c5cc;--line:#666b75;--accent:#eda5ad;--on-accent:#292b30;--focus:#9ac8ff}:root[data-theme=light]{color-scheme:only light;--bg:#e8e9eb;--surface:#eff0f2;--text:#292b30;--muted:#555b64;--line:#bfc3ca;--accent:#a12735;--on-accent:#fff;--focus:#125ba5}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.65}html{scroll-padding-top:calc(var(--header-height) + 20px)}[hidden]{display:none!important}a{color:var(--accent);text-underline-offset:3px}a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
#site-header.site-chrome{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:minmax(112px,1fr) auto minmax(112px,1fr);align-items:center;gap:16px;height:var(--header-height);max-width:none;margin:0;padding:0 var(--gutter);border-bottom:1px solid var(--line);background:var(--bg);font-size:16px}
.site-chrome .brand,.site-footer .brand{display:inline-flex;align-items:center;text-decoration:none;line-height:1;justify-self:start}.brand-art{display:inline-flex;align-items:center;width:clamp(110px,10vw,146px)}.brand-art img{width:100%;height:auto;display:block}.brand-art .wordmark-dark{display:none}:root[data-theme=dark] .brand-art .wordmark-light{display:none}:root[data-theme=dark] .brand-art .wordmark-dark{display:block}@media(prefers-color-scheme:dark){:root:not([data-theme]) .brand-art .wordmark-light{display:none}:root:not([data-theme]) .brand-art .wordmark-dark{display:block}}
.site-chrome nav{display:flex;gap:clamp(12px,1.6vw,24px);font-size:14px;margin:0;align-items:center}.site-chrome nav a{color:var(--text);text-decoration:none;white-space:nowrap}.site-chrome nav a:hover{text-decoration:underline}.site-chrome .controls{display:flex;align-items:center;gap:8px;justify-content:flex-end;min-width:0}.site-chrome select,.site-chrome button,.site-footer button{font:inherit;font-size:13px;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:7px;min-height:40px;padding:6px 10px;cursor:pointer}.site-chrome select{width:clamp(108px,13vw,164px);max-width:100%}.site-chrome #theme{width:40px;padding:0;font-size:20px}.site-chrome #chapter-menu{display:none}.site-chrome .sr,.skip:not(:focus){position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.skip:focus{position:fixed;z-index:30;top:4px;left:4px;background:var(--surface);padding:8px}
.site-footer{width:100%;max-width:none;margin:0;border-top:1px solid var(--line);padding:48px var(--gutter) 20px;color:var(--muted);font-size:14px;text-align:left}.site-footer-grid,.site-footer-bottom{max-width:var(--rail);margin:0 auto}.site-footer-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1fr);gap:clamp(20px,4vw,52px)}.site-footer .footer-identity p{max-width:32ch;margin:.85rem 0}.site-footer .footer-status{font-size:.85em}.site-footer .footer-links{display:flex;flex-direction:column;gap:7px;align-items:flex-start}.site-footer .footer-links strong{color:var(--text);margin-bottom:5px}.site-footer .footer-links a{color:var(--muted);text-decoration:none}.site-footer .footer-links a:hover{text-decoration:underline}.site-footer .footer-links button{min-height:34px;margin-top:5px}.site-footer-bottom{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);margin-top:28px;padding-top:16px;gap:12px}.site-footer-bottom a{color:var(--muted);text-decoration:none}
@media(max-width:900px){#site-header.site-chrome{grid-template-columns:minmax(100px,1fr) minmax(0,auto);gap:6px}.site-chrome #chapter-menu{display:block}.site-chrome nav{display:none}.site-chrome nav.open{display:flex;position:absolute;top:calc(var(--header-height) - 1px);left:0;right:0;flex-wrap:wrap;padding:16px var(--gutter);background:var(--bg);border-bottom:1px solid var(--line);box-shadow:0 8px 16px #0002}.site-chrome .controls{gap:5px}}
@media(max-width:480px){:root{--header-height:62px;--gutter:16px}.site-chrome .brand-art{width:104px}.site-chrome select{width:92px;padding:5px}.site-chrome #chapter-menu{padding:5px;font-size:12px}.site-chrome #theme{width:34px}.site-footer-grid{grid-template-columns:1fr 1fr}.footer-identity{grid-column:1/-1}.site-footer{padding-top:32px}}
@media(max-width:350px){:root{--gutter:12px}.site-chrome .brand-art{width:86px}.site-chrome .controls{gap:3px}.site-chrome select{width:79px}.site-chrome #theme{width:30px}}

/* Respect the operating system preference for reduced motion, including anchor navigation. */
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}}

/* Keep localized header controls inside the viewport without clipping labels. */
.site-chrome #chapter-menu{white-space:normal;overflow-wrap:anywhere;min-inline-size:0}
.site-chrome nav.open a{white-space:normal;overflow-wrap:anywhere;max-inline-size:100%}
.site-footer-grid>*{min-inline-size:0;overflow-wrap:anywhere}
@media(max-width:350px){#site-header.site-chrome{grid-template-columns:minmax(0,1fr) minmax(0,auto)}.site-chrome .controls{max-inline-size:100%}.site-chrome #chapter-menu{max-inline-size:76px}.site-chrome select{min-inline-size:0}}

/* Manual light mode opts out of browser automatic darkening where supported. */
:root[data-theme=light] body{color-scheme:only light;background-color:var(--bg);color:var(--text)}
