:root {
  --bg: #f5efe5;
  --panel: rgba(255, 251, 246, 0.92);
  --border: #d8cbb5;
  --ink: #1f2a2a;
  --muted: #6f746f;
  --blue: #4878a8;
  --red: #d95b5b;
  --gold: #b88b2f;
  --shadow: 0 18px 50px rgba(60, 43, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(184, 139, 47, 0.12), transparent 34%),
    radial-gradient(circle at bottom right, rgba(72, 120, 168, 0.12), transparent 28%),
    var(--bg);
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", sans-serif;
}

.page-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 28px 22px;
  border-right: 1px solid var(--border);
  background: rgba(255, 248, 239, 0.78);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
}

.sidebar h1,
.panel h2,
.hero h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
}

.sidebar h1 {
  font-size: 38px;
  line-height: 1.05;
}

.lead {
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.5;
}

.summary-cards {
  display: grid;
  gap: 12px;
  margin: 26px 0 28px;
}

.summary-card,
.question-button,
.panel,
.hero {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.summary-card {
  padding: 14px 16px;
}

.summary-card .label {
  color: var(--muted);
  font-size: 13px;
}

.summary-card .value {
  font-size: 28px;
  font-weight: 700;
  margin-top: 4px;
}

.section-head {
  margin-bottom: 12px;
}

.section-head h2 {
  font-size: 20px;
}

.section-head p,
.panel-head p {
  color: var(--muted);
  margin: 6px 0 0;
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-button {
  border: 1px solid var(--border);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.question-button:hover {
  transform: translateY(-2px);
  border-color: #bca782;
}

.question-button.active {
  border-color: var(--gold);
  background: #fff7eb;
}

.question-button .match {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: #efe5d0;
  color: #6f5626;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.question-button .text {
  display: block;
  margin-top: 10px;
  font-weight: 600;
  line-height: 1.4;
}

.question-button .meta {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.main-panel {
  padding: 28px;
  display: grid;
  gap: 22px;
}

.hero {
  padding: 24px 26px;
}

.hero-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: 1.35fr 0.85fr;
}

.hero-copy h2 {
  font-size: 30px;
  line-height: 1.15;
}

.question-pair {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.question-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid #eadfca;
}

.question-card .year {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.question-card p {
  margin: 8px 0 0;
  line-height: 1.45;
}

.hero-stats {
  display: grid;
  gap: 12px;
}

.stat-box {
  padding: 16px 18px;
  border-radius: 16px;
  background: #fffdf8;
  border: 1px solid #eadfca;
}

.stat-box .label {
  color: var(--muted);
  font-size: 13px;
}

.stat-box .value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
}

.panel {
  padding: 22px 24px;
}

.panel-head {
  margin-bottom: 18px;
}

.chart-wrap {
  overflow: auto;
}

.chart-svg {
  width: 100%;
  height: auto;
  min-height: clamp(320px, 52vh, 560px);
  max-height: 70vh;
}

.axis-line {
  stroke: #d3c6b5;
  stroke-width: 1;
}

.zero-line {
  stroke: #252525;
  stroke-dasharray: 6 6;
  stroke-width: 1.2;
}

.connector {
  stroke: #bdb6aa;
  stroke-width: 2;
}

.dot-2022 {
  fill: var(--blue);
}

.dot-2026 {
  fill: var(--red);
}

.party-label {
  font-size: 13px;
  fill: var(--ink);
}

.tick-label {
  font-size: 12px;
  fill: var(--muted);
}

.legend {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
}

.chart-title-block {
  margin-bottom: 14px;
}

.chart-kicker {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-question {
  margin-top: 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.2;
}

.chart-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid #eadfca;
  text-align: left;
}

th {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(250, 244, 232, 0.9);
}

.delta-up {
  color: #1f7f4a;
  font-weight: 700;
}

.delta-down {
  color: #a83b3b;
  font-weight: 700;
}

@media (max-width: 1100px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}
