/* =========================================================
   Unmitigated Wisdom — site stylesheet
   One file used by every page. Layers:

     1. Design tokens      (:root)
     2. Reset + base
     3. Layout wrapper     (.wrap + .wide / .dashboard)
     4. Top nav            (nav.top)
     5. Page headers       (hero, post-head / page-head, ledger site)
     6. Site widgets       (stats, cards, reports-list, feed-list,
                            method, social-list)
     7. Prose vocabulary   (article.post-body.prose + everything
                            allowed inside it)
     8. Ledger widgets     (.post, .msgnum, .thread-children, .photo)
     9. Mixture of Experts (stats-grid, rating, acc-bar, controls,
                            pred-row, loading)
    10. Footer
    11. Responsive
   ========================================================= */

/* ---- 1. Design tokens ---- */
:root {
  /* Palette */
  --bg: #fafaf7;
  --fg: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #b8342f;
  --amber: #c47a1e;
  --green: #2a7a4a;
  --border: #e5e2d9;
  --card: #ffffff;
  --soft: #f4f1e8;
  --accent-tint: #fdf2f1;
  --thread-line: #d6d0bf;

  /* Fact-check rating palette (ledger badges, MoE) */
  --r-true:        #2a7a4a;
  --r-mostly-true: #6ba07e;
  --r-partial:     #c9a548;
  --r-mostly-false:#d08247;
  --r-false:       #c0392b;
  --r-unresolved:  #b8b3a4;

  /* Typography */
  --font-serif: ui-serif, Georgia, 'Iowan Old Style', 'Palatino Linotype', serif;
  --font-sans:  ui-sans-serif, system-ui, sans-serif;

  /* Page measures (max content widths) */
  --measure-narrow:    680px;  /* prose column inside posts */
  --measure-hub:       860px;  /* standard pages: home, about, reports, ledger */
  --measure-wide:      980px;  /* post wrapper (wider than inner prose) */
  --measure-dashboard: 1100px; /* mixture-of-experts explorer */
}

/* ---- 2. Reset + base ---- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-serif);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 3. Layout wrapper ---- */
.wrap          { max-width: var(--measure-hub);       margin: 0 auto; padding: 56px 24px 100px; }
.wrap.wide     { max-width: var(--measure-wide);      padding: 32px 20px 80px; }
.wrap.dashboard{ max-width: var(--measure-dashboard); padding: 32px 20px 80px; }

/* ---- 4. Top nav ---- */
nav.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.88rem;
}
nav.top .brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
nav.top .brand img { display: block; height: 36px; width: auto; }
nav.top .brand:hover { text-decoration: none; }
nav.top ul { list-style: none; display: flex; gap: 22px; margin: 0; padding: 0; }
nav.top ul a { color: var(--muted); }
nav.top ul a:hover { color: var(--accent); text-decoration: none; }
nav.top ul a.disabled { opacity: 0.5; cursor: not-allowed; }
nav.top ul a[aria-current="page"] { color: var(--fg); font-weight: 600; }

/* ---- 5. Page headers ---- */

/* Generic site hero (About / Reports / Ledger land on this + a variant) */
header.hero {
  padding: 70px 0 50px;
  border-bottom: 2px solid var(--fg);
  margin-bottom: 48px;
}
header.hero h1 {
  font-size: 3.2rem;
  margin: 0 0 14px;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
header.hero .tagline {
  font-style: italic;
  color: var(--muted);
  font-size: 1.15rem;
  margin: 0 0 28px;
  max-width: 640px;
}
header.hero .cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
header.hero .cta a {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--fg);
  border-radius: 3px;
  font-weight: 600;
  color: var(--fg);
}
header.hero .cta a:hover { text-decoration: none; background: var(--soft); }
header.hero .cta a.primary { background: var(--fg); color: var(--bg); }
header.hero .cta a.primary:hover { background: var(--accent); border-color: var(--accent); }

/* Slim hero for sub-pages (About, Reports) */
header.hero.slim { padding: 36px 0 28px; border-bottom-width: 1px; margin-bottom: 32px; }
header.hero.slim h1 { font-size: 2.2rem; margin-bottom: 8px; }
header.hero.slim .tagline { font-size: 1rem; margin-bottom: 0; }

