/* ═══════════════════════════════════════════════════════════════════════
   AphixLabs — DOCUMENT BASE: single source of truth for page-level
   rendering. Loaded on every page BEFORE nav.css.

   Anything here that differs between the home page and a sub-page causes a
   visible shift when navigating — the scrollbar width alone moves every
   right-aligned element. Declared once, explicitly, for every page.
   ═══════════════════════════════════════════════════════════════════════ */

html{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  scroll-behavior:smooth;
  scroll-padding-top:96px;
  /* identical scrollbar on every page: same width => same viewport width */
  scrollbar-width:thin;
  scrollbar-color:#3a3f6e transparent;
  /* reserve the gutter so pages that do and don't scroll line up too */
  scrollbar-gutter:stable;
}
html::-webkit-scrollbar{width:9px;height:9px;}
html::-webkit-scrollbar-track{background:transparent;}
html::-webkit-scrollbar-thumb{background:#3a3f6e;border-radius:10px;}
html::-webkit-scrollbar-thumb:hover{background:#4a4f85;}
html[data-theme="light"]{scrollbar-color:#c9c7dd transparent;}
html[data-theme="light"]::-webkit-scrollbar-thumb{background:#c9c7dd;}

body{
  background:var(--bg);
  color:var(--br);
  font-family:'Bricolage Grotesque',sans-serif;
  font-size:16px;
  line-height:1.65;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  margin:0;
}

@media(max-width:1000px){ html{scroll-padding-top:76px;} }
@media print{ html{scrollbar-gutter:auto;} }
