:root {
  --page-max-width: 1240px;
  --page-content-width: 1120px;
  --page-gutter: 60px;
  --canvas: #edf3f8;
  --paper: #fff;
  --ink: #20354c;
  --muted: #63758a;
  --line: #dbe4ed;
  --blue: #275ca5;
  --blue-soft: #e7effa;
  --teal: #168478;
  --orange: #b76b30;
  font-family: "Avenir Next", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.55; }
button, input, select { font: inherit; }
button, select, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select { outline-offset: 4px; }
:focus-visible { outline: 3px solid #397ac5; }
button, select { cursor: pointer; }
button { color: inherit; }
button:disabled { opacity: .4; cursor: default; }
a { color: var(--blue); text-underline-offset: 3px; }
button { border: 0; background: none; }
[hidden] { display: none !important; }
.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; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3vw, 43px); line-height: 1.15; letter-spacing: -1.5px; font-weight: 650; }
h2 { font-size: 21px; line-height: 1.3; font-weight: 650; letter-spacing: -.45px; }
h3 { font-size: 17px; font-weight: 650; letter-spacing: -.2px; }
input, select { background: white; border: 1px solid #cbd7e3; color: var(--ink); border-radius: 6px; min-height: 40px; padding: 8px 10px; min-width: 0; }
input[type="checkbox"] { min-height: auto; width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }
input[type="search"] { width: 100%; }
input::placeholder { color: #7c8997; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 100; padding: 10px; background: white; }
.skip-link:focus { top: 10px; }
.topbar { height: 84px; padding: 0 max(var(--page-gutter), calc((100vw - var(--page-content-width)) / 2)); background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; gap: 13px; align-items: center; color: var(--ink); text-decoration: none; font-size: 22px; letter-spacing: -.6px; font-weight: 600; }
.brand strong { color: var(--blue); font-weight: 700; }
.brand-mark { width: 33px; height: 36px; stroke: var(--blue); fill: none; stroke-width: 4px; stroke-linecap: round; }
.brand-mark path:last-child { stroke: var(--teal); stroke-width: 2; }
.edition { font-size: 14px; color: var(--muted); }
.edition b { color: var(--ink); margin-left: 7px; font-weight: 600; }
.text-button { padding: 2px 0; font-size: 12px; color: var(--blue); font-weight: 600; text-align: left; }
.text-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.topbar .text-button { font-size: 13px; }
.topbar .text-button span { margin-left: 7px; }
main { width: 100%; max-width: var(--page-max-width); padding: 0 var(--page-gutter); margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 38px 0 31px; }
.context { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.intro { color: var(--muted); margin-top: 12px; font-size: 14px; }
.data-stamp { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--muted); padding-bottom: 2px; min-width: 180px; max-width: 230px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); flex-shrink: 0; margin-top: 6px; }
.workspace { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 27px; align-items: start; }
.filters { padding: 22px 19px; background: #f7fafd; border: 1px solid var(--line); border-radius: 10px; }
.filters h2 { font-size: 16px; margin-bottom: 26px; }
.field { display: block; margin: 0 0 25px; padding: 0; border: none; min-width: 0; }
.field>label, .field legend, .candidate-header>label { font-size: 12px; font-weight: 650; margin-bottom: 9px; display: block; }
.field select { width: 100%; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.6; margin-top: 9px; }
.segmented { display: flex; background: #e9eff6; border-radius: 6px; padding: 3px; gap: 2px; }
.segmented button { flex: 1; padding: 7px 3px; font-size: 11px; white-space: nowrap; border-radius: 4px; font-weight: 600; }
.segmented button[aria-pressed="true"] { background: white; color: var(--blue); box-shadow: 0 1px 4px #20354c13; }
.date-inputs { display: grid; gap: 9px; }
#custom-dates { margin-top: 10px; }
.date-inputs label { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.date-inputs label input { width: 100%; min-height: 35px; font-size: 12px; }
.date-inputs label { display: grid; grid-template-columns: 18px minmax(0, 1fr); }
.candidate-header { display: flex; justify-content: space-between; gap: 5px; align-items: baseline; }
.candidate-header>label { margin-bottom: 10px; }
#candidate-search { font-size: 12px; min-height: 36px; }
.candidate-actions { display: flex; justify-content: space-between; padding: 11px 0 6px; }
.candidate-actions button { font-size: 10px; }
.candidate-list { max-height: 410px; overflow-y: auto; scrollbar-width: thin; padding: 3px 0; }
.candidate-option { display: flex; align-items: center; gap: 7px; padding: 7px 0; cursor: pointer; font-size: 11px; }
.candidate-option input { margin: 0; width: 13px; height: 13px; accent-color: var(--series-color); }
.candidate-option .color-dot { margin-left: auto; }
.color-dot { display: inline-block; width: 8px; height: 8px; background: var(--series-color); border-radius: 50%; flex-shrink: 0; }
.filter-note { margin-top: 25px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; gap: 12px; font-size: 11px; color: var(--muted); }
.tiny-chart { font-size: 26px; color: var(--teal); line-height: 1; }
.dashboard { min-width: 0; }
.question-selector { margin-bottom: 18px; }
.question-selector-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; margin-bottom: 10px; }
#question-label { font-size: 12px; font-weight: 650; }
#questions-summary { color: var(--muted); font-size: 11px; }
#questions { display: flex; flex-wrap: wrap; gap: 8px; }
.question-button { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; max-width: 100%; padding: 9px 13px; border: 1px solid #b9c9da; border-radius: 6px; background: white; text-align: left; font-size: 13px; line-height: 1.4; font-weight: 600; }
.question-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.question-button[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: white; }
.question-button[aria-pressed="true"]:hover { background: #204d8b; }
.question-check { visibility: hidden; width: 13px; flex-shrink: 0; }
.question-button[aria-pressed="true"] .question-check { visibility: visible; }
.question-actions { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; }
.selected-questions { margin-top: 8px; font-size: 12px; }
.selected-questions > summary { width: fit-content; color: var(--blue); cursor: pointer; }
.selected-questions ul { list-style: none; margin: 10px 0 0; padding: 0; max-width: 85ch; }
.selected-questions li { padding: 8px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.question-coverage { margin: 0 20px 16px; font-size: 11px; color: var(--muted); }
.question-coverage > summary { cursor: pointer; color: var(--blue); }
.question-coverage ul { list-style: none; margin: 8px 0 0; padding: 0; }
.question-coverage li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.question-coverage li span:first-child { flex: 1 1 220px; color: var(--ink); }
.trend-panel { background: white; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 23px 25px 14px; gap: 15px; }
.panel-heading p { color: var(--muted); font-size: 12px; margin-top: 7px; max-width: 80ch; }
.icon-button { display: grid; place-items: center; font-size: 23px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: white; flex-shrink: 0; }
.icon-button:hover:enabled { background: var(--blue-soft); color: var(--blue); }
.chart-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 6px 25px 9px; font-size: 11px; color: var(--muted); gap: 12px; }
.metric-control { display: flex; align-items: center; gap: 6px; font-size: 10px; }
.metric-control select { min-height: 30px; padding: 4px 6px; font-size: 10px; }
.switch { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.switch input { margin: 0; width: 13px; height: 13px; }
.trend-chart { position: relative; min-height: 310px; padding: 0 16px; }
.trend-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.trend-chart svg text { font-family: inherit; fill: var(--muted); font-size: 11px; }
.trend-chart .axis-label { font-size: 10px; }
.trend-chart .date-label { fill: var(--ink); }
.trend-chart .selected-date { fill: var(--blue); font-weight: 700; }
.trend-chart .chart-point { cursor: pointer; transition: r .12s; }
.trend-chart .chart-point:hover, .trend-chart .chart-point:focus { r: 6; }
.trend-chart .day-target { cursor: pointer; }
.chart-footer { padding: 7px 25px 13px; display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.chart-legend { display: flex; flex-wrap: wrap; padding: 13px 25px 17px; gap: 11px 20px; border-top: 1px solid #edf1f5; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; }
.day-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 30px 0 17px; }
.day-heading .context { margin-bottom: 3px; }
.day-heading h2 { font-size: 23px; }
.day-navigation { display: flex; gap: 7px; align-items: center; }
.day-navigation select { font-size: 12px; min-height: 32px; padding: 4px 8px; }
.day-content { display: grid; grid-template-columns: 1.1fr 1fr; gap: 19px; align-items: start; }
.analysis-tabs { display: flex; gap: 26px; border-bottom: 1px solid #cbd7e3; margin-bottom: 20px; }
.analysis-tabs button { position: relative; padding: 12px 2px; font-weight: 600; color: var(--muted); }
.analysis-tabs button[aria-selected="true"] { color: var(--blue); }
.analysis-tabs button[aria-selected="true"]:after { content: ""; position: absolute; bottom: -1px; left: 0; right: 0; height: 3px; background: currentColor; }
.source-analysis-panel { border: 1px solid var(--line); background: var(--paper); border-radius: 11px; overflow: hidden; }
.source-analysis-panel .context { color: var(--teal); margin: 0 0 5px; }
.source-analysis-controls { display: flex; align-items: flex-end; gap: 18px; padding: 5px 25px 18px; }
.source-analysis-controls label { display: grid; gap: 6px; font-size: 11px; color: var(--muted); flex: 1; min-width: 0; }
.source-analysis-controls select { font-size: 12px; width: 100%; }
.source-analysis-controls .icon-button { margin-bottom: 4px; }
.source-analysis-panel > .detail-intro { margin: 0 25px 16px; }
.source-indicators { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 25px 24px; border-block: 1px solid var(--line); }
.source-indicator { padding: 17px 14px; display: flex; flex-direction: column; gap: 7px; border-right: 1px solid var(--line); }
.source-indicator:first-child { padding-left: 0; }
.source-indicator:last-child { border: 0; }
.source-indicator > span { font-size: 11px; color: var(--muted); }
.source-indicator strong { font-size: clamp(22px, 2.5vw, 32px); font-weight: 600; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.2; color: #13796e; }
.source-indicator small { color: var(--muted); font-size: 10px; }
.source-ranking-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 25px 8px; }
.source-ranking-heading > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.source-domain-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(130px, .8fr); align-items: center; gap: 18px; width: 100%; padding: 12px 25px; border-top: 1px solid #edf1f5; text-align: left; }
.source-domain-row:hover, .source-domain-row:focus-visible { background: #f0f8f6; }
.source-domain-name { overflow-wrap: anywhere; font-size: 12px; font-weight: 600; }
.source-domain-metric { display: flex; flex-direction: column; gap: 5px; }
.source-domain-metric strong { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.source-domain-track { display: block; height: 9px; background: #eff5f3; border-radius: 2px; }
.source-domain-fill { display: block; height: 100%; background: #13796e; opacity: .8; border-radius: 2px; }
.source-categories { padding-top: 8px; margin-bottom: 26px; }
.source-categories > .detail-intro { margin: 0 25px 12px; }
.source-category-row[aria-pressed="true"] { background: #e3f2ed; box-shadow: inset 3px 0 #13796e; }
.source-category-row[data-category="indetermines"] .source-domain-fill { background: #7c8189; }
.source-category-row:focus-visible { outline: 2px solid var(--teal); outline-offset: -2px; }
.source-classification { margin: 0 25px 10px; font-size: 11px; color: var(--muted); }
.source-classification summary { cursor: pointer; }
.source-classification p { margin-top: 7px; line-height: 1.6; }
.source-domain-count { text-align: right; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.source-evolution { margin-top: 20px; }
.source-method { margin: 18px 25px; font-size: 11px; color: var(--muted); }
.source-method summary { cursor: pointer; color: var(--blue); }
.source-method p { margin-top: 10px; line-height: 1.8; }
.source-chart-point { cursor: pointer; }
.source-chart-point:hover, .source-chart-point:focus { stroke-width: 4px; }
.source-table-scroll { max-width: 100%; overflow-x: auto; }
.source-values { border-collapse: collapse; width: 100%; font-size: 11px; margin-top: 12px; }
.source-values th, .source-values td { text-align: right; padding: 9px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.source-values th:first-child { text-align: left; }
.source-details { grid-template-columns: 1fr; }
.source-details .ranking-panel { display: none; }
.source-explorer-heading { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 12px; }
#candidate-filters { min-width: 0; }
#source-trend-chart svg { width: 100%; display: block; }
#source-trend-chart svg text { font-family: inherit; font-size: 10px; fill: var(--muted); }
@media (max-width: 1150px) {
  .source-indicators { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .source-indicator:nth-child(2) { border-right: 0; }
  .source-indicator:nth-child(3) { padding-left: 0; }
  .source-indicator:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 800px) {
  #candidate-filters { grid-column: 1 / -1; display: grid; gap: 12px; }
}
@media (max-width: 480px) {
  .source-analysis-controls { flex-wrap: wrap; gap: 12px; padding-inline: 16px; }
  .source-analysis-controls label { flex-basis: 100%; }
  .source-analysis-panel > .detail-intro, .source-indicators, .source-ranking-heading, .source-method { margin-inline: 16px; }
  .source-indicator { padding-inline: 10px; }
  .source-domain-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding-inline: 16px; gap: 6px 12px; }
  .source-domain-count { grid-column: 1 / -1; text-align: left; }
  .source-ranking-heading { flex-wrap: wrap; }
  .source-categories > .detail-intro, .source-classification { margin-inline: 16px; }
}
.ranking-panel, .detail-panel { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; min-width: 0; }
.ranking-panel .panel-heading { padding: 21px 20px 13px; }
.download-link { font-size: 11px; font-weight: 650; text-decoration: none; border-bottom: 1px solid #a1b5cf; white-space: nowrap; }
.daily-count { margin: 0 20px 16px; font-size: 11px; background: #f0f5fa; color: #50677f; border-radius: 4px; padding: 8px 10px; }
.ranking-table-head { padding: 0 20px 9px; display: grid; grid-template-columns: 1.1fr 1.2fr 48px; gap: 10px; color: var(--muted); font-size: 9px; }
.ranking-table-head span:last-child { text-align: right; }
.ranking-row { display: grid; grid-template-columns: 1.1fr 1.2fr 48px; gap: 10px; padding: 11px 20px; align-items: center; border-top: 1px solid #eef2f6; font-size: 11px; }
.ranking-row.dimmed .rank-bar-fill { opacity: .25; }
.ranking-name { display: flex; align-items: baseline; gap: 7px; }
.ranking-name .color-dot { width: 6px; height: 6px; }
.ranking-name small { display: block; color: var(--muted); font-size: 9px; }
.rank-value { font-variant-numeric: tabular-nums; font-size: 11px; }
.rank-bar-track { position: relative; height: 13px; margin-top: 5px; background: #f2f5f9; border-radius: 2px; }
.rank-bar-fill { height: 100%; background: var(--series-color); opacity: .64; border-radius: 2px; min-width: 2px; }
.rank-n { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10px; }
.rank-n.partial { color: #99602d; font-weight: 600; }
.panel-footnote { color: var(--muted); font-size: 10px; margin: 15px 20px 18px; }
.detail-tabs, .response-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 22px; padding: 0 21px; }
.detail-tabs button, .response-tabs button { position: relative; padding: 18px 0 15px; font-size: 12px; color: var(--muted); }
.detail-tabs button[aria-selected="true"], .response-tabs button[aria-selected="true"] { color: var(--blue); font-weight: 650; }
.detail-tabs button[aria-selected="true"]:after, .response-tabs button[aria-selected="true"]:after { content: ""; position: absolute; height: 3px; background: var(--blue); bottom: -1px; left: 0; right: 0; }
.detail-tabs button span { margin-left: 5px; font-size: 10px; background: #edf2f7; border-radius: 4px; padding: 1px 5px; color: var(--muted); }
#responses-panel, #sources-panel { padding: 18px 20px 21px; }
.detail-intro { font-size: 11px; color: var(--muted); line-height: 1.8; margin-bottom: 15px; }
.response-card { border: 1px solid var(--line); border-radius: 7px; margin-bottom: 9px; padding: 13px; width: 100%; text-align: left; display: grid; grid-template-columns: 29px minmax(0, 1fr) 15px; gap: 10px; align-items: center; background: white; }
.response-card:hover { background: #f6f9fd; border-color: #9ab4d6; }
.repeat-number { font-size: 12px; color: var(--blue); background: #eaf0f8; border-radius: 50%; width: 27px; height: 27px; display: grid; place-items: center; }
.response-card strong { font-size: 12px; display: block; font-weight: 600; }
.response-card small { font-size: 10px; color: var(--muted); display: block; margin-top: 4px; }
.card-arrow { color: var(--muted); font-size: 18px; }
.warning { background: #fcf4e9; color: #895627; padding: 11px 12px; border-radius: 5px; font-size: 11px; line-height: 1.7; margin-top: 12px; }
.sources-controls { display: grid; gap: 10px; margin-bottom: 14px; }
.sources-controls input[type="search"] { font-size: 12px; }
.sources-controls label { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--muted); }
.sources-controls input[type="checkbox"] { width: 13px; height: 13px; margin: 0; }
.source-item { border-top: 1px solid #edf1f6; padding: 12px 0; }
.source-item a, .source-item .source-name { color: var(--ink); display: block; font-size: 12px; text-decoration: none; overflow-wrap: anywhere; line-height: 1.6; }
.source-item a:hover { color: var(--blue); text-decoration: underline; }
.source-domain { color: var(--blue); font-size: 10px; margin-bottom: 3px; }
.source-counts { display: flex; gap: 8px; margin-top: 6px; font-size: 9px; color: var(--muted); }
.source-counts .cited { color: var(--teal); }
.source-provenance { color: var(--muted); font-size: 10px; margin-top: 6px; }
.source-provenance summary { cursor: pointer; }
.source-provenance li { overflow-wrap: anywhere; margin-bottom: 5px; }
.source-provenance ul { padding-left: 14px; }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; font-size: 11px; text-decoration: none; font-weight: 600; align-items: center; }
.primary-button { background: var(--blue); color: white; border-color: var(--blue); }
.secondary-button { color: var(--blue); background: white; }
.secondary-button:hover { background: var(--blue-soft); }
#more-sources { width: 100%; margin-top: 12px; }
.page-footer { display: flex; justify-content: space-between; align-items: start; gap: 25px; padding: 35px 0 25px; color: var(--muted); font-size: 10px; }
.page-footer>span { white-space: nowrap; }
.page-footer>span:first-child { font-weight: 650; color: var(--ink); font-size: 12px; }
.page-footer p { max-width: 74ch; }
.loading { padding: 75px 20px; text-align: center; color: var(--muted); }
.notice { margin-bottom: 20px; border: 1px solid #e4c7a1; background: #fff6eb; padding: 16px; border-radius: 6px; color: #845121; font-size: 13px; }
.empty-state { color: var(--muted); padding: 38px 23px; font-size: 13px; text-align: center; }
.trend-chart>.empty-state { padding: 110px 20px; }
#day-loading { padding: 40px; text-align: center; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 8px; }
.chart-tooltip { position: fixed; z-index: 30; background: #20354cf5; color: white; border-radius: 7px; padding: 11px 14px; font-size: 11px; pointer-events: none; max-width: 250px; box-shadow: 0 5px 15px #20354c1c; }
.chart-tooltip strong { display: block; font-size: 12px; margin-bottom: 3px; }
dialog { border: 1px solid #d2dfec; border-radius: 12px; padding: 0; color: var(--ink); background: white; box-shadow: 0 22px 100px #1a345340; }
dialog::backdrop { background: #172d4870; }
.response-dialog { width: min(820px, calc(100% - 32px)); max-height: 90vh; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; padding: 24px 27px 17px; gap: 20px; }
.dialog-heading .context { margin-bottom: 5px; }
.dialog-heading .icon-button { font-size: 23px; }
.response-meta { display: flex; flex-wrap: wrap; padding: 0 27px 17px; gap: 7px 14px; font-size: 10px; color: var(--muted); }
.response-question { margin: 0 27px 15px; padding: 11px 13px; background: #f1f6fb; font-size: 11px; line-height: 1.75; color: #4c647d; }
.response-tabs { padding: 0 27px; gap: 23px; }
.response-tabs button { padding: 13px 0; font-size: 12px; }
.response-view { padding: 25px 27px; min-height: 250px; max-height: 52vh; overflow: auto; }
.response-view pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: inherit; font-size: 13px; line-height: 1.85; }
#json-panel pre { font-family: ui-monospace, monospace; font-size: 11px; line-height: 1.6; }
.markdown-body { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.markdown-body.plain-text { white-space: pre-wrap; }
.markdown-body p { margin: 0 0 1em; }
.markdown-body :is(h1, h2, h3, h4, h5, h6) { margin: 1.4em 0 .6em; line-height: 1.4; letter-spacing: normal; font-weight: 650; }
.markdown-body h1 { font-size: 22px; }
.markdown-body h2 { font-size: 19px; }
.markdown-body h3 { font-size: 16px; }
.markdown-body :is(h4, h5, h6) { font-size: 14px; }
.markdown-body :first-child { margin-top: 0; }
.markdown-body :last-child { margin-bottom: 0; }
.markdown-body :is(ul, ol) { margin: 0 0 1em; padding-left: 1.8em; }
.markdown-body li { margin: .3em 0; }
.markdown-body li > :is(ul, ol) { margin: .3em 0; }
.markdown-body blockquote { margin: 1em 0; padding: 10px 15px; border-left: 3px solid #93afd0; background: #f5f8fc; }
.markdown-body code { font-family: ui-monospace, monospace; font-size: .9em; padding: 2px 4px; border-radius: 3px; background: #f0f5fa; }
.markdown-body pre { margin: 1em 0; padding: 13px; overflow-x: auto; white-space: pre; background: #f0f5fa; border-radius: 6px; }
.markdown-body pre code { padding: 0; background: none; white-space: pre; }
.markdown-body hr { margin: 1.5em 0; border: 0; border-top: 1px solid var(--line); }
.markdown-table { margin: 1em 0; overflow-x: auto; }
.markdown-body table { width: 100%; border-collapse: collapse; font-size: 12px; }
.markdown-body :is(th, td) { border: 1px solid var(--line); padding: 8px 10px; min-width: 110px; text-align: left; vertical-align: top; }
.markdown-body th { background: #f0f5fa; font-weight: 650; }
#response-status { padding: 15px 27px; color: var(--muted); font-size: 12px; }
#response-status:empty { display: none; }
.dialog-footer { padding: 15px 27px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.extracted-entry { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.extracted-entry h3 { font-size: 14px; margin-bottom: 7px; }
.extracted-entry p { color: var(--muted); margin: 7px 0; }
.extracted-entry blockquote { margin: 12px 0 0; padding: 9px 13px; background: #f5f8fc; border-left: 2px solid #93afd0; white-space: pre-wrap; font-size: 11px; }
.extracted-entry a { display: block; overflow-wrap: anywhere; font-size: 11px; }
.extracted-notes { color: var(--muted); font-size: 12px; margin-top: 16px; }
.method-dialog { width: min(670px, calc(100% - 32px)); max-height: 90vh; }
.method-content { padding: 0 27px 27px; font-size: 13px; line-height: 1.8; }
.method-content h3 { font-size: 15px; margin: 21px 0 6px; }
@media (min-width: 1600px) { .trend-chart { padding: 0 28px; } }
@media (max-width: 1150px) {
  .workspace { grid-template-columns: 215px minmax(0, 1fr); gap: 18px; }
  .filters { padding: 20px 14px; }
  .day-content { grid-template-columns: 1fr; }
  .trend-chart { min-height: 250px; }
  .chart-toolbar { font-size: 10px; }
  .ranking-table-head, .ranking-row { grid-template-columns: 1fr 1fr 65px; }
}
@media (max-width: 800px) {
  .topbar { height: 70px; }
  .edition { display: none; }
  .brand { font-size: 19px; }
  .page-heading { padding: 27px 0 24px; display: block; }
  h1 { font-size: 34px; max-width: 550px; }
  .data-stamp { max-width: none; margin-top: 18px; }
  .workspace { grid-template-columns: 1fr; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; padding: 19px; }
  .filters h2, .candidate-header, #candidate-search, .candidate-actions, .candidate-list, .filter-note { grid-column: 1 / -1; }
  .filters h2 { margin-bottom: 0; }
  .field { margin: 0; }
  .filters fieldset:last-of-type { grid-column: 1 / -1; }
  .date-inputs { display: flex; gap: 15px; }
  .date-inputs label { width: 50%; }
  .candidate-header { margin-top: 2px; }
  .candidate-header>label { margin: 0; }
  #candidate-search { display: none; }
  .candidate-actions { padding: 0; margin-top: -8px; justify-content: flex-start; gap: 17px; }
  .candidate-list { display: flex; flex-wrap: wrap; gap: 4px 14px; max-height: 118px; padding: 0; }
  .candidate-option { padding: 4px 0; }
  .candidate-option .color-dot { display: none; }
  .filter-note { display: none; }
  .trend-chart { min-height: 230px; }
  .page-footer { flex-wrap: wrap; gap: 12px; }
  .page-footer p { order: 3; width: 100%; }
}
@media (max-width: 480px) {
  .topbar .text-button { font-size: 10px; max-width: 100px; }
  .topbar .text-button span { display: none; }
  h1 { font-size: 30px; letter-spacing: -1px; }
  .intro { font-size: 12px; }
  .filters { gap: 13px; padding: 15px; }
  .filters .field:nth-of-type(2) { min-width: 0; }
  .segmented button { font-size: 9px; }
  .field-hint { font-size: 10px; }
  .panel-heading { padding: 18px 16px 10px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-heading p { font-size: 11px; }
  .chart-toolbar { padding: 8px 16px; align-items: flex-start; }
  .chart-toolbar { flex-wrap: wrap; }
  .chart-toolbar .switch { font-size: 9px; max-width: 125px; }
  .trend-chart { min-height: 190px; padding: 0 6px; }
  .chart-footer { padding: 8px 16px 12px; font-size: 9px; }
  .chart-footer p { max-width: 210px; }
  .chart-legend { padding: 12px 16px; gap: 7px 12px; }
  .legend-item { font-size: 10px; }
  .day-heading { flex-wrap: wrap; gap: 13px; margin-top: 24px; }
  .day-heading h2 { font-size: 21px; }
  .day-heading .context { font-size: 10px; }
  .day-navigation { gap: 4px; }
  .day-navigation select { font-size: 10px; padding: 4px; }
  .day-navigation .icon-button { width: 26px; height: 29px; }
  .ranking-row, .ranking-table-head { padding-left: 15px; padding-right: 15px; grid-template-columns: 1.1fr 1fr 40px; gap: 7px; }
  .ranking-name { font-size: 10px; }
  .response-tabs { padding: 0 17px; gap: 17px; }
  .response-tabs button { font-size: 10px; }
  .dialog-heading, .response-view, .method-content { padding-left: 19px; padding-right: 19px; }
  .response-meta { padding-left: 19px; padding-right: 19px; }
  .dialog-heading h2 { font-size: 19px; }
  .response-view { max-height: 50vh; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { transition: none !important; scroll-behavior: auto !important; } }

#original-text mark { background: #fff0a6; color: inherit; border-radius: 2px; padding: 0 .08em; }

/* Comparaison des candidats par thème. */
.candidate-display { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; font-size: 13px; }
.candidate-display > span { color: var(--muted); margin-right: 8px; }
.candidate-display button { padding: 9px 15px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.candidate-display button[aria-selected="true"] { background: #e7effa; color: #204d8b; border-color: var(--blue); font-weight: 650; }
.candidate-display button:focus-visible, .theme-cell:focus-visible { outline: 3px solid var(--blue); outline-offset: -3px; }
.theme-panel { background: white; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.theme-panel .panel-heading p { margin-top: 8px; color: var(--muted); font-size: 12px; }
.theme-table-scroll { overflow: auto; max-height: 680px; margin: 15px 0; }
.theme-values { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: 13px; }
.theme-values th { padding: 12px; text-align: left; background: white; }
.theme-values thead th { position: sticky; top: 0; z-index: 2; min-width: 115px; vertical-align: bottom; box-shadow: 0 1px var(--line); }
.theme-values tr > th:first-child { position: sticky; left: 0; z-index: 1; min-width: 165px; max-width: 210px; }
.theme-values thead th:first-child { z-index: 3; }
.theme-values th small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-weight: 400; }
.theme-values td { padding: 0; text-align: center; background: #f3f5f7; color: var(--muted); }
.theme-cell { display: block; width: 100%; min-height: 44px; padding: 10px 7px; border-radius: 3px; font-variant-numeric: tabular-nums; }
.theme-cell small { display: block; margin-top: 4px; font-size: 11px; }
.theme-cell:hover { box-shadow: inset 0 0 0 2px #172c40; }
.theme-response-filter { display: flex; align-items: center; gap: 9px; padding: 15px 24px; font-size: 13px; }
@media (max-width: 600px) {
  .theme-values tr > th:first-child { min-width: 125px; max-width: 145px; padding: 8px; }
  .theme-values thead th { min-width: 100px; }
}

.candidate-measure { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.evolution-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .48fr); gap: 22px; padding: 20px; margin-bottom: 20px; background: #f7fafd; border: 1px solid var(--line); border-radius: 10px; }
.evolution-controls > div { min-width: 0; }
.evolution-controls .candidate-list { max-height: 210px; }
.evolution-controls .question-selector { margin: 0; }
.theme-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 0 25px; font-size: 12px; color: var(--muted); }
.theme-toolbar > p { flex: 1 1 280px; }
.theme-scale { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.theme-scale-gradient { width: 110px; height: 12px; border: 1px solid #bccddd; border-radius: 3px; background: linear-gradient(to right, #ebf2f3, #275ca5); }
.theme-sort-status { margin: 12px 25px 0; font-size: 12px; color: var(--muted); }
.theme-sort { width: 100%; padding: 4px 0; font-weight: 650; text-align: left; border-radius: 3px; }
.theme-sort:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.theme-values th[aria-sort] { background: #f0f5fc; }
.theme-values .theme-cell { white-space: nowrap; }
@media (max-width: 900px) {
  .evolution-controls { grid-template-columns: minmax(0, 1fr); }
  .evolution-controls #candidate-filters { display: block; }
  .evolution-controls .candidate-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 0 15px; padding-top: 8px; max-height: 170px; }
  .evolution-controls #candidate-search { display: block; }
}
@media (max-width: 600px) {
  .candidate-measure { justify-content: flex-start; }
  .evolution-controls { padding: 15px; }
  .theme-toolbar, .theme-sort-status { margin-inline: 16px; }
  .theme-values th { padding: 8px; }
}

.campaign-protocol { margin: 1rem 0; padding: 1rem; border: 1px solid #dce3eb; border-radius: .65rem; background: #fff; }
.campaign-protocol select { max-width: 100%; padding: .5rem; margin: .4rem; }
.campaign-protocol p { margin: .5rem 0; line-height: 1.5; }
.campaign-protocol details { margin-top: .75rem; }

body[data-analysis-profile="sources"] .ranking-panel { display: none; }
body[data-analysis-profile="sources"] .day-content { grid-template-columns: minmax(0, 1fr); }

/* Shared page geometry follows the home page, including tablet/mobile gutters. */
@media (max-width: 1240px) {
  :root { --page-gutter: 5vw; }
}
.home-footer, .editorial-footer {
  width: calc(100% - 2 * var(--page-gutter));
  max-width: var(--page-content-width);
  margin-inline: auto;
}
