:root {
  --ink: #0b1f2a;
  --body: #162a35;
  --muted: #586a73;
  --paper: #fffdf8;
  --line: #d8e0e4;
  --panel: #f3f6f7;
  --teal: #0b8f85;
  --gold: #d8ac4a;
  --rust: #b45309;
  --green: #28734f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--body);
  background: #e7ecef;
  font-family: Inter, "Noto Sans", "Avenir Next", "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

textarea { font: inherit; }

.site-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  padding: 16px clamp(16px, 4vw, 48px);
  color: var(--ink);
  background: var(--paper);
  border-bottom: 4px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.hero {
  display: block;
  padding: 28px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.hero-art {
  display: block;
  width: auto;
  height: 300px;
  max-width: 100%;
  margin: 0 0 24px;
  object-fit: contain;
  border: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.12;
}

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 56px);
}

h2 { font-size: 30px; }
h3 { font-size: 22px; }

.intro {
  max-width: 780px;
  margin: 16px 0 0;
  color: #2d434f;
  font-size: 18px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 30%);
  gap: 24px;
  margin-top: 24px;
  align-items: start;
}

.quiz-panel,
.sidebar {
  background: var(--paper);
  border: 1px solid var(--line);
}

.quiz-panel {
  min-height: 720px;
  padding: clamp(18px, 3vw, 30px);
}

.sidebar {
  position: sticky;
  top: 18px;
  padding: 24px;
}

.sidebar p,
.sidebar li {
  color: #334b56;
}

.sidebar ul {
  margin: 12px 0 0 18px;
  padding: 0;
}

.sidebar li {
  margin-bottom: 8px;
}

.side-rule {
  height: 3px;
  margin: 20px 0;
  background: var(--gold);
}

.side-callout {
  margin-top: 22px;
  padding: 16px;
  background: var(--panel);
  border-left: 4px solid var(--teal);
}

.side-callout strong {
  color: var(--ink);
}

.side-callout p {
  margin: 6px 0 0;
  font-size: 14px;
}

.loading {
  padding: 24px;
  color: var(--muted);
  background: var(--panel);
}

.hidden { display: none !important; }

.progress-wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.step-label,
.question-count {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.question-count {
  white-space: nowrap;
}

.progress-bar {
  height: 8px;
  margin: 18px 0 24px;
  overflow: hidden;
  background: #dfe7ea;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--teal);
  transition: width .2s ease;
}

.questions {
  display: grid;
  gap: 20px;
}

.question {
  padding: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.question legend {
  padding: 0;
  color: var(--ink);
  font-weight: 900;
}

.question p {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.select-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid #c5d1d7;
}

textarea.select-input { resize: vertical; }

.options {
  display: grid;
  gap: 10px;
}

.option {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 48px;
  padding: 12px;
  cursor: pointer;
  border: 1px solid #cdd7dc;
  background: var(--paper);
}

.option:has(input:checked) {
  border-color: var(--teal);
  box-shadow: inset 0 0 0 2px rgba(11, 143, 133, .18);
}

.option input {
  margin-top: 3px;
  accent-color: var(--teal);
}

.form-error {
  min-height: 24px;
  margin-top: 16px;
  color: #8d2f16;
  font-weight: 800;
}

.turnstile {
  min-height: 0;
  margin-top: 16px;
}

.actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.button {
  min-height: 44px;
  padding: 10px 18px;
  cursor: pointer;
  border: 1px solid var(--ink);
  font-weight: 900;
}

.button.primary {
  color: #ffffff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: var(--paper);
}

.button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.results h2 {
  max-width: 760px;
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.score-card {
  padding: 20px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.score-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.score-card strong {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.15;
}

.score-card strong small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

.score-card em {
  display: block;
  margin-top: 6px;
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.score-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.meter {
  height: 9px;
  margin-top: 18px;
  background: #dfe7ea;
}

.meter span {
  display: block;
  height: 100%;
  background: var(--teal);
}

.exposure-card .meter span {
  background: var(--rust);
}

.result-summary {
  margin: 0 0 24px;
  padding: 18px;
  color: #263e49;
  background: var(--panel);
  border-left: 4px solid var(--gold);
}

.outcomes {
  display: grid;
  gap: 10px;
  margin: 12px 0 24px;
}

.outcome-row {
  display: grid;
  grid-template-columns: 1fr 52px;
  gap: 14px;
  align-items: center;
}

.outcome-row span {
  color: var(--ink);
  font-weight: 800;
}

.mini-meter {
  height: 8px;
  margin-top: 6px;
  background: #dfe7ea;
}

.mini-meter i {
  display: block;
  height: 100%;
  background: var(--teal);
}

.factor-list {
  margin: 12px 0 24px 18px;
  padding: 0;
}

.factor-list li {
  margin-bottom: 8px;
}

.cta-box {
  margin-top: 24px;
  padding: 20px;
  color: var(--ink);
  background: #f8f1df;
  border: 1px solid #dfc989;
}

.cta-box p {
  margin: 10px 0 0;
}

.lead-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.fine-print {
  color: #5e5539;
  font-size: 13px;
}

.scope-note {
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: var(--panel);
}

.fit-panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.fit-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.fit-work-context {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 4px solid var(--teal);
  background: var(--panel);
  overflow-wrap: anywhere;
}

.fit-work-context p {
  margin: 0 0 8px;
}

.fit-work-context p:last-child {
  margin-bottom: 0;
}

.fit-panel form {
  display: grid;
  gap: 10px;
}

.fit-panel form label {
  margin-top: 12px;
  color: var(--ink);
  font-weight: 800;
}

.fit-outcome {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid #dfc989;
  background: #fff9e9;
}

.fit-outcome h3 {
  margin-bottom: 10px;
}

.refund-note {
  font-weight: 800;
}

.fit-ack {
  display: flex;
  gap: 10px;
  align-items: start;
  margin-top: 16px;
}

.fit-ack input {
  margin-top: 5px;
}

.fit-newsletter {
  margin-top: 18px;
  padding: 16px;
  background: var(--paper);
  border-left: 4px solid var(--teal);
}

.purchase-review {
  margin-top: 20px;
  padding: 20px;
  border: 2px solid var(--teal);
  background: #f1faf8;
}

.purchase-review p {
  max-width: 680px;
}

.fit-newsletter p {
  margin: 6px 0;
}

.fit-newsletter a {
  color: #075f59;
  font-weight: 800;
}

@media (max-width: 880px) {
  .workspace,
  .score-grid,
  .lead-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .progress-wrap,
  .actions,
  .lead-row {
    align-items: stretch;
    flex-direction: column;
  }

  .question-count {
    white-space: normal;
  }
}
