:root {
  --ink: #1a1714;
  --muted: #5c5348;
  --paper: #f4efe4;
  --paper-2: #efe6d4;
  --rule: #c9bba3;
  --rule-strong: #1a1714;
  --pine: #1f4a3a;
  --pine-2: #2f6b52;
  --gold: #b8873a;
  --link: #1f4a3a;
  --head: "Playfair Display", "Source Serif 4", "Noto Serif", "Times New Roman", serif;
  --hed: "Source Serif 4", "Noto Serif", "Times New Roman", serif;
  --body: "Noto Serif", "Source Serif 4", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--link); text-underline-offset: 2px; }
a:visited { color: var(--link); }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.wrap { width: min(1140px, calc(100% - 36px)); margin: 0 auto; }

/* —— Masthead —— */
.toprule {
  height: 4px;
  background: var(--ink);
}
.masthead {
  padding: 18px 0 10px;
  text-align: center;
}
.kicker {
  margin: 0 0 10px;
  font-family: var(--hed);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
}
.wordmark {
  margin: 0;
  font-family: var(--head);
  font-size: clamp(44px, 10vw, 92px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 0.88;
  text-transform: uppercase;
}
.wordmark a { color: inherit; text-decoration: none; }
.mast-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 10px auto 8px;
  max-width: 28rem;
  color: var(--ink);
}
.mast-ornament::before,
.mast-ornament::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--ink);
}
.mast-mark {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
}
.dateline {
  margin: 0;
  font-family: var(--hed);
  font-size: 14px;
  font-weight: 600;
}
.bureau {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-style: italic;
}

/* Folio + section bar */
.folio {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 7px 0 8px;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--ink);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.folio-left { justify-self: start; color: var(--muted); }
.folio-right { justify-self: end; color: var(--muted); text-align: right; }
.sections {
  display: flex;
  justify-content: center;
  gap: 0;
}
.sections a {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  padding: 0 14px;
  letter-spacing: 0.16em;
}
.sections a:not(:last-child) {
  border-right: 1px solid var(--rule);
}
.sections a:hover { color: var(--gold); }

main.wrap { padding: 22px 0 56px; }

