/* ============================================================================
   SimpleIDGen — "The Statistical Almanac"
   A synthetic-population API styled as a printed statistical abstract:
   warm paper, ledger-red ink, ruled grids, tabular figures.
   Type: Fraunces (display) · Newsreader (body) · JetBrains Mono (data).
   No framework — a small set of .d-none/.text-* shims exists only so the
   pre-existing auth/history JS keeps working untouched.
   ========================================================================== */

:root {
  --paper:      #f4efe3;
  --paper-2:    #efe8d8;
  --paper-3:    #e9e0cc;
  --ink:        #1c1813;
  --ink-soft:   #4f463a;
  --ink-faint:  #8c7f6b;
  --rule:       #d7cbb2;
  --rule-soft:  #e3d9c4;
  --red:        #c23218;
  --red-deep:   #95230f;
  --red-wash:   #f0d9cf;
  --blue:       #28486b;
  --green:      #3c6440;

  --serif:   "Newsreader", Georgia, "Times New Roman", serif;
  --display: "Fraunces", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --maxw: 1120px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  position: relative;
  overflow-x: hidden;
}

/* Faint paper grain — sits under everything, never intercepts clicks. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input { font: inherit; }

::selection { background: var(--red); color: var(--paper); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--rule); border: 2px solid var(--paper-2); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-faint); }

/* ── Layout primitives ─────────────────────────────────────────────────────── */

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.75rem; position: relative; z-index: 1; }
.wrap--narrow { max-width: 540px; }
main { display: block; padding: 0 0 5rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.eyebrow--plain::after { display: none; }

/* ── Typography ────────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.05; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-weight: 900; }
p { color: var(--ink-soft); }
strong, b { font-weight: 600; color: var(--ink); }

.lead { font-size: 1.25rem; line-height: 1.5; color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }

code, .mono { font-family: var(--mono); font-size: 0.86em; }
code { color: var(--red-deep); background: var(--red-wash); padding: 0.08em 0.34em; border-radius: 2px; }

/* ── Masthead / nav ────────────────────────────────────────────────────────── */

.masthead {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  border-bottom: 1px solid var(--rule);
}
.masthead__row { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0.05em;
}
.brand b { color: var(--red); font-weight: 900; }

.nav-links { display: flex; align-items: center; gap: 0.25rem; list-style: none; }
/* Auth-aware nav: Profile (auth-in) hidden until SHELL_JS confirms a session;
   Login/Register (auth-out) hide once it does. */
.auth-in { display: none; }
.masthead.is-authed .auth-out { display: none; }
.masthead.is-authed .auth-in { display: block; }
.nav-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  padding: 0.45rem 0.7rem;
  border-radius: 3px;
  transition: color 0.15s, background 0.15s;
  position: relative;
}
.nav-link:hover { color: var(--ink); background: var(--paper-3); }
.nav-link.is-active { color: var(--red); }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.1rem;
  height: 2px; background: var(--red);
}
.nav-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--rule); border-radius: 3px; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 18px; height: 2px; background: var(--ink); position: relative; transition: 0.2s;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after  { position: absolute; top: 6px; }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 0.5rem 1.75rem 1rem; display: none;
    box-shadow: 0 24px 40px -24px rgba(28,24,19,0.4);
  }
  .nav-menu.is-open { display: flex; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-link { padding: 0.7rem 0.4rem; border-bottom: 1px solid var(--rule-soft); }
  .nav-link.is-active::after { display: none; }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--mono); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.03em;
  text-transform: uppercase; padding: 0.7rem 1.25rem; border-radius: 3px;
  border: 1px solid transparent; transition: transform 0.08s, background 0.15s, box-shadow 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 0.9rem 1.6rem; font-size: 0.85rem; }
.btn--block { width: 100%; }

