/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --blue-50:  #eef4fc;
  --blue-100: #c8ddf5;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-900: #1e3a5f;
  --teal-50:  #e6f7f2;
  --teal-100: #b2e8d4;
  --teal-600: #0d9668;
  --teal-700: #047857;
  --teal-800: #065f46;
  --gray-50:  #fafaf9;
  --gray-100: #e7e5e4;
  --gray-200: #d6d3d1;
  --gray-300: #a8a29e;
  --gray-600: #57534e;
  --gray-800: #292524;
  --gray-900: #1c1917;
  --purple-50:  #f5f3ff;
  --purple-100: #ede9fe;
  --purple-600: #7c3aed;
  --purple-700: #6d28d9;
  --purple-800: #5b21b6;
  --amber-50:  #fffbeb;
  --amber-100: #fef3c7;
  --amber-600: #d97706;
  --amber-800: #92400e;
  --red-50:   #fef2f2;
  --red-600:  #dc2626;
  --surface:        #fafaf9;
  --surface-strong: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.06), 0 2px 4px -2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.07);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.08);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(0, 0, .2, 1);

  --text-xs:      0.8rem;
  --text-sm:      0.925rem;
  --text-base:    1.0625rem;
  --text-lg:      1.175rem;
  --text-display: clamp(2rem, 3.5vw, 3.5rem);

  --lh-tight:   1.2;
  --lh-snug:    1.4;
  --lh-normal:  1.6;
  --lh-relaxed: 1.75;
}

/* ─── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }

/* ─── Body ───────────────────────────────────────────────────────────────── */
/* ─── Body (removido — definido acima) ────────────────────────────────────── */

body::before { content: none; }

/* ─── Layout containers ──────────────────────────────────────────────────── */
.page-header,
.progress-bar,
.questionnaire {
  width: 100%;
}

/* Wrapper visual — header + questionnaire como bloco arredondado */
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  background: #eceae4;
  color: var(--gray-900);
  padding: 2rem 1.5rem 4rem;
  min-height: 100vh;
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  align-items: center;
}

body::before { content: none; }

/* ─── Page Header ────────────────────────────────────────────────────────── */
.page-header {
  position: relative;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 3.5rem) clamp(2rem, 5vw, 3.5rem);
  background: var(--surface-strong);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border: none;
  border-bottom: 1px solid var(--gray-100);
  overflow: hidden;
  box-shadow: 0 -4px 20px rgba(0,0,0,.03);
  animation: fade-up .6s var(--ease-out) both;
}

.page-header::before { content: none; }
.page-header::after { content: none; }

/* Badge institucional */
.page-header .label {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  border-radius: 999px;
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(4px);
  border: 1px solid var(--gray-200);
  font-size: var(--text-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-600);
  font-weight: 600;
  margin-bottom: 1.75rem;
  white-space: nowrap;
}

.page-header .label a,
.page-header p a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Título */
.page-header h1 {
  max-width: none;
  font-family: "Georgia", "Times New Roman", serif;
  font-size: var(--text-display);
  font-weight: 400;
  color: var(--gray-900);
  line-height: var(--lh-tight);
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
}

/* Parágrafo de descrição */
.page-header p:not(.meta-note) {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: var(--lh-relaxed);
  max-width: none;
}

/* Nota meta */
.page-header .meta-note {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--lh-relaxed);
  max-width: none;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
  opacity: .96;
}

.page-header p + p { margin-top: .75rem; }

/* ─── Progress Bar ───────────────────────────────────────────────────────── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  height: 4px;
  background: var(--gray-100);
  overflow: visible;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--blue-600), var(--teal-600));
  transition: width .4s var(--ease);
  border-radius: 0 999px 999px 0;
  position: relative;
}

.progress-fill::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(13,150,104,.2);
  transition: opacity .3s ease;
}

/* ─── Questionnaire Container ────────────────────────────────────────────── */
.questionnaire {
  display: none;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 3.5rem) clamp(2.5rem, 5vw, 4rem);
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  border: none;
  background: var(--surface-strong);
  box-shadow: 0 8px 30px rgba(0,0,0,.04);
  animation: fade-up .6s var(--ease-out) both .1s;
}

