/* ============================================================================
   Emotion Rating Study — stylesheet
   Aesthetic: refined editorial minimalism.
   Typography: Fraunces (display serif) + IBM Plex Sans (body/UI).
   Ground: warm off-white. Accent: deep academic green. One shadow, one radius.
   Goals: quiet, readable, deliberately non-consumer. Fades into background.
============================================================================ */

/* Fonts load once, non-blocking, from index.html (display=swap). The font
   stacks below carry full system fallbacks, so first paint never waits on
   fonts.googleapis.com. */

/* --- Design tokens --- */
:root {
  /* Color */
  --bg:            #FAFAF7;
  --bg-elevated:   #FFFFFF;
  --ink:           #0F0F0F;
  --ink-2:         #3A3A3A;
  --ink-3:         #6B6B6B;
  --ink-4:         #9B9A94;
  --rule:          #E0DFD9;
  --rule-strong:   #C9C7BF;
  --accent:        #2D4A2B;
  --accent-hover:  #1F3620;
  --accent-wash:   rgba(45, 74, 43, 0.08);
  --error:         #8B1E2D;

  /* Type */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, system-ui, sans-serif;

  /* Scale (8-pt) */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* Geometry */
  --radius:  2px;
  --radius-lg: 4px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --dur-slow: 360ms;

  /* Layout */
  --max-width: 1200px;
  --max-narrow: 640px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv05";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

/* --- Global stage (jsPsych injects into #jspsych-target) --- */
#jspsych-target { min-height: 100vh; }
.jspsych-content-wrapper,
.jspsych-content {
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.jspsych-display-element { background: var(--bg); }

/* --- Page shell used by consent, instructions, completion --- */
.survey-logo-header {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: clamp(var(--s-4), 2.4vw, var(--s-5)) var(--s-6) 0;
}
.institution-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--s-4), 3vw, var(--s-6));
  flex-wrap: wrap;
}
.institution-logos img {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.logo-mit { height: 38px; }
.logo-harvard { height: 46px; }
.logo-northwestern { height: 30px; }

.stage {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.survey-logo-header + .stage {
  min-height: calc(100vh - 78px);
  min-height: calc(100dvh - 78px);
}
.stage-header {
  padding: var(--s-5) var(--s-6);
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--rule);
}
.stage-header__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.stage-header__meta {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.stage-body {
  padding: var(--s-8) var(--s-6);
  display: grid;
  place-items: center;
}
.stage-card {
  max-width: var(--max-narrow);
  width: 100%;
}
.stage-footer {
  padding: var(--s-5) var(--s-6);
  border-top: 1px solid var(--rule);
  display: flex; justify-content: flex-end;
}

/* --- Typography utilities --- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 var(--s-3);
}
.title-xl {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-5);
  font-variation-settings: "opsz" 64;
}
.title-lg {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2rem);
  line-height: 1.15;
  margin: 0 0 var(--s-4);
  font-variation-settings: "opsz" 36;
}
.title-md {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  line-height: 1.3;
  margin: 0 0 var(--s-2);
  font-variation-settings: "opsz" 14;
}
.prose {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 60ch;
}
.prose p + p { margin-top: var(--s-4); }
.prose strong { color: var(--ink); font-weight: 500; }
.prose ul { padding-left: 1.25rem; margin: var(--s-4) 0; }
.prose li + li { margin-top: var(--s-2); }

.rule {
  height: 1px;
  background: var(--rule);
  border: 0;
  margin: var(--s-6) 0;
}
.rule--short {
  width: 48px;
  height: 1px;
  background: var(--ink);
  border: 0;
  margin: 0 0 var(--s-5);
}

/* --- Button --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: var(--s-3) var(--s-5);
  min-height: 44px;
  min-width: 160px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #F6F6F1;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease),
              opacity var(--dur-fast) var(--ease);
}
.btn:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled {
  background: transparent;
  color: var(--ink-4);
  border-color: var(--rule);
  cursor: not-allowed;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.btn--ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--rule);
}
.btn--ghost:hover:not(:disabled) {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

[hidden] {
  display: none !important;
}

/* ============================================================================
   Rating trial — desktop (single screen, viewport-locked)
   Left: video. Right: emotion checkboxes. Continue in footer.
   Height is capped at 100vh with no page scroll — each element is sized so
   the whole trial fits in the viewport on typical laptop screens (>= ~680px).
============================================================================ */
.rating {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* dynamic viewport unit — avoids mobile URL-bar jumps */
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr auto;
}
.rating--with-logos {
  grid-template-rows: auto 1fr auto;
}
.rating--creator-rewards,
.rating--comparison {
  grid-template-rows: auto auto 1fr auto;
}
.rating--with-logos .survey-logo-header {
  padding-top: clamp(var(--s-3), 1.6vw, var(--s-4));
}
.rating--with-logos .rating-body {
  padding-top: var(--s-3);
}

.rating-body {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: var(--s-5);
  padding: var(--s-4) var(--s-5) var(--s-3);
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  min-height: 0;       /* critical: lets the 1fr row cap children to this row's height */
  align-items: stretch;
}

/* --- Video column — height-constrained (aspect-ratio determines width) --- */
.video-col {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.video-frame {
  position: relative;
  /* Size the frame from its width; aspect-ratio derives height. We cap both
     dimensions so a tall viewport can shrink width (keeping 9:16) and a narrow
     one can shrink height — neither cap, on its own, distorts the ratio. */
  aspect-ratio: 9 / 16;
  width: min(34vw, 430px);
  max-height: 100%;
  background: #0B0B0B;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 20px 48px -20px rgba(0,0,0,0.18);
}
.video-frame video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  background: #0B0B0B;
}
.video-frame__sound {
  position: absolute;
  right: var(--s-3);
  bottom: var(--s-3);
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: none;
  border-radius: 999px;
  background: rgba(20,20,20,0.72);
  color: #F6F6F1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.video-frame__sound:hover { background: rgba(20,20,20,0.92); }
.video-frame__sound:active { transform: scale(0.96); }
.video-frame__sound svg { width: 18px; height: 18px; }

/* Thin, subtle progress bar along bottom of video frame — no numbers. */
.video-frame__progress {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: rgba(255,255,255,0.12);
}
.video-frame__progress-fill {
  height: 100%;
  background: rgba(255,255,255,0.82);
  width: 0%;
  transition: width 120ms linear;
}

/* --- Prompt column --- */
.prompt {
  display: flex;
  flex-direction: column;
  justify-content: center;  /* vertically center with the video column */
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  gap: var(--s-3);
}
.prompt__q {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  line-height: 1.35;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0;
  max-width: 48ch;
}
.prompt__hint {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}
.prompt__hint strong { color: var(--ink-2); font-weight: 500; }

/* --- Chip grid --- */
.emo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.emo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  background: var(--bg-elevated);
  color: var(--ink-2);
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
  user-select: none;
  text-align: center;
}
.emo:hover:not(:has(input:checked)) {
  border-color: var(--ink-3);
  color: var(--ink);
}
.emo:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #F6F6F1;
}
.emo:has(input:checked):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.emo input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.emo__label {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
}
.emo:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* "None of the above" and "Other" span the full width as quieter options. */
.emo--special {
  grid-column: 1 / -1;
  background: transparent;
  border-style: dashed;
  border-color: var(--rule-strong);
  color: var(--ink-3);
}
.emo--full-width {
  grid-column: 1 / -1;
}
.emo--special:hover:not(:has(input:checked)) {
  border-color: var(--ink-3);
  border-style: dashed;
  color: var(--ink);
}
.rating--choice .emo--special[data-option-id="none"]:not(:has(input:checked)) {
  background: #ECECEA;
  border-color: #D4D4D0;
  border-style: solid;
  color: var(--ink-2);
}
.rating--choice .emo--special[data-option-id="none"]:hover:not(:has(input:checked)) {
  background: #E2E2DF;
  border-color: #BEBEB8;
  border-style: solid;
}
.emo-other-field {
  grid-column: 1 / -1;
  margin-top: -2px;
  padding: 4px 0 0;
  display: none;
}
.emo-other-field.is-visible { display: block; }
.emo-other-field input[type="text"] {
  width: 100%;
  padding: 10px var(--s-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font: 400 14px/1.4 var(--font-body);
  color: var(--ink);
}
.emo-other-field input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

/* --- Footer with Continue button --- */
.rating-footer {
  border-top: 1px solid var(--rule);
  padding: 10px var(--s-5) 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--s-4);
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  background: var(--bg);
}
.rating-footer .btn { min-height: 40px; min-width: 140px; padding: 10px var(--s-5); }
.watch-gate {
  margin-right: auto;
  width: min(220px, 34vw);
  min-width: 168px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  color: var(--ink-3);
}
.watch-gate__label {
  font: 600 11px/1.1 var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.watch-gate__time {
  font: 600 12px/1 var(--font-body);
  font-variant-numeric: tabular-nums;
}
.watch-gate__track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.watch-gate__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent);
  transition: transform 180ms linear, background var(--dur-fast) var(--ease);
}
.watch-gate[data-state="complete"] .watch-gate__fill {
  background: #2f8a5f;
}
.watch-gate[data-state="complete"] .watch-gate__time {
  color: #2f8a5f;
}
.rating-footer__note {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  text-align: right;
}
.rating-footer__note:empty { display: none; }
.rating--voice .rating-footer {
  display: none;
}
.rating--voice {
  background: #0B0B0B;
}
.rating--voice .rating-body {
  display: block;
  max-width: none;
  height: 100%;
  padding: 0;
}
.rating--voice .video-col {
  height: 100%;
}
.rating--voice .video-frame {
  width: min(100vw, calc(100dvh * 9 / 16));
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
}
.rating--voice .video-frame video {
  object-fit: contain;
}
.rating--voice .prompt {
  display: none;
}
.rating--voice-recording .prompt {
  display: none;
}