.btn--red { background: var(--red); color: var(--paper); box-shadow: 0 2px 0 var(--red-deep); }
.btn--red:hover { background: var(--red-deep); box-shadow: 0 2px 0 var(--red-deep); color: var(--paper); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Hero ──────────────────────────────────────────────────────────────────── */

.hero { padding: 4.5rem 0 3rem; border-bottom: 1px solid var(--rule); }
.hero__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 3.5rem; align-items: center; }
.hero__title { font-size: clamp(2.6rem, 6vw, 4.5rem); margin: 1.4rem 0 0; }
.hero__title em { font-style: italic; color: var(--red); font-weight: 400; }
.hero__sub { font-size: 1.2rem; line-height: 1.55; color: var(--ink-soft); margin-top: 1.4rem; max-width: 32ch; }
.hero__cta { display: flex; gap: 0.75rem; margin-top: 2rem; flex-wrap: wrap; }

@media (max-width: 880px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__sub { max-width: none; }
}

/* Hero histogram — CSS age distribution, "FIG. 1". */
.fig {
  border: 1px solid var(--rule); background: var(--paper-2); border-radius: 4px;
  padding: 1.25rem 1.25rem 0.9rem;
}
.fig__cap { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-faint); display: flex; justify-content: space-between; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 190px; margin: 1rem 0 0.5rem; }
.hist__bar { flex: 1; background: var(--ink); border-radius: 1px 1px 0 0; transform-origin: bottom; animation: grow 0.9s cubic-bezier(0.2,0.8,0.2,1) backwards; }
.hist__bar.is-hi { background: var(--red); }
.hist__axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.6rem; color: var(--ink-faint); border-top: 1px solid var(--rule); padding-top: 0.4rem; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* Specimen (the curl command). */
.specimen {
  background: var(--ink); color: #e9e0cc; border-radius: 4px; overflow: hidden;
  box-shadow: 0 18px 40px -22px rgba(28,24,19,0.55);
}
.specimen__bar { display: flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-bottom: 1px solid rgba(255,255,255,0.08); }
.specimen__dot { width: 9px; height: 9px; border-radius: 50%; background: #5a5247; }
.specimen__dot--red { background: var(--red); }
.specimen__label { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: #8c8170; margin-left: auto; }
.specimen pre { margin: 0; padding: 1.1rem 1.25rem; overflow-x: auto; }
.specimen code { font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: #ece3d2; background: none; padding: 0; }
.specimen .tok-cmd { color: #f0a868; } .specimen .tok-flag { color: #9db7c9; } .specimen .tok-str { color: #b6c99a; } .specimen .tok-key { color: #e0d6c4; }

/* ── Figures / stat strip ──────────────────────────────────────────────────── */

.figures { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--paper-2); }
.figure { padding: 1.5rem 1.25rem; border-right: 1px solid var(--rule); }
.figure:last-child { border-right: none; }
.figure__num { font-family: var(--display); font-weight: 900; font-size: 2.6rem; line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure__num .u { color: var(--red); }
.figure__label { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin-top: 0.6rem; }
@media (max-width: 720px) {
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figure:nth-child(2) { border-right: none; }
  .figure:nth-child(1), .figure:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

/* ── Sections ──────────────────────────────────────────────────────────────── */

.section { padding: 4rem 0; }
.section--tight { padding: 3rem 0; }
.section__head { max-width: 60ch; margin-bottom: 2.5rem; }
.section__title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin-top: 1.2rem; }

.cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--rule); }
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--rule); }
@media (max-width: 760px) { .cols-2, .cols-3 { grid-template-columns: 1fr; } }

.entry { padding: 1.75rem 1.75rem 1.75rem 0; border-bottom: 1px solid var(--rule); border-right: 1px solid var(--rule); }
.entry:last-child { border-right: none; }
.cols-2 .entry:nth-child(2n) { padding-left: 1.75rem; border-right: none; }
.cols-2 .entry:nth-child(2n-1) { padding-right: 1.75rem; }
.cols-3 .entry { padding: 1.75rem; }
.cols-3 .entry:nth-child(3n) { border-right: none; }
.entry__no { font-family: var(--mono); font-size: 0.7rem; color: var(--red); letter-spacing: 0.1em; }
.entry__title { font-size: 1.2rem; margin: 0.5rem 0 0.6rem; }
.entry p { font-size: 0.98rem; }
@media (max-width: 760px) {
  .entry, .cols-2 .entry:nth-child(2n), .cols-2 .entry:nth-child(2n-1), .cols-3 .entry { padding: 1.5rem 0; border-right: none; }
}

