:root {
  color-scheme: light;
  --paper: #fbfafc;
  --ink: #373047;
  --muted: #61596e;
  --indigo: #575077;
  --lavender: #e7e2f5;
  --rose: #f2dce6;
  --sage: #dce9e3;
  --line: #d5cfde;
  --control-line: #81758d;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; line-height: 1.55; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 1000' preserveAspectRatio='xMidYMid slice'%3E%3Cdefs%3E%3Cfilter id='wash' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.024' numOctaves='3' seed='14' result='paper'/%3E%3CfeDisplacementMap in='SourceGraphic' in2='paper' scale='70' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='18'/%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23wash)' opacity='.55'%3E%3Cpath fill='%23e7e2f5' d='M1090 -130C800 30 864 241 1125 354s449-80 497-329Z'/%3E%3Cpath fill='%23f2dce6' d='M1490 250c-244-63-418 89-379 269s140 217 365 188Z'/%3E%3Cpath fill='%23dce9e3' d='M-141 744c228-72 397 15 351 161S53 1169-151 1118Z'/%3E%3Cpath fill='%23e7e2f5' d='M74 969c65-90 211-144 311-52s4 154-108 175Z'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, label, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
button, a, input, summary { touch-action: manipulation; }
:focus-visible { outline: 3px solid #353053; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, h4, p, figure { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.035em; }
h1 { font-size: clamp(2.45rem, 5.2vw, 4.2rem); line-height: 1.08; margin-bottom: 28px; }
h2 { font-size: 2rem; line-height: 1.2; }
h3 { font-size: 1.15rem; font-weight: 600; }
h4 { font-size: 1rem; margin-bottom: 8px; }
p { max-width: 68ch; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 12px 18px; background: var(--paper); }
.skip-link:focus { top: 16px; }
.site-header { max-width: 1240px; height: 76px; margin: auto; padding: 0 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { min-height: 44px; display: inline-flex; align-items: center; font-family: var(--serif); font-size: 1.4rem; letter-spacing: -.03em; text-decoration: none; }
.header-note { color: var(--muted); }
.page-shell { width: min(1100px, calc(100% - 96px)); min-height: calc(100vh - 170px); margin: 0 auto; }
.site-footer { max-width: 1240px; padding: 24px 48px; margin: auto; color: var(--muted); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.button { min-height: 48px; padding: 11px 24px; border: 1px solid var(--control-line); border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; font-weight: 550; line-height: 1.45; background: transparent; color: var(--ink); }
.button--primary { border-color: var(--indigo); background: var(--indigo); color: #fff; }
.button--primary:hover { background: #494262; border-color: #494262; }
.button--quiet:hover { background: var(--lavender); }
.text-button, .text-link, .back-link { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: var(--muted); display: inline-flex; align-items: center; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.text-button--danger { color: #83384a; }
.back-link { text-decoration: none; }
.invitation { min-height: 640px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 72px; align-items: center; padding: 64px 0 80px; }
.invitation h1 { font-size: clamp(3.5rem, 5.8vw, 5.6rem); line-height: 1.02; margin-bottom: 32px; }
.lede { font-size: 1.2rem; margin-bottom: 14px; }
.invitation-note { color: var(--muted); margin-bottom: 34px; }
.time-note { margin: 18px 0 0; color: var(--muted); }
.qr-invitation { margin: 0; text-align: center; justify-self: center; padding: 32px 32px 24px; border: 1px solid rgba(129,117,141,.4); border-radius: 46% 46% 12px 12px; background: rgba(251,250,252,.65); }
.questionnaire-qr { display: block; width: 225px; height: 225px; margin: 10px auto 18px; }
.qr-invitation figcaption { font-family: var(--serif); font-size: 1.55rem; }
.qr-invitation .text-link { margin-right: 16px; }
.status-note:empty { display: none; }
.status-note { color: var(--muted); margin: 18px 0; }
.narrow-flow { max-width: 580px; margin: 0 auto; padding: 70px 0 50px; }
.narrow-flow > .back-link { margin-bottom: 38px; }
.alias-form { display: grid; gap: 14px; }
.alias-form > label { font-weight: 550; }
.alias-form > input, .invitation-code { min-height: 54px; width: 100%; border: 1px solid var(--control-line); border-radius: 8px; padding: 12px 15px; background: rgba(255,255,255,.72); color: var(--ink); }
.invitation-label { display: block; margin-bottom: 14px; font-weight: 550; }
.alias-form .button { justify-self: start; margin-top: 16px; min-width: 140px; }
.field-help { color: var(--muted); font-size: 1rem; margin-bottom: 24px; }
.error-copy { color: #83384a; padding-left: 14px; border-left: 3px solid #83384a; margin: 20px 0; }
.quiz-flow { max-width: 760px; margin: 0 auto; padding: 40px 0 50px; }
.question-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.question-count { color: var(--muted); margin-bottom: 0; }
.progress-track { height: 4px; background: var(--line); margin-bottom: 44px; border-radius: 4px; overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--indigo); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; font-family: var(--serif); font-size: clamp(1.8rem, 3.3vw, 2.65rem); line-height: 1.22; letter-spacing: -.025em; margin-bottom: 38px; }
.scale-endpoints { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 24px; }
.scale-endpoints p { max-width: 28ch; margin-bottom: 0; }
.scale-endpoints p:last-child { text-align: right; justify-self: end; }
.scale-endpoints span { display: block; margin-bottom: 8px; font-family: var(--serif); font-size: 1.65rem; color: var(--indigo); }
.answer-scale { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; }
.answer-option { min-width: 0; min-height: 56px; position: relative; cursor: pointer; }
.answer-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.answer-option > span { display: flex; align-items: center; justify-content: center; min-height: 56px; width: 100%; border: 1px solid var(--control-line); background: rgba(255,255,255,.65); border-radius: 8px; }
.answer-option input:checked + span { color: white; border-color: var(--indigo); background: var(--indigo); font-weight: 650; }
.answer-option input:focus-visible + span { outline: 3px solid #353053; outline-offset: 3px; }
.answer-option input:focus-visible { outline: none; }
.skip-option, .consent-option, .select-option { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.skip-option { margin-top: 22px; color: var(--muted); }
.skip-option input, .consent-option input, .select-option input { width: 20px; height: 20px; margin: 0; flex: 0 0 20px; accent-color: var(--indigo); }
.consent-option { padding: 12px 0; align-items: flex-start; margin: 28px 0; }
.consent-option input { margin-top: 3px; }
.quiz-actions { display: flex; justify-content: flex-end; margin-top: 32px; }
.quiz-actions .button { min-width: 140px; }
.stacked-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.coverage-list { list-style: none; padding: 0; margin: 24px 0; }
.coverage-list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.completion { padding-top: 110px; }
.completion-mark { font-family: var(--serif); font-size: 2.3rem; color: var(--indigo); margin-bottom: 24px; }
.completion .button { margin-top: 24px; }
.admin-console { padding: 56px 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h1, .section-heading h2 { margin-bottom: 12px; }
.section-heading p { margin-bottom: 0; color: var(--muted); }
.console-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
.empty-state { border-top: 1px solid var(--line); padding: 50px 0; }
.empty-state .button { margin-top: 16px; }
.cohort-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); }
.profile-list { list-style: none; padding: 0; margin: 8px 0 0; }
.profile-row { display: grid; grid-template-columns: minmax(180px, 1fr) 90px auto 60px; align-items: start; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.profile-row .select-option span { overflow-wrap: anywhere; }
.profile-date { padding-top: 12px; color: var(--muted); }
summary { min-height: 44px; cursor: pointer; padding: 10px 0; }
.profile-details { min-width: 150px; }
.profile-details dl { max-width: 380px; margin: 12px 0; }
.profile-details dl > div { padding: 10px 0; }
.profile-details dt { font-weight: 550; }
.profile-details dd { margin: 4px 0 0; }
.profile-details dd span { color: var(--muted); display: block; }
.results { margin-top: 56px; padding-top: 44px; border-top: 1px solid var(--line); }
.result-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 36px; }
.pair-list { list-style: none; padding: 0; }
.pair-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.pair-row strong { font-weight: 600; overflow-wrap: anywhere; }
.pair-row p { color: var(--muted); margin: 6px 0 0; }
.pair-rank { color: var(--muted); }
.pair-score { color: var(--indigo); font-size: 1.15rem; font-weight: 600; white-space: nowrap; }
.pair-score small { font-size: 1rem; font-weight: 400; }
.group-results { margin-top: 30px; }
.groups-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.group-row { border-top: 1px solid var(--line); padding: 20px 0; }
.group-row p { overflow-wrap: anywhere; }
.method-details { color: var(--muted); margin-top: 24px; }
.method-details p { margin: 16px 0; }
@media (max-width: 767px) {
  .site-header { padding: 0 24px; }
  .page-shell { width: calc(100% - 48px); }
  .site-footer { padding: 20px 24px; }
  .invitation { grid-template-columns: 1fr; gap: 54px; min-height: auto; padding: 48px 0; }
  .invitation h1 { font-size: clamp(3.3rem, 10.5vw, 4.6rem); }
  .qr-invitation { justify-self: start; padding: 24px; }
  .questionnaire-qr { width: 208px; height: 208px; }
  .narrow-flow { padding-top: 46px; }
  .quiz-flow { padding-top: 20px; }
  .progress-track { margin-bottom: 32px; }
  legend { margin-bottom: 28px; }
  .scale-endpoints { gap: 24px; }
  .answer-scale { grid-template-columns: repeat(5, 1fr); gap: 10px 8px; }
  .answer-option, .answer-option > span { min-height: 48px; }
  .quiz-actions { margin-top: 24px; }
  .completion { padding-top: 70px; }
  .header-note { font-size: 1rem; }
  .section-heading { flex-wrap: wrap; }
  .admin-console { padding-top: 36px; }
  .profile-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; }
  .profile-date { text-align: right; }
  .profile-details { grid-column: 1; }
  .profile-row > .text-button { justify-self: end; }
  .result-columns, .groups-list { grid-template-columns: 1fr; gap: 24px; }
  .results { padding-top: 32px; }
}
@media (max-width: 359px) {
  .site-header, .site-footer { padding-left: 20px; padding-right: 20px; }
  .page-shell { width: calc(100% - 40px); }
  .invitation h1 { font-size: 3rem; }
  .qr-invitation { padding: 20px; }
  .scale-endpoints { gap: 16px; }
  .header-note { max-width: 100px; line-height: 1.4; }
  .stacked-actions { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