/* --- Why (free text) overlay — appears inline after multi-select on ~1/10 trials --- */
.why {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}
.why__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  color: var(--ink);
}
.why__label em {
  font-style: normal;
  font-weight: 400;
  color: var(--ink-3);
  font-size: 12px;
  margin-left: var(--s-2);
}
.why textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font: 400 14px/1.45 var(--font-body);
  color: var(--ink);
  resize: vertical;
}
.why textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.genre-preference {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  margin-top: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--rule);
}
.genre-preference__label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  margin: 0;
  max-width: 48ch;
}
.genre-preference__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.genre-preference__option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-elevated);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
  user-select: none;
  text-align: center;
}
.genre-preference__option:hover:not(:has(input:checked)) {
  border-color: var(--ink-3);
  color: var(--ink);
}
.genre-preference__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0; height: 0;
}
.genre-preference__option span {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.2;
  white-space: nowrap;
}
.genre-preference__option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent);
  color: #F6F6F1;
}
.genre-preference__option:has(input:checked):hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.genre-preference__option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.political-followup {
  display: grid;
  gap: var(--s-5);
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}
.political-followup__group {
  display: grid;
  gap: var(--s-3);
}
.political-followup__options {
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.political-followup__options--ideology {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.political-followup__options--reactions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* ============================================================================
   Config-driven choice trial
============================================================================ */
.rating--choice .choice-prompt {
  justify-content: center;
  gap: var(--s-5);
  overflow: auto;
  padding-right: 2px;
}
.rating--choice .prompt__q {
  font-size: clamp(1.42rem, 1.65vw, 1.58rem);
  line-height: 1.25;
  max-width: none;
}
.rating--choice .emo {
  min-height: 54px;
  padding: 10px 16px;
}
.rating--choice .emo__label {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}
.rating--choice .emo--tone-positive:not(.emo--special) {
  background: #EFF8EC;
  border-color: #D7EAD0;
  color: #24412A;
}
.rating--choice .emo--tone-negative:not(.emo--special) {
  background: #FAEEEE;
  border-color: #EED6D6;
  color: #4A2828;
}
.rating--choice .emo--tone-positive:not(.emo--special):hover:not(:has(input:checked)) {
  border-color: #AFCFA6;
  background: #E6F3E1;
}
.rating--choice .emo--tone-negative:not(.emo--special):hover:not(:has(input:checked)) {
  border-color: #D7B1AE;
  background: #F6E5E4;
}
.rating--choice .emo--tone-positive:not(.emo--special):has(input:checked) {
  background: #2F6B3D;
  border-color: #1E4D2B;
  color: #FFFFFF;
}
.rating--choice .emo--tone-negative:not(.emo--special):has(input:checked) {
  background: #9A3E3E;
  border-color: #742A2A;
  color: #FFFFFF;
}
.rating--choice .emo--tone-positive:not(.emo--special):has(input:checked):hover {
  background: #285C35;
  border-color: #173E22;
}
.rating--choice .emo--tone-negative:not(.emo--special):has(input:checked):hover {
  background: #873434;
  border-color: #642222;
}
/* The specific-reactions battery holds only negative reactions, so selected
   rows use the negative (red) palette instead of the default green. */
.rating--choice .choice-question[data-question-id="specific_negative_reactions"]
  .emo--full-width:not(.emo--special):has(input:checked),
.politics-question-example
  .choice-question[data-question-id="specific_negative_reactions"]
  .emo--full-width:not(.emo--special):has(input:checked) {
  background: #9A3E3E;
  border-color: #742A2A;
  color: #FFFFFF;
}
.rating--choice .choice-question[data-question-id="specific_negative_reactions"]
  .emo--full-width:not(.emo--special):has(input:checked):hover,
.politics-question-example
  .choice-question[data-question-id="specific_negative_reactions"]
  .emo--full-width:not(.emo--special):has(input:checked):hover {
  background: #873434;
  border-color: #642222;
}
.rating--choice .emo--special[data-option-id="none"]:has(input:checked) {
  background: #686868;
  border-color: #505050;
  border-style: solid;
  color: #FFFFFF;
}
.rating--choice .emo--special[data-option-id="none"]:has(input:checked):hover {
  background: #595959;
  border-color: #444444;
}
.inactivity-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: var(--s-5);
  background: rgba(15, 15, 15, 0.62);
  backdrop-filter: blur(2px);
}
.inactivity-modal[hidden] {
  display: none;
}
.inactivity-modal__card {
  width: min(420px, 100%);
  padding: var(--s-7) var(--s-6);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
  text-align: center;
}
.inactivity-modal__card h2 {
  margin: 0 0 var(--s-5);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 500;
  line-height: 1.1;
}
.choice-question {
  display: grid;
  gap: var(--s-3);
}
.choice-question__options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.choice-question__options--four-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.choice-question__options--politics-emotions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.rating--choice .choice-question__options--politics-emotions .emo {
  min-height: 34px;
  padding: 5px 9px;
}
.rating--choice .choice-question__options--politics-emotions .emo__label {
  font-size: 14px;
}
.choice-question__options--expanded-emotions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.rating--choice .choice-question__options--expanded-emotions .emo {
  min-height: 42px;
  padding: 7px 10px;
}
.rating--choice .choice-question__options--expanded-emotions .emo__label {
  font-size: 16px;
}
.choice-text-field {
  grid-column: 1 / -1;
}
.rating--choice .choice-prompt:has(.choice-question--three_layer) {
  justify-content: center;
  gap: 18px;
  overflow: hidden;
}
.rating--choice .choice-question--three_layer {
  gap: 6px;
}
.rating--choice .choice-question--three_layer + .choice-question--three_layer {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.rating--choice .choice-question--three_layer .prompt__q {
  font-size: 17px;
  line-height: 1.25;
}
.rating--choice .choice-question--three_layer .prompt__hint {
  font-size: 13px;
  font-style: italic;
  line-height: 1.3;
}
.rating--choice .choice-question--three_layer .choice-question__options {
  gap: 5px;
}
.rating--choice .choice-question--three_layer .emo {
  min-height: 32px;
  padding: 4px 10px;
}
.rating--choice .choice-question--three_layer .emo__label {
  font-size: 14.5px;
  line-height: 1.15;
}
.rating--choice .choice-question--three_layer .emo--special {
  min-height: 30px;
}
.rating--creator-rewards .choice-prompt {
  justify-content: flex-start;
  gap: 8px;
  padding-block: 2px;
}
/* Progressive question pages (three-layer politics): top-anchor the question
   column and let it scroll internally so answered questions never shift as
   later ones are revealed; adapted from .comparison-prompt-column. */
.rating--progressive-questions .choice-prompt,
.rating--choice.rating--progressive-questions
  .choice-prompt:has(.choice-question--three_layer) {
  justify-content: flex-start;
  max-height: 100%;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}
.rating--progressive-questions .choice-question--progressive-revealing {
  /* A fade-only reveal keeps the column visually still as each new question
     is added, matching the paired-comparison fix. */
  animation-name: creator-comparison-question-reveal;
}
.rating--creator-rewards .choice-question {
  gap: 6px;
  position: relative;
}
.choice-question--progressive-hidden,
.comparison-question--progressive-hidden {
  display: none !important;
}
.choice-question--progressive-revealing,
.comparison-question--progressive-revealing {
  /* Apply the starting frame before the animation, but do not retain the
     ending opacity afterward. Retaining it would override the muted opacity
     once a revealed question was answered. */
  animation: creator-question-reveal 280ms var(--ease) backwards;
}
.comparison-question--progressive-revealing {
  /* A fade-only reveal keeps the paired column visually still as each new
     question is added. The single-video layout can retain the small rise. */
  animation-name: creator-comparison-question-reveal;
}
.choice-question--progressive-complete,
.comparison-question--progressive-complete {
  opacity: 0.52;
  filter: grayscale(0.28);
  transition: opacity 180ms var(--ease), filter 180ms var(--ease);
}
.choice-question--progressive-complete:hover,
.choice-question--progressive-complete:focus-within,
.comparison-question--progressive-complete:hover,
.comparison-question--progressive-complete:focus-within {
  opacity: 0.78;
  filter: none;
}
@keyframes creator-question-reveal {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes creator-comparison-question-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .choice-question--progressive-revealing,
  .comparison-question--progressive-revealing {
    animation: none;
  }
}
.rating--creator-rewards .prompt__q {
  font-size: 15px;
  line-height: 1.22;
}
.rating--creator-rewards .choice-question[data-question-id="posting_willingness_3_dollars"] .prompt__q {
  font-size: 17px;
  line-height: 1.3;
}
.rating--creator-rewards .choice-question[data-question-id="posting_willingness_3_dollars"] {
  margin-top: 28px;
}
.rating--creator-rewards .choice-question--overall {
  margin: 0;
  padding: 0;
  border: 0;
}
.rating--creator-rewards .choice-question--creator-satisfaction
  + .choice-question--creator-satisfaction {
  margin-top: 14px;
}
.rating--creator-rewards .choice-question__options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.rating--creator-rewards .choice-question[data-question-id="posting_willingness_3_dollars"] .choice-question__options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.rating--creator-rewards .emo {
  min-height: 38px;
  padding: 6px 8px;
  border-radius: var(--radius-lg);
}
.rating--creator-rewards .emo__label {
  font-size: 13px;
  line-height: 1.2;
}
.rating--creator-rewards .choice-question--creator-satisfaction .emo {
  min-height: 32px;
  padding-block: 4px;
}
.rating--creator-rewards .choice-question--reason_box {
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid #d9ddd8;
  border-radius: var(--radius-lg);
  background: #f4f5f3;
}
.rating--creator-rewards .choice-question--reason_box .prompt__q {
  font-size: 15px;
}
.rating--creator-rewards .choice-question--reason_box .prompt__hint {
  margin: 0;
  font-size: 12px;
}
.rating--creator-rewards .choice-question--reason_box .choice-question__options {
  grid-template-columns: 1fr;
  gap: 4px;
}
.rating--creator-rewards .choice-question--reason_box .emo {
  min-height: 31px;
  justify-content: flex-start;
  padding: 5px 8px;
  text-align: left;
}
.rating--creator-rewards .choice-question--reason_box .emo__label {
  font-size: 12px;
  line-height: 1.2;
}
.creator-dimension-lead {
  margin: 3px 0 0;
  padding-top: 7px;
  border-top: 1px solid var(--rule);
  color: var(--ink);
  font: 600 16px/1.3 var(--font-body);
  text-align: left;
}

/* Quiet study-level orientation and progress, shared by both Creator Rewards arms. */
.creator-study-status {
  display: grid;
  gap: 6px;
  width: min(1120px, calc(100% - 32px));
  margin: 5px auto 0;
}
.creator-study-status--comparison {
  width: min(1480px, calc(100% - 32px));
}
.study-progress {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 9px;
  color: var(--ink-3);
  font: 600 11px/1 var(--font-body);
  letter-spacing: 0.01em;
}
.study-progress__track {
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 10%, transparent);
}
.study-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #5f8c6b;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 700ms linear;
}
.creator-perspective-reminder {
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #d9e2d8;
  border-radius: var(--radius);
  background: #f4f7f2;
  color: var(--ink-2);
  font: 400 12px/1.42 var(--font-body);
  text-align: left;
}

