/* good_sport — /ledger
   The learnings space: claims we make, graded as evidence lands.
   Inherits the landing tokens from styles.css (paper/ink/accent, Playfair +
   Plex). This file adds only the ledger index + entry typography. */

/* ================= shared shell ================= */
.ledger-wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.ledger-head {
  padding: 3.2rem 0 2.4rem;
  border-bottom: 1px solid var(--rule);
}
.ledger-head h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
}
.ledger-head .standfirst {
  margin-top: 0.9rem;
  color: var(--ink-soft);
  max-width: var(--measure);
}

/* ================= the board: live gate fuses ================= */
.board {
  margin-top: 2rem;
  padding: 1.4rem 1.5rem 1.5rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
}
.board .eyebrow { margin-bottom: 0.5rem; }
.board-sub {
  font-size: 0.85rem;
  color: var(--ink-soft);
  max-width: var(--measure);
  margin-bottom: 1.2rem;
}
.fuses { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.95rem; }
.fuse {
  display: grid;
  grid-template-columns: 11.5rem 1fr auto;
  gap: 0.35rem 1rem;
  align-items: center;
}
.fuse-name {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fuse-bar {
  display: block;
  height: 8px;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.fuse-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 600ms ease;
}
.fuse-nums { font-family: var(--mono); font-size: 0.78rem; white-space: nowrap; }
.fuse-nums .stat.pos { color: var(--pos); }
.fuse-nums .stat.neg { color: var(--neg); }
.fuse-nums .stat.flat { color: var(--ink-soft); }
.fuse-note {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: -0.15rem;
}
@media (max-width: 640px) {
  .fuse { grid-template-columns: 1fr auto; }
  .fuse-bar { grid-column: 1 / -1; order: 3; }
  .fuse-note { order: 4; }
}

/* ================= index rows ================= */
.ledger-list { list-style: none; margin: 0; padding: 0; }

.ledger-row { border-bottom: 1px solid var(--rule); }
.ledger-row a {
  display: grid;
  grid-template-columns: 4.4rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 1.3rem 0;
  text-decoration: none;
  color: inherit;
}
.ledger-row a:hover .entry-title { color: var(--accent); }

.entry-date {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: nowrap;
}
.entry-main { min-width: 0; }
.entry-title, .entry-sub { display: block; }
.entry-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.18rem;
  line-height: 1.3;
  transition: color 120ms ease;
}
.entry-sub {
  margin-top: 0.25rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.entry-kind {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-right: 0.55rem;
}

/* ---- stamps: the grading discipline ---- */
.stamp {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 0.18rem 0.5rem;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.stamp-open   { color: var(--ink-soft); }
.stamp-held   { color: var(--pos); }
.stamp-busted { color: var(--neg); }
.stamp-report { color: var(--accent); border-style: dashed; }

.ledger-record {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0 3.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.ledger-record a { color: var(--accent); text-decoration: none; }
.ledger-record a:hover { text-decoration: underline; }

/* ================= entry pages ================= */
.entry { padding: 3rem 0 3.5rem; }

.entry-meta {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.entry h1 {
  font-size: clamp(1.8rem, 4.6vw, 2.5rem);
  line-height: 1.18;
  max-width: 34rem;
}
.entry .standfirst {
  margin: 1rem 0 0;
  font-style: italic;
  color: var(--ink-soft);
  max-width: var(--measure);
}
.entry-body { margin-top: 2.2rem; max-width: var(--measure); }
.entry-body h2 {
  font-size: 1.35rem;
  margin: 2.2rem 0 0.8rem;
}
.entry-body p { margin: 0 0 1.05rem; }
.entry-body a { color: var(--accent); }
.entry-body strong { font-weight: 600; }

.entry-body figure { margin: 1.8rem 0; }
.entry-body figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

/* data tables render natively here — no Substack table jail */
.entry-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.entry-body th {
  text-align: right;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--ink-soft);
  padding: 0 0 0.55rem 0.8rem;
  border-bottom: 2px solid var(--ink);
}
.entry-body td {
  text-align: right;
  padding: 0.65rem 0 0.65rem 0.8rem;
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.entry-body th:first-child, .entry-body td:first-child {
  text-align: left;
  padding-left: 0;
  font-family: var(--sans);
}
.entry-body td:first-child { font-weight: 600; font-size: 0.9rem; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* the grade box: how a claim-bearing entry resolves */
.grade-box {
  margin: 2.4rem 0 0;
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  font-size: 0.88rem;
}
.grade-box .stamp { margin-right: 0.6rem; }

.entry-nav {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.entry-nav a { color: var(--accent); text-decoration: none; }
.entry-nav a:hover { text-decoration: underline; }

@media (max-width: 560px) {
  .ledger-row a { grid-template-columns: 1fr auto; }
  .entry-date { grid-column: 1 / -1; }
}
