/* Homepage only. Site tokens come from style.css. */
.home {
  --hm-sage: #a9c2b0;
  --hm-meter: #facc15;
  --hm-rule: #1e4027;
  --hm-panel: #0f2317;
}

/* ---------- Hero ---------- */
.hm-hero { padding: 72px 0 56px; }

.hm-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  align-items: center;
}

.hm-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.6vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 13ch;
}

.hm-lede {
  margin-top: 20px;
  max-width: 58ch;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--hm-sage);
}

/* ---------- Ledger ---------- */
.lg { margin-top: 48px; }

.lg-head {
  display: flex;
  justify-content: space-between;
  padding: 0 14px 10px;
  border-bottom: 2px solid var(--text);
  font-size: 0.85rem;
  color: var(--hm-sage);
}

.lg-list { list-style: none; }

.lg-list li { border-bottom: 1px solid var(--hm-rule); }

.lg-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 14px;
  color: var(--text);
  text-decoration: none;
}

.lg-q {
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.35;
}

.lg-dots {
  flex: 1 1 40px;
  min-width: 24px;
  border-bottom: 2px dotted #3b6b47;
  transform: translateY(-5px);
}

.lg-a {
  flex: none;
  color: var(--hm-meter);
  font-weight: 600;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lg-row:hover { background: var(--hm-panel); text-decoration: none; }
.lg-row:hover .lg-q { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.lg-row:focus-visible { outline: 2px solid var(--hm-meter); outline-offset: -2px; }

.lg-cap {
  margin-top: 12px;
  padding: 0 14px;
  font-size: 0.85rem;
  color: var(--hm-sage);
}

.hm-browse {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  padding: 0 14px;
}

.hm-browse a {
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--primary);
  padding-bottom: 2px;
}

.hm-browse a:hover { color: var(--primary); text-decoration: none; }

/* ---------- Shared section type ---------- */
.hm-h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}

.hm-sub {
  margin-top: 8px;
  max-width: 60ch;
  color: var(--hm-sage);
  line-height: 1.6;
}

/* ---------- Season ---------- */
.hm-season {
  background: var(--hm-panel);
  border-top: 1px solid var(--hm-rule);
  border-bottom: 1px solid var(--hm-rule);
  padding: 56px 0;
}

.ss-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
  margin-top: 28px;
}

.ss-list li { border-top: 1px solid var(--hm-rule); }

.ss-list a {
  display: block;
  padding: 16px 0 18px;
  text-decoration: none;
}

.ss-t {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
}

.ss-d {
  display: block;
  margin-top: 4px;
  color: var(--hm-sage);
  font-size: 0.95rem;
  line-height: 1.5;
}

.ss-list a:hover .ss-t { color: var(--primary); }
.ss-list a:focus-visible, .rc-list a:focus-visible, .hm-browse a:focus-visible {
  outline: 2px solid var(--hm-meter);
  outline-offset: 3px;
}

/* ---------- Sources + recent ---------- */
.hm-split { padding: 64px 0; }

.hm-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
}

.src-list { margin-top: 24px; }

.src-list div {
  padding: 14px 0;
  border-top: 1px solid var(--hm-rule);
}

.src-list dt { color: var(--text); font-weight: 600; }

.src-list dd {
  margin-top: 2px;
  color: var(--hm-sage);
  font-size: 0.95rem;
  line-height: 1.5;
}

.rc-list { list-style: none; margin-top: 24px; }

.rc-list li {
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr);
  column-gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--hm-rule);
}

.rc-list time {
  grid-row: span 2;
  color: var(--hm-meter);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  padding-top: 2px;
}

.rc-list a { color: var(--text); font-weight: 500; line-height: 1.4; }
.rc-list a:hover { color: var(--primary); }

.rc-k { color: var(--hm-sage); font-size: 0.82rem; }

/* ---------- Listed on ---------- */
.hm-listed {
  border-top: 1px solid var(--hm-rule);
  padding: 28px 0 36px;
}

.hm-listed p { font-size: 0.85rem; color: var(--hm-sage); margin-bottom: 12px; }

.hm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  opacity: 0.8;
}

