/* ==========================================================================
   Base — resets, paper texture, typography defaults. Loaded on every page.
   Keep archetype-specific styles out; those live in chrome.css / single-*.css.
   ========================================================================== */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Paper texture — two layered dot grids. From the mockups exactly. */
  background-image:
    radial-gradient(rgba(0,0,0,0.025) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.02) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

img, svg, video { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink-soft); }

em, i { font-style: italic; }
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 var(--wrap-pad); }

/* Accessibility: skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 8px 12px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Screen-reader-only — visually hidden, SR-accessible */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  border: 0;
}

/* Global focus outline — yellow ring reads on both paper and ink
   surfaces, only when keyboard-focused. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Selection */
::selection { background: var(--accent); color: var(--ink); }

/* Highlight tag — hard-stop gradient highlighter, per Trevor's direction.
   Overrides the browser default solid-yellow <mark>. */
mark {
  background: linear-gradient(180deg, transparent 62%, var(--accent) 62%);
  color: inherit;
  padding: 0 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Honeypot fields — visually removed, present for bots to trip on. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
