/* The /issues pages (written by tools/make_issue_pages.py): stat tiles, fact tables, budget bars, issue cards.
   Uses the site.css tokens (--navy, --red, --gold, --paper ...). Loaded only by issues.html and issues/*.html. */

.iss-wrap { max-width: 900px; margin: 0 auto; }
.iss-wrap > h2 { margin-top: 1.6em; }
.iss-wrap > h2:first-child { margin-top: 0; }
.iss-sub { font-size: .9rem; color: var(--muted); }

/* ---------- stat tiles ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 0 0 8px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius);
  padding: 16px 18px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 6px; }
.stat__big { font: 700 2rem/1 var(--head); color: var(--navy); letter-spacing: .01em; overflow-wrap: anywhere; }
.stat__txt { font-size: .93rem; line-height: 1.45; }
.stat__src { font-size: .8rem; color: var(--muted); margin-top: auto; }
.stat__src a { color: var(--muted); }

/* ---------- tables ---------- */
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 6px; }
table.facts { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); }
table.facts th, table.facts td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
table.facts thead th { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: .82rem; color: var(--navy); }
table.facts .num { text-align: right; white-space: nowrap; }
table.facts small { color: var(--muted); }
.tsrc { font-size: .82rem; color: var(--muted); margin: 6px 0 28px; line-height: 1.45; }
.tsrc a { color: var(--muted); }

/* ---------- budget bars ---------- */
.bars { margin: 0 0 8px; padding: 18px 20px 12px; background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); border-radius: var(--radius); box-shadow: var(--shadow); }
.bars figcaption { font: 600 1.12rem var(--head); color: var(--navy); margin: 0 0 14px; letter-spacing: .02em; }
.bar { display: grid; grid-template-columns: minmax(0, 15rem) 1fr 5.4rem; gap: 10px; align-items: center; margin: 0 0 8px; font-size: .9rem; }
.bar__track { background: var(--bg); height: 16px; border-radius: 2px; overflow: hidden; }
.bar__fill { display: block; height: 100%; background: var(--navy); }
.bar:first-of-type .bar__fill { background: var(--red); }
.bar__val { font: 600 .92rem var(--head); color: var(--navy); text-align: right; white-space: nowrap; }
.bar--sub { color: var(--muted); font-size: .85rem; }
.bar--total { border-top: 1px solid var(--line); padding-top: 8px; font-weight: 700; }
@media (max-width: 640px) { .bar { grid-template-columns: 1fr 5rem; } .bar__track { grid-column: 1 / -1; grid-row: 2; } }

/* ---------- budget tree ---------- */
.tree { background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--gold); border-radius: var(--radius);
  padding: 14px 18px; margin: 0 0 6px; }
.tree > summary, .tree details > summary { cursor: pointer; }
.tree__cap { font: 600 1.08rem var(--head); color: var(--navy); }
.tree ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.tree li { margin: 4px 0; font-size: .92rem; }
.tree .amt { font: 600 .9rem var(--head); color: var(--navy); margin-left: 6px; white-space: nowrap; }

/* ---------- issue cards on /issues ---------- */
.icards { gap: 20px; }
.icard { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--navy); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  text-decoration: none; color: var(--text); transition: transform .15s; }
.icard:hover, .icard:focus-visible { transform: translateY(-3px); }
.icard:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.icard__kicker { font: 600 .78rem var(--head); text-transform: uppercase; letter-spacing: .06em; color: var(--red); }
.icard__title { font: 700 1.45rem/1.05 var(--head); text-transform: uppercase; color: var(--navy); }
.icard__big { font: 700 1.7rem/1 var(--head); color: var(--red-dark); }
.icard__txt { font-size: .93rem; line-height: 1.45; color: var(--muted); }
.icard--record { border-top-color: var(--gold); }

.iss-list { padding-left: 1.2em; }
.iss-list li { margin: 0 0 .7em; }
.billlist + .tsrc, .cmp + p { margin-top: 12px; }
.iss-note { margin: 18px 0 28px; }

/* /sources: every source, grouped */
.src-list { padding-left: 0; list-style: none; }
.src-list > li { margin: 0 0 14px; }
.src-list ul { margin: 6px 0 0; padding-left: 20px; }
.src-list ul li { margin: 3px 0; overflow-wrap: anywhere; }