/* Centered hero (homepage) — logo + wordmark + kicker */
header.hero.centered {
  text-align: center;
  padding: 16px 0 20px;
  border-bottom: none;
  margin-bottom: 20px;
}
header.hero.centered .hero-logo {
  display: block;
  margin: 0 auto 10px;
  height: 160px;
  width: auto;
  max-width: 100%;
}
header.hero.centered h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.3rem);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-weight: 600;
}
header.hero.centered h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}
header.hero.centered .kicker {
  font-family: var(--font-sans);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin: 0 0 14px;
}
header.hero.centered .tagline {
  margin: 0 auto;
  max-width: 560px;
  font-size: 1.05rem;
}
header.hero.centered .cta { justify-content: center; margin-top: 20px; }
header.hero.centered .social-list { justify-content: center; margin-top: 18px; }

/* Post-style header (eyebrow + h1 + meta). Scoped to direct children of
   .wrap so it doesn't bleed into the ledger's inline .post-head bar.
   page-head is an alias used by mixture-of-experts. */
.wrap > header.post-head,
.wrap > header.page-head {
  padding: 48px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.wrap > header.post-head .eyebrow,
.wrap > header.page-head .eyebrow {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 14px;
  font-weight: 600;
}
.wrap > header.post-head h1,
.wrap > header.page-head h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.wrap > header.post-head .meta,
.wrap > header.page-head .meta {
  font-family: var(--font-sans);
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0;
}
.wrap > header.post-head .meta strong,
.wrap > header.page-head .meta strong { color: var(--fg); font-weight: 600; }
.wrap > header.post-head .meta time,
.wrap > header.page-head .meta time { color: var(--fg); }
.wrap > header.page-head .lead {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0;
  max-width: 720px;
}

/* Ledger page header (channel masthead) */
header.masthead {
  border-bottom: 2px solid var(--fg);
  padding-bottom: 24px;
  margin-bottom: 40px;
}
header.masthead h1 { font-size: 2.4rem; margin: 0 0 8px; letter-spacing: -0.01em; }
header.masthead .tagline { color: var(--muted); font-style: italic; margin: 0 0 12px; }
header.masthead .channel-link {
  display: inline-block;
  color: var(--accent);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
}

/* ---- 6. Site widgets (home / about / reports) ---- */

section { margin-bottom: 56px; }
section h2 {
  font-size: 1.5rem;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  letter-spacing: -0.01em;
}
section p { margin: 0 0 14px; }
section .section-sub {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  margin: -10px 0 18px;
}
.stats-note {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  margin: -44px 0 56px;
  text-align: right;
}

/* Stat strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 56px;
  overflow: hidden;
}
.stat {
  padding: 22px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.stat:last-child { border-right: none; }
.stat .num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.stat .label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Card grid */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 24px;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--fg); }
.card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card h3 .tag {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: var(--soft);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
}
.card h3 .tag.live { color: var(--accent); background: var(--accent-tint); }
.card p { font-size: 0.93rem; color: var(--muted); margin: 0 0 12px; }
.card a.more {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
}

/* Reports feed — news-archive layout, one article per entry */
.reports-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.reports-feed li {
  padding: 26px 0 28px;
  border-bottom: 1px solid var(--border);
}
.reports-feed li:first-child { padding-top: 4px; }
.reports-feed li:last-child { border-bottom: none; }
.reports-feed a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.reports-feed .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 10px;
}
.reports-feed .meta time { color: var(--fg); font-weight: 600; }
.reports-feed .meta .kicker { color: var(--accent); }
.reports-feed .meta .kicker::before {
  content: '·';
  margin-right: 10px;
  color: var(--border);
}
.reports-feed h2 {
  font-size: 1.45rem;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  padding-bottom: 0;
  border-bottom: none;
  font-weight: 600;
  color: var(--fg);
}
.reports-feed .meta .rating {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: auto;
}
.reports-feed a:hover h2 { color: var(--accent); }
.reports-feed .deck {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
  max-width: 70ch;
}

