:root {
  /* Second Act Affiliate brand: navy main, gold accent used sparingly, cream background */
  --bg: #f6f1e7;
  --card: #ffffff;
  --text: #1d1d1b;
  --muted: #55524b;
  --accent: #16324f;
  --accent-text: #ffffff;
  --gold: #e8a33d;
  --gold-soft: #fbf1de;
  --border: #ddd5c4;
  --ready: #1e7a3c;
  --leaking: #a15c00;
  --scaring: #b3261e;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 18px/1.55 Arial, Helvetica, sans-serif;
}

.card {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  background: var(--card);
  min-height: 100vh;
  /* The question slide animation must never make the page scroll sideways */
  overflow-x: clip;
}

@media (min-width: 700px) {
  .card { margin: 32px auto; min-height: auto; border-radius: var(--radius); padding: 40px; border: 1px solid var(--border); }
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; color: var(--accent); }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 12px; }
h2 { font-size: 1.5rem; line-height: 1.3; margin: 8px 0 12px; }
h3 { font-size: 1.25rem; margin: 32px 0 8px; }
h4 { font-size: 1.05rem; margin: 20px 0 8px; }
h1:focus, h2:focus { outline: none; }

.eyebrow { color: #a15c00; font: 600 0.9rem/1.4 "Open Sans", Arial, sans-serif; text-transform: uppercase; letter-spacing: 0.12em; margin: 0; }
.byline { color: var(--muted); margin: -4px 0 12px; }
.lead { font-size: 1.15rem; }
.hint { color: var(--muted); }
.where { background: var(--bg); border-radius: var(--radius); padding: 12px; font-size: 0.95rem; }
.fine { color: var(--muted); font-size: 0.9rem; }
.error { color: var(--scaring); font-weight: 600; }
.hero-photo { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.honeypot { position: absolute; left: -9999px; }

button { font: inherit; cursor: pointer; }
button:disabled { opacity: 0.6; cursor: wait; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.primary {
  display: block;
  width: 100%;
  margin: 20px 0 8px;
  padding: 16px;
  border: 0;
  border-radius: var(--radius);
  background: var(--gold);
  color: var(--text);
  font-weight: 700;
}

.answers { display: grid; gap: 12px; margin: 24px 0; }
.answer {
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  text-align: left;
}
.answer[aria-pressed="true"] { border-color: var(--accent); background: var(--gold-soft); }

.question-enter { animation: question-in 0.45s ease-out; }
.question-leave { animation: question-out 0.25s ease-in forwards; }
@keyframes question-in {
  from { opacity: 0; transform: translateX(80px); }
  to { opacity: 1; transform: none; }
}
@keyframes question-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateX(-80px); }
}
@media (prefers-reduced-motion: reduce) {
  .question-enter { animation: question-fade-in 0.45s ease-out; }
  .question-leave { animation: question-fade-out 0.25s ease-in forwards; }
  @keyframes question-fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes question-fade-out { from { opacity: 1; } to { opacity: 0; } }
}

.link-button { border: 0; background: none; color: var(--accent); padding: 8px 0; }

.progress { height: 8px; background: var(--border); border-radius: 4px; overflow: hidden; margin-bottom: 16px; }
.progress-bar { height: 100%; width: 0; background: var(--gold); transition: width 0.2s; }

.platform-list { border: 0; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.platform-list label {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
}
.platform-list input { width: 22px; height: 22px; }

form label { display: block; margin: 16px 0 4px; font-weight: 600; }
form input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  font: inherit;
  border: 2px solid var(--border);
  border-radius: var(--radius);
}

.score-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.score-number { font-size: 1.5rem; font-weight: 800; }
.band { font-weight: 700; }
.band-ready { color: var(--ready); }
.band-leaking { color: var(--leaking); }
.band-scaring { color: var(--scaring); }

.fix { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.fix p { margin: 8px 0; }
.prompt { white-space: pre-wrap; background: var(--bg); padding: 12px; border-radius: 8px; font: 0.95rem/1.5 ui-monospace, Consolas, monospace; }
.copy-button { padding: 10px 14px; border: 2px solid var(--accent); border-radius: 8px; background: var(--card); color: var(--accent); font-weight: 600; }
.passed-list { padding-left: 0; list-style: none; }
.passed-list li { padding: 6px 0; color: var(--muted); }
.passed-list li::before { content: "✓ "; color: var(--ready); font-weight: 800; }

.results-link { margin-top: 32px; padding: 16px; background: var(--bg); border-radius: var(--radius); }
.results-link input { width: 100%; padding: 12px; font: inherit; font-size: 0.9rem; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; }
.results-link button { padding: 10px 14px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-text); font-weight: 600; }
