/* Tsimerman
   One bold device: the reporter's highlighter, used on what matters.
   Franklin for headlines and interface (American newspaper / civic signage),
   Source Serif for reading. Everything else stays quiet. */

:root {
  --paper: #f6f7f5;
  --paper-sunk: #eceeeb;
  --ink: #15201e;
  --ink-soft: #3c4845;
  --muted: #5a6662;
  --rule: #d3dad6;
  --hi: #c4ee4b;          /* lime highlighter */
  --hi-ink: #15201e;      /* text on highlighter */
  --yes: #1e7353;
  --no: #b3362b;
  --link: #0f5a66;
  --focus: #0f5a66;
  --franklin: "Libre Franklin", "Franklin Gothic Medium", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  /* Tsimerman's two wild fonts, used in exactly two places. Swap here. */
  --placard: "Permanent Marker", "Marker Felt", "Comic Sans MS", cursive;
  --hand: "Shantell Sans", "Comic Neue", "Trebuchet MS", sans-serif;
  --sheet: #fffdf6;
  --sheet-rule: #c9d6e8;
  --measure: 40rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101715; --paper-sunk: #18211f; --ink: #e6ece9; --ink-soft: #c3ccc8; --muted: #93a09b;
    --rule: #2c3734; --hi: #b5e33f; --hi-ink: #111; --yes: #4fb68c; --no: #ec6a5d; --link: #7cc9d4; --focus: #7cc9d4;
    --sheet: #1b2321; --sheet-rule: #2f3f4a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101715; --paper-sunk: #18211f; --ink: #e6ece9; --ink-soft: #c3ccc8; --muted: #93a09b;
  --rule: #2c3734; --hi: #b5e33f; --hi-ink: #111; --yes: #4fb68c; --no: #ec6a5d; --link: #7cc9d4; --focus: #7cc9d4;
  --sheet: #1b2321; --sheet-rule: #2f3f4a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--serif); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* The highlighter: a marker swipe that wraps across lines */
.hi { background: linear-gradient(to bottom, transparent 8%, var(--hi) 8%, var(--hi) 92%, transparent 92%);
  color: var(--hi-ink); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 0.15em; margin: 0 -0.15em; }

/* Masthead */
.masthead { padding: 20px 0 14px; border-bottom: 2px solid var(--ink); }
.masthead .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; }
.brand { color: var(--ink); text-decoration: none; display: block; }
/* The wordmark: a hand-lettered placard held up at the podium */
.brand b { display: inline-block; font: 400 2rem/1.05 var(--placard); letter-spacing: 0.01em; padding: 4px 14px 1px;
  background: var(--paper); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--hi); transform: rotate(-2deg); }
.brand span { display: block; font: 500 0.875rem/1.3 var(--franklin); color: var(--muted); margin-top: 10px; }
.brand:hover b { transform: rotate(-1deg); }
@media (prefers-reduced-motion: no-preference) { .brand b { transition: transform .15s ease; } }
.brand-wrap { display: flex; align-items: flex-end; gap: 10px 24px; flex-wrap: wrap; }
/* Meetings watched: the attendance record */
.watched { margin: 0 0 1px; font: 600 0.8125rem/1.3 var(--franklin); color: var(--muted); }
.watched b { font: 900 1.125rem/1 var(--franklin); color: var(--ink); margin-left: 3px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -0.35em 0 var(--hi); padding: 0 2px; }
.nav { display: flex; gap: 22px; font: 600 0.9375rem/1 var(--franklin); }
.nav a { color: var(--ink-soft); text-decoration: none; padding: 6px 0; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* Headings & text */
h1, h2, h3 { font-family: var(--franklin); color: var(--ink); }
.page-title { font: 800 clamp(2rem, 5.2vw, 3.25rem)/1.04 var(--franklin); letter-spacing: -0.028em; margin: 0 0 14px; max-width: 22em; }
.standfirst { font: 400 1.3125rem/1.5 var(--serif); color: var(--ink-soft); max-width: var(--measure); margin: 0 0 14px; }
.byline { font: 500 0.9375rem/1.55 var(--franklin); color: var(--muted); margin: 0; max-width: 46rem; }
.byline a { color: var(--ink-soft); }
.byline .private { color: var(--no); font-weight: 700; }
.section-head { font: 800 1.25rem/1.2 var(--franklin); letter-spacing: -0.01em; margin: 44px 0 14px; padding-top: 12px; border-top: 2px solid var(--ink); }
.note { font: 400 0.9375rem/1.55 var(--franklin); color: var(--muted); max-width: var(--measure); }
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1em; }

