/* ==========================================================================
   BASE — reset + bare-element defaults. No classes here, only elements.
   ========================================================================== */

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

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

body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg{ max-width: 100%; display: block; }
a{ color: inherit; }

h1, h2, h3, h4{
  font-family: var(--font-display); font-weight: 600; line-height: 1.15;
  margin: 0 0 .6em; letter-spacing: -0.01em; text-wrap: balance;
}
h1{ font-size: var(--display-lg); }
h2{ font-size: var(--display-md); }
h3{ font-size: var(--display-sm); }

p{ margin: 0 0 1em; max-width: var(--measure); }
p:last-child{ margin-bottom: 0; }

ul, ol{ margin: 0; padding: 0; list-style: none; }
dl{ margin: 0; }

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

/* Editorial default: prose reads better slightly looser and a touch larger
   than UI chrome. Anything with class="prose" (or inside .story-content)
   inherits this without repeating font-size everywhere. */
.prose, .story-content{ font-size: var(--text-lg); color: var(--ink-soft); line-height: 1.7; }
.prose :is(h2, h3), .story-content :is(h2, h3){ color: var(--ink); }