/* Creator Rewards paired-comparison arm. */
.rating--comparison {
  background: var(--bg);
}
.comparison-rating-body {
  display: grid;
  grid-template-columns: minmax(200px, 0.72fr) minmax(430px, 1.36fr) minmax(200px, 0.72fr);
  gap: clamp(10px, 1.5vw, 22px);
  align-items: center;
  min-height: 0;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 8px clamp(12px, 2vw, 28px);
}
.comparison-video-panel {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 0;
}
.comparison-video-label {
  margin: 0;
  font: 600 14px/1 var(--font-body);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.comparison-video-frame {
  width: min(23vw, 320px);
  max-width: 100%;
  max-height: min(58dvh, 570px);
}
.comparison-playback-controls {
  bottom: 9px;
}
.comparison-playback-controls .video-playback-control {
  padding-inline: 7px;
  font-size: 10px;
}
.comparison-watch-gate {
  display: grid;
  grid-template-columns: auto auto;
  gap: 4px 8px;
  align-items: center;
  width: min(220px, 100%);
  color: var(--ink-3);
  font: 600 11px/1.1 var(--font-body);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.comparison-watch-gate strong {
  justify-self: end;
  color: inherit;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.comparison-watch-gate__track {
  grid-column: 1 / -1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.comparison-watch-gate__fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0);
  transform-origin: left center;
  background: var(--accent);
  transition: transform 180ms linear, background var(--dur-fast) var(--ease);
}
.comparison-watch-gate[data-state="complete"] {
  color: #2f8a5f;
}
.comparison-watch-gate[data-state="complete"] .comparison-watch-gate__fill {
  background: #2f8a5f;
}
.comparison-prompt-column {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 6px;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  padding: 2px 4px;
}
.comparison-lock-note {
  padding: 7px 10px;
  border-radius: var(--radius);
  background: #f0f1ee;
  color: var(--ink-2);
  font: 500 12px/1.25 var(--font-body);
  text-align: center;
}
.comparison-question {
  display: grid;
  gap: 3px;
}
.comparison-question--creator-satisfaction
  + .comparison-question--creator-satisfaction {
  margin-top: 8px;
}
.comparison-question__prompt {
  margin: 0;
  font: 500 13px/1.18 var(--font-body);
  color: var(--ink);
  text-align: center;
}
.creator-dimension-lead--comparison {
  margin: 0 0 2px;
  padding-top: 0;
  border-top: 0;
  font-size: 14px;
  line-height: 1.25;
  text-align: center;
}
.comparison-question__options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.comparison-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 4px 7px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink-2);
  font: 500 11px/1.1 var(--font-body);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.comparison-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.comparison-option:hover {
  border-color: var(--ink-3);
}
.comparison-option.is-selected,
.comparison-option:has(input:checked) {
  border-color: #2f6040;
  background: #DDF1DF;
  color: #21432c;
}
.comparison-question__options:disabled .comparison-option {
  border-color: var(--rule);
  background: #f2f2ef;
  color: var(--ink-4);
  cursor: not-allowed;
  opacity: 0.62;
}
.comparison-question[data-question-id="posting_preference_3_dollars"] {
  gap: 7px;
}
.comparison-question[data-question-id="posting_preference_3_dollars"] {
  margin: 28px 0 2px;
}
.comparison-question[data-question-id="posting_preference_3_dollars"] .comparison-question__prompt {
  font-size: 18px;
  line-height: 1.24;
}
.comparison-question[data-question-id="posting_preference_3_dollars"] .comparison-option {
  min-height: 42px;
  padding: 8px 10px;
  font-size: 15px;
}
.comparison-footer .rating-footer__note {
  margin-left: auto;
}

@media (max-width: 960px) {
  .rating--comparison {
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow: auto;
  }
  .comparison-rating-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "video-one video-two"
      "questions questions";
    align-items: start;
  }
  .comparison-video-panel[data-video-slot="1"] { grid-area: video-one; }
  .comparison-video-panel[data-video-slot="2"] { grid-area: video-two; }
  .comparison-prompt-column { grid-area: questions; }
  .comparison-video-frame {
    width: min(34vw, 260px);
    max-height: 46dvh;
  }
  .comparison-prompt-column {
    width: min(680px, 100%);
    justify-self: center;
    overflow: visible;
  }
}
.choice-question--conditional[hidden] {
  display: none;
}
.choice-definition-trigger {
  display: inline;
  margin: 0;
  border: 0;
  border-bottom: 1px dotted #345a3c;
  padding: 0 2px;
  background: #DDF1DF;
  color: inherit;
  font: inherit;
  line-height: inherit;
  cursor: help;
}
.choice-definition-trigger:hover,
.choice-definition-trigger:focus-visible,
.choice-definition-trigger[aria-expanded="true"] {
  outline: none;
  background: #cfe8cf;
}
.choice-definition-popover {
  position: absolute;
  z-index: 20;
  top: auto;
  bottom: calc(100% + 8px);
  left: 0;
  width: min(520px, 96%);
  max-height: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 14px;
  border: 1px solid #c9d0c8;
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: 0 12px 32px rgba(30, 44, 33, 0.2);
  color: var(--ink);
  text-align: left;
}
.choice-definition-popover[hidden] {
  display: none;
}
.choice-definition-popover__title {
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 700;
}
.choice-definition-popover__list {
  margin: 0;
  padding-left: 20px;
}
.choice-definition-popover__list li {
  margin-bottom: 5px;
  font-size: 12px;
  font-style: italic;
  line-height: 1.3;
}

@media (min-width: 761px) {
  .rating--choice .choice-prompt:has(.choice-question[data-question-id="specific_negative_reactions"]) {
    gap: 18px;
    overflow: hidden;
  }
  .rating--choice .choice-question:has(.emo--full-width) {
    gap: 8px;
  }
  .rating--choice .choice-question:has(.emo--full-width) .prompt__q {
    font-size: 18px;
    line-height: 1.25;
  }
  .rating--choice .choice-question:has(.emo--full-width) .choice-question__options {
    gap: 6px;
  }
  .rating--choice .choice-question:has(.emo--full-width) .emo {
    min-height: 33px;
    padding: 5px 10px;
  }
  .rating--choice .choice-question:has(.emo--full-width) .emo__label {
    font-size: 15px;
    line-height: 1.15;
  }
}
.politics-question-example {
  width: min(960px, 100%);
  max-width: 960px;
  padding: clamp(22px, 3vw, 36px);
}
.three-layer-question-example {
  width: min(1040px, 100%);
  max-width: 1040px;
  padding: clamp(6px, 1vw, 10px);
}
.stage-body:has(.three-layer-question-example) {
  padding-block: clamp(6px, 1.5vh, 14px);
}
.viewer-emotions-intro-page .three-layer-question-example .eyebrow {
  margin-bottom: 3px;
  font-size: 11px;
}
.three-layer-question-example h1 {
  margin: 0 0 5px;
  font-size: 21px;
  line-height: 1.2;
}
.three-layer-question-example > p.prose {
  margin: 0;
  max-width: none;
  font-size: 17px;
  line-height: 1.45;
}
.three-layer-question-example .politics-question-example__questions {
  gap: 18px;
  margin-top: 10px;
}
.three-layer-question-example .choice-question--three_layer {
  gap: 3px;
}
.three-layer-question-example .choice-question--three_layer
  + .choice-question--three_layer {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
}
.three-layer-question-example .prompt__q {
  max-width: none;
  font-size: 14px;
  line-height: 1.12;
}
.three-layer-question-example .prompt__hint {
  margin: 0;
  color: var(--ink-3);
  font-size: 10.5px;
  line-height: 1.15;
}
.three-layer-question-example .choice-question__options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px 4px;
}
.three-layer-question-example .emo {
  min-height: 20px;
  padding: 1px 8px;
}
.three-layer-question-example .emo__label {
  font-size: 11.5px;
}
.three-layer-question-example .card__actions {
  margin-top: 8px;
}
.viewer-emotions-intro-page .three-layer-question-example .btn {
  min-height: 38px;
  padding-block: 7px;
  font-size: 14px;
}
.politics-question-example__questions {
  display: grid;
  gap: 14px;
  margin-top: var(--s-4);
}
.politics-question-example .choice-question {
  gap: 7px;
}
.politics-question-example .prompt__q {
  font-size: 17px;
  line-height: 1.2;
}
.politics-question-example .choice-question__options {
  gap: 5px;
}
.politics-question-example .emo {
  min-height: 30px;
  padding: 4px 10px;
  cursor: pointer;
}
.politics-question-example .emo__label {
  font-size: 14px;
  line-height: 1.15;
}
.politics-question-example .emo--tone-positive:not(.emo--special) {
  background: #EFF8EC;
  border-color: #D7EAD0;
  color: #24412A;
}
.politics-question-example .emo--tone-negative:not(.emo--special) {
  background: #FAEEEE;
  border-color: #EED6D6;
  color: #4A2828;
}
.politics-question-example .emo--tone-positive:not(.emo--special):has(input:checked) {
  background: #2F6B3D;
  border-color: #1E4D2B;
  color: #FFFFFF;
}
.politics-question-example .emo--tone-negative:not(.emo--special):has(input:checked) {
  background: #9A3E3E;
  border-color: #742A2A;
  color: #FFFFFF;
}
.politics-question-example .emo:hover {
  transform: none;
}
.politics-example-other {
  grid-column: 1 / -1;
}
.politics-example-other input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  font: 400 14px/1.3 var(--font-body);
}
.politics-example-other input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}
.all-videos-question-example {
  width: min(1032px, 100%);
  max-width: 1032px;
}
.all-videos-question-example > p.prose {
  max-width: none;
  white-space: nowrap;
}
.all-videos-question-example .choice-question {
  gap: var(--s-3);
}
.all-videos-question-example .prompt__q {
  font-size: clamp(1.42rem, 1.65vw, 1.58rem);
  line-height: 1.25;
  width: max-content;
  max-width: none;
  justify-self: center;
  white-space: nowrap;
}
.all-videos-question-example .choice-question__options {
  width: min(664px, 100%);
  justify-self: center;
  gap: 8px;
}
.all-videos-question-example .emo {
  min-height: 42px;
  padding: 7px 10px;
}
.all-videos-question-example .emo__label {
  font-size: 16px;
  line-height: 1.2;
}
@media (max-width: 1100px) {
  .all-videos-question-example > p.prose {
    white-space: normal;
  }
  .all-videos-question-example .prompt__q {
    width: auto;
    max-width: 100%;
    justify-self: stretch;
    white-space: normal;
  }
}
.choice-text-field input[type="text"] {
  width: 100%;
  padding: 12px var(--s-3);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font: 400 18px/1.35 var(--font-body);
  color: var(--ink);
}
.choice-text-field input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .rating--choice {
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow: auto;
  }
  .rating--choice .rating-body {
    grid-template-columns: 1fr;
    padding: var(--s-4);
  }
  .rating--choice .video-frame {
    width: min(72vw, 320px);
    max-height: 52dvh;
  }
  .choice-question__options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rating--choice .prompt__q {
    font-size: 1.34rem;
  }
  .rating--choice .emo {
    min-height: 48px;
    padding: 9px 12px;
  }
  .rating--choice .emo__label {
    font-size: 17px;
  }
  .rating--choice .choice-question__options--expanded-emotions .emo {
    min-height: 42px;
    padding: 7px 9px;
  }
  .rating--choice .choice-question__options--expanded-emotions .emo__label {
    font-size: 15px;
  }
  .rating--creator-rewards .choice-question__options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rating--creator-rewards .choice-question[data-question-id="posting_willingness_3_dollars"] .choice-question__options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .rating--creator-rewards .emo {
    min-height: 42px;
    padding: 7px 5px;
  }
  .rating--creator-rewards .emo__label {
    font-size: 13px;
  }
  .rating--creator-rewards .choice-question--reason_box .choice-question__options {
    grid-template-columns: 1fr;
  }
  .rating--creator-rewards .choice-question--reason_box .emo {
    min-height: 34px;
    padding: 6px 8px;
  }
  .rating--creator-rewards .choice-question--reason_box .emo__label {
    font-size: 12px;
  }
  .rating--choice .rating-footer {
    position: sticky;
    bottom: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .rating--choice .watch-gate {
    width: auto;
    min-width: 150px;
    flex: 1 1 150px;
  }
}

