:root {
  --bg: #f1ece0;
  --panel: #faf7ef;
  --ink: #171310;
  --ink-muted: #6b6154;
  --red: #b3241c;
  --red-fill: rgba(179, 36, 28, 0.22);
  --red-ink: #ffffff;
  --line: #171310;
  --line-soft: #d8d0bd;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15120f;
    --panel: #1d1915;
    --ink: #f1ece0;
    --ink-muted: #a89e8c;
    --red: #d33128;
    --red-fill: rgba(211, 49, 40, 0.28);
    --red-ink: #17110f;
    --line: #f1ece0;
    --line-soft: #3a352c;
  }
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

.wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, .kicker, .axis-label, .btn-block, .btn-outline, .results-eyebrow,
.ideology-eyebrow, .ideology-name {
  font-family: "Oswald", "IBM Plex Sans", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.stripe {
  height: 10px;
  background: repeating-linear-gradient(
    -45deg,
    var(--red),
    var(--red) 14px,
    var(--ink) 14px,
    var(--ink) 28px
  );
}

.site-header {
  background: var(--ink);
  color: var(--bg);
  padding: 40px 0 32px;
  border-bottom: 4px solid var(--red);
}

.kicker {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 10px;
}

.site-header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 8px;
  line-height: 1;
}

.subhead {
  margin: 0;
  color: var(--bg);
  opacity: 0.75;
  font-size: 0.95rem;
}

main.wrap {
  padding-top: 28px;
  padding-bottom: 40px;
}

.panel {
  background: var(--panel);
  border: 3px solid var(--line);
  padding: 28px;
  position: relative;
}

.panel + .panel {
  margin-top: 24px;
}

.lede {
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 22px;
}

.axis-list {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  border-top: 2px solid var(--line);
}

.axis-list li {
  display: grid;
  grid-template-columns: 32px auto 1fr;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.92rem;
}

.axis-num {
  font-family: "Oswald", sans-serif;
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
}

.axis-list b {
  font-weight: 600;
}

.axis-vs {
  color: var(--ink-muted);
  text-align: right;
  font-size: 0.85rem;
}

.fine-print {
  color: var(--ink-muted);
  font-size: 0.82rem;
  margin: 0 0 22px;
}

.btn-block {
  display: block;
  width: 100%;
  background: var(--red);
  color: var(--red-ink);
  border: 3px solid var(--line);
  padding: 14px 20px;
  font-size: 1.02rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.03em;
}

.btn-block:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.progress-bar {
  height: 10px;
  background: var(--line-soft);
  border: 2px solid var(--line);
  margin-bottom: 10px;
}

.progress-fill {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width 0.25s ease;
}

.progress-text {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-bottom: 22px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.axis-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--red-ink);
  background: var(--red);
  padding: 5px 12px;
  margin-bottom: 18px;
}

.question-text {
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0 0 26px;
  min-height: 90px;
  font-weight: 500;
}

.likert-group {
  display: grid;
  gap: 0;
  margin-bottom: 22px;
  border-top: 2px solid var(--line);
}

.likert-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 4px;
  border: none;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  font-size: 0.95rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.likert-btn::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  flex-shrink: 0;
}

.likert-btn:hover {
  background: var(--line-soft);
}

.likert-btn.selected {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.likert-btn.selected::before {
  background: var(--red);
  border-color: var(--red);
}

.nav-row {
  display: flex;
  gap: 10px;
}

.btn-outline {
  flex: 1;
  padding: 11px;
  border: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.btn-outline:hover:not(:disabled) {
  background: var(--ink);
  color: var(--bg);
}

.btn-outline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.results-eyebrow {
  color: var(--red);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.ideology-primary {
  border: 2px solid var(--line);
  padding: 20px;
  margin-bottom: 18px;
  background: var(--ink);
  color: var(--bg);
}

.ideology-eyebrow {
  font-size: 0.68rem;
  color: var(--red);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}

.ideology-name {
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 6px;
}

.ideology-match-pct {
  font-family: "Oswald", sans-serif;
  color: var(--red);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.ideology-blurb {
  margin: 0 0 12px;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.9;
}

.ideology-wiki {
  display: inline-block;
  color: var(--red);
  font-family: "Oswald", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--red);
}

.ideology-wiki:hover {
  color: var(--bg);
  border-bottom-color: var(--bg);
}

.ideology-runners {
  border-top: 1px solid var(--line-soft);
  margin-bottom: 24px;
}

.ideology-runner-row {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.ideology-runner-row span:last-child {
  color: var(--red);
  font-weight: 600;
}

.ideology-runner-row a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line-soft);
}

.ideology-runner-row a:hover {
  color: var(--red);
  border-bottom-color: var(--red);
}

#radar-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: block;
  margin: 4px auto 26px;
}

.axis-row {
  margin-bottom: 18px;
}

.axis-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 7px;
}

.axis-result-label {
  color: var(--red);
}

.axis-track-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.axis-tag {
  font-size: 0.68rem;
  color: var(--ink-muted);
  width: 78px;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.axis-tag-right {
  text-align: right;
}

.axis-bar {
  position: relative;
  flex: 1;
  height: 8px;
  background: var(--line-soft);
  border: 1px solid var(--line);
}

.axis-marker {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--red);
  border: 2px solid var(--line);
  transform: translate(0, -50%);
}

.site-footer {
  border-top: 3px solid var(--line);
  padding: 20px 0 40px;
}

.site-footer p {
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.78rem;
  margin: 0;
}

.site-footer a {
  color: var(--red);
}

.contact {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  text-align: center;
}

.contact-eyebrow {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.contact-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
}

a.contact-item:hover {
  color: var(--red);
}

.contact-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}
