/* Base: reset, layout primitives, typography. Colours come from themes.css variables only. */
:root { color-scheme: dark; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
:root[data-theme="light"] { color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--page-bg); background-attachment: fixed; line-height: 1.45; }
[hidden] { display: none !important; }
.page { width: min(1500px, calc(100% - 32px)); margin: 18px auto 96px; }
a { color: var(--accent-glow); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { margin: 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.02em; }
h2 { margin: 0 0 4px; font-size: 1.12rem; letter-spacing: -.01em; }
h3 { margin: 0; font-size: .98rem; }
.muted { color: var(--muted); font-size: .88rem; margin: 6px 0; }
.muted-inline { color: var(--muted); font-size: .82rem; }
code { background: var(--bg-2); padding: 1px 6px; border-radius: 5px; font-size: .85em; border: 1px solid var(--line); }
select, input, textarea, button { font: inherit; }
select, input, textarea { min-width: 0; color: var(--text); background: var(--field); border: 1px solid var(--line-strong); border-radius: 8px; padding: 8px 11px; }
select:hover, input:hover, textarea:hover { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
button { cursor: pointer; }
button:disabled, .nav-btn:disabled { cursor: not-allowed; }
summary { cursor: pointer; font-weight: 650; }
.section-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.section-label { margin: 20px 0 8px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.icon { flex: none; vertical-align: -3px; }
/* Keyboard/arrow-key focus: wide, high-contrast magenta so the selection is always visible. */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; box-shadow: 0 0 0 7px var(--focus-glow); border-radius: 8px; }
html[data-reduce-motion="true"] *, html[data-reduce-motion="true"] *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