/* ============================================================================
   Viewer Scrolling feed
============================================================================ */
.scroll-feed {
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  overflow: hidden;
  background: #050505;
  color: #F6F6F1;
}
.scroll-feed__rail {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.scroll-feed__item {
  position: relative;
  height: 100vh;
  height: 100dvh;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #050505;
}
.scroll-feed__video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
}
.scroll-feed__carousel {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #050505;
}
.scroll-feed__carousel-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}
.scroll-feed__carousel-track::-webkit-scrollbar { display: none; }
.scroll-feed__carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.scroll-feed__carousel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #050505;
  user-select: none;
  -webkit-user-drag: none;
}
.scroll-feed__carousel-audio { display: none; }
.scroll-feed__carousel-pagination {
  position: absolute;
  bottom: clamp(132px, 17vh, 170px);
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 1vw, 5px);
  width: min(82vw, 350px);
  height: 20px;
  pointer-events: none;
}
.scroll-feed__carousel-dot {
  flex: 0 1 7px;
  width: 7px;
  min-width: 4px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  transition: background-color 120ms ease, transform 120ms ease;
}
.scroll-feed__carousel-dot.is-active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.82);
  transform: scale(1.32);
}
.scroll-feed__carousel-nav {
  display: none;
}
@media (hover: hover) and (pointer: fine) {
  .scroll-feed__carousel-nav:not([hidden]) {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    font: 700 28px/1 sans-serif;
    transform: translateY(-50%);
    backdrop-filter: blur(6px);
  }
  .scroll-feed__carousel-nav--previous { left: 10px; }
  .scroll-feed__carousel-nav--next { right: 104px; }
}
.scroll-feed__spacer {
  height: 0;
  flex-shrink: 0;
}
.scroll-feed__media-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-content: center;
  gap: 14px;
  justify-items: center;
  text-align: center;
  padding: 24px;
  background: rgba(5, 5, 5, 0.72);
  color: #F6F6F1;
}
.scroll-feed__media-overlay[hidden] { display: none; }
.scroll-feed__media-spinner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 3px solid rgba(246, 246, 241, 0.28);
  border-top-color: #F6F6F1;
  animation: scroll-feed-spin 0.9s linear infinite;
}
@keyframes scroll-feed-spin { to { transform: rotate(360deg); } }
.scroll-feed__media-message {
  margin: 0;
  font-size: 0.95rem;
  max-width: 30ch;
}
.scroll-feed__media-message:empty { display: none; }
.scroll-feed__media-actions {
  display: grid;
  gap: 10px;
}
.scroll-feed__media-btn {
  font: inherit;
  padding: 12px 26px;
  border-radius: 999px;
  border: 1px solid #F6F6F1;
  background: #F6F6F1;
  color: #050505;
  cursor: pointer;
}
.scroll-feed__media-btn[hidden] { display: none; }
.scroll-feed__media-btn--ghost {
  background: transparent;
  color: #F6F6F1;
}
.scroll-feed__actions {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 86px;
}
.scroll-feed__reaction {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__reaction-circle {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(0,0,0,0.42);
  color: #F6F6F1;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}
.scroll-feed__reaction:active .scroll-feed__reaction-circle {
  transform: scale(0.96);
}
.scroll-feed__reaction-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scroll-feed__action-label {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: center;
  color: rgba(246, 246, 241, 0.92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.scroll-feed__public-like-count {
  margin-top: -1px;
  padding: 2px 7px 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}
.scroll-feed__reaction[data-reaction="like"].is-selected .scroll-feed__reaction-icon {
  fill: currentColor;
}
.scroll-feed__reaction.is-selected .scroll-feed__reaction-circle {
  background: #F6F6F1;
  color: #050505;
  border-color: #F6F6F1;
}
.scroll-feed__reaction[data-reaction="like"].is-selected .scroll-feed__reaction-circle {
  background: #F34E68;
  border-color: #F34E68;
  color: #FFFFFF;
}
.scroll-feed__reaction[data-reaction="dislike"].is-selected .scroll-feed__reaction-circle {
  background: #F6F6F1;
  border-color: #F6F6F1;
  color: #050505;
}
.scroll-feed__status {
  position: fixed;
  left: max(14px, env(safe-area-inset-left));
  right: max(14px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
  transition: opacity 400ms ease;
}
.scroll-feed__status.is-dismissed {
  opacity: 0;
  visibility: hidden;
}

/* TikTok-style creator/caption overlay: bottom-left, over a gradient scrim,
   kept clear of the reaction rail on the right. Plain text only. */
.scroll-feed__meta {
  position: absolute;
  left: max(14px, env(safe-area-inset-left));
  right: 84px;
  bottom: max(52px, calc(env(safe-area-inset-bottom) + 40px));
  z-index: 3;
  color: #F6F6F1;
  pointer-events: none;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
}
.scroll-feed__item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 132px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.62), rgba(5, 5, 5, 0));
}
.scroll-feed__meta-handle {
  margin: 0 0 4px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scroll-feed__meta-caption {
  margin: 0;
  font-family: var(--font-body);
  font-size: 13.5px;
  line-height: 1.4;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
  /* Tappable: clamped captions expand upward like TikTok's. */
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
/* Expanded caption grows upward (the block is bottom-anchored), capped at
   roughly half the screen with internal scroll for extreme captions. */
.scroll-feed__meta.is-expanded .scroll-feed__meta-caption {
  display: block;
  -webkit-line-clamp: unset;
  max-height: 45vh;
  max-height: 45dvh;
  overflow-y: auto;
  background: rgba(5, 5, 5, 0.6);
  border-radius: 10px;
  padding: 10px 12px;
  margin-left: -12px;
  backdrop-filter: blur(6px);
}

/* End-of-feed sentinel card: activating it completes the session. */
.scroll-feed__item--end {
  display: grid;
  place-items: center;
}
.scroll-feed__end {
  text-align: center;
  color: #F6F6F1;
  padding: 24px;
}
.scroll-feed__end-title {
  margin: 0 0 8px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
}
.scroll-feed__end-copy {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(246, 246, 241, 0.75);
}
.scroll-feed__sound-toggle {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top) + 10px));
  right: max(14px, env(safe-area-inset-right));
  z-index: 6;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(0,0,0,0.52);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.24);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__sound-toggle.is-unmuted {
  background: rgba(246,246,241,0.94);
  color: #111111;
}
.scroll-feed__pause-toggle {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top) + 10px));
  left: max(14px, env(safe-area-inset-left));
  z-index: 6;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(0,0,0,0.52);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.24);
  backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}
.scroll-feed__pause-toggle:disabled {
  opacity: 0.35;
  cursor: default;
}
.scroll-feed__pause-toggle[hidden] { display: none; }
.scroll-feed__pause-overlay {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 5, 5, 0.82);
  backdrop-filter: blur(6px);
}
.scroll-feed__pause-overlay[hidden] { display: none; }
.scroll-feed__pause-card {
  max-width: 420px;
  text-align: center;
  color: #F6F6F1;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.scroll-feed__pause-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
}
.scroll-feed__pause-copy {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  color: rgba(246, 246, 241, 0.85);
}
.scroll-feed__pause-overlay[data-pause-kind="attention_warning"] .scroll-feed__pause-title {
  color: #FFB4B4;
}
.scroll-feed__pause-resume {
  font: inherit;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid #F6F6F1;
  background: #F6F6F1;
  color: #050505;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Comments button: bubble-with-dots icon in the reaction rail, with a
   small "View Comments" label beneath the circle. */
.scroll-feed__comments-btn {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__comments-btn[hidden] { display: none; }
.scroll-feed__comments-bubble {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(0,0,0,0.42);
  color: #F6F6F1;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  transition: transform 140ms ease;
}
.scroll-feed__comments-btn:active .scroll-feed__comments-bubble {
  transform: scale(0.96);
}
.scroll-feed__comments-bubble .scroll-feed__reaction-icon {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Source-link copy action: TikTok-style share arrow in the same right-hand
   rail, always positioned after the comments slot. */
.scroll-feed__share-btn {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 86px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__share-btn:disabled {
  cursor: default;
  opacity: 0.45;
}
.scroll-feed__share-circle {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  background: rgba(0,0,0,0.42);
  color: #F6F6F1;
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  transition: transform 140ms ease, background 140ms ease;
}
.scroll-feed__share-btn:not(:disabled):active .scroll-feed__share-circle {
  transform: scale(0.96);
  background: rgba(246, 246, 241, 0.22);
}
.scroll-feed__share-circle .scroll-feed__reaction-icon {
  width: 26px;
  height: 26px;
}

.scroll-feed__copy-toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px));
  z-index: 9;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 10px 15px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.94);
  color: #FFFFFF;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.42);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(12px);
}
.scroll-feed__copy-toast[hidden] { display: none; }
.scroll-feed__copy-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}
.scroll-feed__copy-toast.is-error {
  border-color: rgba(255, 180, 180, 0.42);
}
.scroll-feed__copy-toast-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #29C48A;
  color: #07130F;
}
.scroll-feed__copy-toast.is-error .scroll-feed__copy-toast-icon {
  background: #FFB4B4;
}
.scroll-feed__copy-toast-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* TikTok-style comments bottom sheet (anonymous top comments, plain text).
   z-index 7: above the feed chrome, below the pause overlay (8) and the
   attention check (10). */
.scroll-feed__comments {
  position: fixed;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.scroll-feed__comments[hidden] { display: none; }
.scroll-feed__comments-scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.35);
}
.scroll-feed__comments-sheet {
  position: relative;
  max-height: 55vh;
  max-height: 55dvh;
  display: flex;
  flex-direction: column;
  background: #141414;
  color: #F6F6F1;
  border-radius: 16px 16px 0 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
}
.scroll-feed__comments-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 14px 48px 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
}
.scroll-feed__comments-close {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(246, 246, 241, 0.8);
  font-size: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__comments-list {
  margin: 0;
  padding: 0 16px 12px;
  list-style: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.scroll-feed__comment {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(246, 246, 241, 0.08);
}
.scroll-feed__comment:last-child { border-bottom: none; }
.scroll-feed__comment-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
  overflow-wrap: anywhere;
}
.scroll-feed__comment-likes {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(246, 246, 241, 0.6);
}
.scroll-feed__comment-likes .scroll-feed__reaction-icon {
  width: 14px;
  height: 14px;
}
.scroll-feed__hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: rgba(0,0,0,0.34);
  color: rgba(246,246,241,0.82);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  backdrop-filter: blur(8px);
}
.scroll-feed__hint-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.scroll-feed__attention-check {
  position: fixed;
  top: max(14px, calc(env(safe-area-inset-top) + 10px));
  left: 50%;
  z-index: 10;
  width: min(420px, calc(100vw - 28px));
  padding: 13px 14px 11px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 15px;
  background: rgba(246,246,241,0.96);
  color: #111111;
  box-shadow: 0 12px 34px rgba(0,0,0,0.34);
  font-family: var(--font-body);
  text-align: left;
  cursor: pointer;
  transform: translateX(-50%);
  animation: scroll-attention-enter 180ms ease-out both;
  -webkit-tap-highlight-color: transparent;
}
.scroll-feed__attention-check[hidden] {
  display: none;
}
.scroll-feed__attention-check:active {
  transform: translateX(-50%) scale(0.985);
}
.scroll-feed__attention-kicker,
.scroll-feed__attention-copy {
  display: block;
}
.scroll-feed__attention-kicker {
  margin-bottom: 2px;
  color: rgba(17,17,17,0.58);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-feed__attention-copy {
  font-size: 16px;
  font-weight: 750;
  line-height: 1.25;
}
.scroll-feed__attention-progress {
  display: block;
  height: 4px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17,17,17,0.14);
}
.scroll-feed__attention-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #3C2A78;
  transform-origin: left center;
  animation: scroll-attention-countdown var(--attention-check-duration, 5000ms) linear forwards;
}
.scroll-feed__attention-check.is-paused .scroll-feed__attention-progress-fill {
  animation-play-state: paused;
}
@keyframes scroll-attention-enter {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes scroll-attention-countdown {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
.emo--political {
  min-height: 38px;
  border-radius: var(--radius);
  padding: 8px 12px;
}
.emo--political .emo__label {
  line-height: 1.25;
  letter-spacing: 0;
}

/* ============================================================================
   Mobile / narrow viewports (<768px)
   Keep the viewport-locked single-screen structure: video on top, prompt below.
   The whole screen still fits without page scroll; the prompt column gets
   internal scroll if needed.
============================================================================ */
@media (max-width: 767.98px) {
  .rating-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 45%) minmax(0, 55%);
    gap: var(--s-3);
    padding: var(--s-3) var(--s-4);
  }
  .video-frame {
    /* On mobile the column is full-width. aspect-ratio will shrink width to
       maintain 9:16 when max-height (45vh row cap) kicks in. */
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0 auto;
  }
  .prompt__q  { font-size: 1.25rem; }
  .emo-grid   { grid-template-columns: 1fr 1fr; }
  .genre-preference__options { flex-direction: column; }
  .political-followup__options--ideology,
  .political-followup__options--reactions { grid-template-columns: 1fr; }
  .stage-body { padding: var(--s-6) var(--s-4); }

  .rating--voice-recording .rating-footer {
    display: none;
  }
}

