:root {
  color-scheme: light;
  --ink: #18202b;
  --muted: #657184;
  --line: #dce2ea;
  --paper: #ffffff;
  --wash: #f4f6f9;
  --accent: #2156a5;
  --accent-dark: #173f7b;
  --accent-soft: #eaf1fb;
  --danger: #a22c2c;
  --shadow: 0 14px 38px rgba(28, 42, 64, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--wash); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }

.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  max-width: 1420px; margin: 0 auto; padding: 34px 28px 20px;
}
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: .75rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.65rem, 2.5vw, 2.25rem); letter-spacing: -.035em; }
.progress { min-width: 120px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); text-align: right; }
.progress span { display: block; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.progress strong { font-size: 1.35rem; }

.page-shell { width: min(100% - 32px, 1420px); margin: 0 auto 48px; }
.state-card, .context-card, .comparison-section, .questions-card {
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow);
}
.state-card { max-width: 620px; margin: 80px auto; padding: 48px; text-align: center; }
.state-card h2 { margin: 14px 0 8px; }
.state-card p { color: var(--muted); }
.state-card.error { border-color: #efcccc; }
.state-card.error h2 { color: var(--danger); }
.spinner { width: 32px; height: 32px; margin: auto; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

#evaluation-form { display: grid; gap: 20px; }
.context-card, .comparison-section, .questions-card { padding: clamp(20px, 3vw, 34px); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 22px; }
.section-heading h2 { margin: 0 0 4px; font-size: 1.25rem; }
.section-heading p { margin: 0; color: var(--muted); }
.step { display: grid; place-items: center; flex: 0 0 29px; height: 29px; border-radius: 50%; background: var(--accent); color: white; font-weight: 750; }
.prompt-text { margin: 0 0 28px; padding: 20px; border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--accent-soft); font-size: 1rem; line-height: 1.72; white-space: pre-wrap; }
h3 { margin: 0 0 12px; font-size: .92rem; }
.reference-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.reference-grid figure { margin: 0; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #eef1f5; }
.reference-grid img { display: block; width: 100%; height: 220px; object-fit: contain; }
.reference-grid figcaption { padding: 8px 10px; color: var(--muted); font-size: .82rem; background: var(--paper); }

.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.video-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #0d1117; }
.video-label { position: absolute; z-index: 1; top: 12px; left: 12px; padding: 6px 11px; border-radius: 999px; color: white; background: rgba(12, 17, 25, .78); font-weight: 750; }
.video-card video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #080a0d; object-fit: contain; }
.replay-button { width: 100%; color: #dbe7f8; background: #141b24; border: 0; border-top: 1px solid #283343; padding: 10px; }
.text-button:hover { background: #1d2734; }
.secondary { margin-top: 14px; padding: 10px 15px; border: 1px solid #b9c7da; border-radius: 9px; color: var(--accent-dark); background: #f8fbff; font-weight: 700; }

.questions-card fieldset { margin: 0; padding: 22px 0; border: 0; border-top: 1px solid var(--line); }
.questions-card legend { width: 100%; padding: 0; font-size: 1.03rem; font-weight: 700; line-height: 1.5; }
.questions-card legend span { display: block; margin-bottom: 3px; color: var(--accent); font-size: .76rem; letter-spacing: .08em; text-transform: uppercase; }
.question-note { margin: 7px 0 14px; color: var(--muted); }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 12px; margin-top: 15px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 14px 18px; border: 2px solid var(--line); border-radius: 10px; text-align: center; font-weight: 750; transition: .14s ease; }
.choice:hover span { border-color: #90acd1; background: #f7faff; }
.choice input:focus-visible + span { outline: 3px solid rgba(33, 86, 165, .25); outline-offset: 2px; }
.choice input:checked + span { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-soft); }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 18px; border-top: 1px solid var(--line); }
.expiry-note { margin: 0; color: var(--muted); font-size: .88rem; }
.primary { min-width: 155px; padding: 13px 20px; border: 0; border-radius: 10px; color: white; background: var(--accent); font-weight: 750; box-shadow: 0 6px 16px rgba(33, 86, 165, .18); }
.primary:hover:not(:disabled) { background: var(--accent-dark); }
footer { padding: 0 20px 34px; color: var(--muted); text-align: center; font-size: .82rem; }

@media (max-width: 760px) {
  .site-header { align-items: flex-start; padding-inline: 18px; }
  .page-shell { width: min(100% - 20px, 1420px); }
  .reference-grid { grid-template-columns: 1fr; }
  .reference-grid img { height: 200px; }
  .video-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr 1fr; }
  .submit-row { align-items: stretch; flex-direction: column; }
  .primary { width: 100%; }
}

