/* Demologue: a plain newspaper front page. Light only, system fonts (nothing loaded from elsewhere). */
:root {
  color-scheme: light;
  --paper: #fbfaf7; --ink: #16171a; --muted: #5e6168; --rule: #d9d6cf; --rule-strong: #16171a;
  --accent: #8a1c1c; --link: #1b4f9c; --soft: #f1eee8; --ai: #5b4a8b;
  --serif: "Iowan Old Style", "Charter", "Georgia", "Cambria", "Times New Roman", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
img, svg { max-width: 100%; }
.story, .rep, .addr, .agenda, .latest, .official .text, #lookup h2 { overflow-wrap: anywhere; }
html, body { background: var(--paper); color: var(--ink); }
body { margin: 0; }
a { color: var(--link); text-underline-offset: 2px; }
/* one centred column: never wider than the screen minus a gutter, never wider than 1180px */
.wrap { --gutter: clamp(16px, 4vw, 24px); width: min(100% - 2 * var(--gutter), 1180px); margin-inline: auto; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 16px; top: 8px; background: var(--paper); padding: 8px; z-index: 9; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.error { color: var(--accent); font-weight: 600; margin: 6px 0 0; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

/* masthead */
.masthead { border-bottom: 3px double var(--rule-strong); padding: 22px 0 10px; background: var(--paper); }
.mast-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.mast-title { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 7vw, 3.4rem); letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none; line-height: 1; }
.mast-date { margin: 10px 0 0; padding-top: 8px; border-top: 1px solid var(--rule-strong); font-size: .82rem;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.zipform { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 18rem; max-width: 28rem; }
.zipform input { flex: 1 1 7rem; min-width: 0; width: 0; font: inherit; font-size: 1rem; padding: 9px 12px; border: 1px solid var(--ink); border-radius: 2px;
  background: #fff; color: var(--ink); letter-spacing: .06em; }
button, .btn { font: inherit; font-size: .95rem; font-weight: 600; border: 1px solid var(--ink); border-radius: 2px; padding: 9px 14px;
  cursor: pointer; background: var(--ink); color: var(--paper); text-decoration: none; display: inline-flex; align-items: center; min-height: 42px; }
.zipform button { flex: 1 0 auto; justify-content: center; }
button:hover, .btn:hover { background: #33353a; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--soft); }

/* front page */
main { padding-bottom: 30px; }
#lead .story { border-bottom: 1px solid var(--rule-strong); padding: 26px 0 22px; margin-bottom: 4px; }
#lead .story h2 { font-size: clamp(1.55rem, 5vw, 2.6rem); line-height: 1.12; max-width: 24em; }
#lead .story .body { font-size: clamp(1.04rem, 2.5vw, 1.15rem); max-width: 46em; }
.feed { columns: 3 280px; column-gap: 40px; column-rule: 1px solid var(--rule); padding-top: 4px; }
.story { break-inside: avoid; padding: 16px 0 18px; border-bottom: 1px solid var(--rule); }
.kicker { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
.story h2 { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1.22; margin: 0 0 8px; letter-spacing: -0.005em; }
.story .body { font-family: var(--serif); font-size: 1.04rem; line-height: 1.55; margin: 0 0 10px; }
.meta { font-size: .8rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.meta .ai { color: var(--ai); font-weight: 600; letter-spacing: .02em; }
.meta a { color: var(--muted); }
.meta a:hover { color: var(--link); }
details.official { margin-top: 8px; font-size: .9rem; }
details.official summary { cursor: pointer; color: var(--muted); list-style: none; }
details.official summary::-webkit-details-marker { display: none; }
details.official summary::before { content: "+ "; }
details.official[open] summary::before { content: "– "; }
details.official .text { white-space: pre-line; margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--rule); color: #2c2e33; }

/* representatives */
#lookup { padding-top: 22px; }
#lookup > .sechead h2 { font-family: var(--serif); font-size: clamp(1.4rem, 4.5vw, 1.9rem); line-height: 1.2; margin: 0 0 4px; }
.level { margin-top: 22px; }
.level > h3 { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  border-top: 1px solid var(--rule-strong); padding-top: 10px; margin: 0 0 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 36px; }
.card { padding: 12px 0 14px; border-bottom: 1px solid var(--rule); }
.rep .who { font-family: var(--serif); font-weight: 700; font-size: 1.2rem; }
.rep .role { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions .btn { flex: 1 1 auto; justify-content: center; min-height: 40px; padding: 7px 12px; font-size: .88rem; }
.addr { font-size: .84rem; color: var(--muted); margin-top: 6px; }
.note { font-size: .9rem; color: var(--muted); font-style: italic; margin: 0 0 8px; }
.cat { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.meeting .when { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }
.meeting ul { margin: 6px 0 0; padding-left: 20px; font-size: .95rem; }
.bill .top { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.num { font-weight: 700; font-size: .85rem; letter-spacing: .04em; }
.pill { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; }
.bill .title { font-family: var(--serif); font-size: 1.05rem; margin: 4px 0 6px; }
.links { display: flex; gap: 14px; flex-wrap: wrap; font-size: .85rem; margin-top: 6px; }
.official-text { white-space: pre-line; font-size: .92rem; }
details summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.badge { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* representatives: one compact line each, caret opens contact details */
.reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 0 32px;
  border-bottom: 1px solid var(--rule-strong); margin-bottom: 6px; padding-bottom: 4px; }
details.rep { border-bottom: 1px solid var(--rule); }
details.rep summary { color: var(--ink); font-size: inherit; list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  padding: 10px 0 10px 18px; position: relative; }
details.rep summary::-webkit-details-marker { display: none; }
details.rep summary::before { content: ""; position: absolute; left: 2px; top: 17px; border: 5px solid transparent;
  border-left: 6px solid var(--ink); transition: transform .15s; }
details.rep[open] summary::before { transform: rotate(90deg) translate(1px, 1px); }
details.rep .who { font-family: var(--serif); font-weight: 700; font-size: 1.08rem; }
details.rep .role { color: var(--muted); font-size: .86rem; }
details.rep .rep-body { padding: 0 0 12px 18px; }
.section-head { font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink);
  border-top: 1px solid var(--rule-strong); padding-top: 10px; margin: 26px 0 0; }
.latest { font-size: .86rem; color: var(--muted); margin: -2px 0 8px; }
.latest strong { color: var(--ink); font-weight: 650; }

/* Federal / State / Local section bar (newspaper section heads) */
.sections { display: flex; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong); margin: 14px 0 18px; }
.sections button { flex: 1 1 0; max-width: 10rem; justify-content: center; background: none; color: var(--muted); border: 0;
  border-radius: 0; min-height: 44px; padding: 10px 4px; font-size: .8rem; font-weight: 700; letter-spacing: clamp(.06em, 1vw, .16em); text-transform: uppercase; border-right: 1px solid var(--rule); }
.sections button:hover { background: var(--soft); color: var(--ink); }
.sections button[aria-selected="true"] { color: var(--paper); background: var(--ink); }
.lead-wrap .story { border-bottom: 1px solid var(--rule-strong); padding-top: 18px; }
.lead-wrap .story h2 { font-size: clamp(1.5rem, 4.5vw, 2.2rem); line-height: 1.15; }
.lead-wrap .story .body { font-size: 1.12rem; max-width: 46em; }
.agenda { font-family: var(--serif); margin: 4px 0 10px; padding-left: 18px; font-size: 1rem; }
.agenda li { margin: 3px 0; }
#lookup #fedfeed #lead .story { padding-top: 18px; }
#frontpage:empty { display: none; }

footer.site { border-top: 3px double var(--rule-strong); padding: 18px 0 40px; font-size: .84rem; color: var(--muted); }
footer.site p { margin: 6px 0; max-width: 60em; }
