/* ============================================================
   reset.css — modern reset + bug B1 defenses
   ============================================================ */

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

html, body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Root defense — no element can force horizontal scroll on the page.
     `clip` is preferred over `hidden` because it doesn't create a scroll container
     (which would break position:sticky and similar). Fallback to `hidden`. */
  overflow-x: hidden;
  overflow-x: clip;
}

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

body {
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  max-width: 100vw;
  text-rendering: optimizeSpeed;
  line-height: 1.55;
  overflow-x: hidden;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img, picture {
  height: auto;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

button { background: none; border: 0; cursor: pointer; }

[hidden] { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: var(--c-stone); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-accent); }

::selection { background: var(--brand-accent); color: var(--c-black); }

:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================================
   BUG B1 DEFENSE — SVG sizing
   Default: SVG is icon-sized (1em). If HTML attribute width="X"
   exists, attribute wins. Class-based size overrides also work.
   ============================================================ */
svg {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  fill: currentColor;
}

svg[width] { width: auto; }
svg[height] { height: auto; }