/* Short viewports — tighten further so everything fits on a ~600px-tall laptop. */
@media (max-height: 720px) {
  .rating-body { padding: 10px var(--s-4) 8px; gap: var(--s-4); }
  .prompt      { gap: var(--s-2); }
  .prompt__q   { font-size: 0.95rem; }
  .emo-grid    { gap: 6px; }
  .emo         { min-height: 32px; padding: 4px 12px; }
  .emo__label  { font-size: 12px; }
  .genre-preference { padding-top: var(--s-2); }
  .genre-preference__label { font-size: 13px; }
  .genre-preference__options { gap: 6px; }
  .genre-preference__option { min-height: 32px; padding: 4px 10px; }
  .genre-preference__option span { font-size: 12px; }
  .political-followup { gap: var(--s-3); }
  .political-followup__group { gap: var(--s-2); }
  .emo--political { min-height: 32px; padding: 5px 10px; }
  .rating--choice .choice-question__options--expanded-emotions .emo { min-height: 34px; padding: 5px 8px; }
  .rating--choice .choice-question__options--expanded-emotions .emo__label { font-size: 13px; }
  .video-frame { width: min(31vw, 380px); }
}

/* ============================================================================
   Consent / Instructions / Completion
============================================================================ */
.consent, .instructions, .completion, .comprehension-check {
  max-width: var(--max-narrow);
  width: 100%;
}
.instructions.voice-instructions {
  max-width: 1120px;
}
.consent h1, .instructions h1, .completion h1, .comprehension-check h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin: 0 0 var(--s-5);
  font-variation-settings: "opsz" 64;
}
.completion-code {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  margin: var(--s-5) 0;
  padding: var(--s-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: #F0F7F0;
}
.completion-code span {
  grid-column: 1 / -1;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.completion-code strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(1.35rem, 6vw, 2rem);
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}
.completion-code .btn {
  min-height: 40px;
}
.completion-feedback {
  display: grid;
  gap: 10px;
  margin: var(--s-5) 0;
}
.completion-feedback label {
  color: var(--ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}
.completion-feedback label span {
  color: var(--ink-2);
  font-weight: 500;
}
.completion-feedback textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}
.completion-feedback textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(54, 105, 72, 0.12);
}
.completion-feedback__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.completion-feedback__actions .btn {
  min-height: 40px;
  flex: 0 0 auto;
}
.completion-feedback__actions p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
}
.consent .agree-row {
  display: flex; align-items: center; gap: var(--s-3);
  margin: var(--s-6) 0;
  padding: var(--s-4);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
}
.consent .agree-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent);
}
.consent .agree-row label {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
}
.welcome-guard {
  margin-top: var(--s-5);
  padding: var(--s-4);
  border: 1px solid #B8CDBA;
  border-radius: calc(var(--radius) + 4px);
  background: #F0F7F0;
}
.welcome-guard--phone {
  border-color: #D7C58B;
  background: #FFF9E8;
}
.welcome-guard h2 {
  margin: 0 0 var(--s-2);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}
