:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #19212c;
  --muted: #667388;
  --line: #d7dfeb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #eef4ff 0%, var(--bg) 100%);
  color: var(--text);
}

a {
  color: inherit;
}

.page-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(215, 223, 235, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 28px;
  margin-bottom: 18px;
}

.hero-card h1,
.panel h2 {
  margin: 0;
  line-height: 1.15;
}

.hero-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.panel h2 {
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}

.subtext,
.muted {
  color: var(--muted);
}

.subtext {
  margin: 12px 0 0;
}

.meta-row,
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-row {
  justify-content: space-between;
  margin-top: 20px;
  color: var(--muted);
  font-weight: 600;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.panel {
  padding: 24px;
}

.panel-heading {
  margin-bottom: 20px;
}

.panel-heading p:last-child {
  margin-bottom: 0;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  min-height: 58px;
}

.option-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.45);
}

.option-card input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

.option-card span {
  line-height: 1.3;
}

.option-card:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.secondary {
  background: #e8edf5;
  color: var(--text);
}

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

.result-row {
  display: grid;
  gap: 8px;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  font-size: 0.98rem;
}

.result-topline small {
  color: var(--muted);
}

.bar-track {
  width: 100%;
  height: 12px;
  background: #e9eef7;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 100%);
}

.compact-results .panel-heading {
  margin-bottom: 16px;
}

.actions {
  margin-top: 20px;
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 16px;
    padding-bottom: 28px;
  }

  .hero-card,
  .panel {
    padding: 18px;
    border-radius: 18px;
  }

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

  .result-topline,
  .meta-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .button {
    width: 100%;
  }

  .actions {
    flex-direction: column;
    align-items: stretch;
  }
}

.wide-shell {
  width: min(1120px, calc(100% - 32px));
}

.results-stack {
  display: grid;
  gap: 18px;
}

.question-nav {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 14px;
  margin: 0 0 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(215, 223, 235, 0.95);
  border-radius: 16px;
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}

.question-nav-link {
  flex: 0 0 auto;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fbfdff;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.question-nav-link:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.45);
  color: var(--accent);
}

.question-nav-link.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-footer {
  margin-top: 18px;
}

@media (max-width: 720px) {
  .wide-shell {
    width: min(100% - 20px, 100%);
  }

  .question-nav {
    gap: 8px;
    padding: 12px;
    margin-bottom: 16px;
  }

  .question-nav-link {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 0.95rem;
  }
}
