/* ==========================================================================
   BASE — reset, typography, grid utilities
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 42rem;
}

/* ---- Layout shell ---- */
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

main { display: block; }

.section {
  padding-top: clamp(3rem, 8vw, 6rem);
  padding-bottom: clamp(3rem, 8vw, 6rem);
}
.section--tight { padding-top: clamp(1.5rem, 4vw, 2.5rem); padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }

/* ---- Axis-tick rule: the site's signature divider motif ----
   A hairline with small plot-style ticks, referencing a chart baseline. */
.tick-rule {
  --tick-count: 24;
  height: 9px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(
    to right,
    var(--line) 0 1px,
    transparent 1px calc(100% / var(--tick-count))
  );
  background-size: calc(100% / var(--tick-count)) 6px;
  background-repeat: repeat-x;
  background-position: top left;
  margin: 0;
}

.tick-rule--accent { border-top-color: var(--ink); }
.tick-rule--accent { background-image: repeating-linear-gradient(
    to right,
    var(--accent) 0 1px,
    transparent 1px calc(100% / var(--tick-count))
  ); }

.rule {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--accent-ink);
  background: var(--accent-dim);
  border-radius: var(--radius);
  padding: 0.28em 0.6em;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 720px) {
  .grid-12 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 721px) and (max-width: 1000px) {
  .grid-12 { grid-template-columns: repeat(8, 1fr); }
}
