/* IA — "The county paper" */
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("/assets/fonts/source-serif.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }

:root {
  --paper: #f4efe3;
  --ink: #1b1915;
  --ink-2: #4a443a;     /* secondary text, 8.4:1 on paper */
  --rule: #1b1915;
  --hair: #b8ae9b;      /* column rules (non-text) */
  --gold: #c8961e;      /* fills and rules only */
  --gold-ink: #7a5410;  /* gold when it must be text, 5.9:1 on paper */
  --head: "Instrument Serif", "Times New Roman", serif;
  --body: "Source Serif 4", Georgia, serif;
  --gutter: 28px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.55; font-optical-sizing: auto; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
p { margin: 0 0 .8em; }
h1, h2, h3 { font-family: var(--head); font-weight: 400; margin: 0; line-height: 1.05; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 10; }

/* ---------- Masthead ---------- */
.masthead { padding-top: 22px; }
.flag { display: flex; justify-content: center; align-items: center; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
.nameplate { margin: 0; font-family: var(--head); font-size: clamp(3rem, 9.5vw, 8.6rem); line-height: .95; letter-spacing: -.01em; text-align: center; }
.nameplate a { text-decoration: none; color: var(--ink); }
.nameplate a:hover { color: var(--ink); }

.dateline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  border-bottom: 3px solid var(--rule); padding: 7px 0; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); }
.dateline p { margin: 0; }
.dateline .beat { font-weight: 600; color: var(--ink); }
.dateline .edition { text-align: right; }

.sections { border-bottom: 1px solid var(--rule); }
.sections ul { display: flex; justify-content: center; flex-wrap: wrap; }
.sections li + li { border-left: 1px solid var(--hair); }
.sections a { display: flex; align-items: center; min-height: 44px; padding: 0 22px; text-decoration: none; font-size: .92rem; font-weight: 600; letter-spacing: .02em; }
.sections a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }

.menu { display: none; }

/* ---------- Banner ---------- */
.banner { padding: 30px 0 22px; border-bottom: 1px solid var(--rule); text-align: center; }
.banner h1 { font-size: clamp(2.3rem, 5.2vw, 4.6rem); line-height: 1.02; letter-spacing: -.012em; max-width: 21ch; margin: 0 auto; text-wrap: balance; }
.next[hidden] { display: none; }
.next { display: inline-block; margin-top: 18px; padding: 10px 2px; font-size: 1rem; text-decoration: none; border-top: 3px solid var(--gold); }
.next [data-part="date"] { font-weight: 700; }
.next [data-part="type"]::before { content: "· "; }
.next:hover [data-part="type"] { text-decoration: underline; }

/* ---------- Above the fold ---------- */
.fold { display: grid; grid-template-columns: 1fr 2fr; border-bottom: 1px solid var(--rule); }
.lead { padding: 26px var(--gutter) 26px 0; border-right: 1px solid var(--hair); display: flex; flex-direction: column; }
.lede { font-family: var(--head); font-size: 2rem; line-height: 1.18; margin-bottom: 1em; }
.actions { display: flex; flex-direction: column; gap: 12px; margin: auto 0 0; }
.btn, .btn-ghost { display: flex; align-items: center; min-height: 52px; padding: 12px 18px; font-weight: 650; font-size: 1rem; line-height: 1.3; text-decoration: none; border: 1.5px solid var(--ink); }
.btn { background: var(--gold); color: var(--ink); }
.btn:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.photo { margin: 0; padding: 26px 0 22px var(--gutter); }
.photo img { width: 100%; aspect-ratio: 1024 / 680; object-fit: cover; }
.photo figcaption { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--hair); font-size: .8rem; line-height: 1.45; color: var(--ink-2); }
.photo figcaption a { color: var(--ink-2); }

/* ---------- Columns ---------- */
.columns { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--rule); }
.story { padding: 26px var(--gutter) 30px; min-width: 0; }
.columns > .story:first-child { padding-left: 0; }
.columns > :last-child { padding-right: 0; }
.columns > * + * { border-left: 1px solid var(--hair); }

.kicker { margin: 0 0 6px; font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.story h2 { font-size: 2.15rem; line-height: 1.04; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--rule); text-wrap: balance; }
.story h3 { font-size: 1.45rem; line-height: 1.1; margin-bottom: 6px; }

/* Check — numbered paragraphs */
.steps { counter-reset: step; }
.steps li { counter-increment: step; padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--hair); }
.steps h3::before { content: counter(step) ". "; }
.steps li.accent { border-left: 4px solid var(--gold); padding-left: 14px; }
.steps p { margin-bottom: .5em; }
.more { display: flex; flex-wrap: wrap; gap: 0 16px; }
.more a, .note a, .credit a, .cta a, .about a { font-weight: 600; }
.more a { display: inline-flex; align-items: center; min-height: 44px; }
.note { font-size: .93rem; color: var(--ink-2); font-style: italic; }
.note a { font-style: normal; color: var(--ink); }

