/* FORENSIC LEDGER — monochrome ink on paper-white, one deep-teal accent,
   tabular numerals, hairline rules. Evidence tables are the identity. */
:root {
  --ink: #1c1c1a;
  --paper: #fbfaf7;
  --accent: #0e6b63;
  --rule: #d9d6cd;
  --muted: #6b6a64;
  /* Legacy aliases kept so nothing referencing them breaks. */
  --ink-soft: #6b6a64;
  --accent-dark: #0a5049;
  --paper-soft: #f4f2ec;
  --line: #d9d6cd;
  --ok: #0e6b63;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.wrap { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }
h1, h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.005em;
}
/* Ink masthead band — the graphic anchor (3A). White mark at cap height
   of the wordmark, never larger. */
header.site {
  border-bottom: 1px solid var(--ink);
  background: var(--ink);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700; font-size: 1.25rem; color: var(--paper);
  text-decoration: none; letter-spacing: 0.02em;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.brand img { height: 0.72em; width: auto; display: block; }
nav.site {
  display: flex; align-items: center; gap: 1.1rem;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; max-width: 100%;
}
nav.site::-webkit-scrollbar { display: none; }
nav.site a {
  color: #d8d6cf; text-decoration: none;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  white-space: nowrap;
}
nav.site a:hover, nav.site a.active { color: #ffffff; }
.hero {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 3.5rem 0 3rem;
}
.hero h1 { font-size: 2.2rem; line-height: 1.2; margin: 0 0 0.75rem; max-width: 36rem; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 40rem; margin: 0 0 1.5rem; }
main { padding: 2.5rem 0; }
h2 {
  font-size: 1.45rem; margin-top: 2.4rem;
  padding-bottom: 0.45rem; border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.02rem; }
p, li { color: var(--ink); }
.muted { color: var(--muted); }
a { color: var(--accent); }
.btn {
  display: inline-block; background: var(--accent); color: var(--paper);
  padding: 0.65rem 1.4rem; border-radius: 2px; text-decoration: none;
  font-weight: 600; border: 1px solid var(--accent); font-size: 0.9rem;
  cursor: pointer; text-transform: uppercase; letter-spacing: 0.08em;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; margin: 1.5rem 0; }
.card {
  border: 1px solid var(--rule); border-radius: 0; padding: 1.1rem 1.25rem;
  background: var(--paper);
  border-top: 2px solid var(--ink);
}
.card h3 { margin-top: 0; }
.badge {
  display: inline-block; font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 0; padding: 0.1rem 0.5rem;
  vertical-align: middle; margin-left: 0.4rem;
}
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; margin: 1rem 0; padding-left: 2.6rem; position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero); position: absolute;
  left: 0; top: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: var(--accent); font-weight: 600; font-size: 0.95rem;
  border-bottom: 1px solid var(--rule); padding-bottom: 0.1rem;
}
.notice {
  border: 1px solid var(--rule); border-left: 2px solid var(--accent);
  background: var(--paper);
  padding: 0.8rem 1rem; margin: 1.4rem 0; border-radius: 0;
}
.draft-banner {
  background: var(--paper); border: 1px solid var(--ink); color: var(--ink);
  padding: 0.8rem 1rem; border-radius: 0; font-weight: 600; margin: 1.4rem 0;
  letter-spacing: 0.02em;
}
form.lead { max-width: 30rem; }
form.lead label {
  display: block; font-weight: 600; margin: 0.9rem 0 0.25rem;
  font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
}
form.lead input, form.lead textarea {
  width: 100%; padding: 0.55rem 0.7rem; border: 1px solid var(--rule);
  border-radius: 0; font: inherit; background: #fff; color: var(--ink);
}
form.lead input:focus, form.lead textarea:focus {
  outline: 1px solid var(--accent); outline-offset: -1px;
}
form.lead textarea { min-height: 7rem; }
form.lead .btn { margin-top: 1.1rem; }
#form-status { margin-top: 0.8rem; font-weight: 600; }
footer.site {
  border-top: 1px solid var(--rule); margin-top: 3rem;
  padding: 1.5rem 0 2rem; color: var(--muted); font-size: 0.9rem;
}
footer.site a { color: var(--muted); }
table.plain { border-collapse: collapse; width: 100%; margin: 1.2rem 0; }
table.plain th, table.plain td {
  text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
}
table.plain th {
  font-weight: 600; font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  border-bottom: 1px solid var(--ink);
}