.welcome-guard p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.welcome-guard__confirmation {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  margin-top: var(--s-4);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.welcome-guard__confirmation input {
  width: 19px;
  height: 19px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.welcome-guard__field {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-4);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}
.welcome-guard__field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--ink);
  font: 16px/1.4 var(--font-body);
}
.welcome-guard__field input:focus {
  outline: 2px solid #6D9B72;
  outline-offset: 2px;
  border-color: #6D9B72;
}
.welcome-guard__field input[aria-invalid="true"] {
  border-color: var(--error);
}
.welcome-guard .welcome-guard__error {
  margin-top: var(--s-3);
  color: var(--error);
  font-weight: 500;
}
.instructions__numbered {
  counter-reset: step;
  padding: 0;
  list-style: none;
  margin: var(--s-5) 0 0;
}
.instructions__numbered li {
  counter-increment: step;
  position: relative;
  padding-left: 44px;
  margin-bottom: var(--s-5);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
}
.instructions__numbered li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--font-display);
  font-variation-settings: "opsz" 14;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
}
.instructions__numbered li em {
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
}
.instructions__numbered li strong {
  color: var(--ink);
  font-weight: 500;
}
.instructions__numbered li p {
  margin: 0;
}
.instructions__numbered li p + p {
  margin-top: var(--s-4);
}
.instruction-highlight {
  padding: 0.04em 0.18em 0.08em;
  border-radius: 0.24em;
  background: #DDF1DF;
  color: var(--ink);
  font-weight: inherit;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.instruction-highlight--negative {
  background: #f5dddd;
}
.instructions:not(.voice-instructions) .prose {
  font-size: 17px;
  line-height: 1.65;
}
.viewer-emotions-intro-page .consent h1,
.viewer-emotions-intro-page .instructions h1,
.creator-emotions-intro-page .consent h1,
.creator-emotions-intro-page .instructions h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
}
.viewer-emotions-intro-page .prose,
.creator-emotions-intro-page .prose {
  font-size: 18.75px;
}
.viewer-emotions-intro-page .instructions:not(.voice-instructions) .prose,
.creator-emotions-intro-page .instructions:not(.voice-instructions) .prose {
  font-size: 21.25px;
}
.viewer-emotions-intro-page .instructions__numbered li,
.creator-emotions-intro-page .instructions__numbered li {
  font-size: 21.25px;
}
.viewer-emotions-intro-page .instructions__numbered li::before,
.creator-emotions-intro-page .instructions__numbered li::before {
  font-size: 16.25px;
}
.viewer-emotions-intro-page .eyebrow,
.creator-emotions-intro-page .eyebrow {
  font-size: 15px;
}
.viewer-emotions-intro-page .btn,
.creator-emotions-intro-page .btn {
  font-size: 18.75px;
}
.creator-emotions-intro-page .instructions {
  max-width: 1080px;
}
.creator-emotions-intro-page .creator-motivation-page {
  max-width: 1180px;
}
.creator-motivation-page__intro {
  max-width: 88ch;
  margin: 0 0 var(--s-6);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.55;
}
.creator-motivation-scale {
  display: grid;
  background: transparent;
}
.creator-motivation-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
.creator-motivation-row {
  margin: 0;
  padding: 15px 0 18px;
  border: 0;
}
.creator-motivation-row + .creator-motivation-row {
  border-top: 1px solid color-mix(in srgb, var(--ink) 8%, transparent);
}
.creator-motivation-row > p {
  display: block;
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0 0 10px;
  padding: 0;
  color: var(--ink);
  font: 500 16px/1.4 var(--font-body);
}
.creator-motivation-row .instruction-highlight {
  padding: 0;
  border-radius: 0;
  background: linear-gradient(
    to bottom,
    transparent 58%,
    rgba(202, 232, 205, 0.78) 58%
  );
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.creator-motivation-row[data-motivation-id="creation_difficulty_time"]
  .instruction-highlight {
  background: linear-gradient(
    to bottom,
    transparent 58%,
    rgba(245, 221, 221, 0.96) 58%
  );
}
.creator-motivation-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  margin: 0 5px;
  padding: 6px 8px;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.creator-motivation-option:hover {
  background: #f5f7f3;
}
.creator-motivation-option:has(input:checked) {
  background: #edf6ed;
}
.creator-motivation-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2f6040;
  cursor: pointer;
}
.creator-motivation-option__label {
  color: var(--ink-2);
  font: 600 12.5px/1.25 var(--font-body);
  text-align: center;
}
.creator-motivation-page__error {
  margin: var(--s-3) 0 0;
  color: #8a2f2f;
  font-size: 14px;
}
.creator-motivation-page .card__actions {
  margin-top: var(--s-5);
}
.creator-instructions__intro {
  margin-bottom: var(--s-6);
}
.creator-instructions__intro > p {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.65;
}
.creator-instructions__intro > p + p {
  margin-top: var(--s-3);
}
.creator-instructions__body {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.65;
}
.creator-instruction-section {
  margin: 0;
}
.creator-instruction-section + .creator-instruction-section {
  margin-top: var(--s-8);
}
.creator-instruction-section > p {
  margin: 0;
}
.creator-instruction-section > * + p {
  margin-top: var(--s-5);
}
.creator-instructions__question {
  margin: var(--s-3) 0 var(--s-5) var(--s-3);
  padding-left: var(--s-4);
  border-left: 3px solid var(--ink-4);
  color: var(--ink);
  font-size: 19px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.creator-instructions__question--stacked {
  white-space: normal;
}
.creator-instructions__question--stacked p {
  margin: 0;
}
.creator-instructions__question--stacked p + p {
  margin-top: var(--s-4);
}
.creator-example-box {
  margin: var(--s-4) 0 var(--s-5) var(--s-3);
  padding: var(--s-4) var(--s-5);
  border-radius: var(--radius);
  background: rgba(31, 35, 38, 0.055);
  color: var(--ink-2);
  font-size: 16.5px;
  font-style: italic;
  line-height: 1.55;
}
.creator-example-box p {
  margin: 0;
}
.creator-example-box__heading {
  color: var(--ink);
  font-style: normal;
  font-weight: 650;
}
.creator-content-example-list {
  margin: var(--s-2) 0 0;
  padding-left: 1.35em;
}
.creator-content-example {
  padding-left: var(--s-1);
}
.creator-content-example + .creator-content-example {
  margin-top: var(--s-2);
}
.creator-reward-example-list {
  margin: var(--s-2) 0 0;
  padding-left: 1.35em;
}
.creator-reward-example-list li + li {
  margin-top: var(--s-2);
}
.creator-instruction-section em {
  color: var(--ink);
  font-weight: 600;
}
.creator-question-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.creator-question {
  margin: 0 0 var(--s-7);
  padding: 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.65;
}
.creator-question__lead {
  margin: 0 0 var(--s-2);
  color: var(--ink-2);
  font-weight: 600;
}
.creator-question__prompt {
  margin: 0;
  color: var(--ink);
  font-size: inherit;
  line-height: 1.65;
}
.creator-content-choices {
  margin: var(--s-3) 0 var(--s-4);
  padding-left: var(--s-5);
}
.creator-content-choice {
  padding-left: var(--s-1);
  color: var(--ink-2);
}
.creator-content-choice + .creator-content-choice {
  margin-top: var(--s-3);
}
.creator-content-choice strong {
  color: var(--ink);
}
.creator-question__explanation {
  margin: var(--s-3) 0 0;
  padding: 0;
  color: var(--ink);
}
.creator-question__explanation em,
.creator-content-choice em {
  color: var(--ink);
  font-weight: 600;
}
@media (max-width: 640px) {
  .creator-instructions__question {
    margin-left: 0;
    white-space: normal;
  }
  .creator-example-box {
    margin-left: 0;
    padding: var(--s-4);
  }
  .creator-content-choices {
    padding-left: var(--s-4);
  }
  .creator-motivation-scale {
    overflow: visible;
  }
  .creator-motivation-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }
  .creator-motivation-option {
    justify-content: flex-start;
    margin: 2px 4px;
  }
}
.comprehension-check__intro {
  max-width: 58ch;
  margin: 0 0 var(--s-6);
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.6;
}
.comprehension-question {
  min-width: 0;
  margin: 0;
  padding: var(--s-5);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius) + 4px);
  background: rgba(255,255,255,0.42);
}
.comprehension-question + .comprehension-question {
  margin-top: var(--s-5);
}
.comprehension-question legend {
  width: 100%;
  margin: 0 0 var(--s-4);
  padding: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  line-height: 1.3;
}
.comprehension-option {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--s-3);
  align-items: start;
  min-height: 52px;
  padding: 13px 14px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease),
              background var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease);
}
.comprehension-option + .comprehension-option {
  margin-top: var(--s-3);
}
.comprehension-option:hover {
  border-color: var(--ink-4);
}
.comprehension-option:has(input:checked) {
  border-color: #6D9B72;
  background: #EDF7EE;
  box-shadow: 0 0 0 1px rgba(109,155,114,0.18);
}
.comprehension-option input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: #517E57;
}
.comprehension-option span {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
}
.comprehension-option:focus-within {
  outline: 2px solid #6D9B72;
  outline-offset: 2px;
}
.comprehension-check__error {
  margin: var(--s-5) 0 0;
  padding: var(--s-4);
  border-left: 3px solid var(--error);
  background: rgba(179,38,30,0.06);
  color: var(--error);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
}
.voice-instructions__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-5);
  margin-top: var(--s-5);
}
.voice-instructions__step {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  align-items: start;
  padding-top: var(--s-4);
  border-top: 1px solid var(--rule);
}
.voice-instructions__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: #0B0B0B;
}
.voice-instructions__copy {
  display: grid;
  gap: var(--s-2);
}
.voice-instructions__step-number {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #F6F6F1;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.voice-instructions__copy h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.voice-instructions__copy p:not(.voice-instructions__step-number) {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}
.voice-instructions__note {
  display: grid;
  gap: var(--s-3);
  max-width: 840px;
  margin-top: var(--s-6);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.voice-instructions__note p {
  margin: 0;
}
.completion__code {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 28px;
  letter-spacing: 0.12em;
  padding: var(--s-4) var(--s-5);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-wash);
  color: var(--accent);
  display: inline-block;
  margin: var(--s-4) 0 var(--s-6);
}

/* ============================================================================
   Loading / error states
============================================================================ */
.loading {
  display: grid; place-items: center;
  min-height: 50vh;
  color: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.loading::before {
  content: "";
  display: block;
  width: 14px; height: 14px;
  border: 1.5px solid var(--rule-strong);
  border-top-color: var(--ink-3);
  border-radius: 999px;
  animation: spin 900ms linear infinite;
  margin-right: var(--s-3);
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.error-banner {
  border: 1px solid var(--error);
  color: var(--error);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--radius);
  font-size: 13px;
  background: color-mix(in srgb, var(--error) 6%, transparent);
}

/* ============================================================================
   Subtle fade-in on trial transitions
============================================================================ */
.fade-in {
  animation: fade-in 360ms var(--ease) both;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================================
   Focus management — visible, not obnoxious.
============================================================================ */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Reduce motion for users who prefer it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   Final questionnaire
============================================================================ */
.final-questionnaire {
  position: relative;
  min-height: 100vh;
  padding: clamp(var(--s-5), 4vw, var(--s-7));
  overflow: hidden;
}
.final-questionnaire--with-logos {
  display: grid;
  grid-template-rows: auto 1fr;
  align-content: start;
}
.final-questionnaire--with-logos .survey-logo-header {
  position: relative;
  z-index: 1;
  padding-top: 0;
  margin-bottom: clamp(var(--s-5), 3vw, var(--s-7));
}
.final-questionnaire__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, rgba(45, 74, 43, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 250, 247, 0.96));
  pointer-events: none;
}
.final-questionnaire__shell {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}
.final-questionnaire__hero {
  display: grid;
  gap: var(--s-3);
  max-width: 720px;
  margin-bottom: var(--s-7);
}
.final-questionnaire__hero .title-xl {
  margin-bottom: 0;
}
.final-questionnaire__hero .prose {
  margin: 0;
}
.final-questionnaire__sections {
  display: grid;
  gap: var(--s-7);
}
.survey-question {
  display: grid;
  gap: var(--s-5);
  padding-top: var(--s-5);
  border-top: 1px solid var(--rule);
}
.survey-question__head {
  display: grid;
  gap: var(--s-2);
  max-width: 780px;
}
.survey-question__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.65rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink);
}
.survey-question__help {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.6;
}
.survey-question--compact-head {
  gap: var(--s-4);
}
.survey-question--compact-head .survey-question__head {
  max-width: 1080px;
  gap: var(--s-1);
}
.survey-question--compact-head .survey-question__title {
  max-width: 920px;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.28;
}
.survey-question--compact-head .survey-question__help {
  max-width: 920px;
  font-size: 13px;
  line-height: 1.5;
}
.survey-info {
  display: grid;
  gap: var(--s-3);
  max-width: 920px;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.65;
}
.survey-info__paragraph,
.survey-info__list {
  margin: 0;
}
.survey-info__list {
  padding-left: var(--s-5);
}
.survey-info__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.survey-info__link,
.survey-pdf__fallback a {
  color: var(--accent);
  font-weight: 600;
}
.survey-pdf {
  display: grid;
  gap: var(--s-3);
}
.survey-pdf__frame {
  width: 100%;
  min-height: min(68vh, 760px);
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
}
.survey-pdf__fallback {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
}
.survey-choice-group {
  display: grid;
  gap: var(--s-3);
}
.survey-choice-group--multi-select {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.survey-question--inline .survey-choice-group {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.survey-question--grid .survey-choice-group {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.survey-choice {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--rule);
  background: rgba(255, 255, 255, 0.7);
  transition:
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease),
    transform var(--dur-fast) var(--ease);
}
.survey-choice:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}
.survey-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.survey-choice__dot,
.survey-choice__check,
.survey-matrix__radio,
.survey-matrix__checkbox {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid var(--rule-strong);
  background: var(--bg-elevated);
  box-shadow: inset 0 0 0 3px transparent;
  transition:
    box-shadow var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    background var(--dur-fast) var(--ease);
}
.survey-choice__dot,
.survey-matrix__radio {
  border-radius: 999px;
}
.survey-choice__check,
.survey-matrix__checkbox {
  border-radius: 3px;
}
.survey-choice input:checked + .survey-choice__dot,
.survey-choice input:checked + .survey-choice__check,
.survey-matrix__cell input:checked + .survey-matrix__radio,
.survey-matrix__cell input:checked + .survey-matrix__checkbox {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, white);
  box-shadow: inset 0 0 0 5px var(--accent);
}
.survey-choice input:focus-visible + .survey-choice__dot,
.survey-choice input:focus-visible + .survey-choice__check,
.survey-matrix__cell input:focus-visible + .survey-matrix__radio,
.survey-matrix__cell input:focus-visible + .survey-matrix__checkbox {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.survey-choice--full {
  grid-column: 1 / -1;
}
.survey-choice__label {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
}
.survey-number {
  display: grid;
  gap: var(--s-2);
  max-width: 220px;
}
.survey-number__input {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--s-4);
  border: 1px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.survey-number__hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-3);
}
.survey-text {
  display: grid;
  gap: var(--s-2);
}
.survey-text__input {
  width: 100%;
  min-height: 52px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--rule-strong);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}
.survey-text__input--multiline {
  min-height: 140px;
}
.survey-table-wrap {
  overflow-x: auto;
  padding-bottom: var(--s-2);
}
.survey-matrix {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.62);
}
.survey-matrix th,
.survey-matrix td {
  padding: var(--s-4) var(--s-3);
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.survey-matrix thead th {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 84%, white);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-3);
  text-align: center;
}
.survey-matrix tbody th {
  width: 26%;
  min-width: 220px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  text-align: left;
}
.survey-matrix td {
  text-align: center;
}
.survey-matrix__cell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
}
.survey-matrix__cell--checkbox {
  min-width: 72px;
}
.survey-matrix__cell input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.final-questionnaire__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-4);
  padding-top: var(--s-6);
  margin-top: var(--s-2);
  border-top: 1px solid var(--rule);
}
.final-questionnaire__error {
  margin: 0;
  color: var(--error);
  font-size: 14px;
}
.final-questionnaire__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-3);
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .final-questionnaire {
    padding: var(--s-5) var(--s-4) var(--s-6);
  }
  .final-questionnaire__sections {
    gap: var(--s-6);
  }
  .survey-question--inline .survey-choice-group,
  .survey-question--grid .survey-choice-group {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .survey-logo-header {
    padding: var(--s-4) var(--s-4) 0;
  }
  .institution-logos {
    gap: var(--s-4);
  }
  .logo-mit { height: 32px; }
  .logo-harvard { height: 40px; }
  .logo-northwestern { height: 25px; }

  .final-questionnaire__hero {
    margin-bottom: var(--s-6);
  }
  .survey-question {
    gap: var(--s-4);
  }
  .survey-matrix {
    min-width: 680px;
  }
  .final-questionnaire__footer {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .final-questionnaire__actions {
    display: grid;
    gap: var(--s-3);
    width: calc(100vw - (2 * var(--s-4)));
    justify-items: stretch;
  }
  .final-questionnaire__actions .btn {
    width: 100%;
    inline-size: 100%;
    min-width: calc(100vw - (2 * var(--s-4)));
    justify-self: stretch;
  }
}

/* ============================================================================
   Utilities + small additions
============================================================================ */

/* Screen-reader-only text — visually hidden but exposed to assistive tech. */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Button row at the bottom of consent / instructions / completion cards. */
.card__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-3);
  margin-top: var(--s-6);
  flex-wrap: wrap;
}
.card__actions .btn { min-width: 180px; }
@media (max-width: 520px) {
  .card__actions { flex-direction: column-reverse; }
  .card__actions .btn { width: 100%; }
  .comprehension-question { padding: var(--s-4); }
  .comprehension-question legend { font-size: 18px; }
  .comprehension-option {
    grid-template-columns: 20px minmax(0, 1fr);
    padding: 12px;
  }
}