/* Elections — calendar listing */
.elections { margin-bottom: 18px; }
.election { display: grid; grid-template-columns: 1fr; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.election:first-child { padding-top: 0; }
.election p { margin: 0; }
.election-date { font-family: var(--head); font-size: 1.75rem; line-height: 1.1; }
.election-type { font-size: .82rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.uocava { margin-top: 16px; border-top: 3px solid var(--rule); }
.uocava summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 700; font-size: .95rem; }
.uocava summary::before { content: "+"; display: inline-block; width: 1.1em; font-weight: 700; }
.uocava[open] summary::before { content: "\2212"; }
.uocava ul { padding: 4px 0 6px; }
.uocava li { font-size: .88rem; padding: 6px 0; border-bottom: 1px solid var(--hair); }
.fvap { font-size: .9rem; margin: 10px 0 0; }
.fvap a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.credit { font-size: .84rem; color: var(--ink-2); line-height: 1.5; }
.credit a { color: var(--ink); }

/* Legislation — short news items */
.bill { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--hair); }
.bill-meta { margin: 0 0 4px; font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); }
.bill .bill-title { font-size: 1.5rem; line-height: 1.12; margin-bottom: 8px; }
.bill-action { font-size: .95rem; margin-bottom: 2px; }
.bill a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .95rem; }
.updated { font-size: .8rem; font-style: italic; color: var(--ink-2); }
.cta .btn-ghost { justify-content: center; }

/* ---------- Lower: resources + sidebar ---------- */
.lower { grid-template-columns: 1fr; }
.lower > .story { padding-right: 0; }
.lists { display: grid; grid-template-columns: 2fr 1fr; gap: 0 var(--gutter); }
.lists > ul { columns: 2; column-gap: var(--gutter); column-rule: 1px solid var(--hair); }
.lists > ul li { break-inside: avoid; }
.lists > div { border-left: 1px solid var(--hair); padding-left: var(--gutter); }
.lists h3 { font-size: 1.3rem; margin: 0 0 4px; }
.linklist li { border-bottom: 1px solid var(--hair); }
.linklist a { display: flex; align-items: center; min-height: 44px; padding: 6px 0; text-decoration: none; }
.linklist a:hover { text-decoration: underline; }
.wide .note { margin-top: 18px; }


/* ---------- County pages ---------- */
.banner .kicker { margin-bottom: 12px; }
.fold.no-photo { grid-template-columns: 1fr; }
.fold.no-photo .lead { border-right: 0; padding-right: 0; display: grid; grid-template-columns: 2fr 1fr; gap: 0 var(--gutter); align-items: center; }
.fold.no-photo .lede { margin: 0; }
.columns.cols-2 { grid-template-columns: 1fr 1fr; }
.columns.cols-2 > .stack { padding-right: 0; }
.county-page .lead .actions { margin-top: 0; }
.about-county { margin-top: 24px; padding-top: 18px; border-top: 3px solid var(--rule); }
.about-county h2 { font-size: 1.7rem; margin-bottom: 10px; }
.about-county .credit { margin: 0; }
.summary { font-size: 1.12rem; line-height: 1.6; }
.summary::first-line { font-weight: 600; }
.counties-section { padding: 26px 0 30px; border-bottom: 1px solid var(--rule); }
.counties { columns: 6 150px; column-gap: var(--gutter); column-rule: 1px solid var(--hair); }
.counties li { break-inside: avoid; }
.counties a { display: flex; align-items: center; min-height: 34px; text-decoration: none; font-size: .95rem; line-height: 1.2; }
.counties a:hover { text-decoration: underline; }
.stack { padding: 0 var(--gutter); }
.stack > .story { padding-left: 0; padding-right: 0; }
.stack > .about { padding-top: 22px; border-top: 3px solid var(--rule); }
.about h2 { font-size: 1.7rem; }
.about p { font-size: .95rem; }

