*{ box-sizing:border-box; }
/* No universal color-transition on [data-theme] change, on purpose - fading every themed
   element at once read as heavy on content-dense pages and on mobile. Colors snap instantly. */
/* Prevent oversized content and full-bleed elements from creating horizontal page scrolling. */
html{ scroll-behavior:smooth; background:var(--background); scrollbar-gutter:stable; overflow-x:hidden; }
html{ scrollbar-width:thin; scrollbar-color:var(--border) transparent; }
.article-content pre::-webkit-scrollbar, .chroma::-webkit-scrollbar{ width:3px; height:3px; }
.article-content pre::-webkit-scrollbar-thumb, .chroma::-webkit-scrollbar-thumb{ background:color-mix(in oklab, var(--border) 60%, transparent); border-radius:999px; }
.article-content pre::-webkit-scrollbar-track, .chroma::-webkit-scrollbar-track{ background:transparent; }
.article-content pre{ scrollbar-width:thin; scrollbar-color:color-mix(in oklab, var(--border) 50%, transparent) transparent; }

/* padding-top:var(--header-total-h) (layout/header.css, kept live by nav.js's ResizeObserver)
   instead of a hardcoded number - reads .site-header-group's actual current total height
   (header bar, plus the mobile TOC bar when it's showing - single.html's "mobileToc" block)
   at any width, instead of a guess that has to be hand-kept in sync with it. */
body{ margin:0; background:transparent; color:var(--foreground); padding-top:var(--header-total-h, 64px); font-family:var(--font); line-height:1.6; -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale; text-rendering:optimizeLegibility; display:flex; flex-direction:column; min-height:100vh;
  font-size:calc(16px * var(--type-scale));
}
/* Native controls inherit the site's font unless their component sets one. */
button, input, select, textarea{ font-family:inherit; }
a{ color:var(--foreground); text-decoration:none; }
a:hover{ color:var(--link-hover); opacity:.8; }
img{ max-width:100%; height:auto; }
code, pre{ font-family:var(--mono); }
::selection{ background:var(--foreground); color:var(--background); }


::-webkit-scrollbar{ width:4px; height:4px; }
::-webkit-scrollbar-thumb{ background:var(--border); border-radius:999px; }

/* Visually hidden but still announced by screen readers - for labels on inputs whose
   placeholder already carries the visible hint (search boxes, filters). */
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