.live-tag { display: inline-flex; align-items: center; gap: 7px; font: 800 0.875rem/1 var(--franklin); color: var(--hi-ink); background: var(--hi); padding: 5px 9px 5px 8px; border-radius: 3px; vertical-align: 2px; }
.live-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: blink 1.4s steps(2, start) infinite; }
.live-tag.recess::before { animation: none; opacity: .4; }
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .live-tag::before { animation: none; } }

/* Meeting header */
.meeting-head { padding: 34px 0 6px; }
.meeting-head .live-tag { margin-bottom: 14px; }
.now-line { font: 600 1.0625rem/1.45 var(--franklin); margin: 16px 0 0; max-width: 46rem; }
.now-line span { color: var(--muted); font-weight: 500; }

.tabs { display: flex; gap: 26px; margin: 26px 0 0; border-bottom: 1px solid var(--rule); overflow-x: auto; }
.tabs a { font: 700 1rem/1 var(--franklin); color: var(--muted); text-decoration: none; padding: 12px 0 11px; border-bottom: 4px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--hi); }
.tabs small { font-weight: 600; color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 56px; margin-top: 30px; align-items: start; }
@media (max-width: 920px) { .layout { grid-template-columns: 1fr; gap: 8px; } .layout > aside .sofar { display: none; } }
.sofar-inline { display: none; margin: 0 0 24px; }
@media (max-width: 920px) { .sofar-inline { display: block; } }

