/* NMI Blogger — design tokens
   Ledger / trade-journal aesthetic: masthead nameplate, hairline rules,
   data set in monospace, editorial serif headlines. */

:root {
  --ink: #16233A;
  --paper: #F1F2EE;
  --surface: #FBFAF7;
  --slate: #2B3340;
  --muted: #5C6470;
  --steel: #3E5C76;
  --brass: #B9791F;
  --brass-deep: #8F5D15;
  --line: #D8DAD3;
  --line-strong: #B8BBB2;
  --good: #3F6E52;
  --warn: #A6432A;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --max: 920px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

a { color: var(--steel); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brass-deep); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

img, svg { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- masthead ---------- */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line-strong); }
.masthead-top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 20px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--brass-deep); }
.wordmark:hover { color: var(--ink); }
.tagline { margin: 0; color: var(--muted); font-size: 0.95rem; font-style: italic; font-family: var(--font-display); }

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brass); color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 46px 0 8px; }
.hero .kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
  margin: 0 0 10px;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
  max-width: 18ch;
}
.hero p.lede {
  font-size: 1.1rem;
  color: var(--slate);
  max-width: 62ch;
}

h1, h2, h3 { font-family: var(--font-display); color: var(--ink); font-weight: 600; }
h2 { font-size: 1.55rem; margin: 2.4em 0 0.7em; border-top: 1px solid var(--line); padding-top: 0.9em; }
main .wrap > h2:first-of-type,
article h2:first-of-type { border-top: none; padding-top: 0; margin-top: 1.2em; }
h3 { font-size: 1.18rem; margin: 1.6em 0 0.5em; }
p { max-width: 68ch; }
main ul, main ol { max-width: 68ch; padding-left: 1.3em; }
li { margin: 0.35em 0; }

section { padding: 8px 0 30px; }

/* ---------- hero figure / photography ---------- */
figure.hero-figure {
  margin: 22px 0 6px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
figure.hero-figure img { width: 100%; height: auto; }
figure.hero-figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--muted);
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}
figure.hero-figure.diagram { max-width: 420px; }
figure.hero-figure.diagram img { padding: 18px; background: #fff; }

/* ---------- ledger table ---------- */
.ledger { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: 0.95rem; }
.ledger caption { text-align: left; font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin-bottom: 6px; }
.ledger th, .ledger td { border-bottom: 1px solid var(--line); padding: 10px 14px 10px 0; text-align: left; vertical-align: top; }
.ledger thead th { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line-strong); }
.ledger td.num, .ledger th.num { font-family: var(--font-mono); }
.ledger tbody tr:last-child td { border-bottom: 1px solid var(--line-strong); }
.grade { font-family: var(--font-mono); font-weight: 600; padding: 1px 7px; border: 1px solid var(--line-strong); }
.grade.a { color: var(--good); border-color: var(--good); }
.grade.b { color: var(--steel); border-color: var(--steel); }
.grade.c { color: var(--brass-deep); border-color: var(--brass-deep); }

/* ---------- verdict panel ---------- */
.verdict {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 20px 22px;
  margin: 1.6em 0;
}
.verdict h3 { margin-top: 0; }
.verdict .score {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.verdict-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 620px) { .verdict-cols { grid-template-columns: 1fr; } }
.verdict-cols h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: none; margin: 0 0 6px; color: var(--muted); }
.verdict-cols ul { margin: 0; padding-left: 1.1em; font-size: 0.95rem; }

/* ---------- cards for hub pages ---------- */
.link-list { list-style: none; padding: 0; margin: 1.2em 0; }
.link-list li { border-top: 1px solid var(--line); padding: 16px 0; margin: 0; }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a.title { font-family: var(--font-display); font-size: 1.15rem; text-decoration: none; color: var(--ink); }
.link-list a.title:hover { color: var(--brass-deep); }
.link-list p { margin: 6px 0 0; color: var(--muted); font-size: 0.96rem; }

.pillbar { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin: 6px 0 0; }

blockquote {
  border-left: 3px solid var(--brass); margin: 1.4em 0; padding: 4px 0 4px 18px;
  color: var(--slate); font-family: var(--font-display); font-style: italic; max-width: 60ch;
}

.callout {
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--steel);
  padding: 14px 18px;
  margin: 1.4em 0;
  background: var(--surface);
  font-size: 0.96rem;
  max-width: 68ch;
}
.callout.warn { border-left-color: var(--warn); }

/* ---------- forms ---------- */
form.contact-form { max-width: 480px; margin-top: 1.4em; }
.field { margin-bottom: 16px; }
.field label { display: block; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line-strong); background: var(--surface);
  padding: 10px 12px; font-family: var(--font-body); font-size: 0.96rem; color: var(--slate);
}
.field textarea { min-height: 120px; resize: vertical; }
button.btn, .btn {
  display: inline-block;
  background: var(--ink);
  color: #F1F2EE;
  border: none;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 22px;
  cursor: pointer;
  text-decoration: none;
}
button.btn:hover, .btn:hover { background: var(--brass-deep); color: #fff; }

/* ---------- footer ---------- */
footer.site-footer { border-top: 1px solid var(--line-strong); background: var(--surface); margin-top: 60px; }
.footer-grid {
  max-width: var(--max); margin: 0 auto; padding: 40px 24px 20px;
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px;
}
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); margin: 0 0 10px; font-weight: 500; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 6px 0; }
.footer-grid a { color: var(--slate); text-decoration: none; font-size: 0.94rem; }
.footer-grid a:hover { color: var(--brass-deep); }
.footer-brand { font-family: var(--font-display); font-size: 1.2rem; color: var(--ink); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; }
.disclaimer {
  max-width: var(--max); margin: 0 auto; padding: 0 24px 20px;
  font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; max-width: none;
}
.disclaimer p { max-width: 90ch; }
.copyright { max-width: var(--max); margin: 0 auto; padding: 0 24px 30px; font-size: 0.8rem; color: var(--muted); font-family: var(--font-mono); }

/* ---------- 404 ---------- */
.error-page { padding: 90px 0; text-align: left; }
.error-page .kicker { font-family: var(--font-mono); color: var(--warn); }