/* ---------- Footer ---------- */
.foot { margin-top: 0; padding: 22px 0 40px; }
.foot-in { border-top: 3px solid var(--rule); padding-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.foot-name { margin: 0; font-family: var(--head); font-size: 1.8rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.foot-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .92rem; }

/* ---------- Tablet ---------- */
@media (max-width: 1020px) {
  .columns { grid-template-columns: 1fr 1fr; }
  .columns > #legislation, .columns > .stack + .story { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .columns > .stack { padding-right: 0; }
  .lists { grid-template-columns: 1fr 1fr; }
  .lists > ul { columns: 1; }
  .columns.cols-2 { grid-template-columns: 1fr 1fr; }
  .columns.cols-2 > .stack { grid-column: auto; border-top: 0; border-left: 1px solid var(--hair); padding-left: var(--gutter); }
}

/* ---------- Phone ---------- */
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 16.5px; }
  .masthead { padding-top: 10px; }
  .flag { justify-content: space-between; gap: 12px; padding-bottom: 8px; }
  .nameplate { font-size: clamp(2.2rem, 10.6vw, 3.4rem); text-align: left; }
  .menu { display: block; position: relative; }
  .menu summary { list-style: none; display: flex; align-items: center; justify-content: center; min-height: 44px; min-width: 64px; padding: 0 12px; border: 1.5px solid var(--ink); font-weight: 700; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
  .menu summary::-webkit-details-marker { display: none; }
  .menu[open] summary { background: var(--ink); color: var(--paper); }
  .menu nav { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(80vw, 280px); background: var(--paper); border: 1.5px solid var(--ink); }
  .menu li + li { border-top: 1px solid var(--hair); }
  .menu a { display: flex; align-items: center; min-height: 48px; padding: 0 16px; text-decoration: none; font-weight: 600; }
  .sections { display: none; }
  .dateline { grid-template-columns: 1fr auto; font-size: .72rem; letter-spacing: .06em; }
  .dateline .beat { display: none; }
  .banner { padding: 22px 0 18px; text-align: left; }
  .banner h1 { font-size: 2.35rem; margin: 0; }
  .fold, .columns, .lower { grid-template-columns: 1fr; }
  .fold { display: flex; flex-direction: column-reverse; }
  .photo { padding: 18px 0 14px; border-bottom: 1px solid var(--hair); }
  .lead { padding: 18px 0 22px; border-right: 0; }
  .lede { font-size: 1.6rem; }
  .story, .columns > .story:first-child, .columns > :last-child { padding: 22px 0 24px; }
  .stack { padding: 0; }
  main.wrap { display: flex; flex-direction: column; }
  .columns, .lower, .stack { display: contents; }
  .columns > * + *, .stack > .story { border-left: 0; border-top: 1px solid var(--rule); }
  .counties-section { order: 8; border-top: 1px solid var(--rule); border-bottom: 0; padding: 22px 0 24px; }
  .counties { columns: 2; }
  .fold.no-photo .lead { display: block; }
  .fold.no-photo .lede { margin-bottom: 1em; }
  .stack > .about { order: 9; border-top: 3px solid var(--rule); }
  .columns > * + *, .columns > #legislation { border-left: 0; border-top: 1px solid var(--rule); }
  .story h2 { font-size: 1.95rem; }
  .lists { grid-template-columns: 1fr; }
  .lists > div { border-left: 0; padding-left: 0; margin-top: 22px; }
  .counties a { min-height: 44px; }
  .foot-in { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.fold.no-photo .about-county { grid-column: 1 / -1; }
.county-page .steps li:last-child { border-bottom: 0; margin-bottom: 0; }

/* ---------- County details (facts desk) ---------- */
.details { grid-template-columns: 2fr 1fr; }
.details.solo { grid-template-columns: 1fr; }
.details.pair { grid-template-columns: 1fr 1fr; }
.details > .stack { padding-right: 0; }
.details .stack > .story + .story { border-top: 1px solid var(--rule); }
.history .history-text { columns: 2 260px; column-gap: var(--gutter); column-rule: 1px solid var(--hair); }
.history .history-text p { margin: 0; font-size: 1.02rem; line-height: 1.6; }
.history .credit { margin-top: 16px; }
.facts h2 { font-size: 1.7rem; }
.glance { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--gutter); }
.glance > div { padding: 8px 0 10px; border-bottom: 1px solid var(--hair); min-width: 0; }
.glance dt { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.glance dd { margin: 2px 0 0; font-family: var(--head); font-size: 1.45rem; line-height: 1.15; overflow-wrap: anywhere; }
.places li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--hair); }
.place-name { font-weight: 600; }
.place-pop { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.seat { display: inline-block; margin-left: 6px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-ink); border-top: 2px solid var(--gold); padding-top: 1px; }
.stack > .neighbors { border-top: 1px solid var(--rule); }
.neighbors h2 { font-size: 1.7rem; }
@media (max-width: 1020px) {
  .details, .details.pair { grid-template-columns: 1fr 1fr; }
  .details > .history:not(:only-child) { grid-column: 1 / -1; padding-right: 0; }
  .details > .history + .stack { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; }
  .details > .history + .stack > .story + .story { border-top: 0; border-left: 1px solid var(--hair); padding-left: var(--gutter); }
}
@media (max-width: 720px) {
  .details > .history + .stack { display: contents; }
  .details > .history + .stack > .story + .story { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
}