/* Homepage feed (ledger preview) */
.feed-list { list-style: none; margin: 0; padding: 0; }
.feed-list li {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.feed-list li:last-child { border-bottom: none; }
.feed-list li time {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}
.feed-list li .summary {
  color: var(--fg);
  font-size: 0.98rem;
  line-height: 1.5;
}
.feed-list li a.permalink {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}
.feed-list li a.permalink:hover { color: var(--accent); text-decoration: none; }
.feed-list .more-link,
section .more-link {
  margin-top: 22px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}

/* Methodology callout card (home, about, MoE) */
.method {
  background: var(--card);
  border-left: 3px solid var(--accent);
  padding: 20px 26px;
  font-size: 0.95rem;
}
.method h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.method ul { margin: 10px 0 0; padding-left: 20px; }
.method li { margin: 4px 0; }
.method p { margin: 6px 0; }
.method .scores { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.method .scores .s {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 3px;
  background: var(--soft);
  color: var(--fg);
}
.method .scores .s b { color: var(--accent); margin-left: 4px; }

/* Social strip */
.social-list {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 0.9rem;
}
.social-list a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--fg);
  background: var(--card);
}
.social-list a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.social-list a.soon { opacity: 0.55; cursor: default; }
.social-list a.soon:hover { border-color: var(--border); color: var(--fg); }
.social-list .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }
.social-list .soon .dot { background: #c9c4b3; }

/* ---- 7. Prose vocabulary (article.post-body + .prose) ---- */

/* Legacy iframe wrappers (kept for posterity; no post currently uses them) */
article.post-body {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
article.post-body.prose {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
article.post-body iframe.artifact,
article.post-body iframe.pdf {
  display: block;
  width: 100%;
  border: 0;
  min-height: 80vh;
}
article.post-body iframe.pdf { height: 90vh; min-height: 600px; }

/* Inline prose — the vocabulary all posts use */
.prose {
  max-width: var(--measure-narrow);
  margin: 0 auto;
  font-size: 1.02rem;
  line-height: 1.65;
}
.prose > * + * { margin-top: 1.1em; }
.prose h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin: 2.4em 0 0.6em;
  font-weight: 600;
}
.prose h3 {
  font-size: 1.15rem;
  margin: 2em 0 0.5em;
  font-weight: 600;
}
.prose p { margin: 0 0 1.1em; }
.prose strong { font-weight: 600; color: var(--fg); }
.prose em { font-style: italic; }
.prose a {
  color: var(--accent);
  border-bottom: 1px solid rgba(184, 52, 47, 0.25);
}
.prose a:hover { text-decoration: none; border-bottom-color: var(--accent); }
.prose sup { font-size: 0.7em; line-height: 0; }
.prose sup a {
  border: none;
  font-family: var(--font-sans);
  padding: 0 2px;
}
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin-bottom: 0.4em; }
.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.4em 0;
}
.prose .deck {
  font-style: italic;
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.5;
  margin: -0.2em 0 1.4em;
}
.prose .dropcap::first-letter {
  font-size: 3.2em;
  float: left;
  line-height: 0.9;
  padding: 0.08em 0.12em 0 0;
  font-weight: 500;
  color: var(--accent);
}
.prose blockquote {
  margin: 1.4em 0;
  padding: 0 0 0 1.1em;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--fg);
}
.prose blockquote cite {
  display: block;
  margin-top: 0.6em;
  font-style: normal;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose blockquote cite a { color: var(--muted); border-bottom-color: rgba(107, 107, 107, 0.4); }
.prose .callout {
  background: var(--soft);
  border-left: 2px solid var(--accent);
  padding: 18px 22px;
  margin: 1.8em 0;
}
.prose .callout .label,
.prose .callout > h3:first-child {
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 10px;
}
.prose .callout p:last-child { margin-bottom: 0; }
.prose .callout.amber { border-left-color: var(--amber); }
.prose .callout.amber .label,
.prose .callout.amber > h3:first-child { color: var(--amber); }
.prose .callout.green { border-left-color: var(--green); }
.prose .callout.green .label,
.prose .callout.green > h3:first-child { color: var(--green); }
.prose figure { margin: 1.8em 0; }
.prose figure img,
.prose figure svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.prose figure canvas { display: block; max-width: 100%; margin: 0 auto; }
.prose figure.chart {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 20px 14px;
}
.prose figure.chart figcaption { text-align: left; margin-top: 10px; }
.prose figcaption {
  margin-top: 0.6em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.prose .key-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 1.8em 0;
  overflow: hidden;
}
.prose .key-stats > div {
  background: var(--card);
  padding: 16px 18px;
}
.prose .key-stats > div.highlight { background: var(--accent-tint); }
.prose .key-stats > div.highlight .value { color: var(--accent); }
.prose .key-stats .value {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--fg);
}
.prose .key-stats .value.accent { color: var(--accent); }
.prose .key-stats .sub {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}
.prose .key-stats .label {
  display: block;
  margin-top: 4px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.8em 0;
  font-size: 0.92rem;
}
.prose th, .prose td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.prose th {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.prose .ornament {
  text-align: center;
  color: var(--muted);
  letter-spacing: 0.5em;
  margin: 2.4em 0 1.8em;
}
.prose .method {
  margin: 2.4em 0 0;
  padding: 24px 26px;
  background: var(--soft);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.94rem;
  color: var(--muted);
}
.prose .method h3 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
  font-weight: 600;
}
.prose .method p { margin: 0; font-style: italic; }
.prose .sources {
  margin-top: 3em;
  padding-top: 1.4em;
  border-top: 1px solid var(--border);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}
