/* ==========================================================================
   V3 · base — reset, typography, layout primitives
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-base);
  line-height: 1.5;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"], .list-reset { list-style: none; padding: 0; margin: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
table { border-collapse: collapse; width: 100%; }
[hidden] { display: none !important; }
::selection { background: var(--lime); color: var(--graphite); }

:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }

.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 1000;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--graphite); color: #fff; font-size: var(--fs-sm);
  transform: translateY(-160%); transition: transform var(--t-med) var(--ease-out);
}
.skip-link:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Typography ------------------------------------------------------------- */
.display, .h-display {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: var(--track-display);
  line-height: .92;
}
.t-4xl { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-4xl); letter-spacing: -0.055em; line-height: .86; }
.t-3xl { font-family: var(--font-display); font-weight: 650; font-size: var(--fs-3xl); letter-spacing: var(--track-display); line-height: .94; }
.t-2xl { font-family: var(--font-display); font-weight: 620; font-size: var(--fs-2xl); letter-spacing: -0.035em; line-height: 1; }
.t-xl  { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-xl); letter-spacing: -0.025em; line-height: 1.1; }
.t-lg  { font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); letter-spacing: -0.015em; line-height: 1.2; }
.lede  { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; color: var(--text-2); letter-spacing: -0.01em; max-width: 46ch; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono, .label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: var(--track-mono);
  text-transform: uppercase;
  line-height: 1.4;
}
.label { color: var(--text-2); }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.balance { text-wrap: balance; }
.pretty { text-wrap: pretty; }

/* Layout ----------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: 880px; }
.wrap--mid { max-width: 1180px; }
.stack > * + * { margin-top: var(--stack, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 12px); }
.row--wrap { flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }

/* Field-notes decorative primitives -------------------------------------- */
.hairline-grid {
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 80px 80px;
}
.xmark { position: absolute; width: 11px; height: 11px; pointer-events: none; color: var(--text-3); }
.xmark::before, .xmark::after { content: ""; position: absolute; background: currentColor; }
.xmark::before { left: 5px; top: 0; width: 1px; height: 11px; }
.xmark::after { top: 5px; left: 0; height: 1px; width: 11px; }
.xmark--tl { left: -6px; top: -6px; }
.xmark--tr { right: -6px; top: -6px; }
.xmark--bl { left: -6px; bottom: -6px; }
.xmark--br { right: -6px; bottom: -6px; }

.rec-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #FF3B30; box-shadow: 0 0 0 0 rgba(255, 59, 48, .6); animation: recPulse 1.6s var(--ease-out) infinite; }
@keyframes recPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 48, .55); } 70% { box-shadow: 0 0 0 8px rgba(255, 59, 48, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 48, 0); } }

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