.hm-badges img { height: 28px; width: auto; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  .hm-hero { padding: 44px 0 40px; }
  .lg { margin-top: 36px; }
  .lg-head { display: none; }
  .lg-list { border-top: 2px solid var(--text); }
  .lg-row { flex-direction: column; gap: 4px; padding: 14px 4px; }
  .lg-q { font-size: 1.08rem; }
  .lg-dots { display: none; }
  .lg-a { font-size: 1rem; white-space: normal; }
  .lg-cap, .hm-browse { padding: 0 4px; }
  .ss-list { grid-template-columns: 1fr; }
  .hm-season { padding: 44px 0; }
  .hm-split { padding: 48px 0; }
  .hm-split-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* ---------- Meter illustration ---------- */
.hm-meter { margin: 0; width: 320px; }
.hm-meter svg { width: 100%; height: auto; display: block; }
.mt-ring { fill: none; stroke: #2c5236; stroke-width: 6; }
.mt-glass { fill: #0d1f13; stroke: #3b6b47; stroke-width: 1.5; }
.mt-plate { fill: #13301b; stroke: #1e4027; }
.mt-face { fill: #eaf6ec; stroke: #9cc3a6; stroke-width: 1; }
.mt-ticks line { stroke: #43614b; stroke-width: 1.2; }
.mt-needle path { fill: #0a1a0f; }
.mt-needle { transform: rotate(var(--a)); }
.mt-hub { fill: #facc15; stroke: #0a1a0f; stroke-width: 1; }
.mt-unit { fill: #a9c2b0; font: 500 11px var(--font-body); text-anchor: middle; letter-spacing: .02em; }
.mt-title { fill: #6f8f78; font: 500 10px var(--font-body); text-anchor: middle; letter-spacing: .04em; }
.mt-digit { fill: #facc15; font: 600 13px var(--font-body); text-anchor: middle; font-variant-numeric: tabular-nums; }
.mt-small { fill: #6f8f78; font: 500 9px var(--font-body); text-anchor: middle; }
.mt-slot { fill: #0a1a0f; stroke: #2c5236; }
.mt-mark { fill: #facc15; }
.mt-shine { fill: none; stroke: rgba(240,253,244,.07); stroke-width: 12; stroke-linecap: round; }

@media (prefers-reduced-motion: no-preference) {
  .mt-needle { animation: mt-sweep 1.6s cubic-bezier(.2,.7,.2,1) both; animation-delay: var(--d); }
  .mt-mark { animation: mt-spin 2.4s ease-in-out both; }
}
@keyframes mt-sweep { from { transform: rotate(0deg); } to { transform: rotate(var(--a)); } }
@keyframes mt-spin { from { transform: translateX(0); } to { transform: translateX(94px); } }

.hm-register { display: none; margin: 0; }
.hm-register svg { width: 100%; max-width: 316px; height: auto; display: block; }
.mt-unit-l { text-anchor: start; font-size: 13px; }

/* ---------- Where the money goes ---------- */
.hm-money {
  background: var(--hm-panel);
  border-top: 1px solid var(--hm-rule);
  border-bottom: 1px solid var(--hm-rule);
  padding: 64px 0;
}

.mg-chart { margin-top: 32px; }

.mg-row {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 96px;
  grid-template-areas: "name track val" ". links links";
  column-gap: 20px;
  row-gap: 6px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--hm-rule);
}

.mg-name { grid-area: name; color: var(--text); font-weight: 600; line-height: 1.3; }
.mg-track { grid-area: track; height: 12px; }
.mg-bar {
  display: block;
  height: 12px;
  width: var(--w);
  background: var(--hm-meter);
  border-radius: 0 4px 4px 0;
}
.mg-val {
  grid-area: val;
  text-align: right;
  color: var(--text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.mg-val span { margin-left: 8px; color: var(--hm-sage); font-weight: 400; font-size: .9rem; }
.mg-links { grid-area: links; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: .9rem; }
.mg-links a { color: var(--hm-sage); border-bottom: 1px solid #2f5a3a; }
.mg-links a:hover { color: var(--text); text-decoration: none; }

.hm-note {
  margin-top: 16px;
  max-width: 80ch;
  font-size: .82rem;
  line-height: 1.55;
  color: #7f9c87;
}

/* ---------- Topics ---------- */
.hm-topics { padding: 64px 0; }

.tp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px 32px;
  margin-top: 32px;
}

.tp { border-top: 2px solid var(--text); padding-top: 18px; }
.tp-ic {
  fill: none;
  stroke: var(--hm-meter);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tp h3 {
  margin-top: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}
.tp ul { list-style: none; margin-top: 10px; }
.tp li { padding: 5px 0; line-height: 1.4; }
.tp a { color: var(--hm-sage); font-size: .95rem; }
.tp a:hover { color: var(--text); }

/* ---------- Head to head ---------- */
.hm-h2h { padding: 64px 0; border-top: 1px solid var(--hm-rule); }

.hh-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  margin-top: 32px;
}

.hh h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.35; }
.hh h3 a { color: var(--text); border-bottom: 1px solid var(--primary); }
.hh h3 a:hover { color: var(--primary); text-decoration: none; }

.hh-chart { margin-top: 18px; display: grid; gap: 12px; }
.hh-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "l v" "t t";
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 5px;
  font-size: .92rem;
}
.hh-l { grid-area: l; color: var(--hm-sage); }
.hh-v { grid-area: v; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.hh-v em { font-style: normal; font-weight: 500; color: var(--hm-meter); margin-left: 8px; font-size: .82rem; }
.hh-track { grid-area: t; height: 10px; }
.hh-bar { display: block; height: 10px; width: var(--w); background: #3b6b47; border-radius: 0 4px 4px 0; }
.is-low .hh-bar { background: var(--hm-meter); }
.hh p { margin-top: 16px; color: var(--hm-sage); font-size: .92rem; line-height: 1.55; }

/* ---------- Medium & small screens ---------- */
@media (max-width: 980px) {
  .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hh-grid { grid-template-columns: 1fr; gap: 36px; max-width: 560px; }
  .hm-meter { width: 240px; }
}

@media (max-width: 760px) {
  .hm-top { grid-template-columns: 1fr; gap: 0; }
  .hm-meter { display: none; }
  .hm-register { display: block; margin-top: 28px; }
  .hm-money, .hm-topics, .hm-h2h { padding: 48px 0; }
  .mg-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name val" "track track" "links links";
    column-gap: 12px;
  }
  .tp-grid { gap: 32px 20px; }
}

@media (max-width: 480px) {
  .tp h3 { font-size: .98rem; }
  .tp a { font-size: .9rem; }
}
