/* ============================================================
   PROOF — base: reset, type, primitives
   ============================================================ */

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

html, body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--plane);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  margin: 0;
  padding: 0;
}
button { cursor: pointer; }

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

svg { display: block; }

::selection { background: var(--seq-100); color: var(--ink); }

/* --- focus: visible, never removed ------------------------ */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--t1);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --- scrollbars ------------------------------------------- */
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hairline-strong) transparent; }
.scroll::-webkit-scrollbar { width: 9px; height: 9px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb {
  background: var(--hairline-strong);
  border-radius: 6px;
  border: 2px solid var(--plane);
}
.scroll::-webkit-scrollbar-thumb:hover { background: var(--ink-muted); }

/* ============================================================
   TYPE PRIMITIVES
   ============================================================ */

/* Section eyebrow — the ledger's column heading voice */
.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.title-xl { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.017em; line-height: 1.15; }
.title-lg { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.012em; line-height: 1.25; }
.title-md { font-size: var(--fs-md); font-weight: 600; letter-spacing: -.008em; }
.title-sm { font-size: var(--fs-base); font-weight: 600; }

.body    { font-size: var(--fs-base); color: var(--ink-secondary); }
.body-sm { font-size: var(--fs-sm);   color: var(--ink-secondary); }
.muted   { color: var(--ink-muted); }
.dim     { color: var(--ink-secondary); }

/* Identifiers and codes only — never prose, never chart labels.
   Mono is reserved for things that ARE strings-of-record:
   record ids, lineage paths, model versions, hashes. */
.code {
  font-family: var(--mono);
  font-size: var(--fs-xs);
  letter-spacing: -.01em;
  color: var(--ink-muted);
}

/* Columns of figures that must align vertically. */
.tnum { font-variant-numeric: tabular-nums; }

/* Large standalone values use proportional figures (skill rule). */
.hero-figure {
  font-size: var(--fs-hero);
  font-weight: 600;
  letter-spacing: -.028em;
  line-height: 1;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.row  { display: flex; align-items: center; }
.col  { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.g4 { gap: 4px; } .g6 { gap: 6px; } .g8 { gap: 8px; }
.g12 { gap: 12px; } .g16 { gap: 16px; } .g20 { gap: 20px; } .g28 { gap: 28px; }

.hr { height: 1px; background: var(--hairline); border: 0; margin: 0; }
.vr { width: 1px; align-self: stretch; background: var(--hairline); }

.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   MOTION — purposeful only
   ============================================================ */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rail-in {
  from { opacity: 0; transform: translateX(18px); }
  to   { opacity: 1; transform: none; }
}

.enter { animation: fade-up var(--t-base) var(--ease) both; }

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