/* ── Cards / panels ────────────────────────────────────────────────────────── */

.panel { border: 1px solid var(--rule); border-radius: 4px; background: var(--paper-2); }
.panel__head { padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--rule); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); display: flex; align-items: center; justify-content: space-between; }
.panel__body { padding: 1.25rem; }

.stamp {
  display: inline-block; font-family: var(--mono); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--red);
  border: 2px solid var(--red); border-radius: 4px; padding: 0.35rem 0.7rem;
  transform: rotate(-3deg); opacity: 0.85;
}

/* ── Marks / badges ────────────────────────────────────────────────────────── */

.mark { font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.22rem 0.5rem; border-radius: 2px; border: 1px solid; display: inline-flex; align-items: center; gap: 0.3rem; }
.mark--red { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.mark--green { color: var(--green); border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.mark--ink { color: var(--ink-soft); border-color: var(--rule); background: var(--paper); }

/* ── Ledger table ──────────────────────────────────────────────────────────── */

.ledger { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ledger thead th {
  font-family: var(--mono); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint); text-align: left;
  padding: 0.6rem 0.9rem; border-bottom: 2px solid var(--ink); white-space: nowrap;
}
.ledger tbody td { padding: 0.6rem 0.9rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; color: var(--ink-soft); }
.ledger tbody tr:hover td { background: var(--paper-3); }
.ledger code { background: none; color: var(--ink); padding: 0; font-weight: 500; }
.table-scroll { overflow-x: auto; border: 1px solid var(--rule); border-radius: 4px; }

/* ── Tabs (vanilla) ────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; }
.tab {
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.03em; color: var(--ink-faint);
  padding: 0.7rem 1.05rem; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color 0.15s;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--red); border-bottom-color: var(--red); }
.panes { padding-top: 1.75rem; }
.pane { display: none; }
.pane.is-active { display: block; animation: fade 0.3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* code tab group */
.codetabs { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.codetabs .tabs { background: var(--paper-2); border-bottom: 1px solid var(--rule); padding: 0 0.4rem; }
.codetabs .panes { padding: 0; }
.codetabs .pane { background: var(--ink); }
.codetabs pre { margin: 0; padding: 1.15rem 1.25rem; overflow-x: auto; }
.codetabs code { font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; color: #e9e0cc; background: none; padding: 0; white-space: pre; }

/* ── Code block + copy ─────────────────────────────────────────────────────── */

.codeblock { position: relative; background: var(--ink); border-radius: 4px; overflow: hidden; }
.codeblock pre { margin: 0; padding: 1.15rem 1.25rem; overflow-x: auto; }
.codeblock code { font-family: var(--mono); font-size: 0.8rem; line-height: 1.7; color: #e9e0cc; background: none; padding: 0; white-space: pre; }
.copy-btn {
  position: absolute; top: 0.6rem; right: 0.6rem; font-family: var(--mono); font-size: 0.64rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #c9bda8;
  border: 1px solid rgba(255,255,255,0.18); background: rgba(255,255,255,0.05);
  padding: 0.28rem 0.55rem; border-radius: 3px; opacity: 0; transition: opacity 0.15s, color 0.15s; z-index: 2;
}
.codeblock:hover .copy-btn, .specimen:hover .copy-btn { opacity: 1; }
.copy-btn:hover { color: #fff; border-color: var(--red); }

/* ── Try-it widget ─────────────────────────────────────────────────────────── */

.tryout__out { max-height: 360px; overflow: auto; margin-top: 1rem; }
.tryout__out pre { margin: 0; padding: 1rem 1.1rem; }

/* ── Forms ─────────────────────────────────────────────────────────────────── */

.field { margin-bottom: 1.1rem; }
.label { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 0.4rem; }
.input {
  width: 100%; padding: 0.7rem 0.85rem; background: var(--paper); border: 1px solid var(--rule);
  border-radius: 3px; color: var(--ink); transition: border-color 0.15s, box-shadow 0.15s; font-family: var(--mono); font-size: 0.92rem;
}
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-wash); }
.input::placeholder { color: var(--ink-faint); }
.help { font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.35rem; }

.alert { padding: 0.75rem 1rem; border-radius: 3px; border: 1px solid; font-size: 0.92rem; margin-bottom: 1.25rem; font-family: var(--mono); font-size: 0.82rem; }
.alert-danger { color: var(--red-deep); border-color: var(--red); background: var(--red-wash); }
.alert-success { color: var(--green); border-color: color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }

/* ── Key/value (profile) ───────────────────────────────────────────────────── */

.kv { display: grid; grid-template-columns: 160px 1fr; border-top: 1px solid var(--rule); }
.kv dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); padding: 0.7rem 0; border-bottom: 1px solid var(--rule-soft); }
.kv dd { padding: 0.7rem 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink); }
.kv dd code { background: none; padding: 0; color: var(--ink); }
@media (max-width: 560px) { .kv { grid-template-columns: 1fr; } .kv dt { padding-bottom: 0; border-bottom: none; } .kv dd { padding-top: 0.2rem; } }

/* ── Modal (vanilla) ───────────────────────────────────────────────────────── */

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 1.5rem; background: rgba(28,24,19,0.5); backdrop-filter: blur(2px); }
.modal.is-open { display: flex; animation: fade 0.2s ease; }
.modal__panel { background: var(--paper); border: 1px solid var(--ink); border-radius: 4px; max-width: 640px; width: 100%; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 2px solid var(--ink); }
.modal__head h2 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.modal__close { font-family: var(--mono); font-size: 1.1rem; color: var(--ink-faint); padding: 0 0.3rem; }
.modal__close:hover { color: var(--red); }
.modal__body { padding: 1.25rem; overflow-y: auto; }