.questionnaire.active { display: block; }

/* ─── Smooth transitions ─────────────────────────────────────────────────── */
.preamble,
.timing-note,
.scale-footer,
.strategy-card,
.question-row,
.preference-row,
.demographic-block,
.submit-area {
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}

/* ─── Preamble ───────────────────────────────────────────────────────────── */
.preamble {
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  background: var(--amber-50);
  border: 1px solid var(--amber-100);
  border-left: 4px solid var(--amber-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 2.5rem;
  animation: fade-up .5s var(--ease-out) both .15s;
}

.preamble .preamble-label {
  font-size: var(--text-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-600);
  font-weight: 700;
  margin-bottom: .6rem;
}

.preamble p {
  font-size: var(--text-base);
  color: var(--amber-800);
  line-height: var(--lh-relaxed);
  font-style: italic;
}

/* ─── Strategy Grid ──────────────────────────────────────────────────────── */
.strategy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.slots-3 .strategy-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.strategy-card {
  position: relative;
  overflow: hidden;
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.strategy-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.strategy-card.a {
  border-top: 4px solid var(--blue-600);
  animation: slide-in-left .5s var(--ease-out) both .2s;
}

.strategy-card.b {
  border-top: 4px solid var(--teal-600);
  animation: slide-in-right .5s var(--ease-out) both .25s;
}

.strategy-card.c {
  border-top: 4px solid var(--purple-600);
  animation: fade-up .5s var(--ease-out) both .3s;
}

.strategy-card::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: .04;
  pointer-events: none;
}

.strategy-card.a::after {
  background: radial-gradient(circle, var(--blue-600), transparent 70%);
}

.strategy-card.b::after {
  background: radial-gradient(circle, var(--teal-600), transparent 70%);
}

.strategy-card.c::after {
  background: radial-gradient(circle, var(--purple-600), transparent 70%);
}

.strategy-card .strategy-label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  font-size: var(--text-xs);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.strategy-icon {
  display: none;
}

.strategy-icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strategy-card.a .strategy-label {
  color: var(--blue-700);
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
}

.strategy-card.b .strategy-label {
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1px solid var(--teal-100);
}

.strategy-card.c .strategy-label {
  color: var(--purple-700);
  background: var(--purple-50);
  border: 1px solid var(--purple-100);
}

.strategy-card.c .detail-icon { color: var(--purple-600); }

.strategy-detail {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--lh-relaxed);
}

.strategy-detail strong {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: var(--text-xs);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gray-800);
  margin-top: 1.25rem;
  margin-bottom: .4rem;
  font-weight: 700;
}

.strategy-detail strong:first-child { margin-top: 0; }

.detail-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  flex-shrink: 0;
}

.detail-icon svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.strategy-card.a .detail-icon { color: var(--blue-600); }
.strategy-card.b .detail-icon { color: var(--teal-600); }

/* ─── Timing Note & Scale Footer ─────────────────────────────────────────── */
.timing-note,
.scale-footer {
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--lh-normal);
}

.timing-note { margin-bottom: 2.5rem; }

.timing-note strong,
.scale-footer strong { color: var(--gray-800); font-weight: 600; }

