*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: var(--t-16); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-underline-offset: 0.2em; }
a:hover { color: var(--blue-hover); }
::selection { background: var(--blue); color: var(--surface); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

h1, h2, h3, h4 { margin: 0; font-family: "Inter Tight", Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; }
h1 { font-size: var(--t-64); letter-spacing: -0.04em; }
h2 { font-size: var(--t-48); letter-spacing: -0.035em; }
h3 { font-size: var(--t-28); letter-spacing: -0.025em; }
h4 { font-size: var(--t-20); letter-spacing: -0.02em; }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
p { margin: 0; }
.accent { font-family: "Instrument Serif", Georgia, serif; font-size: 1.08em; font-weight: 400; letter-spacing: 0; }

:root[data-theme="dark"] { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { scrollbar-width: thin; scrollbar-color: var(--rule) transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
