:root {
  --ink: #182230;
  --muted: #5f6b7a;
  --line: #d6dce5;
  --line-strong: #aeb8c5;
  --page: #f5f6f8;
  --surface: #ffffff;
  --accent: #2d5da8;
  --accent-dark: #20477f;
  --accent-soft: #edf3fc;
  --danger: #a61b1b;
  --success: #24734e;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 28px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: #fff; color: var(--ink); padding: .75rem 1rem; border: 2px solid var(--accent); }
.skip-link:focus { top: 1rem; }
.top-rule { height: 5px; background: var(--accent); }
.wrap { width: min(100% - 40px, 980px); margin-inline: auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.kicker { display: block; color: var(--accent); font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .11em; }
.title { display: block; margin-top: 2px; font-weight: 650; letter-spacing: -.01em; }
.privacy-note { color: var(--muted); font-size: 13px; }

.global-progress { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
.progress-inner { padding-block: 10px 12px; }
.progress-copy { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.progress-copy strong { color: var(--ink); }
.progress-track, .section-progress-track { height: 6px; overflow: hidden; border-radius: 999px; background: #e6e9ee; }
.progress-fill, [data-step-progress] { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .25s ease; }

main.wrap { padding-block: 38px 28px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: clamp(24px, 4.5vw, 48px); box-shadow: var(--shadow); margin-bottom: 20px; }
.form-panel { max-width: 980px; }
.intro { margin-top: 24px; }
h1 { margin: 0 0 15px; font-size: clamp(28px, 4vw, 38px); line-height: 1.18; letter-spacing: -.025em; }
h2 { margin: 0 0 12px; font-size: clamp(21px, 3vw, 27px); line-height: 1.25; letter-spacing: -.015em; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }
.page-eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 12px; font-weight: 750; letter-spacing: .095em; text-transform: uppercase; }
.footer { padding: 0 0 28px; color: var(--muted); font-size: 12px; text-align: center; }

.study-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0; border-block: 1px solid var(--line); }
.study-facts div { min-height: 92px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; border-right: 1px solid var(--line); }
.study-facts div:last-child { border-right: 0; }
.study-facts strong { font-size: 18px; }
.study-facts span { color: var(--muted); font-size: 13px; }
.reading-block { border-left: 3px solid var(--line-strong); padding-left: 20px; margin: 24px 0; }
.consent-choice { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; font-weight: 650; }
.consent-choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.consent-choice input { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); }

.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 19px; border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); color: #fff; font: inherit; font-weight: 680; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; }
.button:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.button:active { transform: translateY(1px); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(45,93,168,.3); outline-offset: 2px; }
.button.secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.button.secondary:hover { background: #f2f4f7; }
.button[disabled] { background: #aab2bd; border-color: #aab2bd; cursor: wait; transform: none; }
.form-actions, .step-actions { margin-top: 26px; display: flex; align-items: center; gap: 12px; }
.form-actions { justify-content: flex-end; }
.step-actions { border-top: 1px solid var(--line); padding-top: 20px; }
.step-actions .timer-note { margin-left: auto; }
.timer-note { color: var(--muted); font-size: 13px; }

.section-progress { margin: 26px 0 24px; color: var(--muted); font-size: 13px; font-weight: 650; }
.section-progress-track { margin-top: 7px; height: 5px; }
.survey-step[hidden] { display: none !important; }
.survey-step { min-height: 260px; animation: step-in .18s ease-out; }
@keyframes step-in { from { opacity: .25; transform: translateY(4px); } to { opacity: 1; transform: none; } }

fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
legend, .question-prompt { display: block; width: 100%; margin-bottom: 16px; font-size: 20px; line-height: 1.4; font-weight: 660; }
input[type="text"], select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 3px; background: #fff; color: var(--ink); font: inherit; }
textarea { min-height: 210px; resize: vertical; }
.question-block { padding-top: 12px; }
.choice-tile-list { display: grid; gap: 8px; }
.choice-tile { min-height: 52px; display: grid; grid-template-columns: 22px 32px 1fr; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.choice-tile:hover { background: #f8fafc; border-color: var(--line-strong); }
.choice-tile:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.choice-tile input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.choice-value { color: var(--muted); font-weight: 700; }
.choice-label { line-height: 1.25; }

.matrix-instruction { color: var(--muted); font-size: 14px; }
.matrix-wrap { overflow: visible; }
.likert-matrix { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.likert-matrix th, .likert-matrix td { padding: 11px 7px; border-right: 1px solid #e5e8ed; border-bottom: 1px solid #e5e8ed; text-align: center; vertical-align: middle; }
.likert-matrix tr:last-child > * { border-bottom: 0; }
.likert-matrix tr > *:last-child { border-right: 0; }
.likert-matrix thead th { background: #f4f6f8; font-size: 11px; font-weight: 650; line-height: 1.15; }
.likert-matrix thead th:first-child { width: 37%; text-align: left; }
.likert-matrix tbody th { background: #fff; text-align: left; font-size: 14px; line-height: 1.35; font-weight: 560; }
.likert-matrix tbody tr:hover > * { background: #f8fafc; }
.scale-number { display: block; color: var(--accent); font-size: 14px; }
.scale-label { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.matrix-choice { min-height: 38px; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 3px; }
.matrix-choice:hover { background: var(--accent-soft); }
.matrix-choice input { width: 19px; height: 19px; margin: 0; accent-color: var(--accent); }
.mobile-choice-label { display: none; }
.has-errors { box-shadow: inset 4px 0 var(--danger); }
.errorlist { margin: 8px 0; padding-left: 21px; color: var(--danger); font-size: 14px; }
.inline-error { margin-top: 16px; padding: 10px 12px; color: var(--danger); background: #fff1f0; border-left: 3px solid var(--danger); }

.instruction-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0; }
.instruction-grid > div { padding: 18px; border: 1px solid var(--line); background: #fafbfc; }
.instruction-grid p { margin: 10px 0 0; font-size: 14px; }
.instruction-number { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 750; }
.condition { margin: 26px 0 20px; padding: 22px; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.condition h2 { font-size: 22px; }
.condition p:last-child { margin-bottom: 0; }
.resource-demo { margin: 22px 0; padding: 22px; border: 1px solid var(--line); background: #fafbfc; }
.resource-demo h2 { font-size: 22px; }
.resource-demo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.resource-demo-grid article { padding: 16px; border: 1px solid var(--line); background: #fff; }
.resource-demo-grid h3 { margin: 0 0 7px; font-size: 16px; }
.resource-demo-grid p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.opportunity-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: -8px 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.opportunity-count { color: var(--accent); font-weight: 750; }
.stimulus-card { padding: clamp(2px, 2vw, 14px) 0; }
.stimulus { font-size: 18px; line-height: 1.7; }
details { margin-top: 22px; padding: 14px 16px; border: 1px solid var(--line); background: #fafbfc; }
summary { cursor: pointer; color: var(--accent-dark); font-weight: 680; }
details p { margin: 12px 0 0; }

.choice-fieldset legend { margin-bottom: 12px; }
.choice-cards { display: grid; gap: 9px; }
.choice-card { display: flex; align-items: flex-start; gap: 12px; min-height: 58px; padding: 15px; border: 1px solid var(--line); cursor: pointer; }
.choice-card:hover { border-color: var(--line-strong); background: #f8fafc; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.choice-card input { flex: 0 0 auto; width: 19px; height: 19px; margin-top: 2px; accent-color: var(--accent); }
.choice-card span { font-weight: 620; }
.text-question label { display: block; margin-bottom: 6px; font-size: 18px; font-weight: 650; }
.character-count { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: right; }
.character-count.is-complete { color: var(--success); }
.completion-panel { text-align: center; }
.completion-mark { width: 58px; height: 58px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; border-radius: 50%; background: #e9f7ef; color: var(--success); font-size: 28px; font-weight: 750; }

@media (max-width: 760px) {
  .wrap { width: min(100% - 28px, 980px); }
  .privacy-note { display: none; }
  main.wrap { padding-top: 22px; }
  .panel { padding: 24px 18px; }
  .study-facts { grid-template-columns: 1fr; }
  .study-facts div { min-height: 68px; border-right: 0; border-bottom: 1px solid var(--line); }
  .study-facts div:last-child { border-bottom: 0; }
  .instruction-grid { grid-template-columns: 1fr; }
  .resource-demo-grid { grid-template-columns: 1fr; }
  .survey-step { min-height: 220px; }
  .likert-matrix, .likert-matrix tbody, .likert-matrix tr, .likert-matrix th, .likert-matrix td { display: block; width: 100%; }
  .likert-matrix { border: 0; }
  .likert-matrix thead { display: none; }
  .likert-matrix tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 20px; padding: 13px; border: 1px solid var(--line); border-radius: 3px; }
  .likert-matrix tbody th { grid-column: 1 / -1; padding: 0 0 9px; border: 0; font-size: 16px; }
  .likert-matrix tbody td { padding: 0; border: 0; }
  .likert-matrix tbody tr:hover > * { background: transparent; }
  .matrix-choice { min-height: 48px; justify-content: flex-start; gap: 8px; padding: 8px; border: 1px solid var(--line); background: #fff; }
  .matrix-choice:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
  .mobile-choice-label { display: inline; font-size: 12px; line-height: 1.2; }
  .mobile-choice-label strong { margin-right: 2px; color: var(--accent); font-size: 14px; }
  .step-actions, .form-actions { align-items: stretch; flex-wrap: wrap; }
  .step-actions .timer-note, .form-actions .timer-note { width: 100%; margin-left: 0; text-align: right; order: -1; }
  .step-actions .button, .form-actions .button { flex: 1 1 150px; }
}

@media (max-width: 420px) {
  body { font-size: 15px; }
  .header-inner { min-height: 62px; }
  .title { font-size: 14px; }
  .likert-matrix tbody tr { grid-template-columns: 1fr; }
  .stimulus { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