/* Live timeline */
.feed-bar { display: flex; justify-content: space-between; align-items: baseline; font: 500 0.875rem/1 var(--franklin); color: var(--muted); margin: 0 0 6px; }
.feed-bar button { font: 600 0.875rem/1 var(--franklin); color: var(--link); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 0.18em; }
.timeline { position: relative; }
.entry { display: grid; grid-template-columns: 5.75rem minmax(0, 1fr); gap: 0 34px; position: relative; padding: 0 0 36px; }
.entry::before { content: ""; position: absolute; left: calc(5.75rem + 16px); top: 12px; bottom: -12px; width: 2px; background: var(--rule); }
.entry:last-child::before { display: none; }
.entry .when { font: 700 0.9375rem/1.3 var(--franklin); font-variant-numeric: tabular-nums; text-align: right; padding-top: 4px; }
.entry .when .from { display: block; white-space: nowrap; font-weight: 500; font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.entry .when a { color: inherit; text-decoration: none; }
.entry .when a:hover { color: var(--link); text-decoration: underline; }
.entry .body { position: relative; padding-left: 0; max-width: var(--measure); }
.entry .body::before { content: ""; position: absolute; left: -23px; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); }
.entry.key .body::before { background: var(--hi); width: 16px; height: 16px; left: -25px; top: 5px; }
.entry h2 { font: 800 1.4375rem/1.22 var(--franklin); letter-spacing: -0.012em; margin: 0 0 8px; }
.entry .kind { font: 700 0.8125rem/1 var(--franklin); color: var(--muted); margin: 0 0 7px; }
.entry .text p { margin: 0 0 0.8em; }
.entry .text p:last-child { margin-bottom: 0; }
.entry.fresh .body { animation: arrive 2.4s ease-out; }
@keyframes arrive { from { background: color-mix(in srgb, var(--hi) 35%, transparent); } to { background: transparent; } }
@media (prefers-reduced-motion: reduce) { .entry.fresh .body { animation: none; } }
.entry.hidden-post { opacity: .45; }
.quote { margin: 14px 0 4px; padding: 0 0 0 16px; border-left: 4px solid var(--hi); font: italic 400 1.25rem/1.45 var(--serif); }
.quote footer { font: normal 600 0.875rem/1.4 var(--franklin); color: var(--muted); margin-top: 6px; border: 0; padding: 0; }
.update { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.update strong { font: 700 0.875rem/1 var(--franklin); margin-right: 6px; }
.update p { display: inline; }
.empty { font: 400 1.0625rem/1.5 var(--serif); color: var(--muted); padding: 10px 0 30px; max-width: var(--measure); }
.new-pill { position: sticky; top: 12px; z-index: 5; display: none; margin: 0 0 12px; font: 700 0.9375rem/1 var(--franklin); background: var(--hi); color: var(--hi-ink); border: 2px solid var(--ink); border-radius: 4px; padding: 9px 14px; cursor: pointer; }
.new-pill.show { display: inline-block; }

/* Roll call */
.rollcall { margin: 14px 0 2px; }
.rollcall .tally { font: 800 1rem/1.3 var(--franklin); margin: 0 0 8px; }
.rollcall .tally .y { color: var(--yes); } .rollcall .tally .n { color: var(--no); }
.rollcall ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rollcall li { font: 700 0.8125rem/1 var(--franklin); padding: 7px 9px; border-radius: 3px; border: 2px solid var(--yes); color: #fff; background: var(--yes); }
.rollcall li.no { background: transparent; color: var(--no); border-color: var(--no); text-decoration: line-through; text-decoration-thickness: 2px; }
.rollcall li.other { background: transparent; color: var(--muted); border-color: var(--rule); }
.rollcall li small { font-weight: 500; margin-left: 4px; }

/* Side rail */
.rail-block { margin: 0 0 30px; }
.rail-block h2 { font: 800 1.0625rem/1.25 var(--franklin); margin: 0 0 10px; }
.rail-block p, .rail-block li { font: 400 0.9375rem/1.5 var(--franklin); color: var(--ink-soft); }
.rail-block ul { margin: 0; padding-left: 1.1em; }
.rail-block li { margin: 0 0 8px; }
.sofar { background: var(--paper-sunk); padding: 16px 18px 8px; border-left: 4px solid var(--hi); }
.sofar li { color: var(--ink); font-size: 1rem; }
.rail-block .count { font: 900 2.75rem/1 var(--franklin); letter-spacing: -0.03em; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }

/* Record */
.video { position: static; }
.video video { width: 100%; aspect-ratio: 16 / 9; display: block; background: #000; border-radius: 3px; }
/* Official video: follows you while it plays. Wide screens: pinned at the top of
   the side rail (left/width set by live.js). Phones: pinned across the top. */
.vid-frame { position: relative; background: #000; border-radius: 3px; }
.vid-frame.docked { position: fixed; top: 14px; z-index: 30; box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 2px solid var(--ink); }
.vid-frame.docked .feed-close { display: block; }
@media (max-width: 920px) {
  .vid-frame.docked { top: 0; left: 0 !important; right: 0; width: auto !important; border-width: 0 0 2px; border-radius: 0; }
  .vid-frame.docked video { border-radius: 0; max-height: 34vh; }
}
/* The item whose moment is playing */
.playing { box-shadow: inset 4px 0 0 var(--hi); background: color-mix(in srgb, var(--hi) 14%, transparent); }
.video .note { margin: 8px 0 0; }
.chapters { list-style: none; padding: 0; margin: 10px 0 0; font: 400 0.875rem/1.4 var(--franklin); }
.chapters li { padding: 5px 0; border-top: 1px solid var(--rule); display: flex; gap: 10px; }
.chapters a { font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; min-width: 3.4em; }
.moments { list-style: none; padding: 0; margin: 0; }
.moments li { display: grid; grid-template-columns: 4.75rem minmax(0, 1fr); gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule); }
.moments .t { font: 700 0.9375rem/1.4 var(--franklin); font-variant-numeric: tabular-nums; }
.moments .t a { text-decoration: none; }
.moments h3 { font: 700 1.0625rem/1.3 var(--franklin); margin: 0 0 2px; }
.moments p { margin: 0; color: var(--ink-soft); }
.votes { list-style: none; margin: 0; padding: 0; }
.votes > li { padding: 14px 0 16px; border-top: 1px solid var(--rule); }
.votes h3 { font: 700 1.0625rem/1.3 var(--franklin); margin: 0 0 4px; }
.votes .result { font: 800 1rem/1.3 var(--franklin); }
.votes p { margin: 4px 0 0; color: var(--ink-soft); max-width: var(--measure); }

table.split { width: 100%; max-width: var(--measure); border-collapse: collapse; font: 400 0.9375rem/1.4 var(--franklin); margin: 4px 0 10px; }
table.split th { text-align: left; font-weight: 700; color: var(--muted); padding: 0 8px 8px 0; border-bottom: 2px solid var(--ink); }
table.split td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.split .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; width: 4.5em; }
table.split .bar { width: 34%; }
table.split .bar span { display: block; height: 10px; background: var(--ink); border-radius: 1px; min-width: 2px; }
table.split tfoot td { font-weight: 800; border-bottom: 0; border-top: 2px solid var(--ink); }

/* Commenters */
/* Public comment as the sign-up sheet at the back of the chamber */
.speakers { list-style: none; padding: 0; margin: 0; background: var(--sheet); border: 1px solid var(--rule);
  border-top: 3px solid var(--ink); }
.speaker { display: grid; grid-template-columns: 2.25rem 4.25rem minmax(0, 1fr); gap: 14px; padding: 14px 14px 14px 0;
  border-top: 1px solid var(--sheet-rule); }
.speaker:first-child { border-top: 0; }
.speaker::before { content: attr(data-n); font: 700 0.8125rem/1.9 var(--franklin); color: var(--muted); text-align: right;
  border-right: 2px solid color-mix(in srgb, var(--no) 45%, transparent); padding-right: 8px; }
.speaker .t { font: 700 0.9375rem/1.35 var(--franklin); font-variant-numeric: tabular-nums; }
.speaker .t a { text-decoration: none; }
.speaker .t small { display: block; font-weight: 500; font-size: 0.8125rem; color: var(--muted); margin-top: 3px; }
/* The sign-up sheet's first line: hand-drawn but not handwriting */
.speaker h3 { font: 550 1.1875rem/1.3 var(--hand); font-variation-settings: "INFM" 30, "BNCE" 0; margin: 0; }
.speaker h3 .name { font-weight: 650; }
.speaker h3 .aff { font-weight: 450; color: var(--ink-soft); }
.speaker h3 .flag { font-weight: 450; color: var(--muted); font-size: 0.875rem; }
.speaker.notable h3 .name { background: linear-gradient(to bottom, transparent 55%, var(--hi) 55%, var(--hi) 92%, transparent 92%); }
/* Everything under the name: one clean sans, quiet hierarchy */
.speaker p { margin: 4px 0 0; max-width: var(--measure); font: 400 1rem/1.55 var(--franklin); color: var(--ink); }
.speaker .asks { font-size: 0.9375rem; color: var(--muted); }
.positions { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; list-style: none; font: 500 0.875rem/1.4 var(--franklin); }
.positions a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--rule); }
.positions a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.positions .main a { color: var(--ink-soft); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filters button, .filters a { font: 600 0.875rem/1 var(--franklin); color: var(--ink-soft); background: transparent; border: 1px solid var(--rule); border-radius: 3px; padding: 7px 10px; cursor: pointer; text-decoration: none; }
.filters [aria-pressed="true"], .filters a[aria-current="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* Tracker */
.tracker { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.tracker li { border-top: 1px solid var(--rule); }
.tracker a { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 4px 18px; padding: 14px 0; color: var(--ink); text-decoration: none; }
.tracker a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
.tracker .n { font: 900 2rem/1 var(--franklin); letter-spacing: -0.03em; text-align: right; font-variant-numeric: tabular-nums; grid-row: span 2; }
.tracker h3 { font: 700 1.125rem/1.3 var(--franklin); margin: 2px 0 0; }
.tracker .topic { font: 500 0.875rem/1.3 var(--franklin); color: var(--muted); }
.tracker .bar { grid-column: 2; height: 6px; background: var(--paper-sunk); border-radius: 1px; margin-top: 4px; }
.tracker .bar span { display: block; height: 100%; background: var(--ink); border-radius: 1px; }

/* Home */
.lead { padding: 34px 0 10px; }
.lead .latest { list-style: none; padding: 0; margin: 18px 0 0; max-width: 46rem; }
.lead .latest li { display: grid; grid-template-columns: 5.25rem 1fr; gap: 14px; padding: 9px 0; border-top: 1px solid var(--rule); font: 600 1.0625rem/1.35 var(--franklin); }
.lead .latest time { font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.home { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 56px; margin-top: 10px; }
@media (max-width: 920px) { .home { grid-template-columns: 1fr; gap: 0; } }
.story { padding: 18px 0; border-top: 1px solid var(--rule); }
.story:first-of-type { border-top: 0; padding-top: 4px; }
.story h3 { font: 800 1.375rem/1.2 var(--franklin); letter-spacing: -0.01em; margin: 0 0 6px; }
.story h3 a { color: var(--ink); text-decoration: none; }
.story h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.story p { margin: 0 0 6px; color: var(--ink-soft); max-width: var(--measure); }
.story .byline { font-size: 0.875rem; }
.schedule { list-style: none; padding: 0; margin: 0; }
.schedule li { padding: 10px 0; border-top: 1px solid var(--rule); font: 400 0.9375rem/1.45 var(--franklin); color: var(--ink-soft); }
.schedule b { display: block; color: var(--ink); font-weight: 700; }
.mini-tracker { list-style: none; padding: 0; margin: 0; }
.mini-tracker li { display: grid; grid-template-columns: 2.75rem 1fr; gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule); font: 600 0.9375rem/1.3 var(--franklin); }
.mini-tracker b { font-weight: 900; text-align: right; font-variant-numeric: tabular-nums; }
.mini-tracker a { color: var(--ink); text-decoration: none; }
.mini-tracker a:hover { text-decoration: underline; }

.site-foot { margin-top: 80px; padding: 22px 0 44px; border-top: 2px solid var(--ink); font: 400 0.875rem/1.6 var(--franklin); color: var(--muted); }
.site-foot p { max-width: 46rem; margin: 0; }

/* Admin (plain on purpose) */
.admin { font: 400 0.9375rem/1.5 var(--franklin); padding-top: 20px; }
.admin h1 { font: 800 1.75rem/1.2 var(--franklin); }
.admin table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin td, .admin th { border-bottom: 1px solid var(--rule); padding: 7px 6px; text-align: left; vertical-align: top; }
.admin form.inline { display: inline; }
.admin button { font: 600 0.8125rem var(--franklin); padding: 5px 10px; border: 1px solid var(--rule); background: var(--paper-sunk); color: var(--ink); border-radius: 3px; cursor: pointer; }
.admin input[type=text], .admin input[type=password], .admin textarea, .admin select { font: 0.9375rem var(--franklin); padding: 7px 9px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 3px; width: 100%; }
.admin textarea { min-height: 120px; }
.admin .row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .admin .row { grid-template-columns: 1fr; } }
.pill { font: 700 0.75rem/1 var(--franklin); padding: 3px 7px; border-radius: 3px; background: var(--paper-sunk); }
.pill.live { background: var(--hi); color: var(--hi-ink); }
.lvl-warn { color: #9a5b00; } .lvl-error { color: var(--no); }

.speaker[hidden] { display: none; }

/* Live broadcast player: inline at the top, docks to a corner while playing */
.feed-player { margin: 0 0 26px; }
.feed-frame { position: relative; background: #000; border-radius: 3px; overflow: hidden; }
.feed-frame video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.feed-close { display: none; position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.65); color: #fff; font: 700 18px/28px var(--franklin); cursor: pointer; }
.feed-frame.docked { position: fixed; right: 16px; bottom: 16px; width: min(380px, calc(100vw - 32px)); z-index: 30;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); border: 2px solid var(--ink); }
.feed-frame.docked .feed-close { display: block; }
.feed-player .note { margin: 8px 0 0; }
@media (max-width: 600px) {
  .speaker { grid-template-columns: 2rem minmax(0, 1fr); gap: 4px 12px; }
  .speaker::before { grid-row: span 2; }
  .speaker .t { display: flex; gap: 10px; align-items: baseline; }
  .speaker .t small { margin-top: 0; }
}
