/* ============================================================
   VARIANT LEDGER — Knight Frank REH 2026
   Financial-ledger composition. Zero radius, no shadows,
   Georgia 400 serif, hairlines. Maximum density.
   ============================================================ */

/* ── Region grid: sticky side rail (map + name) + ledger body ── */
.ledger-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 0 44px;
  align-items: start;
  padding-top: 32px;
}

.ledger-side {
  position: sticky;
  top: 110px;               /* below main nav + region bar */
  padding-bottom: 24px;
}

.ledger-side .region-map {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 14px;
}

.ledger-side .region__name {
  font: 400 26px/1.1 Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid #e4e7ef;
}

.ledger-body {
  min-width: 0;
}

/* Hide takeaways list — entries themselves are the list */
.region.ledger-region .takeaways {
  display: none;
}

/* Figless rows: main spans the remaining width */
.ledger-row--nofigs {
  grid-template-columns: 64px 1fr;
}

/* ── Ledger row ───────────────────────────────────────────── */
.ledger-row {
  display: grid;
  grid-template-columns: 64px 1fr 360px;
  gap: 0 32px;
  padding: 26px 0;
  border-bottom: 1px solid #e4e7ef;
}

/* Rail — large serif numeral, muted */
.ledger-row > .gm-num {
  font: 400 34px/1 Georgia, 'Times New Roman', serif;
  color: #9aa0b8;
  letter-spacing: -0.01em;
  display: block;
  padding-top: 3px;
  user-select: none;
}

/* ── Ledger main: headline + deck + prose-more ──────────── */
.ledger-main {
  min-width: 0;
}

.ledger-main .gm-head {
  font: 400 21px/1.25 Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  margin: 0 0 6px;
}

.ledger-main .deck {
  font: 400 13px/1.5 Arial, sans-serif;
  color: #6b7290;
  margin: 0 0 14px;
}

/* Charts and tables span the full content width beneath the row text */
.ledger-row > .ledger-wide {
  grid-column: 2 / -1;
  margin: 22px 0 0;
  min-width: 0;
}

.ledger-row > .chart-frame.ledger-wide {
  border: 1px solid #e4e7ef;
  padding: 16px;
}

/* prose-more inside ledger-main */
.ledger-main .prose-more {
  margin-top: 12px;
}

/* ── Ledger figures column: bare tabular numbers ─────────── */
.ledger-figs {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 2px;
}

/* Each stat-row inside ledger-figs becomes stacked blocks */
.ledger-figs .stat-row {
  display: block;
  border: 0;
  margin: 0;
  padding: 0;
}

/* Each stat cell: bare, right-aligned, no box borders */
.ledger-figs .stat {
  display: block;
  border: 0;
  padding: 0 0 18px;
  text-align: right;
}

.ledger-figs .stat:last-child {
  padding-bottom: 0;
}

.ledger-figs .stat__label {
  font: 600 9px Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7290;
  display: block;
  margin-bottom: 3px;
  white-space: normal;
}

.ledger-figs .stat__value {
  font: 400 26px/1.05 Georgia, 'Times New Roman', serif;
  color: #1a1a1a;
  display: block;
  font-variant-numeric: tabular-nums;
}

.ledger-figs .stat__value--red,
.ledger-figs .stat__value--red .num {
  color: #D0103A;
}

.ledger-figs .stat__delta {
  font: 600 11px Arial, sans-serif;
  display: block;
  margin-top: 2px;
}

/* KF rule: positive = calm green, negative/flat = muted — NEVER red */
.ledger-figs .stat__delta.up   { color: #0c6b58; }
.ledger-figs .stat__delta.down { color: #6b7290; }
.ledger-figs .stat__delta.flat { color: #6b7290; }

.ledger-figs .stat__note {
  font: 400 10px/1.4 Arial, sans-serif;
  color: #9aa0b8;
  display: block;
  margin-top: 2px;
}

/* Suppress original group-mark layout chrome inside ledger rows */
.ledger-row .group-mark {
  display: contents;
}

.ledger-row .gm-body {
  display: contents;
}

/* ── Mobile: single column, figs above commentary ────────── */
@media (max-width: 900px) {
  .ledger-row {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto;
  }

  .ledger-row > .gm-num {
    grid-row: 1;
    grid-column: 1;
    font-size: 24px;
  }

  .ledger-figs {
    grid-row: 1;
    grid-column: 2;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 16px;
    margin-bottom: 16px;
  }

  .ledger-figs .stat {
    text-align: right;
    padding-bottom: 0;
    min-width: 110px;
  }

  .ledger-main {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .ledger-row > .ledger-wide {
    grid-column: 1 / -1;
  }

  .ledger-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ledger-side {
    position: static;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding-bottom: 8px;
  }

  .ledger-side .region-map {
    width: 110px;
    margin: 0;
  }

  .ledger-side .region__name {
    font-size: 24px;
    border-top: 0;
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .ledger-row {
    grid-template-columns: 36px 1fr;
  }

  .ledger-row > .gm-num {
    font-size: 20px;
  }

  .ledger-figs {
    justify-content: flex-start;
  }
}