/* ── Pricing ───────────────────────────────────────────────────────────────── */

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: stretch; }
@media (max-width: 760px) { .prices { grid-template-columns: 1fr; } }
.price { border: 1px solid var(--rule); border-radius: 4px; background: var(--paper-2); padding: 2rem; display: flex; flex-direction: column; position: relative; }
.price--feat { border: 2px solid var(--ink); }
.price__tag { position: absolute; top: -0.7rem; right: 1.5rem; }
.price__name { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-faint); }
.price__amt { font-family: var(--display); font-weight: 900; font-size: 3.4rem; line-height: 1; letter-spacing: -0.02em; margin: 0.8rem 0 0.2rem; font-variant-numeric: tabular-nums; }
.price__amt .per { font-family: var(--serif); font-weight: 400; font-size: 1rem; color: var(--ink-faint); letter-spacing: 0; }
.price__desc { font-size: 0.95rem; color: var(--ink-soft); margin: 0.6rem 0 1.4rem; }
.price__list { list-style: none; margin: 0 0 1.6rem; flex: 1; }
.price__list li { padding: 0.5rem 0; border-bottom: 1px solid var(--rule-soft); font-size: 0.92rem; display: flex; gap: 0.6rem; }
.price__list li:last-child { border-bottom: none; }
.price__list .ck { color: var(--red); font-weight: 700; }

/* ── FAQ ───────────────────────────────────────────────────────────────────── */

.faq { border-top: 1px solid var(--rule); }
.faq__item { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.6rem; }
.faq__q { font-family: var(--display); font-weight: 600; font-size: 1.08rem; }
.faq__no { font-family: var(--mono); font-size: 0.7rem; color: var(--red); padding-top: 0.35rem; }
.faq__a { font-size: 0.96rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* ── Breadcrumb ────────────────────────────────────────────────────────────── */

.crumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 1.5rem; }
.crumb a:hover { color: var(--red); }
.crumb span { color: var(--rule); margin: 0 0.5rem; }