@media (max-width: 860px) {
  .voice-instructions__steps {
    grid-template-columns: 1fr;
  }
  .voice-instructions__image {
    aspect-ratio: 16 / 10;
  }
}

/* Sound toggle icon — swap between muted/unmuted paths. */
.video-frame__sound .sound-on-only  { display: none; }
.video-frame__sound .sound-off-only { display: inline; }
.video-frame__sound.is-unmuted .sound-on-only  { display: inline; }
.video-frame__sound.is-unmuted .sound-off-only { display: none; }

/* Tap-to-play overlay — only visible when autoplay was blocked. */
.video-frame__tap {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--s-3);
  background: rgba(0, 0, 0, 0.42);
  border: 0;
  color: #F6F6F1;
  cursor: pointer;
  padding: 0;
  font: inherit;
  z-index: 2;
}
.video-frame__tap.is-visible { display: flex; }
.video-frame__tap-circle {
  width: 72px; height: 72px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 10px 32px -8px rgba(0, 0, 0, 0.5);
  transition: transform var(--dur-fast) var(--ease);
}
.video-frame__tap:hover .video-frame__tap-circle { transform: scale(1.04); }
.video-frame__tap:active .video-frame__tap-circle { transform: scale(0.97); }
.video-frame__tap-label {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #F6F6F1;
}

/* Creator Rewards playback controls remain visible throughout each video. */
.video-playback-controls {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 4;
  display: flex;
  gap: 2px;
  padding: 3px;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.76);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.video-playback-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 30px;
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #F6F6F1;
  font: 600 11px/1 var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.video-playback-control:hover:not(:disabled),
.video-playback-control:focus-visible {
  background: rgba(255, 255, 255, 0.17);
}
.video-playback-control:focus-visible {
  outline: 2px solid #FFFFFF;
  outline-offset: 1px;
}
.video-playback-control:disabled {
  opacity: 0.42;
  cursor: default;
}

.video-frame:fullscreen,
.video-frame:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  border-radius: 0;
  background: #000;
}
.video-frame:fullscreen video,
.video-frame:-webkit-full-screen video {
  object-fit: contain;
}
.video-frame:fullscreen .video-playback-controls,
.video-frame:-webkit-full-screen .video-playback-controls {
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%) scale(1.12);
}

.voice-snippet-control {
  position: absolute;
  left: var(--s-3);
  right: var(--s-3);
  bottom: calc(var(--s-3) + 10px);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #F6F6F1;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.voice-snippet-control__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.voice-snippet-control__button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 999px;
  background: rgba(12, 12, 12, 0.66);
  color: #F6F6F1;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.28);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.voice-snippet-control__button.is-recording {
  background: #B3261E;
  border-color: #B3261E;
}
.voice-snippet-control__button--skip:not(:disabled) {
  background: #F6F6F1;
  border-color: #F6F6F1;
  color: #0B0B0B;
}
.voice-snippet-control__button:disabled {
  opacity: 0.7;
}
.voice-snippet-control__status {
  min-width: 0;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: rgba(246,246,241,0.72);
  text-align: right;
}
.rating--voice-recording .voice-snippet-control,
.rating--voice-emotions .voice-snippet-control {
  display: none;
}

/* Keep comparison frames inside their grid columns even on short laptops;
   later generic video media queries otherwise make them too wide. */
.rating--comparison .comparison-video-frame {
  width: min(22vw, 290px);
  max-height: none;
}
@media (max-width: 960px) {
  .rating--comparison .comparison-video-frame {
    width: min(34vw, 260px);
    max-height: none;
  }
}

@media (max-width: 767.98px) {
  .rating--voice:not(.rating--voice-recording):not(.rating--voice-emotions) .voice-snippet-control {
    left: max(18px, env(safe-area-inset-left));
    right: max(18px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    min-height: 44px;
    font-size: 14px;
  }
  .voice-snippet-control__actions {
    gap: 8px;
  }
  .voice-snippet-control__button {
    min-height: 44px;
    padding: 0 14px;
  }
}

/* Fieldset reset so the emo grid renders cleanly without default chrome. */
.emo-grid {
  border: 0;
  padding: 0;
  margin: 0;
}

.voice-recorder {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  align-items: start;
  justify-items: center;
  padding: var(--s-5);
  border: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #F6F6F1;
}
.voice-recorder[hidden] { display: none; }
.voice-recorder__panel {
  width: min(620px, 100%);
  margin-top: clamp(28px, 12vh, 120px);
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.66);
  text-align: left;
  box-shadow: 0 22px 60px rgba(0,0,0,0.22);
}
.voice-recorder__prompt,
.voice-recorder__status {
  margin: 0;
  font-family: var(--font-body);
}
.voice-recorder__prompt {
  max-width: 520px;
  color: #F6F6F1;
  font-weight: 600;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0,0,0,0.65);
}
.voice-recorder__status {
  max-width: 540px;
  color: rgba(246,246,241,0.82);
  text-shadow: 0 2px 14px rgba(0,0,0,0.65);
}
.voice-status__primary,
.voice-status__hint {
  display: block;
}
.voice-status__primary {
  margin-bottom: 0.75rem;
}
.voice-status__hint {
  color: rgba(246,246,241,0.72);
}
.voice-transcripts {
  display: grid;
  gap: var(--s-2);
  max-height: min(28vh, 230px);
  overflow: auto;
}
.voice-transcripts[hidden] { display: none; }
.voice-transcript {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--s-3);
  padding: var(--s-3);
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.10);
}
.voice-transcript strong {
  padding-top: 2px;
  color: rgba(246,246,241,0.62);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.voice-transcript p {
  margin: 0;
  color: #F6F6F1;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.42;
}
.voice-transcript__empty {
  color: rgba(246,246,241,0.55);
  font-style: italic;
}
.voice-recorder__controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
}
.voice-recorder__controls .btn {
  min-width: 0;
}
.voice-recorder__controls .btn.is-recording {
  background: #B3261E;
  border-color: #B3261E;
}

.voice-emotion-picker {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: grid;
  align-items: center;
  justify-items: center;
  padding: var(--s-5);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #F6F6F1;
}
.voice-emotion-picker__panel {
  width: min(620px, 100%);
  display: grid;
  gap: var(--s-4);
  padding: var(--s-5);
  border: 1px solid rgba(255,255,255,0.13);
  background: rgba(0,0,0,0.66);
  box-shadow: 0 22px 60px rgba(0,0,0,0.22);
}
.voice-emotion-picker .prompt__q {
  max-width: 520px;
  color: #F6F6F1;
  font-weight: 600;
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  line-height: 1.2;
  text-shadow: 0 2px 14px rgba(0,0,0,0.65);
}
.voice-emotion-picker .emo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.voice-emotion-picker .emo {
  min-height: 42px;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.10);
  color: #F6F6F1;
}
.voice-emotion-picker .emo:hover:not(:has(input:checked)) {
  border-color: rgba(255,255,255,0.54);
  color: #F6F6F1;
}
.voice-emotion-picker .emo:has(input:checked) {
  border-color: #F6F6F1;
  background: #F6F6F1;
  color: #0B0B0B;
}
.voice-emotion-picker .emo--special {
  border-style: dashed;
  color: rgba(246,246,241,0.78);
}
.voice-emotion-picker__note {
  min-height: 1.2em;
  margin: 0;
  color: rgba(246,246,241,0.72);
  font-family: var(--font-body);
  font-size: 13px;
}
.voice-emotion-picker__note:empty {
  visibility: hidden;
}
.voice-emotion-picker__controls {
  display: flex;
  justify-content: flex-end;
}
.voice-emotion-picker__controls .btn {
  min-width: 160px;
}