.prose .sources h3 {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg);
  margin: 0 0 12px;
  font-weight: 600;
}
.prose .sources ol { padding-left: 1.4em; margin: 0; }
.prose .sources li { margin-bottom: 8px; }
.prose .sources a { word-break: break-word; }

/* ---- 8. Ledger page widgets ---- */

/* Atomized prediction ledger: predictions grouped under a subhead that
   represents the originating post or report. Each prediction is a
   single falsifiable claim; audits of that claim live inside its
   own thread below it. */
.pred-group {
  margin: 28px 0 32px;
  padding: 22px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
.pred-group > header {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.pred-group > header h3 {
  font-size: 1.1rem;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.005em;
}
.pred-group > header .meta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: baseline;
}
.pred-group > header .meta time { color: var(--fg); font-weight: 600; }
.pred-group > header .meta .sources a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 3px;
  background: var(--accent-tint);
  margin-right: 4px;
}
.pred-group > header .meta .sources a:hover { background: var(--accent); color: #fff; }
.pred-group > header .meta .sources .label {
  margin-right: 6px;
  letter-spacing: 0.1em;
}

.pred-item {
  margin: 18px 0 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--border);
}
.pred-item:first-child { margin-top: 0; }
.pred-item + .pred-item { margin-top: 20px; }
.pred-item .prediction {
  font-size: 1rem;
  line-height: 1.55;
  margin: 0;
  color: var(--fg);
}
.pred-item .prediction strong { font-weight: 600; }
.pred-item .resolution {
  margin: 8px 0 0;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}
.pred-item .resolution::before {
  content: 'Resolves · ';
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  margin-right: 2px;
}
/* Landing-page track-record callout */
.track-record {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin: 0 0 36px;
  padding: 16px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: var(--font-sans);
}
.track-record .record-num {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.track-record .record-body {
  margin: 0;
  flex: 1 1 240px;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--fg);
}
.track-record .record-body strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.track-record .record-link {
  flex: 0 0 auto;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
}
.track-record .record-link:hover { text-decoration: underline; }

/* Ledger accuracy score panel (top of ledger.html) */
.ledger-score {
  margin: 0 0 28px;
  padding: 22px 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
}
.ledger-score .score-headline {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.ledger-score .score-num {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ledger-score .score-label {
  font-family: var(--font-sans);
  font-size: 0.92rem;
  color: var(--muted);
}
.ledger-score .score-label strong { color: var(--fg); font-weight: 600; }
.ledger-score .score-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: center;
}
.ledger-score .score-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
}
.ledger-score .score-cell-num {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
  min-width: 1.5em;
  text-align: right;
}
.ledger-score .score-method {
  margin: 14px 0 0;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

.pred-item .outcome {
  margin: 10px 0 0;
  font-family: var(--font-sans);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--fg);
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.pred-item .outcome .rating { flex: 0 0 auto; align-self: center; }
.pred-item .outcome .outcome-note { flex: 1 1 240px; min-width: 0; }
.pred-item .audits {
  margin-top: 12px;
  padding-left: 16px;
  border-left: 1px dashed var(--border);
}
.pred-item .audit {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 8px;
}
.pred-item .audit:last-child { margin-bottom: 0; }
.pred-item .audit .audit-meta {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
  margin-right: 8px;
}
.pred-item .audit a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border); }
.pred-item .audit a:hover { color: var(--accent); }

