/* ============================================================================
   ledgerworks.systems — site.css   ·   v2 design pass (2026-05-21)
   width pass 2026-05-21 — self-adjusting frame (was a fixed 1064px column)

   Museum-grade engineering-document. Reference feel: a geological survey,
   Bell Labs, a railroad archive, a 1950s engineering institution, an energy
   observatory. Ink / charcoal · cream paper · steel gray · one oxidized-iron
   accent. Restraint, exact rule, generous paper, authoritative type.

   System serif + monospace only — no web fonts (CSP-tight, fast, archival-
   stable). No gradients, no animation libraries. The craft is in the type
   scale, the baseline rhythm, the rules, and the white space.
   ========================================================================= */

:root {
  /* — palette: ink, paper, steel, one accent — */
  --ink:        #14110e;   /* near-black, warm — primary text          */
  --charcoal:   #2b2823;   /* charcoal — hero, footer, dark surfaces    */
  --charcoal-2: #262320;   /* a half-step deeper — inset on charcoal    */
  --steel:      #5c5a54;   /* steel gray — secondary text, rules        */
  --steel-pale: #8a877f;   /* faded steel — captions, metadata          */
  --paper:      #f4f1e8;   /* cream paper — the page ground             */
  --paper-warm: #ece7d8;   /* warmer cream — inset panels               */
  --line:       #d8d2c1;   /* hairline rule on paper                    */
  --line-firm:  #c3bca9;   /* a firmer rule                             */
  --ember:      #8a3b1e;   /* oxidized iron — the single accent, sparing*/
  --cream-dim:  #cdc7b6;   /* cream, dimmed — text on charcoal          */

  --measure:    78ch;      /* the reading measure — wide editorial      */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Georgia, "Times New Roman", serif;
  --mono:  "SFMono-Regular", "DejaVu Sans Mono", "Liberation Mono",
           Consolas, "Courier New", monospace;
}

/* — reset — */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.66;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* the binding edge — a document has a top */
body::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--ink);
}

/* — the page frame — self-adjusting: it uses the full viewport on laptops
   and ordinary monitors, caps on very large screens, and carries
   proportional gutters at every size. No fixed-width column. — */
.frame {
  width: 100%;
  max-width: 1500px;
  margin-inline: auto;
  padding-inline: clamp(24px, 5vw, 92px);
}

/* a small typographic primitive: the mono label, used throughout */
.mono-label,
.section-label,
.hero-kicker,
.wordmark,
nav.primary a,
figcaption,
.data-panel .panel-label,
.data-panel .panel-status,
footer.colophon h4,
.build-line,
.hero-plate .plate-cap {
  font-family: var(--mono);
  font-feature-settings: "tnum" 1;
}

/* ── masthead ──────────────────────────────────────────────────────────── */
.masthead { border-bottom: 1px solid var(--ink); padding: 30px 0 20px; }
.masthead .frame {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 30px;
}
.wordmark {
  font-size: 14.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.wordmark .mark-sub {
  display: block;
  font-size: 10px;
  letter-spacing: 0.165em;
  color: var(--steel);
  margin-top: 5px;
  font-weight: 400;
}
nav.primary { display: flex; gap: 24px; flex-wrap: wrap; }
nav.primary a {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .12s ease;
}
nav.primary a:hover { color: var(--ink); border-bottom-color: var(--line-firm); }
nav.primary a.current { color: var(--ink); border-bottom-color: var(--ink); }

/* ── hero — the frontispiece ───────────────────────────────────────────── */
.hero {
  background: var(--charcoal);
  color: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.hero .frame {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: clamp(48px, 6vw, 96px);
  align-items: center;
  padding-block: 88px 94px;
}
.hero-kicker {
  font-size: 11px;
  letter-spacing: 0.215em;
  text-transform: uppercase;
  color: var(--steel-pale);
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #46433c;
}
.hero h1 {
  font-size: clamp(33px, 4.4vw, 52px);
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.007em;
  margin: 0 0 22px;
  color: var(--paper);
  max-width: 18ch;
}
.hero .lede {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--cream-dim);
  max-width: 42ch;
  margin: 0;
}

/* the carbon plate — a framed museum figure on the hero */
.hero-plate { margin: 0; }
.hero-plate .plate-rule {
  border: 1px solid #4b483f;
  background: var(--charcoal-2);
  padding: clamp(20px, 2.4vw, 34px) clamp(24px, 2.8vw, 40px) clamp(18px, 2vw, 28px);
}
.hero-plate svg { display: block; width: 100%; height: auto; }
.hero-plate .plate-cap {
  display: block;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #46433c;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel-pale);
  line-height: 1.55;
}
.hero-plate .plate-cap .plate-no { color: var(--cream-dim); }

/* ── generic section bands ─────────────────────────────────────────────── */
section.band { padding: clamp(52px, 5.4vw, 76px) 0; border-bottom: 1px solid var(--line); }
section.band:last-of-type { border-bottom: none; }
section.band.inset { background: var(--paper-warm); }

.section-label {
  font-size: 11px;
  letter-spacing: 0.215em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 18px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line-firm);
  display: block;
}

h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  font-weight: 600;
  line-height: 1.26;
  letter-spacing: -0.003em;
  margin: 0 0 20px;
  max-width: 26ch;
}
h3 {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  margin: 32px 0 9px;
}

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