.scale-footer {
  margin-top: 1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.scale-footer-spaced { margin-top: 1.5rem; }

/* ─── Section Blocks ─────────────────────────────────────────────────────── */
.section-block {
  margin-bottom: 2rem;
  background: var(--surface-strong);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: fade-up .5s var(--ease-out) both .2s;
}

.section-title {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .9rem 1.5rem;
  font-size: var(--text-xs);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gray-600);
  font-weight: 700;
  background: linear-gradient(180deg, #f9f8f6, #f4f3f0);
  border-bottom: 1px solid var(--gray-100);
}

/* ─── Column Headers ─────────────────────────────────────────────────────── */
.column-headers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1rem;
  padding: .6rem 1.5rem;
  background: linear-gradient(180deg, #f9f8f6, #f4f3f0);
  border-bottom: 1px solid var(--gray-100);
}

.slots-3 .column-headers {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
}

.col-header-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

.slots-3 .col-header-right {
  grid-template-columns: 1fr 1fr 1fr;
}

.col-header-label {
  padding: .35rem .5rem;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  border-radius: 6px;
}

.col-header-label.a {
  color: var(--blue-700);
  background: var(--blue-50);
}

.col-header-label.b {
  color: var(--teal-700);
  background: var(--teal-50);
}

.col-header-label.c {
  color: var(--purple-700);
  background: var(--purple-50);
}

/* ─── Question Rows ──────────────────────────────────────────────────────── */
.question-row,
.preference-row,
.demographic-block {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.question-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1.25rem;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,.04);
  transition: background .15s ease;
}

.slots-3 .question-row {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
}

.question-row:last-of-type { border-bottom: none; }

.question-row:hover { background: rgba(0,0,0,.015); }

.question-num {
  font-size: var(--text-xs);
  color: var(--gray-300);
  font-weight: 700;
  min-width: 1.5rem;
  display: inline-block;
}

.question-text,
.preference-label,
.demo-question {
  font-size: var(--text-base);
  color: var(--gray-900);
  line-height: var(--lh-normal);
}

.question-note {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-style: italic;
  margin-top: .35rem;
  line-height: var(--lh-snug);
}

/* ─── Likert Scales ──────────────────────────────────────────────────────── */
.likert-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}

.slots-3 .likert-pair {
  grid-template-columns: 1fr 1fr 1fr;
}

.likert-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  min-width: 155px;
  padding: .5rem 0;
}

.likert-col-label { display: none; }

.likert-scale {
  display: flex;
  gap: .35rem;
  align-items: center;
}

.likert-scale::before,
.likert-scale::after {
  font-size: 0.65rem;
  color: var(--gray-300);
  font-weight: 600;
  width: 14px;
  text-align: center;
}

.likert-scale::before { content: "1"; margin-right: .15rem; }
.likert-scale::after  { content: "5"; margin-left: .15rem; }

/* ─── Radio Buttons ──────────────────────────────────────────────────────── */
.likert-scale input[type="radio"],
.preference-option input[type="radio"],
.demo-option input[type="radio"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--gray-200);
  border-radius: 50%;
  cursor: pointer;
  background: white;
  transition:
    transform .15s var(--ease),
    background-color .15s var(--ease),
    border-color .15s var(--ease),
    box-shadow .15s var(--ease);
}

.likert-scale input[type="radio"]:hover,
.preference-option input[type="radio"]:hover,
.demo-option input[type="radio"]:hover {
  transform: scale(1.12);
}

.likert-scale input[type="radio"]:focus-visible,
.preference-option input[type="radio"]:focus-visible,
.demo-option input[type="radio"]:focus-visible,
.submit-btn:focus-visible {
  outline: 3px solid rgba(37,99,235,.25);
  outline-offset: 2px;
}

.likert-col.a .likert-scale input[type="radio"]:hover {
  background: var(--blue-50);
  border-color: var(--blue-600);
}

.likert-col.a .likert-scale input[type="radio"]:checked {
  background: var(--blue-600);
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
  transform: scale(1.05);
}

.likert-col.b .likert-scale input[type="radio"]:hover {
  background: var(--teal-50);
  border-color: var(--teal-600);
}

.likert-col.b .likert-scale input[type="radio"]:checked {
  background: var(--teal-600);
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(13,150,104,.15);
  transform: scale(1.05);
}