.ledger-intro {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 18px 22px;
  margin-bottom: 40px;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--muted);
}
.ledger-intro .legend {
  display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap;
  font-size: 0.85rem;
}
.ledger-intro .legend-item { display: flex; align-items: center; gap: 6px; }
.ledger-intro .legend .badge {
  display: inline-block;
  background: var(--accent-tint);
  color: var(--accent);
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 700;
  font-family: var(--font-sans);
}

h2.year {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin: 48px 0 20px;
}
h2.year:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }

article.post {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 22px 26px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}
article.post.depth-0 { margin-bottom: 18px; }
article.post .post-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
article.post .reply-arrow { color: var(--accent); font-size: 1.05rem; margin-right: -6px; }
article.post .msgnum {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 2px 8px;
  border-radius: 3px;
  text-decoration: none;
}
article.post .msgnum:hover { background: var(--accent); color: #fff; }
article.post .post-head time { font-variant-numeric: tabular-nums; }
article.post .permalink { margin-left: auto; color: var(--muted); text-decoration: none; }
article.post .permalink:hover { color: var(--accent); }
article.post .text { white-space: normal; }
article.post .text a { color: var(--accent); word-break: break-all; }
article.post .photo {
  margin-top: 16px;
  background: var(--soft);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 4px 4px 0;
  font-size: 0.93rem;
}
article.post .photo-label {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
article.post .photo-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0;
  font-size: 0.85rem;
  font-family: var(--font-sans);
}
article.post .photo-body th,
article.post .photo-body td {
  border: 1px solid var(--border);
  padding: 5px 9px;
  text-align: left;
}
article.post .photo-body th { background: #e9e4d4; font-weight: 600; }
article.post .photo-body ul { margin: 6px 0; padding-left: 20px; }
article.post .photo-body li { margin: 3px 0; }

.thread-children {
  position: relative;
  margin-left: 28px;
  padding-left: 22px;
  border-left: 2px solid var(--thread-line);
  margin-top: 0;
  margin-bottom: 14px;
}
.thread-children .post { background: #fdfcf8; font-size: 0.96rem; }
.thread-children .thread-children .post { background: #fbf9f3; }
.thread-children .thread-children .thread-children .post { background: #faf7ee; }

/* ---- 9. Mixture of Experts widgets ---- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: 0 0 36px;
  overflow: hidden;
}
.stats-grid .stat {
  padding: 18px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid .stat:nth-child(4n) { border-right: none; }
.stats-grid .stat:nth-last-child(-n+4) { border-bottom: none; }
.stats-grid .stat .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}
.stats-grid .stat .label {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Sortable dashboard tables */
.table-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow-x: auto;
}
.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  font-family: var(--font-sans);
}
.table-wrap thead th {
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: var(--soft);
  white-space: nowrap;
}
.table-wrap thead th.sortable { cursor: pointer; user-select: none; }
.table-wrap thead th.sortable:hover { color: var(--accent); }
.table-wrap thead th .sort-arrow { color: var(--accent); margin-left: 4px; opacity: 0; }
.table-wrap thead th.sorted-asc .sort-arrow,
.table-wrap thead th.sorted-desc .sort-arrow { opacity: 1; }
.table-wrap tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-wrap tbody tr:last-child td { border-bottom: none; }
.table-wrap tbody tr:hover td { background: var(--bg); }
.table-wrap td.num, .table-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap td.acc { font-weight: 600; }

/* Accuracy bar (horizontal stacked) */
.acc-bar {
  display: inline-flex;
  height: 10px;
  width: 110px;
  border-radius: 2px;
  overflow: hidden;
  vertical-align: middle;
  background: var(--soft);
}
.acc-bar span { display: block; height: 100%; }
.acc-bar .true    { background: var(--r-true); }
.acc-bar .mtrue   { background: var(--r-mostly-true); }
.acc-bar .partial { background: var(--r-partial); }
.acc-bar .mfalse  { background: var(--r-mostly-false); }
.acc-bar .false   { background: var(--r-false); }
.acc-bar .unres   { background: var(--r-unresolved); }

/* Rating pills */
.rating {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
}
.rating.r-true    { background: var(--r-true); }
.rating.r-mtrue   { background: var(--r-mostly-true); }
.rating.r-partial { background: var(--r-partial); color: var(--fg); }
.rating.r-mfalse  { background: var(--r-mostly-false); }
.rating.r-false   { background: var(--r-false); }
.rating.r-unres   { background: var(--r-unresolved); color: var(--fg); }

/* Controls row (search + filters + count) */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-sans);
  font-size: 0.86rem;
}
.controls input,
.controls select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card);
  color: var(--fg);
}
.controls input:focus,
.controls select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.controls .grow { flex: 1; min-width: 200px; }
.controls .count { margin-left: auto; align-self: center; color: var(--muted); }
.controls button {
  font: inherit;
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 3px;
  color: var(--fg);
  cursor: pointer;
}
.controls button:hover { border-color: var(--accent); color: var(--accent); }

