/* ==========================================================================
   Reset and element defaults. Nothing here is page-specific.
   ========================================================================== */

*{margin:0;padding:0;box-sizing:border-box}
html{ -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; }
html.lenis, html.lenis body{ height:auto; }
.lenis.lenis-smooth{ scroll-behavior:auto !important; }
.lenis.lenis-stopped{ overflow:hidden; }
/* overflow-x:clip rather than hidden — hidden on a scroll container silently
   breaks the position:sticky module deck in SYS.02. */
html{ overflow-x:clip; scroll-behavior:smooth; }
body{ background:var(--bg); color:var(--ink); font-family:var(--mono); overflow-x:clip; transition:background-color .6s var(--ease-out), color .6s var(--ease-out); }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }

/* Keyboard focus must stay visible even though the page hides the cursor. */
:focus-visible{ outline:2px solid var(--accent); outline-offset:3px; border-radius:2px; }
:focus:not(:focus-visible){ outline:none; }
@media (pointer:coarse){ body{ cursor:auto; } }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; }
::selection{ background:var(--accent); color:var(--on-accent); }

/* <main> takes tabindex="-1" so the skip link can move focus to it. That
   makes it focusable by script but not by Tab — and it must not draw a
   ring around the whole page when it receives focus that way. */
main:focus{ outline:none; }