.likert-col.c .likert-scale input[type="radio"]:hover {
  background: var(--purple-50);
  border-color: var(--purple-600);
}

.likert-col.c .likert-scale input[type="radio"]:checked {
  background: var(--purple-600);
  border-color: var(--purple-600);
  box-shadow: 0 0 0 3px rgba(124,58,237,.15);
  transform: scale(1.05);
}

/* ─── Preference & Demo options ──────────────────────────────────────────── */
.preference-row {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: none;
}

.demographic-block {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-100);
  margin-top: 2rem;
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.demographic-block .section-title {
  position: static;
  background: transparent;
  border: 0;
  padding-left: 0;
  margin-bottom: .75rem;
}

.preference-options,
.demo-options {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.preference-option,
.demo-option {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  min-height: 44px;
  padding: .65rem 1.25rem;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1.5px solid var(--gray-200);
  font-size: var(--text-sm);
  color: var(--gray-800);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}

.preference-option:hover,
.demo-option:hover {
  border-color: var(--gray-300);
  background: var(--gray-50);
  box-shadow: var(--shadow-sm);
}

.preference-option:has(input:checked),
.demo-option:has(input:checked) {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-900);
  box-shadow: 0 0 0 3px rgba(0,0,0,.04);
}

/* Estratégia A selecionada — azul */
.preference-option:has(input[value="A"]:checked) {
  background: var(--blue-50);
  border-color: var(--blue-600);
  color: var(--blue-800);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* Estratégia B selecionada — verde */
.preference-option:has(input[value="B"]:checked) {
  background: var(--teal-50);
  border-color: var(--teal-600);
  color: var(--teal-800);
  box-shadow: 0 0 0 3px rgba(13,150,104,.1);
}

/* Estratégia C selecionada — roxo */
.preference-option:has(input[value="C"]:checked) {
  background: var(--purple-50);
  border-color: var(--purple-600);
  color: var(--purple-800);
  box-shadow: 0 0 0 3px rgba(124,58,237,.1);
}

.preference-option input[type="radio"],
.demo-option input[type="radio"] {
  width: 16px;
  height: 16px;
  border-width: 1.5px;
}

.preference-option input[type="radio"]:checked,
.demo-option input[type="radio"]:checked {
  background: var(--gray-800);
  border-color: var(--gray-800);
  box-shadow: none;
}

.preference-option:has(input[value="A"]:checked) input[type="radio"] {
  background: var(--blue-600);
  border-color: var(--blue-600);
}

.preference-option:has(input[value="B"]:checked) input[type="radio"] {
  background: var(--teal-600);
  border-color: var(--teal-600);
}

.preference-option:has(input[value="C"]:checked) input[type="radio"] {
  background: var(--purple-600);
  border-color: var(--purple-600);
}

/* ─── Manipulation Badge ─────────────────────────────────────────────────── */
.manipulation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--blue-50);
  color: var(--blue-800);
  font-size: 0.65rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-left: .5rem;
  vertical-align: middle;
  font-weight: 700;
  border: 1px solid var(--blue-100);
}