/* Edition figures — not app cards */
.edition {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 28px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.edition .stat {
  padding: 12px 16px;
  text-align: center;
}
.edition .stat:not(:last-child) { border-right: 1px solid var(--rule); }
.edition .stat b {
  display: block;
  font-family: var(--hed);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.edition .stat span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.lead-graf {
  font-size: 17px;
  line-height: 1.55;
  max-width: 46rem;
  margin: 0 0 22px;
}

.kind {
  font-family: var(--hed);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

/* Front page hierarchy */
.front {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 0;
  margin: 0 0 8px;
}
.front-solo { grid-template-columns: 1fr; }
.lead {
  padding: 4px 32px 8px 0;
  border-right: 1px solid var(--ink);
}
.front-solo .lead { padding-right: 0; border-right: 0; }
.lead h2 {
  font-family: var(--hed);
  font-size: clamp(28px, 4.2vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 8px 0 12px;
}
.lead h2 a, .rail a, .brief, .also a { color: inherit; text-decoration: none; }
.lead h2 a:hover, .rail h3 a:hover, .rail a:hover h3, .brief:hover h3, .also a:hover h3 {
  color: var(--gold);
}
.dek { color: var(--muted); line-height: 1.55; margin: 0 0 10px; }
.meta {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rail { padding: 0 0 8px 28px; }
.secondary { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); }
.secondary h3 {
  font-family: var(--hed);
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.18;
  margin: 6px 0 8px;
  font-weight: 700;
}
.rail-item {
  display: block;
  padding: 14px 0;
  color: inherit;
}
.rail-item:not(:last-child) { border-bottom: 1px solid var(--rule); }
.rail-item h3 {
  font-family: var(--hed);
  font-size: 18px;
  line-height: 1.25;
  margin: 4px 0 6px;
  font-weight: 600;
}

.briefs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 8px 0 36px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
.brief {
  display: block;
  padding: 18px 20px 20px 0;
  color: inherit;
}
.brief:not(:first-child) {
  padding-left: 20px;
  border-left: 1px solid var(--rule);
}
.brief h3 {
  font-family: var(--hed);
  font-size: 19px;
  line-height: 1.22;
  margin: 6px 0 8px;
  font-weight: 600;
}

.flag {
  font-family: var(--hed);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 28px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
}

.also { margin: 8px 0 8px; }
.also-list { display: flex; flex-direction: column; }
.also-item {
  display: grid;
  grid-template-columns: 10.5rem 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  color: inherit;
  text-decoration: none;
}
.also-item h3 {
  font-family: var(--hed);
  font-size: 18px;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}
.also-item .meta { justify-self: end; }

/* Article / inner pages */
.article { padding: 8px 0 24px; max-width: 44rem; }
.article h1 {
  font-family: var(--hed);
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.article .body { font-size: 18px; line-height: 1.7; }
.article .body h2 {
  font-family: var(--hed);
  font-size: 22px;
  margin-top: 28px;
}
.article .body .table-wrap { max-width: none; }
.facts { padding-left: 18px; }
.facts li { margin: 8px 0; }
.source {
  margin-top: 32px;
  padding: 14px 16px;
  background: var(--paper-2);
  border-left: 3px solid var(--pine);
  font-size: 14px;
}
.source p { margin: 8px 0 0; }

.page-hed {
  font-family: var(--hed);
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  margin: 4px 0 8px;
}

form.filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 20px; }
input, select, button {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--rule);
  background: #fffdf8;
  border-radius: 0;
}
button, .btn {
  background: var(--pine);
  color: #fffdf8;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 14px;
}
button:hover, .btn:hover { background: var(--pine-2); color: #fffdf8; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 9px 11px;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
th {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--paper-2);
  font-weight: 700;
}
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; margin: 12px 0 28px; }
table.kv th {
  width: 38%;
  color: var(--muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
}

.badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge.bad { background: #f3d6c8; color: #7a2e16; }
.badge.ok { background: #d7eadc; color: #1f4a3a; }
.badge.major { background: #7a2e16; color: #fffdf8; }

.related { margin-top: 36px; max-width: 44rem; }

.article.meduuleg-page { max-width: 64rem; }
.paper-dateline {
  font-family: var(--hed);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
  padding: 8px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.meduuleg-mast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: center;
  margin: 8px 0 20px;
  padding-bottom: 18px;
  border-bottom: 3px double var(--ink);
}
.year-badge {
  width: 7.4rem;
  height: 7.4rem;
  border: 3px double var(--ink);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  flex: 0 0 7.4rem;
}
.year-badge span {
  font-family: var(--head);
  font-size: 2.35rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}
.year-badge small {
  margin-top: 6px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede-year {
  font-size: 1.05em;
  margin: 0;
}
.unit-caveat {
  font-size: 14px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 14px;
}
.office-dl {
  display: grid;
  grid-template-columns: 11.5rem 1fr;
  gap: 8px 16px;
  margin: 8px 0 22px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}
.office-dl dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
}
.office-dl dd { margin: 0; }
.governor-note {
  margin: 16px 0 22px;
  padding: 12px 16px;
  background: var(--paper-2);
  border: 1px solid var(--ink);
  font-size: 15px;
}
.governor-note p { margin: 8px 0 0; }
.governor-note p:first-of-type { margin-top: 6px; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0 0 24px;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.stat-block {
  padding: 12px 14px 14px;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stat-block .stat-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}
.stat-block b {
  display: block;
  font-family: var(--hed);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.bar {
  height: 7px;
  margin-top: 10px;
  background: #e6dcc8;
}
.bar i {
  display: block;
  height: 100%;
  background: var(--pine);
  min-width: 0;
}
.meduuleg-list a {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.meduuleg-infographic .year-badge { margin: 0; }
.year-scope {
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
  margin: 0 0 12px;
}
.year-rail {
  display: flex;
  border: 1px solid var(--ink);
  margin: 0 0 14px;
}
.year-rail .yr {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-family: var(--hed);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-right: 1px solid var(--rule);
}
.year-rail .yr:last-child { border-right: 0; }
.year-rail .yr.latest {
  background: var(--paper-2);
  font-weight: 700;
  box-shadow: inset 0 -3px 0 var(--ink);
}
.year-rail .yr.missing {
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
table.yoy {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
table.yoy th,
table.yoy td {
  border: 1px solid var(--ink);
  padding: 8px 8px 10px;
  vertical-align: top;
  background: var(--paper);
}
table.yoy thead th {
  font-family: var(--hed);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--paper-2);
}
table.yoy tbody th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  min-width: 9.5rem;
  background: var(--paper-2);
}
table.yoy td.num { text-align: right; }
table.yoy .yoy-val {
  display: block;
  font-family: var(--hed);
  font-weight: 700;
  font-size: 15px;
}
table.yoy th.latest,
table.yoy td.latest {
  background: #e9dfc8;
  box-shadow: inset 0 0 0 2px var(--ink);
}
table.yoy td.missing,
table.yoy th.missing {
  color: var(--muted);
  font-style: italic;
  font-size: 12px;
}
.delta {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.delta-up { color: #1f4a3a; }
.delta-down { color: #8a2f1f; }
.delta-flat { color: var(--muted); }
.delta-na { color: var(--muted); font-weight: 400; }
i.spark {
  display: block;
  height: 5px;
  margin-top: 8px;
  background: var(--pine);
  max-width: 100%;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 16px 0 24px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stats .stat { padding: 12px 16px; text-align: center; }
.stats .stat:not(:last-child) { border-right: 1px solid var(--rule); }
.stats .stat b {
  display: block;
  font-family: var(--hed);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.stats .stat span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.list { display: flex; flex-direction: column; }
.list a.item {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
}
.list a.item h3 {
  font-family: var(--hed);
  font-size: 18px;
  margin: 4px 0 6px;
  font-weight: 600;
  line-height: 1.3;
}
.more { margin: 8px 0 32px; }

main h2 {
  font-family: var(--hed);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 28px 0 12px;
}

.colophon {
  border-top: 3px double var(--ink);
  padding: 22px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.colophon-brand {
  font-family: var(--head);
  font-size: 18px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 6px;
}
.colophon p { margin: 4px 0; }

@media (max-width: 860px) {
  .front, .briefs, .edition { grid-template-columns: 1fr; }
  .lead {
    padding-right: 0;
    border-right: 0;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ink);
    margin-bottom: 16px;
  }
  .rail { padding-left: 0; }
  .brief:not(:first-child) {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--rule);
  }
  .edition .stat:not(:last-child),
  .stats .stat:not(:last-child) {
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }
  .stats { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .meduuleg-mast { grid-template-columns: 1fr; justify-items: start; }
  .office-dl { grid-template-columns: 1fr; gap: 2px 0; }
  .office-dl dt { margin-top: 8px; }
  .year-rail .yr { font-size: 12px; padding: 6px 2px; }
  table.yoy { font-size: 12px; }
  table.yoy tbody th { min-width: 7rem; }
  .folio {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 6px;
  }
  .folio-left, .folio-right { justify-self: center; text-align: center; }
  .also-item { grid-template-columns: 1fr; gap: 4px; }
  .also-item .meta { justify-self: start; }
}

@media (max-width: 520px) {
  .wordmark { letter-spacing: 0.02em; }
  .sections a { padding: 0 8px; letter-spacing: 0.1em; }
}

.admin-actions { white-space: nowrap; }
.admin-actions button,
.admin-actions .btn { margin: 2px 0; }
.btn-ghost,
button.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.btn-ghost:hover,
button.btn-ghost:hover {
  background: var(--paper-2);
  color: var(--ink);
}
.admin-banner {
  margin-bottom: 20px;
  border-left-color: var(--gold);
}

