/* Reset, typography, links and focus (from the prototypes, colours moved to tokens). */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html, body { margin: 0; }
  body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
  a { color: var(--primary); text-decoration: none; }
  a:hover { text-decoration: underline; }
  h1, h2, h3 { margin: 0; letter-spacing: -.01em; }
  h1 { font-size: 22px; font-weight: 700; }
  h2 { font-size: 16px; font-weight: 650; }
  h3 { font-size: 14px; font-weight: 650; }
  p { margin: 0 0 8px; }
  img, svg { max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; }
  [hidden] { display: none !important; }
  ::selection { background: var(--primary-soft); color: var(--ink); }

  /* Keyboard focus is always visible (new: the prototypes relied on browser defaults) */
  :focus { outline: none; }
  :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
  .sidebar :focus-visible { outline-color: var(--accent); }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  }
}