/* ─── Submit Area ────────────────────────────────────────────────────────── */
.submit-area {
  margin-top: 2.5rem;
  padding: 1.75rem 1.5rem 0;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.submit-note {
  font-size: var(--text-sm);
  color: var(--gray-600);
  font-style: italic;
  max-width: none;
  line-height: var(--lh-normal);
  white-space: nowrap;
}

.submit-btn {
  min-height: 52px;
  background: var(--gray-900);
  color: white;
  border: none;
  padding: .9rem 2.5rem;
  border-radius: 999px;
  font-size: var(--text-base);
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow-lg);
  transition:
    transform .2s var(--ease),
    box-shadow .2s var(--ease),
    background .2s var(--ease);
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: #111;
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.submit-btn:disabled {
  cursor: progress;
  transform: none;
  opacity: .7;
  box-shadow: none;
}

/* ─── Missing state ──────────────────────────────────────────────────────── */
.question-row.missing,
.preference-row.missing,
.demographic-block.missing {
  background: var(--red-50) !important;
  border-left: 3px solid var(--red-600);
  animation: shake .35s var(--ease);
}

/* ─── Submit Messages ────────────────────────────────────────────────────── */
.submit-message {
  width: 100%;
  font-size: var(--text-sm);
  color: var(--gray-800);
  line-height: var(--lh-snug);
  margin-top: .5rem;
}

.submit-message.error   { color: var(--red-600); }
.submit-message.success { color: var(--teal-700); }

/* ─── Captcha ────────────────────────────────────────────────────────────── */
.captcha-wrap { margin-top: 2rem; }
#turnstile-container { margin-top: 1.5rem; }

/* ─── Keyframe Animations ────────────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slide-in-left {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slide-in-right {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-4px); }
  60%      { transform: translateX(4px); }
}

/* ─── Reduced Motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0ms !important;
  }
}

/* ─── Tablet ─────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .page-header { padding-top: 2.25rem; }

  .strategy-grid,
  .slots-3 .strategy-grid,
  .likert-pair,
  .slots-3 .likert-pair { grid-template-columns: 1fr; }

  .column-headers,
  .question-row,
  .slots-3 .column-headers,
  .slots-3 .question-row { grid-template-columns: 1fr; }

  .col-header-right,
  .slots-3 .col-header-right { display: none; }

  .likert-col {
    min-width: 0;
    align-items: flex-start;
    padding: .6rem .75rem;
    border-radius: var(--radius-sm);
  }

  .likert-col.a { background: var(--blue-50); }
  .likert-col.b { background: var(--teal-50); }
  .likert-col.c { background: var(--purple-50); }

  .likert-col-label {
    display: block;
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: .25rem;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .likert-col.a .likert-col-label { color: var(--blue-700); }
  .likert-col.b .likert-col-label { color: var(--teal-700); }
  .likert-col.c .likert-col-label { color: var(--purple-700); }

  .likert-scale {
    width: 100%;
    justify-content: space-between;
  }

  .question-row { gap: .8rem; }

  .submit-area {
    flex-direction: column;
    align-items: stretch;
  }

  .submit-note { white-space: normal; }
  .submit-btn { width: 100%; text-align: center; }
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  body { padding: 0 0 2rem; }

  .page-header {
    padding: 2rem 1.25rem;
    border-radius: 0;
  }

  .page-header .label {
    font-size: 0.6rem;
    padding: .35rem .75rem;
    letter-spacing: .04em;
    overflow-x: auto;
    max-width: 100%;
  }

  .questionnaire {
    padding: 1.75rem 1rem 2rem;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .page-header h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    max-width: none;
  }

  .section-title { padding: .75rem 1rem; }

  .column-headers,
  .question-row,
  .preference-row,
  .demographic-block {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .preference-option,
  .demo-option {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius-sm);
  }

  .strategy-card { padding: 1.25rem 1rem; }

  .preamble,
  .timing-note,
  .scale-footer {
    padding: .75rem 1rem;
    font-size: var(--text-xs);
  }

  .progress-bar { height: 3px; }

  .progress-fill::after {
    width: 8px;
    height: 8px;
    top: -2.5px;
    right: -3px;
  }

  .likert-scale input[type="radio"] {
    width: 24px;
    height: 24px;
  }

  .strategy-detail strong { gap: .5rem; }
  .detail-icon { width: 1.75rem; height: 1.75rem; }
}

/* ─── Language Toggle ────────────────────────────────────────────────────── */
.lang-toggle {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.lang-toggle button {
  background: none;
  border: none;
  padding: .4rem .7rem;
  cursor: pointer;
  color: var(--gray-600);
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: background .15s ease, color .15s ease;
}

.lang-toggle button.active {
  background: var(--gray-900);
  color: white;
}
