:root {
  --ink: #1B2A41;
  --ink-soft: #2A3C57;
  --muted: #5B6470;
  --line: #D7DEE7;
  --line-strong: #B8C2CF;
  --ground: #F2F5F9;
  --page: #E6EBF1;
  --card: #FFFFFF;
  --accent: #B4650A;
  --accent-ink: #8A4D06;
  --head-text: #DCE3EC;
  --head-kicker: #C9D3E0;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--page);
  line-height: 1.45;
}
a { color: var(--accent-ink); }
a:hover { color: #5E3404; }
select, textarea, button, input { font-family: inherit; font-size: 16px; }

.shell { width: 100%; max-width: 640px; min-height: 100vh; margin: 0 auto; background: var(--ground); display: flex; flex-direction: column; }
.shell.white { background: var(--card); }

header.top { padding: 20px 20px 16px; background: var(--ink); color: #fff; display: flex; flex-direction: column; gap: 6px; }
header.top .kicker { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--head-kicker); }
header.top h1 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; }
header.top p { margin: 0; font-size: 14px; color: var(--head-text); }
header.top .notice { margin-top: 6px; padding: 10px 12px; background: var(--ink-soft); border-radius: 6px; font-size: 13px; color: #fff; }

nav.tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); background: var(--card); }
nav.tabs a { display: flex; align-items: center; justify-content: center; height: 44px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; }
nav.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--accent); }