/* the lead paragraph after a section heading reads a step larger */
section.band > .frame > p:first-of-type {
  font-size: 20.5px;
  line-height: 1.58;
  color: #34302a;
  max-width: 66ch;
}
p.standfirst {
  font-size: 20.5px;
  line-height: 1.58;
  color: #34302a;
  max-width: 66ch;
}

a {
  color: var(--ember);
  text-decoration: none;
  border-bottom: 1px solid var(--line-firm);
}
a:hover { border-bottom-color: var(--ember); }
strong { font-weight: 600; }
em { font-style: italic; }

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

/* ── figure / plate (archival image placeholders) ──────────────────────── */
figure.plate { margin: 34px 0; }
figure.plate .plate-frame {
  background: var(--charcoal);
  border: 1px solid var(--ink);
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
}
figure.plate .plate-frame .plate-note {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--steel-pale);
  text-align: center;
  padding: 0 24px;
}
figcaption {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 11px;
  padding-left: 14px;
  border-left: 2px solid var(--line-firm);
  max-width: var(--measure);
  line-height: 1.6;
}

/* ── the ledger — a numbered index (carbon states, holdings) ────────────── */
.ledger { border-top: 1px solid var(--ink); margin: 30px 0 4px; }
.ledger .entry {
  display: grid;
  grid-template-columns: 4ch 1fr;
  gap: 0 28px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.ledger .entry .entry-no {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ember);
  padding-top: 4px;
  letter-spacing: 0.04em;
}
.ledger .entry h3 { margin: 0 0 6px; font-size: 18px; }
.ledger .entry p { margin: 0; font-size: 16.5px; color: #34302a; max-width: 74ch; }

/* ── data panel (the live-data hook surface) ───────────────────────────── */
.data-panel {
  background: var(--paper-warm);
  border: 1px solid var(--line-firm);
  border-left: 3px solid var(--steel);
  padding: 24px 28px;
  margin: 30px 0;
}
.data-panel .panel-label {
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0 0 10px;
}
.data-panel table { width: 100%; border-collapse: collapse; font-size: 15px; }
.data-panel th, .data-panel td {
  text-align: left;
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--line);
}
.data-panel th {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--steel);
  font-weight: 600;
}
.data-panel td.num { font-family: var(--mono); text-align: right; }
.data-panel .panel-status {
  font-size: 11px;
  color: var(--steel-pale);
  margin-top: 12px;
  letter-spacing: 0.03em;
}
.data-panel.placeholder {
  border-left-color: var(--line-firm);
  background: transparent;
}
.data-panel.placeholder .panel-body {
  font-family: var(--serif);
  font-size: 16px;
  color: var(--steel);
  line-height: 1.62;
  max-width: 64ch;
}
.data-panel.placeholder .panel-body code {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
}

/* ── two / three column grids ──────────────────────────────────────────── */
.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 26px clamp(40px, 4vw, 64px); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px clamp(34px, 3.4vw, 56px); }
.cols-2 > div, .cols-3 > div { padding-top: 18px; border-top: 2px solid var(--ink); }
.cols-2 h3, .cols-3 h3 { margin: 0 0 8px; font-size: 17px; }
.cols-2 p, .cols-3 p { max-width: none; font-size: 16.5px; color: #34302a; }

/* ── pull quote ────────────────────────────────────────────────────────── */
blockquote.pull {
  margin: 0;
  padding: 6px 0 6px 30px;
  border-left: 3px solid var(--ember);
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.46;
  color: #34302a;
  max-width: 58ch;
  font-style: italic;
}

/* ── colophon / footer ─────────────────────────────────────────────────── */
footer.colophon {
  background: var(--charcoal);
  color: var(--steel-pale);
  border-top: 3px solid var(--ink);
  padding: 54px 0 42px;
  font-size: 14px;
}
footer.colophon .frame {
  display: grid;
  grid-template-columns: 2fr 1fr 1.1fr;
  gap: clamp(34px, 4vw, 64px);
}
footer.colophon h4 {
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--paper);
  margin: 0 0 14px;
  font-weight: 600;
  padding-bottom: 9px;
  border-bottom: 1px solid #46433c;
}
footer.colophon p { max-width: 44ch; margin: 0 0 9px; line-height: 1.6; }
footer.colophon a { color: var(--cream-dim); border-bottom-color: #56534a; }
footer.colophon a:hover { color: var(--paper); border-bottom-color: var(--steel-pale); }
nav.footer-nav a { display: block; margin: 0 0 7px; border-bottom: none; }
nav.footer-nav a:hover { color: var(--paper); }
footer.colophon .build-line {
  font-size: 10.5px;
  color: var(--steel);
  margin-top: 34px;
  padding-top: 16px;
  border-top: 1px solid #3a3730;
  letter-spacing: 0.04em;
}

/* ── responsive ────────────────────────────────────────────────────────── */
@media (max-width: 880px) {
  body { font-size: 17.5px; }
  .hero .frame {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-block: 58px 62px;
  }
  .hero-plate { max-width: 420px; }
  .cols-2, .cols-3, footer.colophon .frame { grid-template-columns: 1fr; }
  .cols-2 { gap: 0; }
  .cols-2 > div, .cols-3 > div { margin-top: 4px; }
  .masthead .frame { flex-direction: column; align-items: flex-start; }
}