/* Prediction rows */
.pred-text {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--fg);
  line-height: 1.5;
}
.pred-row td.outcome {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  max-width: 420px;
}
.pred-row td.cats { font-size: 0.74rem; color: var(--muted); white-space: normal; max-width: 160px; }
.pred-row .src-links { display: inline-flex; gap: 6px; font-size: 0.78rem; }
.pred-row .src-links a {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted);
}
.pred-row .src-links a:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

td.expert { font-weight: 600; max-width: 220px; }
td.cat { max-width: 220px; }
td.cat-list { font-size: 0.74rem; color: var(--muted); white-space: normal; max-width: 240px; }

.loading, .empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-sans);
}

/* ---- 10. Footer ---- */
footer.site {
  margin-top: 70px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  font-family: var(--font-sans);
}
footer.site a { color: var(--muted); }
footer.site a:hover { color: var(--accent); }
footer.site em { font-family: var(--font-serif); }

/* ---- 11. Responsive ---- */
@media (max-width: 760px) {
  .wrap { padding: 28px 16px 70px; }
  .wrap.wide, .wrap.dashboard { padding: 20px 14px 60px; }
  header.hero { padding: 40px 0 32px; }
  header.hero h1 { font-size: 2.2rem; }
  header.hero .tagline { font-size: 1rem; }
  header.hero.centered { padding: 12px 0 18px; margin-bottom: 16px; }
  header.hero.centered .hero-logo { height: 120px; margin-bottom: 8px; }
  header.hero.centered .kicker { font-size: 0.72rem; letter-spacing: 0.18em; }
  header.post-head, header.page-head { padding: 28px 0 22px; }
  header.masthead h1 { font-size: 1.8rem; }
  nav.top ul { gap: 14px; }
  .stats, .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats .stat:nth-child(2) { border-right: none; }
  .stats .stat:nth-child(1), .stats .stat:nth-child(2) { border-bottom: 1px solid var(--border); }
  .stats-grid .stat:nth-child(4n) { border-right: 1px solid var(--border); }
  .stats-grid .stat:nth-child(2n) { border-right: none; }
  .stats-grid .stat:nth-last-child(-n+2) { border-bottom: none; }
  .cards { grid-template-columns: 1fr; }
  .feed-list li { grid-template-columns: 90px 1fr; }
  .feed-list li a.permalink { grid-column: 2; justify-self: start; }
  article.post { padding: 16px 16px; }
  .thread-children { margin-left: 12px; padding-left: 14px; }
  article.post .permalink { margin-left: 0; width: 100%; }
  .controls .grow { min-width: 140px; }

  .track-record { padding: 14px 16px; gap: 10px 14px; margin-bottom: 28px; }
  .track-record .record-num { font-size: 1.65rem; }
  .track-record .record-body { font-size: 0.9rem; flex-basis: 100%; }
  .track-record .record-link { font-size: 0.86rem; }

  .ledger-score { padding: 18px 16px; }
  .ledger-score .score-num { font-size: 1.9rem; }
  .ledger-score .score-label { font-size: 0.85rem; }
  .ledger-score .score-breakdown { gap: 10px 14px; }
  .ledger-score .score-cell { font-size: 0.84rem; }

  .pred-item .outcome { gap: 6px 10px; font-size: 0.84rem; }
  .pred-item .outcome .outcome-note { flex-basis: 100%; }
}
