:root {
  --navy: #1B2A3B;
  --charcoal: #2C3033;
  --gold: #C9A847;
  --teal: #2D6B5A;
  --parchment: #F5F0E8;
  --stone: #6B7280;
  --off-white: #F0EBE0;
  --card: #FFFFFF;
  --danger: #9B3B3B;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--parchment);
  color: var(--charcoal);
  line-height: 1.6;
}

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

.site-header {
  background: var(--navy);
  padding: 18px 0;
}
.site-header .wrap { display: flex; flex-direction: column; }
.brand { color: var(--off-white); font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-sub { color: var(--gold); font-size: 13px; margin-top: 2px; }

.progress {
  height: 4px;
  background: #E3DBCC;
  margin-bottom: 8px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--teal);
  transition: width 0.25s ease;
}

main.wrap { padding-top: 32px; padding-bottom: 60px; min-height: 60vh; }

h1 {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin: 0 0 16px;
}
h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 6px;
}
h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin: 0 0 8px;
}

.lede { font-size: 16px; color: var(--charcoal); }
.section-note { color: var(--stone); font-size: 14px; margin: 0 0 22px; }
.muted { color: var(--stone); font-weight: 400; }

a { color: var(--teal); text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color .15s ease; }
a:hover { text-decoration-color: var(--gold); }

.question { margin-bottom: 26px; }
.question .q-label { font-weight: 600; color: var(--navy); display: block; margin-bottom: 4px; }
.question .q-sub { color: var(--stone); font-size: 13px; margin-bottom: 10px; }

.options { display: flex; flex-direction: column; gap: 8px; }
.option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #DDD3C0;
  border-radius: 8px;
  background: var(--card);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.option:hover { border-color: var(--teal); }
.option.selected { border-color: var(--teal); background: #EAF2EF; }
.option input { margin-top: 3px; accent-color: var(--teal); }
.option span { font-size: 15px; }

.field {
  display: block;
  font-weight: 600;
  color: var(--navy);
  font-size: 14px;
  margin-bottom: 16px;
}
.field input[type="text"], .field input[type="email"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #DDD3C0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background: var(--card);
  color: var(--charcoal);
}
.field input:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

.stack-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.stack-row label { width: 150px; font-size: 14px; color: var(--stone); flex-shrink: 0; }
.stack-row input { flex: 1; padding: 8px 10px; border: 1px solid #DDD3C0; border-radius: 6px; font-family: inherit; font-size: 14px; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 14px; font-size: 15px; cursor: pointer; }
.checkbox input { margin-top: 3px; accent-color: var(--teal); }

.hp-field { position: absolute; left: -9999px; top: -9999px; width: 1px; height: 1px; overflow: hidden; }

.privacy-note { font-size: 13px; color: var(--stone); margin: 18px 0; }

.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.btn {
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: #245546; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: transparent; color: var(--stone); border: 1px solid #DDD3C0; }
.btn-secondary:hover { color: var(--charcoal); border-color: var(--stone); }
/* "I'm done" — leaving without opting in is a real choice, so it gets a real
   button. Navy, so it reads as an equal peer to the teal opt-in rather than a
   way out; the two intents must never share one control again. */
.btn-done { background: var(--navy); color: #fff; }
.btn-done:hover { background: #14202D; }
.nav-actions { display: flex; gap: 12px; flex-wrap: wrap; }

#startBtn { margin-top: 8px; }

.result-card {
  background: var(--navy);
  color: var(--off-white);
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  margin-bottom: 24px;
}
.result-pct { font-size: 52px; font-weight: 700; color: #fff; line-height: 1; }
.result-band { font-size: 19px; font-weight: 600; color: var(--gold); margin: 8px 0 16px; }
.result-read { font-size: 15px; color: var(--off-white); max-width: 480px; margin: 0 auto; }
.result-gate {
  margin-top: 16px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  font-size: 13px;
  color: var(--off-white);
}

.axes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.axis-card { background: var(--card); border: 1px solid #DDD3C0; border-radius: 8px; padding: 14px 12px; text-align: center; }
.axis-name { font-size: 12px; color: var(--stone); text-transform: uppercase; letter-spacing: 0.03em; }
.axis-pct { font-size: 24px; font-weight: 700; color: var(--navy); margin-top: 4px; }

.gap-card, .one-move {
  background: var(--card);
  border: 1px solid #DDD3C0;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.gap-card p, .one-move p { margin: 0; font-size: 15px; }

.submit-status { font-size: 14px; color: var(--stone); min-height: 20px; margin-top: 10px; }
.submit-status.error { color: var(--danger); }
.submit-status.ok { color: var(--teal); }
/* Neither box ticked isn't an error — it's a prompt. Navy, not danger red, so
   someone who genuinely wants to leave isn't told off on the way out. */
.submit-status.notice { color: var(--navy); font-weight: 600; }

/* Human check — a prominent, clearly-required box so it never reads as an
   optional tickbox. Gold-bordered card with an accent bar, distinct from the
   plain opt-in checkboxes above it. */
.human-check {
  margin: 18px 0;
  padding: 14px 16px;
  border: 2px solid var(--gold);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  background: rgba(201, 168, 71, 0.07);
}
.human-check-req {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
/* On a submit attempt without solving it, the widget is highlighted + scrolled to. */
altcha-widget.altcha-needed {
  display: block;
  border-radius: 8px;
  outline: 2px solid var(--danger);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(192, 57, 43, 0.10);
}

.site-footer {
  background: var(--navy);
  padding: 20px 0;
  margin-top: 40px;
}
.site-footer .wrap { font-size: 12px; color: var(--stone); }
.site-footer a { color: var(--gold); }

@media (max-width: 480px) {
  h1 { font-size: 22px; }
  .axes { grid-template-columns: 1fr; }
  .stack-row { flex-direction: column; align-items: flex-start; }
  .stack-row label { width: auto; }
  /* Three buttons don't fit a phone. Back keeps its own line; the two real
     choices sit side by side below it at equal width, so neither is favoured. */
  .nav-actions { width: 100%; }
  .nav-actions .btn { flex: 1; padding: 12px 10px; }
}