@media (max-width: 767.98px) {
  .voice-recorder {
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  .voice-recorder__panel {
    margin-top: clamp(24px, 10vh, 84px);
    padding: 18px;
  }
  .voice-recorder__prompt {
    font-size: clamp(1.45rem, 8vw, 2.1rem);
  }
  .voice-transcript {
    grid-template-columns: 1fr;
    gap: var(--s-1);
  }
  .voice-emotion-picker {
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }
  .voice-emotion-picker__panel {
    padding: 18px;
    gap: var(--s-3);
  }
  .voice-emotion-picker .prompt__q {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }
  .voice-emotion-picker .emo {
    min-height: 40px;
    padding: 5px 10px;
  }
  .voice-emotion-picker__controls {
    display: grid;
    justify-content: stretch;
  }
  .voice-emotion-picker__controls .btn {
    width: 100%;
  }
}

/* --- Scroll-survey wait/recovery screens (thin-client flow) --- */
.scroll-wait {
  text-align: center;
}
.scroll-wait__spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
  border: 3px solid var(--rule);
  border-top-color: var(--accent);
  animation: scroll-wait-spin 0.9s linear infinite;
}
@keyframes scroll-wait-spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Viewer Scrolling: final-minute questions and preference section
============================================================================ */
.scroll-preference {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #F7F6F0;
  color: #151715;
  font-family: var(--font-body);
}
.scroll-preference__rail {
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
}
.scroll-preference__rail.is-intro-locked {
  overflow-y: hidden;
  touch-action: none;
}
.scroll-preference__rail.is-final-followup {
  scroll-snap-type: none;
  overscroll-behavior-y: auto;
  overflow-y: auto;
  touch-action: pan-y;
}
.scroll-preference__item {
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.scroll-preference__intro {
  display: grid;
  place-items: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(22px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(22px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 15% 10%, rgba(190, 236, 207, 0.72), transparent 38%),
    linear-gradient(155deg, #F9FAF4 0%, #EEF5EA 100%);
}
.scroll-preference__transition-card,
.scroll-preference__intro-card {
  width: min(480px, 100%);
  display: grid;
  justify-items: center;
  gap: 17px;
  text-align: center;
}
.scroll-preference__transition-check {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #78AF8D;
  border-radius: 50%;
  background: #C9F0D6;
  color: #173F28;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(38, 92, 57, 0.14);
}
.scroll-preference__intro h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 10vw, 3.3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.scroll-preference__intro p {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(1.04rem, 4.6vw, 1.28rem);
  line-height: 1.55;
}
.scroll-preference__intro mark {
  padding: 0.08em 0.22em 0.14em;
  border-radius: 0.28em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  background: #BDECCF;
  color: inherit;
  font-weight: 750;
}
.scroll-preference__transition-check {
  font-size: 22px;
}
.scroll-preference__next {
  width: min(300px, 100%);
  min-height: 52px;
  margin-top: 8px;
  padding: 12px 22px;
  border: 1.5px solid #214E35;
  border-radius: 999px;
  background: #214E35;
  color: #FFFFFF;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 9px 24px rgba(33, 78, 53, 0.18);
  transition: transform 130ms ease, opacity 130ms ease;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__next:active:not(:disabled) {
  transform: scale(0.985);
}
.scroll-preference__next:disabled {
  border-color: #AAB2AC;
  background: #AAB2AC;
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: none;
}
.scroll-preference__eyebrow {
  color: #2F6A48;
  font-size: 11px !important;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.scroll-preference__continuation .scroll-preference__intro-card {
  gap: 13px;
}
.scroll-preference__continuation h1 {
  max-width: 18ch;
  font-size: clamp(1.8rem, 7.5vw, 2.55rem);
  line-height: 1.03;
}
.scroll-preference__continuation-options {
  width: 100%;
  display: grid;
  gap: 10px;
}
.scroll-preference__continuation-option {
  min-height: 70px;
  padding: 14px 16px;
  border: 1.5px solid #AEB8B1;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.92);
  color: #181B19;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(38, 45, 40, 0.07);
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__continuation-option:active {
  transform: scale(0.988);
}
.scroll-preference__continuation-option.is-selected {
  border-color: #2F6A48;
  background: #C9F0D6;
  box-shadow: 0 7px 22px rgba(47, 106, 72, 0.13);
}
.scroll-preference__continuation-option:focus-visible,
.scroll-preference__next:focus-visible {
  outline: 3px solid #2F6A48;
  outline-offset: 3px;
}
.scroll-preference__lottery-note {
  max-width: 46ch !important;
  color: #5D645E;
  font-size: 12px !important;
  line-height: 1.4 !important;
  text-align: left;
}
.scroll-preference__continuation-status {
  min-height: 17px;
  color: #2F6A48;
  font-size: 12px !important;
  font-weight: 750;
  line-height: 1.3 !important;
}
.scroll-preference__explanation h1 {
  max-width: 19ch;
  font-size: clamp(1.9rem, 8.2vw, 2.8rem);
  line-height: 1.04;
}

.scroll-preference__final-followup {
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    max(22px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
  background:
    radial-gradient(circle at 12% 4%, rgba(190, 236, 207, 0.52), transparent 30%),
    #F7F6F0;
  scroll-snap-stop: normal;
}
.scroll-preference__followup-card {
  width: min(600px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}
.scroll-preference__followup-header {
  display: grid;
  gap: 7px;
  text-align: left;
}
.scroll-preference__followup-header h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 9vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
}
.scroll-preference__followup-header h1[tabindex="-1"]:focus {
  outline: none;
}
.scroll-preference__followup-header p {
  margin: 0;
  color: #505751;
  font-size: 15px;
  line-height: 1.45;
}
.scroll-preference__followup-question {
  min-width: 0;
  margin: 0;
  padding: 17px;
  border: 1px solid #D5D9D3;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(38, 45, 40, 0.07);
}
.scroll-preference__followup-question legend {
  width: 100%;
  margin: 0 0 13px;
  padding: 0;
  color: #1E221F;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.42;
}
.scroll-preference__followup-options {
  display: grid;
  gap: 8px;
}
.scroll-preference__followup-option {
  position: relative;
  display: block;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__followup-option input {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.scroll-preference__followup-option-content {
  min-height: 47px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 1.5px solid #BEC6C0;
  border-radius: 12px;
  background: #FFFFFF;
  color: #242824;
  font-size: 15px;
  font-weight: 620;
  line-height: 1.3;
  transition: transform 130ms ease, border-color 130ms ease, background 130ms ease;
}
.scroll-preference__followup-option:active
  .scroll-preference__followup-option-content {
  transform: scale(0.988);
}
.scroll-preference__followup-radio {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1.5px solid #859088;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 4px #FFFFFF;
}
.scroll-preference__followup-option input:checked
  + .scroll-preference__followup-option-content {
  border-color: #2F6A48;
  background: #D8F3E1;
}
.scroll-preference__followup-option input:checked
  + .scroll-preference__followup-option-content
  .scroll-preference__followup-radio {
  border-color: #2F6A48;
  background: #2F6A48;
}
.scroll-preference__followup-option input:focus-visible
  + .scroll-preference__followup-option-content {
  outline: 3px solid #2F6A48;
  outline-offset: 2px;
}
.scroll-preference__followup-status {
  min-height: 18px;
  margin: -4px 0 0;
  color: #2F6A48;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}
.scroll-preference__followup-card > .scroll-preference__next {
  justify-self: center;
  margin-top: -8px;
}

.scroll-preference__pair {
  display: grid;
  align-items: center;
  padding:
    max(14px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  background:
    linear-gradient(180deg, rgba(201, 240, 214, 0.42), transparent 22%),
    #F7F6F0;
}
.scroll-preference__pair-inner {
  width: min(560px, 100%);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  margin: 0 auto;
  display: grid;
  gap: 11px;
}
.scroll-preference__pair-header {
  --scroll-preference-question-size: clamp(1.75rem, 7.2vw, 2.35rem);
  text-align: left;
}
.scroll-preference__pair-header h1 {
  margin: 1px 0 3px;
  font-family: var(--font-display);
  font-size: var(--scroll-preference-question-size);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.scroll-preference__pair-header h1[tabindex="-1"]:focus {
  outline: none;
}
.scroll-preference__pair.is-revealed .scroll-preference__pair-header {
  --scroll-preference-question-size: clamp(1.15rem, 4.8vw, 1.55rem);
}
.scroll-preference__pair.is-revealed .scroll-preference__pair-header h1 {
  max-width: 520px;
  line-height: 1.16;
}
.scroll-preference__rewatch-instruction {
  margin: 0.72em 0 0;
  color: #262A27;
  font-family: var(--font-display);
  font-size: var(--scroll-preference-question-size);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
}
.scroll-preference__progress {
  margin: 0;
  color: #2F6A48;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.scroll-preference__videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.scroll-preference__video-card {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #D5D9D3;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 24px rgba(38, 45, 40, 0.08);
}
.scroll-preference__video-label {
  color: #2A2E2B;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-align: center;
  text-transform: uppercase;
}
.scroll-preference__preview-frame {
  position: relative;
  width: 100%;
  height: min(37vh, 310px);
  height: min(37dvh, 310px);
  overflow: hidden;
  border-radius: 10px;
  background: #080908;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__preview-frame:focus-visible {
  outline: 3px solid #2F6A48;
  outline-offset: 2px;
}
.scroll-preference__preview-video,
.scroll-preference__preview-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #080908;
}
.scroll-preference__carousel-badge {
  position: absolute;
  left: 7px;
  bottom: 7px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(5, 6, 5, 0.78);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 750;
  pointer-events: none;
}
.scroll-preference__preview-loading {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 24px);
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(5, 6, 5, 0.76);
  color: rgba(255,255,255,0.86);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}
.scroll-preference__preview-loading[hidden] {
  display: none;
}
.scroll-preference__expand {
  position: absolute;
  top: 7px;
  right: 7px;
  min-height: 31px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 999px;
  background: rgba(5, 6, 5, 0.78);
  color: #FFFFFF;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  backdrop-filter: blur(8px);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.scroll-preference__choice {
  min-height: 54px;
  padding: 10px 9px;
  border: 1.5px solid #303632;
  border-radius: 13px;
  background: #FFFFFF;
  color: #171A18;
  font: inherit;
  font-size: 13px;
  line-height: 1.25;
  cursor: pointer;
  transition: transform 130ms ease, background 130ms ease, border-color 130ms ease;
  -webkit-tap-highlight-color: transparent;
}
.scroll-preference__choice:active:not(:disabled) {
  transform: scale(0.98);
}
.scroll-preference__choice.is-selected {
  border-color: #42815C;
  background: #C9F0D6;
  color: #153B26;
}
.scroll-preference__choice:disabled:not(.is-selected) {
  opacity: 0.45;
}
.scroll-preference__choice-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: #2F6A48;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.scroll-preference__modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding:
    max(10px, env(safe-area-inset-top))
    max(10px, env(safe-area-inset-right))
    max(10px, env(safe-area-inset-bottom))
    max(10px, env(safe-area-inset-left));
}
.scroll-preference__modal[hidden] {
  display: none;
}
.scroll-preference__modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 9, 8, 0.82);
  backdrop-filter: blur(8px);
}
.scroll-preference__modal-card {
  position: relative;
  width: min(440px, 100%);
  height: min(92vh, 780px);
  height: min(92dvh, 780px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 18px;
  background: #101210;
  color: #F7F7F2;
  box-shadow: 0 28px 80px rgba(0,0,0,0.46);
}
.scroll-preference__modal-head {
  min-height: 37px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 8px;
}
.scroll-preference__modal-head h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 800;
}
.scroll-preference__modal-close {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
  font: inherit;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.scroll-preference__modal-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #050505;
}
.scroll-preference__modal-video,
.scroll-preference__modal-carousel {
  width: 100%;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  background: #050505;
}
.scroll-preference__modal-video {
  object-fit: contain;
}
.scroll-preference__modal-carousel {
  position: relative;
  overflow: hidden;
}
.scroll-preference__modal-carousel[hidden] {
  display: none;
}
.scroll-preference__modal-carousel-track {
  width: 100%;
  height: 100%;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.scroll-preference__modal-carousel-track::-webkit-scrollbar {
  display: none;
}
.scroll-preference__modal-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.scroll-preference__modal-carousel-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.scroll-preference__modal-carousel-nav {
  position: absolute;
  top: 50%;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 50%;
  background: rgba(5, 6, 5, 0.72);
  color: #FFFFFF;
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.scroll-preference__modal-carousel-nav.is-previous { left: 8px; }
.scroll-preference__modal-carousel-nav.is-next { right: 8px; }
.scroll-preference__modal-carousel-nav:disabled {
  opacity: 0;
  pointer-events: none;
}
.scroll-preference__modal-carousel-counter {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(5, 6, 5, 0.72);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 750;
}
.scroll-preference__modal-audio {
  display: none;
}
.scroll-preference__modal-status {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: calc(100% - 32px);
  margin: 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(16, 18, 16, 0.86);
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  pointer-events: none;
}
.scroll-preference__modal-status[hidden] {
  display: none;
}
.scroll-preference__modal-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.scroll-preference__modal-controls button {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 11px;
  background: rgba(255,255,255,0.1);
  color: #FFFFFF;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.scroll-preference__modal-controls button[hidden] {
  display: none;
}
.scroll-preference__preview-limit {
  margin: 0 0 2px;
  color: rgba(247,247,242,0.62);
  font-size: 11px;
  text-align: center;
}
body.scroll-preference-modal-open {
  overflow: hidden;
}

@media (max-height: 680px) {
  .scroll-preference__pair-inner {
    gap: 7px;
  }
  .scroll-preference__pair-header {
    --scroll-preference-question-size: clamp(1.2rem, 5.4vw, 1.6rem);
  }
  .scroll-preference__pair.is-revealed .scroll-preference__pair-header {
    --scroll-preference-question-size: clamp(1.05rem, 4.4vw, 1.3rem);
  }
  .scroll-preference__rewatch-instruction {
    margin-top: 0.48em;
  }
  .scroll-preference__preview-frame {
    height: min(34vh, 220px);
    height: min(34dvh, 220px);
  }
  .scroll-preference__choice {
    min-height: 48px;
    padding: 7px;
  }
}

@media (max-width: 340px) {
  .scroll-preference__pair {
    padding-left: 7px;
    padding-right: 7px;
  }
  .scroll-preference__videos,
  .scroll-preference__choices {
    gap: 6px;
  }
  .scroll-preference__video-card {
    padding: 5px;
  }
  .scroll-preference__expand span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-preference__swipe-arrow {
    animation: none;
  }
  .scroll-preference__choice {
    transition: none;
  }
}