/* ── Reports iframe ────────────────────────────────────────────────────────── */

/* Native analysis reports (rendered from metrics.json) */
.report__title { font-family: var(--display); font-weight: 900; font-size: 1.6rem; letter-spacing: -0.01em; margin: 0 0 0.75rem; }
.report__meta { font-family: var(--mono); font-size: 0.78rem; line-height: 1.7; color: var(--ink-faint); margin: 0.75rem 0 0; }
.report__h { font-family: var(--display); font-weight: 800; font-size: 1.25rem; margin: 2.75rem 0 0.5rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
.report .ledger { margin-top: 0.85rem; }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.25rem; margin-top: 1.1rem; }
.chart { margin: 0; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #fff; }
.chart img { display: block; width: 100%; height: auto; }
.chart figcaption { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-faint); padding: 0.5rem 0.7rem; border-top: 1px solid var(--rule); background: var(--paper-2); }
.chart { cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease; }
.chart:hover { border-color: var(--ink); box-shadow: 0 8px 22px -12px rgba(0,0,0,0.4); }
.chart:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.chart__zoom { float: right; margin-left: 0.5rem; color: var(--ink-faint); }
.chart:hover .chart__zoom { color: var(--red); }
.modal__panel--wide { max-width: 900px; }
.chart-modal__img { width: 100%; height: auto; display: block; border: 1px solid var(--rule); border-radius: 4px; }

/* ── Hero "what you get" callout band ──────────────────────────────────────── */

.band { background: var(--ink); color: var(--paper); border-radius: 4px; padding: 2.5rem; display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.band h2 { color: var(--paper); font-size: clamp(1.6rem, 3vw, 2.2rem); }
.band p { color: #c9bda8; margin-top: 0.5rem; }
.band .btn--ghost { border-color: var(--paper); color: var(--paper); }
.band .btn--ghost:hover { background: var(--paper); color: var(--ink); }

/* ── 404 ───────────────────────────────────────────────────────────────────── */

.notfound { text-align: center; padding: 6rem 0; }
.notfound__code { font-family: var(--display); font-weight: 900; font-size: clamp(6rem, 18vw, 12rem); line-height: 0.9; color: var(--ink); }
.notfound__code em { color: var(--red); font-style: italic; }

/* ── Footer / colophon ─────────────────────────────────────────────────────── */

.colophon { border-top: 3px double var(--rule); padding: 2.5rem 0; margin-top: 2rem; }
.colophon__row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.colophon__links { display: flex; gap: 1.5rem; font-family: var(--mono); font-size: 0.76rem; }
.colophon__links a { color: var(--ink-soft); }
.colophon__links a:hover { color: var(--red); }
.colophon__meta { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-faint); letter-spacing: 0.04em; }

/* ── Reveal-on-load (CSS only; content visible if no anim support) ─────────── */

.reveal { animation: rise 0.7s cubic-bezier(0.2,0.8,0.2,1) backwards; }
.reveal[style*="--d"] { animation-delay: calc(var(--d) * 0.08s); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; scroll-behavior: auto !important; }
}

/* ── Compatibility shims (used ONLY by pre-existing auth/history JS) ────────── */

.d-none { display: none !important; }
.text-muted { color: var(--ink-faint) !important; }
.text-success { color: var(--green) !important; }
.text-warning { color: #9a6a1a !important; }
.text-danger { color: var(--red) !important; }
.fw-semibold { font-weight: 600; }
.font-monospace { font-family: var(--mono); }
.text-break { word-break: break-word; }
.badge { font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.18rem 0.45rem; border-radius: 2px; border: 1px solid var(--rule); }
.text-bg-secondary { background: var(--paper-3); color: var(--ink-soft); }
.user-select-all { user-select: all; }
@media (max-width: 575.98px) { .d-sm-table-cell { display: none !important; } }
@media (max-width: 767.98px) { .d-md-table-cell { display: none !important; } }