/* .ledger — the evidence-table identity: tabular numerals in a
   monospace-leaning stack, hairline row rules, a subtle ruled header. */
table.ledger, .ledger table { border-collapse: collapse; }
.ledger {
  width: 100%; max-width: 40rem; margin: 1.6rem 0 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  border-collapse: collapse;
  background: var(--paper);
}
.ledger th, .ledger td {
  text-align: left; padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.ledger thead th {
  font-weight: 400; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.ledger .num, .ledger td.num, .ledger th.num {
  text-align: right; font-variant-numeric: tabular-nums;
}
.ledger .flag { color: var(--accent); }
.ledger tfoot td {
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  font-weight: 600;
}
.ledger caption {
  caption-side: bottom; text-align: left; color: var(--muted);
  font-family: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.8rem; padding: 0.45rem 0 0;
}

/* .figure — inline emphasis for programmatically injected figures. */
.figure {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.01em;
}

@media (max-width: 700px) {
  header.site .wrap { flex-wrap: nowrap; }
  nav.site { gap: 0.8rem; }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 1.6rem; }
  .ledger { display: block; overflow-x: auto; }
  /* Tabs stay tabs on mobile: the panel slot scrolls, tables stay tables. */
  .hero-tabs .ledger, .hero-frame .ledger { display: table; }
}

/* ——— Phase 3 visual identity ——— */

/* 3B hero: full-bleed tinted band — a distinct zone, not the top of a
   text document. Teal wash over paper, hairline base. */
.hero {
  background: linear-gradient(0deg, rgba(14, 107, 99, 0.06),
    rgba(14, 107, 99, 0.06)), var(--paper);
}

/* 3B tabbed evidence frame: CSS-only radio tabs (work with JS disabled);
   panels grid-stack in one slot so switching cannot shift layout — the
   container is always as tall as the tallest panel. */
.hero-tabs, .hero-frame { max-width: 40rem; margin: 1.6rem 0 0; }
.hero-tabs > input[type="radio"] {
  position: absolute; opacity: 0; pointer-events: none;
}
.tab-strip { display: flex; border-bottom: 1px solid var(--ink); }
.tab-strip label {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); padding: 0.4rem 0.9rem; cursor: pointer;
  border: 1px solid transparent; border-bottom: none; white-space: nowrap;
}
#hero-tab-dd:checked ~ .tab-strip label[for="hero-tab-dd"],
#hero-tab-cam:checked ~ .tab-strip label[for="hero-tab-cam"] {
  color: var(--ink); border-color: var(--ink); background: var(--paper);
  font-weight: 600;
}
.tab-panels { display: grid; overflow-x: auto; }
.tab-panels > table { grid-area: 1 / 1; visibility: hidden; }
#hero-tab-dd:checked ~ .tab-panels > .panel-dd,
#hero-tab-cam:checked ~ .tab-panels > .panel-cam { visibility: visible; }
.hero-tabs .tab-caption, .hero-frame .tab-caption { color: var(--muted); font-size: 0.8rem; margin: 0.45rem 0 0; }
.ledger.evidence { max-width: none; width: 100%; }
.hero-frame { overflow-x: auto; }
.ledger.evidence th[scope="row"] {
  font-weight: 400; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted); vertical-align: top;
}
.ledger.evidence td { white-space: normal; }
.ledger.evidence td.num { white-space: nowrap; vertical-align: top; }

/* 3C section rhythm: white / very light tint alternation. */
section.band { padding: 0.2rem 0 1.4rem; }
section.band.alt {
  background: var(--paper-soft);
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}

/* 3D footer */
footer.site .foot-brand { display: flex; align-items: center; gap: 0.5rem; }
footer.site .foot-brand img { height: 0.9em; width: auto; }
footer.site .stage-line { font-size: 0.8rem; }

/* 3E founder */
.founder-card {
  display: flex; gap: 1.4rem; align-items: flex-start; flex-wrap: wrap;
  margin: 1.2rem 0;
}
.founder-card img.portrait {
  width: 180px; height: auto; border: 1px solid var(--rule); display: block;
}
.founder-card .founder-detail { flex: 1 1 18rem; }
.founder-card h3 { margin: 0 0 0.3rem; }
