/* Keyboardo — base.css. Reset, the CONTRACTS §7 custom-property defaults (=
   the "dark" theme, so a missing data-theme still renders), D13 mono stack,
   focus-visible, reduced motion. Dense style: the 4 sheets share a 32 KB
   render-blocking budget and comments ship (no build step). */

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}

:root{
/* The 15 theme properties — defaults are dark; themes.css overrides. */
--bg:#111418;--surface:#1a1e24;--surface-alt:#232932;--text:#e7eaf0;--sub:#7c8799;
--border:#2b323d;--accent:#6c9ef8;--accent-text:#0d1015;--caret:#6c9ef8;--error:#e05561;
--error-extra:#9d3a43;--success:#4cc38a;--warning:#e3b341;--focus-ring:#6c9ef8;--chart-grid:#262d37;
/* The 4 non-theme tokens. Themes must NOT override these. */
--font-mono:ui-monospace,"Cascadia Mono","Segoe UI Mono","Roboto Mono",Menlo,Monaco,Consolas,monospace;
--test-font:2rem;   /* typing-surface font size */
--test-line:3.2rem; /* typing-surface line height — exact, the CLS math depends on it */
--radius:8px;
color-scheme:dark;
}

html{background:var(--bg);-webkit-text-size-adjust:100%}
body{font-family:var(--font-mono);font-size:1rem;line-height:1.5;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{font-weight:600;line-height:1.25}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
button,input,select,textarea{font:inherit;color:inherit}
button{background:none;border:0;cursor:pointer}
img,svg,canvas{display:block;max-width:100%}
[hidden]{display:none!important} /* !important so [hidden] beats any display rule (e.g. #theme-menu display:grid) */
::selection{background:var(--accent);color:var(--accent-text)}
:focus{outline:none}
:focus-visible{outline:2px solid var(--focus-ring);outline-offset:2px}
/* Off-screen but readable by assistive tech (e.g. the aria-hidden word stream). */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

/* Kill caret smoothing, blink and every animation for reduced-motion users.
   components.css §16 additionally removes the keycap press TRAVEL. */
@media (prefers-reduced-motion:reduce){
*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:0s!important;scroll-behavior:auto!important}
}
