:root {
  color-scheme: light;
  --ink: #172433;
  --muted: #617080;
  --paper: #f4f6f8;
  --panel: #fff;
  --line: #dce2e8;
  --blue: #174f7a;
  --blue-dark: #103a5a;
  --red: #b74738;
  --green: #3d7958;
  --shadow: 0 10px 30px rgba(23, 36, 51, .055);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); line-height: 1.5; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-size: 17px; letter-spacing: -.02em; }
.brand b { color: var(--blue); }
.brand-mark { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--blue); color: white; font-weight: 800; font-size: 13px; letter-spacing: -.04em; }
nav { display: flex; gap: 25px; align-items: center; }
nav a { color: var(--muted); font-size: 13px; text-decoration: none; }
nav .admin-link { color: var(--blue); font-weight: 700; }
.hero { display: grid; grid-template-columns: 1fr auto; gap: 30px; align-items: end; padding: 45px 0 24px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .13em; line-height: 1.4; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(29px, 4vw, 43px); letter-spacing: -.045em; line-height: 1.08; }
.hero-copy { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 16px; }
.date-card { min-width: 245px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: white; box-shadow: var(--shadow); }
.date-card > span, .date-card small { display: block; color: var(--muted); font-size: 11px; }
.date-card strong { display: block; margin: 3px 0; font-size: 19px; }
.clock-row { display: flex; gap: 17px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.clock-row b { margin-left: 4px; color: var(--ink); font-variant-numeric: tabular-nums; }
.status-strip { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 17px; border: 1px solid #d2dde5; border-radius: 12px; background: #edf4f8; }
.status-strip > div { display: flex; flex-direction: column; }
.status-strip strong { font-size: 13px; }
.status-strip span:not(.status-dot) { color: var(--muted); font-size: 11px; }
.status-dot { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #7b8a99; box-shadow: 0 0 0 4px rgba(123, 138, 153, .12); }
.status-dot[data-state="provisional"], .status-dot[data-state="provisional_final"] { background: #c58b26; box-shadow: 0 0 0 4px rgba(197, 139, 38, .13); }
.status-dot[data-state="final"] { background: var(--green); box-shadow: 0 0 0 4px rgba(61, 121, 88, .13); }
.status-dot[data-state="degraded"] { background: var(--red); box-shadow: 0 0 0 4px rgba(183, 71, 56, .12); }
.updated { margin-left: auto; text-align: right; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 14px 0; }
.metric-card { min-height: 115px; display: flex; flex-direction: column; padding: 17px 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.metric-card span { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-card strong { margin: 7px 0 3px; font-size: 25px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.metric-card small { color: var(--muted); font-size: 10px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: 14px; align-items: stretch; }
.panel { min-width: 0; margin: 14px 0; padding: 21px; border: 1px solid var(--line); border-radius: 13px; background: var(--panel); box-shadow: var(--shadow); }
.external-widgets-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.external-widgets-grid .panel { margin: 14px 0 0; }
.external-widget { min-height: 390px; }
.widget-disclosure, .widget-privacy-note, .hemicycle-source-note { color: var(--muted); font-size: 10px; }
.widget-disclosure { margin: -4px 0 13px; }
.widget-fallback { margin: 7px 0 0; font-size: 10px; }
.widget-privacy-note { grid-column: 1 / -1; margin: -3px 0 14px; }
.widget-slot { width: 100%; min-height: 260px; }
.community-select-label { margin: 0 0 12px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel-heading h2, .panel h2 { margin-bottom: 0; font-size: 19px; letter-spacing: -.025em; }
.tag { display: inline-flex; flex-shrink: 0; align-items: center; min-height: 25px; padding: 4px 9px; border: 1px solid #d5e1e9; border-radius: 999px; background: #f3f7fa; color: var(--blue-dark); font-size: 10px; font-weight: 750; }
.tag-muted { border-color: #e1e4e8; background: #f7f8f9; color: #66717c; }
.empty-state { display: grid; min-height: 125px; place-items: center; margin: 0; padding: 25px; border: 1px dashed #cdd6df; border-radius: 10px; color: var(--muted); text-align: center; font-size: 13px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th, td { padding: 10px 9px; border-bottom: 1px solid #edf0f3; white-space: nowrap; }
thead th { color: var(--muted); font-size: 10px; font-weight: 750; }
tbody th { font-weight: 700; white-space: normal; }
td:not(:first-child), thead th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.source-line { margin: 13px 0 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.hemicycle-empty { display: grid; min-height: 210px; place-items: center; padding: 20px; border: 1px dashed #cdd6df; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.hemicycle-wrap { overflow: hidden; }
.hemicycle-source-note { margin: 9px 0; }
#hemicycle { display: block; width: 100%; max-height: 280px; }
.seat-legend { display: flex; flex-wrap: wrap; gap: 8px 15px; margin: 9px 0 0; padding: 0; list-style: none; }
.seat-legend li { display: inline-flex; gap: 6px; align-items: center; color: #43505e; font-size: 10px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.majority-panel > p, .polls-panel > p { color: var(--muted); font-size: 12px; }
.notice { padding: 13px 15px; border-left: 3px solid #b28a41; border-radius: 4px; background: #faf7ef; color: #67562f; font-size: 12px; }
.majority-intro { max-width: 760px; margin: 8px 0 18px; color: var(--muted); font-size: 13px; }
.majority-panel .tag strong { margin-left: 3px; font-variant-numeric: tabular-nums; }
.majority-tool { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 24px; align-items: start; }
.majority-controls { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.majority-controls h3 { margin: 0; font-size: 16px; }
.majority-controls p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.majority-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.majority-suggest-toggle { min-height: 40px; padding: 8px 12px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 750; transition: background-color 150ms ease, border-color 150ms ease; }
.majority-suggest-toggle:hover { border-color: var(--blue-dark); background: var(--blue-dark); }
.majority-clear { min-height: 40px; padding: 8px 12px; border: 1px solid #cbd6df; border-radius: 7px; background: #fff; color: var(--blue-dark); font-size: 11px; font-weight: 750; transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
.majority-clear:hover:not(:disabled) { border-color: var(--blue); background: #f3f8fb; }
.majority-clear:disabled { cursor: default; opacity: .48; }
.majority-search-label { display: flex; flex-direction: column; gap: 6px; margin: 0 0 13px; color: #455362; font-size: 11px; font-weight: 700; }
.majority-search-label input { min-height: 42px; margin: 0; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.party-options { display: grid; grid-template-columns: 1fr; gap: 6px; max-height: 460px; overflow-y: auto; padding: 2px 4px 2px 1px; }
.party-option { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 48px; margin: 0; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 12px; cursor: pointer; transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease; }
.party-option:hover { border-color: #aebdca; background: #f8fbfd; }
.party-option.is-selected { border-color: #6b91ab; background: #f0f6fa; box-shadow: inset 3px 0 0 var(--blue); }
.party-option input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--blue); cursor: pointer; }
.party-name { min-width: 0; overflow-wrap: anywhere; font-weight: 650; }
.party-seats { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.party-seats strong { font-size: 13px; }
.party-seats small { color: var(--muted); font-size: 10px; }
.majority-no-matches { margin: 9px 0 0; color: var(--muted); font-size: 12px; }
.majority-summary { position: sticky; top: 18px; min-width: 0; padding: 19px; border: 1px solid #d5e1e8; border-radius: 12px; background: #f3f7fa; transition: border-color 180ms ease, background-color 180ms ease; }
.majority-summary.has-majority { border-color: #9fc5ad; background: #f1f8f3; }
.majority-summary h3 { margin: -2px 0 16px; font-size: 16px; }
.majority-seat-total { display: flex; align-items: baseline; gap: 8px; margin: 0 0 9px; }
.majority-seat-total strong { font-size: 48px; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.majority-seat-total span { color: var(--muted); font-size: 12px; font-weight: 650; }
.majority-threshold-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.majority-threshold-label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.majority-threshold-label > span:last-child { color: var(--blue-dark); font-weight: 750; }
.majority-summary progress { display: block; width: 100%; height: 11px; margin: 0 0 12px; overflow: hidden; border: 0; border-radius: 999px; background: #dfe7ed; accent-color: var(--blue); }
.majority-summary progress::-webkit-progress-bar { border-radius: 999px; background: #dfe7ed; }
.majority-summary progress::-webkit-progress-value { border-radius: 999px; background: var(--blue); transition: width 180ms ease; }
.majority-summary progress::-moz-progress-bar { border-radius: 999px; background: var(--blue); }
.majority-summary.has-majority progress { accent-color: var(--green); }
.majority-summary.has-majority progress::-webkit-progress-value, .majority-summary.has-majority progress::-moz-progress-bar { background: var(--green); }
.majority-summary > #majority-verdict { min-height: 40px; margin: 0; color: var(--blue-dark); font-size: 12px; font-weight: 700; }
.majority-summary.has-majority > #majority-verdict { color: #316446; }
.majority-selected { margin-top: 15px; padding-top: 13px; border-top: 1px solid #d8e2e9; }
.majority-selected > span { color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.majority-selected p { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.majority-selected ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.majority-selected li { padding: 5px 8px; border: 1px solid #d4e0e8; border-radius: 6px; background: #fff; color: #344453; font-size: 10px; }
.majority-suggestions { grid-column: 1 / -1; margin-top: 2px; padding-top: 19px; border-top: 1px solid var(--line); }
.majority-suggestions-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 13px; }
.majority-suggestions-heading h3 { margin: 0 0 4px; font-size: 16px; }
.majority-suggestions-heading p { max-width: 680px; margin: 0; color: var(--muted); font-size: 11px; }
.majority-suggestions-heading > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 6px; background: #eef3f6; color: #485968; font-size: 10px; font-weight: 750; }
.majority-suggestions-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.majority-suggestion-card { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.majority-suggestion-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.majority-suggestion-heading h4 { margin: 0; font-size: 12px; }
.majority-suggestion-heading > strong { flex: 0 0 auto; color: var(--blue-dark); font-size: 12px; font-variant-numeric: tabular-nums; }
.majority-suggestion-parties { display: grid; gap: 5px; margin: 10px 0; padding: 0; list-style: none; }
.majority-suggestion-parties li { display: flex; justify-content: space-between; gap: 8px; color: #455362; font-size: 10px; }
.majority-suggestion-parties li span { overflow-wrap: anywhere; }
.majority-suggestion-parties li strong { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.majority-suggestion-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 9px; border-top: 1px solid #edf0f3; }
.majority-suggestion-footer > span { color: var(--muted); font-size: 10px; }
.majority-try-pact { min-height: 40px; padding: 7px 10px; border: 1px solid #cbd6df; border-radius: 6px; background: #f8fafb; color: var(--blue-dark); font-size: 10px; font-weight: 750; }
.majority-try-pact:hover { border-color: var(--blue); background: #f0f6fa; }
.majority-suggestions-empty { margin: 0; padding: 14px; border-radius: 8px; background: #f5f7f8; color: var(--muted); font-size: 12px; }
.polls-panel { margin-bottom: 20px; }
.poll-card { margin-top: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfd; }
.exit-poll-card { border-color: #d7b36b; background: #fffdf8; }
.exit-poll-tag { background: #f8edcf; color: #71551c; }
.poll-card-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; }
.poll-card h3 { margin: 0; font-size: 15px; }
.poll-card p { margin: 7px 0; color: var(--muted); font-size: 11px; }
.poll-card .poll-methodology { color: #415362; }
.poll-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; padding: 0; list-style: none; }
.poll-results li { padding: 5px 8px; border-radius: 5px; background: #edf2f5; font-size: 10px; }
.poll-card a { font-size: 10px; font-weight: 700; }
.subheading { margin: 16px 0 8px; font-size: 13px; }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 9px 20px; padding: 19px 2px 32px; color: var(--muted); font-size: 10px; }
.page-footer > div { display: flex; flex-direction: column; }
.page-footer strong { color: var(--ink); }
.page-footer code { padding: 1px 4px; border-radius: 3px; background: #e9edf1; }
.hidden { display: none !important; }

.admin-body { min-height: 100vh; background: #f1f4f7; }
.admin-main { padding-top: 28px; }
.admin-title { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; }
.admin-title h1 { font-size: 32px; }
.admin-title p:last-child { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); gap: 14px; align-items: start; }
.admin-grid .panel { margin: 0 0 14px; }
.admin-grid .panel > p { color: var(--muted); font-size: 12px; }
label { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; color: #455362; font-size: 11px; font-weight: 700; }
.field-note { display: block; margin: -7px 0 12px; color: var(--muted); font-size: 10px; }
input, textarea, select { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #cbd4dd; border-radius: 7px; background: white; color: var(--ink); font-weight: 400; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(23, 79, 122, .25); outline-offset: 2px; border-color: var(--blue); }
textarea { min-height: 230px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.5; }
.button { display: inline-flex; min-height: 38px; justify-content: center; align-items: center; padding: 8px 13px; border: 1px solid #cdd5dd; border-radius: 7px; background: #fff; color: #344453; font-size: 11px; font-weight: 750; text-decoration: none; }
.button:hover { border-color: #9eacb9; background: #f8fafb; color: var(--ink); }
.button-primary { border-color: var(--blue); background: var(--blue); color: white; }
.button-primary:hover { border-color: var(--blue-dark); background: var(--blue-dark); color: white; }
.button-small { min-height: 30px; padding: 5px 9px; font-size: 10px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-message { min-height: 20px; margin-top: 9px; font-size: 11px; }
.admin-message.is-error, .form-alert { color: #a62f28; }
.admin-message.is-success { color: #346a4c; }
.preview-card { margin-top: 15px; padding: 15px; border: 1px solid #cfdbe4; border-radius: 9px; background: #f7fafc; }
.preview-card h3 { margin-bottom: 0; font-size: 15px; }
.preview-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 12px 0; }
.preview-stats div { padding: 7px 9px; border-radius: 6px; background: #fff; }
.preview-stats dt { color: var(--muted); font-size: 9px; }
.preview-stats dd { margin: 2px 0 0; font-size: 11px; font-weight: 700; overflow-wrap: anywhere; }
details { margin: 10px 0; font-size: 11px; }
summary { cursor: pointer; font-weight: 700; }
pre { max-height: 260px; overflow: auto; padding: 10px; border-radius: 6px; background: #eaf0f4; font-size: 10px; white-space: pre-wrap; }
.check-list { display: grid; gap: 9px; padding-left: 18px; color: #485765; font-size: 11px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.history-panel { margin-top: 0; }
.draft-list { display: grid; gap: 8px; padding-left: 18px; font-size: 11px; }
.draft-list li span { display: block; color: var(--muted); }
.admin-user { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 11px; }
.admin-user form { margin: 0; }
.login-card { width: min(410px, calc(100% - 32px)); margin: 8vh auto; padding: 29px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 30px; }
.login-card h1 { font-size: 28px; }
.login-card > p:not(.eyebrow):not(.form-alert) { color: var(--muted); font-size: 12px; }
.login-card form { margin-top: 20px; }
.login-card .button { width: 100%; }
.back-link { display: inline-block; margin-top: 16px; font-size: 11px; }
.form-alert { padding: 9px; border-radius: 6px; background: #fff2f0; font-size: 11px; }
.error-card { margin-block: 10vh; padding: 28px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.error-card h1 { font-size: 26px; }

@media (max-width: 780px) {
  .shell { width: min(100% - 28px, 620px); }
  .header-inner { min-height: 62px; }
  nav { gap: 12px; }
  nav a { font-size: 11px; }
  nav a:nth-child(3), nav a:nth-child(4) { display: none; }
  .hero { grid-template-columns: 1fr; gap: 16px; padding-top: 31px; }
  .date-card { width: 100%; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid, .external-widgets-grid, .admin-grid { grid-template-columns: 1fr; gap: 0; }
  .panel { padding: 17px; }
  .external-widgets-grid .panel { margin-top: 12px; }
  .widget-privacy-note { grid-column: auto; margin-top: 9px; }
  .updated { max-width: 45%; font-size: 9px !important; }
  .majority-tool { grid-template-columns: 1fr; }
  .majority-summary { position: static; }
  .majority-suggestions-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-title { align-items: flex-start; flex-direction: column; }
  .admin-user > span { display: none; }
}

@media (max-width: 430px) {
  .shell { width: calc(100% - 22px); }
  .brand { font-size: 14px; }
  .brand-mark { width: 32px; height: 32px; }
  nav { gap: 10px; }
  nav .admin-link { font-size: 10px; }
  h1 { font-size: 29px; }
  .hero-copy { font-size: 13px; }
  .status-strip { align-items: flex-start; }
  .updated { max-width: 35%; padding-top: 3px; }
  .metrics { gap: 8px; }
  .metric-card { min-height: 100px; padding: 13px; }
  .metric-card strong { font-size: 21px; }
  .panel-heading h2 { font-size: 17px; }
  table { font-size: 10px; }
  th, td { padding: 9px 6px; }
  .party-options { grid-template-columns: 1fr; }
  .majority-controls { align-items: flex-start; flex-direction: column; }
  .majority-actions { width: 100%; flex-direction: column; }
  .majority-actions button { width: 100%; }
  .majority-suggestions-heading { flex-direction: column; }
  .majority-suggestions-list { grid-template-columns: 1fr; }
  .majority-summary { padding: 16px; }
  .two-fields { grid-template-columns: 1fr; gap: 0; }
  .preview-stats { grid-template-columns: 1fr; }
  .page-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .majority-clear, .party-option, .majority-summary, .majority-summary progress::-webkit-progress-value { transition: none; }
}

/* DiarioYA: public electoral reading and pact selection. */
:root { --ink: #202020; --muted: #595959; --paper: #faf9f6; --line: #dedbd5; --blue: #965000; --blue-dark: #713b00; --brand-gold: #e5a21b; --brand-orange: #db7c00; --shadow: none; font-family: Arial, Helvetica, sans-serif; }
::selection { background: #f8d58a; color: #202020; }
input { caret-color: var(--blue); }
body { font-size: 16px; }
.site-header { border-top: 5px solid var(--brand-gold); }
.header-inner { flex-wrap: wrap; padding-block: 14px; gap: 15px; }
.brand { gap: 16px; }
.brand-logo { width: 145px; height: auto; max-height: 58px; object-fit: contain; }
.brand-edition { padding-left: 16px; border-left: 1px solid var(--line); font-size: 14px; font-weight: 700; }
nav { gap: 8px; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; color: var(--ink); font-size: 14px; font-weight: 700; }
nav a:hover { background: #fff0d2; }
.hero { align-items: center; padding: 28px 0 20px; }
h1 { font-size: clamp(26px, 3vw, 36px); letter-spacing: -.03em; }
.date-card { min-width: 200px; box-shadow: none; padding: 10px 14px; }
.date-card summary { font-size: 14px; }
.date-card[open] > span { margin-top: 12px; }
.status-strip { background: #fff6e5; border-color: #e7cf9e; }
.status-strip strong { font-size: 15px; }
.status-strip span:not(.status-dot) { font-size: 13px; }
.status-dot[data-state="stale"] { background: #965000; box-shadow: none; }
.metrics { background: #fff; border-block: 1px solid var(--line); gap: 0; }
.metric-card { min-height: 100px; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.metric-card span { font-size: 14px; }
.metric-card small { font-size: 12px; }
.panel { padding: 24px; border-radius: 8px; box-shadow: none; }
.panel h2, .panel-heading h2 { font-size: 23px; letter-spacing: -.02em; }
.content-grid { align-items: start; }
.tag { font-size: 12px; border-radius: 4px; background: #fff6e5; border-color: #e7cf9e; color: #713b00; white-space: normal; }
table { font-size: 14px; }
th, td { padding: 12px 8px; }
thead th { font-size: 12px; }
.source-line, .hemicycle-source-note, .widget-disclosure, .widget-fallback, .widget-privacy-note { font-size: 13px; line-height: 1.6; }
.representation-note { margin: 12px 0; color: var(--muted); font-size: 14px; }
.other-results { margin: 15px 0; }
summary { min-height: 44px; padding-block: 10px; color: var(--blue-dark); font-size: 14px; }
.party-swatch { display: inline-block; width: 10px; height: 10px; flex: 0 0 10px; margin-right: 7px; }
.seat-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; }
.seat-legend li { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.legend-dot { flex-shrink: 0; }
.majority-panel > p { font-size: 15px; max-width: 72ch; }
.majority-tool { grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr); gap: 24px; }
.majority-controls { flex-wrap: wrap; align-items: start; }
.majority-controls h3 { font-size: 18px; }
.majority-controls p { font-size: 14px; }
.majority-actions { width: 100%; }
.majority-actions button, .majority-clear, .majority-try-pact { min-height: 44px; font-size: 14px; }
.majority-suggest-toggle { background: var(--brand-gold); border-color: #c58b16; color: #202020; font-size: 14px; }
.majority-suggest-toggle:hover { background: #f0b63c; border-color: #965000; }
.majority-search-details { margin: 0 0 10px; }
.majority-search-label { font-size: 14px; }
.majority-search-label input { font-size: 16px; }
.party-options { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; overflow: visible; gap: 8px; padding: 0; }
.party-option { min-height: 58px; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; padding: 10px; font-size: 14px; border-radius: 6px; }
.party-option:hover { background: #fffaf0; border-color: #a78e65; }
.party-option.is-selected { background: #fff1d3; border-color: #965000; box-shadow: none; }
.party-name { display: flex; align-items: center; line-height: 1.35; }
.party-name-text { overflow-wrap: anywhere; }
.party-seats { flex-direction: column; gap: 0; align-items: flex-end; }
.party-seats strong { font-size: 17px; }
.party-seats small { font-size: 12px; }
.majority-summary { background: #fffaf0; border-color: #d7c49e; border-radius: 8px; }
.majority-summary h3 { font-size: 18px; margin-top: 0; }
.majority-summary > #majority-verdict { font-size: 16px; min-height: 48px; }
.majority-seat-total span, .majority-threshold-label { font-size: 14px; }
.majority-summary progress::-webkit-progress-value { background: #965000; transition: none; }
.majority-summary progress::-moz-progress-bar { background: #965000; }
.majority-selected > span { font-size: 12px; }
.majority-selected p { font-size: 14px; }
.majority-selected li { border: 0; padding: 0; background: transparent; }
.majority-selected button { min-height: 44px; padding: 7px 10px; border: 1px solid #c6b998; border-radius: 5px; background: #fff; color: #713b00; font-size: 13px; text-align: left; }
.majority-suggestions-heading h3 { font-size: 18px; }
.majority-suggestions-heading p, .majority-suggestions-heading > span { font-size: 14px; }
.majority-suggestion-card { border-radius: 6px; }
.majority-suggestion-heading { flex-wrap: wrap; }
.majority-suggestion-heading h4, .majority-suggestion-heading > strong { font-size: 15px; }
.majority-suggestion-parties li, .majority-suggestion-footer > span { font-size: 13px; }
.majority-suggestion-footer { flex-wrap: wrap; }
#majority-show-more { margin-top: 12px; }
.external-widgets-grid { margin-top: 24px; }
.external-widget { min-height: 0; }
.external-widget > summary { font-size: 18px; }
.widget-privacy-note { margin-top: 12px; }
.polls-panel > p, .poll-card p, .poll-results li, .poll-card a, .community-select-label { font-size: 14px; }
.poll-card h3 { font-size: 18px; }
.poll-results { gap: 8px; }
.page-footer { font-size: 13px; }
.notice { border-left: 0; border: 1px solid #d7c49e; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #965000; outline-offset: 3px; }
@media (max-width: 1000px) { .content-grid { grid-template-columns: 1fr; gap: 0; } .hemicycle-panel { order: -1; } }
@media (max-width: 780px) {
  .header-inner { gap: 8px; }
  nav { width: 100%; justify-content: space-between; gap: 0; }
  nav a:nth-child(3), nav a:nth-child(4) { display: inline-flex; }
  nav a { font-size: 14px; padding-inline: 8px; }
  .hero { padding-top: 20px; gap: 10px; }
  .date-card { width: auto; justify-self: start; }
  .status-strip { flex-wrap: wrap; }
  .status-strip .updated { width: 100%; max-width: none; margin-left: 22px; text-align: left; font-size: 12px !important; }
  .panel { padding: 18px; }
  .majority-panel .panel-heading { flex-wrap: wrap; gap: 8px; }
  .majority-tool { grid-template-columns: 1fr; }
  .majority-summary { grid-row: 1; position: static; }
  .majority-suggestions { grid-row: 3; }
  .majority-seat-total strong { font-size: 40px; }
  .majority-suggestions-list { grid-template-columns: 1fr; }
  .party-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .brand-logo { width: 120px; }
  .brand-edition { font-size: 13px; padding-left: 10px; }
  .party-options { grid-template-columns: 1fr; }
  .party-seats { flex-direction: row; align-items: baseline; gap: 5px; }
  .majority-actions { flex-direction: column; }
  .seat-legend { grid-template-columns: 1fr; }
  .metric-card { padding: 12px; }
  .panel-heading h2 { font-size: 22px; }
  table { font-size: 14px; }
  th, td { padding: 10px 5px; }
}
@media (max-width: 780px) {
  .majority-summary { padding: 14px; }
  .majority-summary h3 { margin-bottom: 8px; font-size: 16px; }
  .majority-seat-total { margin-bottom: 7px; }
  .majority-seat-total strong { font-size: 34px; }
  .majority-summary > #majority-verdict { min-height: 0; font-size: 14px; }
  .majority-summary progress { margin-bottom: 8px; height: 8px; }
  .majority-threshold-label { font-size: 12px; margin-bottom: 5px; }
  .majority-selected { margin-top: 8px; padding-top: 8px; }
  .majority-selected > span { display: none; }
  .majority-selected ul { margin-top: 0; }
  .majority-selected p { margin: 0; }
  .majority-tool { gap: 16px; }
  .majority-controls { gap: 8px; margin-bottom: 8px; }
}
.majority-summary.has-majority progress::-webkit-progress-value { background: var(--green); }
.majority-summary.has-majority progress::-moz-progress-bar { background: var(--green); }
@media (prefers-reduced-motion: reduce) { .majority-suggest-toggle { transition: none; } }