main { padding: 20px; display: flex; flex-direction: column; gap: 16px; flex-grow: 1; }
@media (min-width: 640px) { main { padding: 28px 32px; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card h2 { margin: 0; font-size: 14px; font-weight: 600; }
.small { font-size: 13px; color: var(--muted); margin: 0; }
form { display: flex; flex-direction: column; gap: 20px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 32px; font-weight: 700; line-height: 1; }
.stat .value.accent { color: var(--accent-ink); font-size: 30px; line-height: 1.1; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field legend, .field .q { font-size: 14px; font-weight: 600; padding: 0; }
.field select { height: 48px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--card); color: var(--ink); }
.field input[type="text"] { height: 48px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--card); color: var(--ink); }
.field textarea { width: 100%; padding: 12px; line-height: 1.4; border: 1.5px solid var(--line-strong); border-radius: 6px; resize: vertical; color: var(--ink); }
fieldset { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choices.row { flex-direction: row; }
.choices label { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 6px; font-size: 15px; cursor: pointer; }
.choices.row label { flex: 1 1 0; justify-content: center; min-height: 44px; }
.choices input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.choices label:has(input:checked) { border-color: var(--ink); background: var(--ground); font-weight: 600; }

.btn { display: flex; width: 100%; align-items: center; justify-content: center; height: 52px; border: 0; border-radius: 6px; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.dark { background: var(--ink); color: #fff; }
.btn.outline { height: 44px; background: transparent; border: 1.5px solid var(--ink); color: var(--ink); font-size: 14px; font-weight: 600; }
.btn[disabled] { opacity: 0.6; cursor: wait; }

.rows { display: flex; flex-direction: column; gap: 10px; }
.row-line { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 12px; }
.row-line strong { font-weight: 600; }
.row-line.muted { color: var(--muted); }
.bar { height: 10px; background: var(--line); border-radius: 3px; overflow: hidden; }
.bar > div { height: 100%; background: var(--ink); border-radius: 3px; }
.bar > div.accent { background: var(--accent); }
.bar-row { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.bar-row .row-line { font-size: 13px; }

.quote { border-left: 4px solid var(--accent); }
.quote p { margin: 0; font-size: 15px; font-style: italic; }
.foot { font-size: 12px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
.ok { padding: 14px; border-radius: 6px; background: #E7F3EA; color: #1E5631; font-size: 15px; }
.err { padding: 12px 14px; border-radius: 6px; background: #FBE9E7; color: #8A2A1E; font-size: 14px; }
.hidden { display: none !important; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
ul.tight, ol.tight { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.evidence { border-left: 3px solid var(--ink); padding-left: 12px; display: flex; flex-direction: column; gap: 2px; }
.evidence.accent { border-left-color: var(--accent); }
.evidence b { font-size: 14px; }
.evidence span { font-size: 13px; color: var(--muted); }

.proposal-link { color: inherit; text-decoration: none; border-left: 4px solid var(--accent); }
.proposal-link:hover { color: inherit; border-color: var(--line-strong); border-left-color: var(--accent); }
.proposal-link .more { font-size: 13px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }
.kicker-sm { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.proposal { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.proposal:first-child { padding-top: 0; border-top: 0; }
.proposal-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; }
.proposal-body { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.btn.vote { width: auto; padding: 0 16px; flex-shrink: 0; }
.back { font-size: 13px; font-weight: 600; text-decoration: none; }

.monthpick { border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--card); padding: 8px 10px 10px; }
.mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mp-head button { width: 44px; height: 40px; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; }
.mp-head button:hover:not([disabled]) { background: var(--ground); }
.mp-head button[disabled] { opacity: 0.25; cursor: default; }
.mp-year { font-size: 16px; font-weight: 700; }
.mp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mp-grid button { height: 44px; border: 1.5px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); font-size: 15px; cursor: pointer; }
.mp-grid button:hover:not([disabled]) { border-color: var(--ink); }
.mp-grid button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.mp-grid button[disabled] { background: var(--ground); color: var(--line-strong); cursor: default; }
.req { color: var(--accent-ink); font-weight: 700; margin-left: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
header.top .kicker.center { text-align: center; }
.stat .value.nodata { font-size: 20px; line-height: 1.2; color: var(--muted); }

.voices { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line); }
.voices-h { margin: 0; font-size: 14px; font-weight: 600; }
.voice-list { display: flex; flex-direction: column; gap: 10px; }
.voice { margin: 0; padding: 10px 12px; background: var(--ground); border-left: 4px solid var(--accent); border-radius: 0 6px 6px 0; }
.voice p { margin: 0; font-size: 15px; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; }
.voice.open p { display: block; -webkit-line-clamp: unset; }
.voice p::before { content: "\201C"; }
.voice p::after { content: "\201D"; }
.linkish { margin-top: 4px; padding: 0; border: 0; background: none; color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; }

/* admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn.admin-small { width: auto; height: 40px; padding: 0 14px; font-size: 14px; }
.btn.danger { border-color: #8A2A1E; color: #8A2A1E; }
.admin-tabs { margin: 0 -20px; }
@media (min-width: 640px) { .admin-tabs { margin: 0 -32px; } }
.admin-list { display: flex; flex-direction: column; gap: 12px; }
.admin-list .field .q, .admin-list .field label.q { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; }
.admin-list input[type="text"], .admin-list select, .admin-list textarea, .field input[type="password"] { width: 100%; min-height: 40px; padding: 8px 10px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--card); color: var(--ink); font-size: 15px; font-weight: 400; }
.field input[type="password"] { height: 48px; font-size: 16px; }
.admin-ticks { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 400; }
.admin-ticks label { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card.pending { border-left: 4px solid var(--accent); }
#filter { width: 100%; height: 44px; padding: 0 12px; border: 1.5px solid var(--line-strong); border-radius: 6px; font-size: 15px; }

/* Utility classes: the Content-Security-Policy (style-src 'self') blocks inline style="" attributes */
.contents { display: contents; }
.big-num { font-size: 30px; font-weight: 700; line-height: 1.1; }
.big-num.accent { color: var(--accent-ink); }
.card h2.sub { font-size: 12px; font-weight: 400; color: var(--muted); }
.card h2.sub .ink { color: var(--ink); font-weight: 700; }
.link-strong { font-size: 14px; font-weight: 600; }
.muted-inline { font-weight: 400; color: var(--muted); }
.spacer-16 { height: 16px; }
.spacer-12 { height: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.body-14 { margin: 0; font-size: 14px; }
.voice-list.scrolls { overflow-y: auto; overscroll-behavior: contain; padding-right: 4px; border-bottom: 1px solid var(--line); }
.voice-list:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.field.subfield { margin-top: 8px; padding: 12px 0 0 12px; border-left: 3px solid var(--line); }
.field.subfield label { font-size: 14px; font-weight: 600; }
