:root {
  color-scheme: light;
  --ink: #1d302d;
  --muted: #526660;
  --brand: #176858;
  --brand-dark: #104c41;
  --line: #d6e1db;
  --panel: #fff;
  --error: #992c30;
  --error-bg: #fff2f1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f3f6f2;
  font-size: 16px;
  line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, input { accent-color: var(--brand); }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
a { color: var(--brand-dark); }
:focus-visible { outline: 3px solid #306bce; outline-offset: 3px; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(1.55rem, 3vw, 2rem); line-height: 1.25; letter-spacing: -.025em; margin-bottom: 1.25rem; }
h2 { font-size: 1.15rem; line-height: 1.5; }
h3, legend { font-size: 1rem; line-height: 1.5; font-weight: 650; }
h4 { font-size: .95rem; }
p { margin-bottom: 1rem; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem clamp(1rem, 4vw, 3rem); border-bottom: 1px solid var(--line); background: white; }
.brand { font-weight: 750; text-decoration: none; letter-spacing: .015em; }
.respondent-badge { font-size: .82rem; color: var(--muted); }
.respondent-badge strong { color: var(--ink); }
.respondent-badge { display: flex; align-items: center; gap: .65rem; white-space: nowrap; }
.respondent-badge strong { padding: .3rem .55rem; border: 1px solid var(--line); border-radius: 6px; background: #f6f8f5; font-size: 1rem; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.home-entry > p { color: var(--muted); }
.home-start { margin-top: 1.5rem; }
.home-entry > h1 { color: #b91919; font-family: Georgia, "Times New Roman", serif; font-weight: 400; border-bottom: 1px solid #b91919; padding-bottom: .7rem; }
.home-start > h2 { margin: 0 0 .8rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; }
.home-start .consent-information { margin-block: 1.2rem; }
.home-start > .button { margin-top: .5rem; }
.home-resume { margin-top: 1.75rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.home-resume h2 { margin-bottom: .6rem; }
.home-resume p { margin-bottom: .65rem; font-size: .9rem; }
.home-code strong { font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.home-resume-link { margin-top: 1.5rem; }
.home-resume-link summary { width: fit-content; padding: .3rem 0; color: var(--brand-dark); cursor: pointer; font-size: .9rem; }
.home-resume-link form { max-width: 520px; }
.home-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1.5rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .76rem; }
.home-footer p { margin: 0; }
.home-footer a { margin-left: auto; color: var(--muted); text-underline-offset: 3px; }
@media (max-width: 680px) {
  .respondent-badge { flex-direction: column; align-items: flex-end; gap: .15rem; font-size: .7rem; }
  .home-entry .button { max-width: 100%; text-align: center; }
}
.shell { max-width: 1160px; margin: auto; padding: clamp(.75rem, 3vw, 2.5rem); }
.survey-card, .home-panel { max-width: 900px; margin: auto; padding: clamp(1rem, 3.5vw, 2.5rem); background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 6px 24px #173a2910; }
.survey-card.wide, .home-panel { max-width: 1120px; }
.survey-card { text-align: justify; text-justify: inter-word; hyphens: auto; }
.survey-card :is(h1, h2, h3, h4, legend, .button, .choice-option, .progress-label, .policy-progress) { text-align: left; }
.progress-wrap { margin-bottom: 1.5rem; }
.progress-label { color: var(--muted); font-size: .85rem; margin-bottom: .6rem; }
.progress-track { height: 5px; border-radius: 10px; background: #e8eeea; overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); }
.lead { font-size: 1.06rem; line-height: 1.65; }
.help, .previous-rating, .dimension-description, .policy-index { color: var(--muted); font-size: .88rem; }
.notice, .error-box { padding: 1rem; margin: 1rem 0; border: 1px solid var(--line); border-radius: 10px; background: #f2f7f4; }
.error-box { background: var(--error-bg); border-color: #de9a9e; color: var(--error); }
.error-box ul { padding-left: 1.2rem; margin-bottom: 0; }
.home-grid, .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.start-card, .stats-grid > div { border: 1px solid var(--line); padding: 1.25rem; border-radius: 10px; background: #fafcf9; }
.stats-grid strong { display: block; font-size: 2rem; }
.text-label { display: grid; gap: .45rem; margin: 1.25rem 0; font-weight: 600; }
.text-label input, .text-label textarea, .allocation-input { width: 100%; border: 1px solid #8ca59a; padding: .7rem .8rem; border-radius: 8px; background: white; color: var(--ink); min-height: 44px; }
textarea { resize: vertical; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: .7rem 1.2rem; border: 1px solid transparent; border-radius: 8px; font-weight: 650; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--brand); color: white; }
.button.primary:hover:enabled { background: var(--brand-dark); }
.button.secondary { color: var(--brand-dark); border-color: #95afa2; background: white; }
[data-page-type="comparative_domain_allocation"] .allocation-exercise:has(.allocation-complete) [data-confirm-allocation]:enabled {
  background: var(--brand);
  border-color: var(--brand);
  color: white;
}
[data-page-type="comparative_domain_allocation"] .allocation-exercise:has(.allocation-complete) [data-confirm-allocation]:enabled:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}
button:disabled { cursor: default; opacity: .48; }
.form-nav, .button-row, .export-links, .policy-pager { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1.75rem; }
.button-row { justify-content: flex-start; }
.validation-hint { text-align: right; font-size: .82rem; color: var(--muted); min-height: 1.25rem; margin: .5rem 0 0; }
/* Compact allocations share the same controls and explicit empty initial state. */
.allocation-box { border: 1px solid var(--line); border-radius: 10px; margin: 1.25rem 0; overflow: hidden; }
.allocation-meter { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .3rem 1rem; padding: .85rem 1rem; background: #f5f8f4; color: var(--muted); font-size: .88rem; }
.allocation-meter strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.allocation-complete .allocation-meter { background: #eaf5ed; }
.allocation-row { --category: #33776c; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 1.25rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.allocation-row:last-child { border-bottom: none; }
.allocation-category label { display: block; font-weight: 550; line-height: 1.45; cursor: pointer; }
.allocation-category small { display: block; color: var(--muted); font-size: .77rem; line-height: 1.4; margin-top: .3rem; }
.allocation-bar { height: 4px; background: #e7eeea; margin-top: .6rem; border-radius: 4px; overflow: hidden; }
[data-allocation-fill] { background: var(--category); width: 0; height: 100%; }
.allocation-controls { display: grid; grid-template-columns: 44px 64px 44px; gap: .35rem; align-items: center; }
.allocation-input { font-variant-numeric: tabular-nums; text-align: center; padding: .5rem .2rem; width: 64px; -moz-appearance: textfield; }
.allocation-input::-webkit-inner-spin-button, .allocation-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.step-button { min-height: 44px; padding: .3rem; border: 1px solid #a8bdb2; border-radius: 8px; background: white; color: var(--brand-dark); font-weight: 650; cursor: pointer; }
.step-button:hover:enabled { background: #eaf3ed; }
.allocation-distribution { height: 9px; display: flex; background: #edf1ed; }
.allocation-distribution > span { width: 0; background: #176858; }
.dk-allocation { display: flex; align-items: center; gap: .6rem; padding: .75rem; margin: .75rem 0; border-radius: 8px; border: 1px solid var(--line); font-size: .9rem; cursor: pointer; }
.dk-allocation input { width: 20px; height: 20px; flex-shrink: 0; }
.allocation-disabled .vertical-layout { opacity: .45; }
/* The domain colors stay fixed when the participant's display order changes. */
[data-domain="climate"] { --category: #366eb0; }
[data-domain="biodiversity"] { --category: #34805c; }
[data-domain="pollution"] { --category: #89639c; }
[data-domain="resources"] { --category: #a2692d; }
.allocation-exercise { margin: .8rem 0; border: 1px solid var(--line); border-radius: 10px; }
.allocation-exercise > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: 1rem; cursor: pointer; font-weight: 650; }
.allocation-exercise > summary::after { content: '+'; color: var(--brand); }
.allocation-exercise[open] > summary::after { content: '−'; }
.allocation-exercise[data-locked="1"] > summary { color: var(--muted); cursor: default; }
.exercise-summary { font-weight: 400; color: var(--muted); font-size: .82rem; margin-left: auto; }
.exercise-body { border-top: 1px solid var(--line); padding: 1rem; }
.exercise-body > p { font-size: .88rem; color: var(--muted); }
.vertical-layout { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 1rem; padding: 1rem; align-items: stretch; }
.stacked-bar { position: relative; height: 460px; display: flex; flex-direction: column; border: 1px solid #a3b5a9; border-radius: 9px; background: #f0f3ef; }
.stacked-segment { height: 0; flex-shrink: 0; background: var(--category); color: white; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .78rem; line-height: 1.3; }
.stacked-segment > span { padding: .3rem; }
.stacked-segment strong { display: block; font-size: 1.1rem; }
.stacked-segment.segment-small > span { visibility: hidden; }
.stacked-unassigned { min-height: 0; display: grid; place-items: center; overflow: hidden; color: #526660; text-align: center; font-size: .8rem; padding: 0 .25rem; }
.stack-boundary { position: absolute; left: -8px; right: -8px; height: 26px; margin-top: -13px; display: grid; place-items: center; cursor: ns-resize; touch-action: none; z-index: 2; }
.stack-boundary::before { content: ''; position: absolute; top: 12px; height: 2px; width: 100%; background: white; box-shadow: 0 0 1px #173a29; }
.stack-boundary > span { z-index: 1; display: grid; place-items: center; width: 38px; height: 25px; border-radius: 8px; background: white; color: var(--ink); border: 1px solid #698575; box-shadow: 0 2px 3px #0002; }
.stacked-values .allocation-row { padding: .65rem 0; gap: .65rem; min-height: 110px; }
.stacked-values .allocation-category label { color: var(--category); font-weight: 650; }
/* Explicitly unanswered percentage slider; the thumb appears after interaction. */
.percentage-control { padding-top: .5rem; }
.percentage-track { position: relative; margin: 3.25rem 1rem 0; }
.percentage-track output { position: absolute; top: -2.6rem; transform: translateX(-50%); padding: .35rem .65rem; border-radius: 6px; background: #e8eeea; color: var(--ink); font-size: .85rem; font-weight: 650; white-space: nowrap; }
.percentage-control.answered output { background: var(--brand); color: white; }
.percentage-track input { display: block; width: 100%; height: 44px; margin: 0; background: transparent; appearance: none; cursor: pointer; }
.percentage-track input::-webkit-slider-runnable-track { height: 8px; border-radius: 8px; background: linear-gradient(to right, var(--brand) var(--percentage, 0%), #dce7df var(--percentage, 0%)); }
.percentage-track input::-moz-range-track { height: 8px; background: #dce7df; border-radius: 8px; }
.percentage-track input::-webkit-slider-thumb { appearance: none; width: 24px; height: 24px; border: 3px solid white; border-radius: 50%; background: var(--brand); margin-top: -8px; box-shadow: 0 0 0 1px #176858; opacity: 0; }
.percentage-track input::-moz-range-thumb { width: 22px; height: 22px; border: 2px solid white; border-radius: 50%; background: var(--brand); opacity: 0; }
.answered input::-webkit-slider-thumb { opacity: 1; }
.answered input::-moz-range-thumb { opacity: 1; }
.anchors { display: flex; justify-content: space-between; gap: 1.5rem; color: var(--muted); font-size: .82rem; margin: 1rem 0; }
.anchors > span { max-width: 48%; }
.anchors > span:last-child { text-align: right; }
/* Numeric matrices keep their labels and generous touch targets on small screens. */
.rating-matrix { margin: 1rem 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.matrix-heading, .matrix-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 1rem; align-items: center; padding: 1rem; border-bottom: 1px solid var(--line); }
.matrix-row:last-child { border-bottom: 0; }
.matrix-heading { font-size: .8rem; background: #f2f6f2; color: var(--muted); }
.matrix-heading > div { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); text-align: center; gap: .2rem; }
.matrix-row h3 { font-size: .92rem; font-weight: 500; margin: 0; }
.rating-grid { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: .3rem; margin: .75rem 0; }
.matrix-row .rating-grid { margin: 0; gap: .2rem; }
.rating-option { display: block; min-width: 0; position: relative; }
.rating-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating-option > span { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .4rem; min-height: 44px; background: white; border: 1px solid #9fb1a6; border-radius: 7px; font-size: .92rem; font-weight: 550; text-align: center; cursor: pointer; }
.rating-option input:checked + span { background: var(--brand); border-color: var(--brand); color: white; box-shadow: inset 0 0 0 1px white; }
.rating-option input:focus-visible + span { outline: 3px solid #306bce; outline-offset: 2px; }
.rating-option:hover > span { border-color: var(--brand); }
.rating-dk { grid-column: 1 / -1; }
.rating-dk > span { font-size: .82rem; font-weight: 400; padding: .45rem .6rem; }
.policy-card, .question-card, .choice-card { border: 1px solid var(--line); border-radius: 10px; padding: 1rem; margin: 1rem 0; background: white; min-width: 0; }
.policy-card h3 { font-weight: 550; }
.policy-card-top { margin-bottom: .6rem; }
.policy-index { margin-bottom: .6rem; }
.policy-followup > h2 { padding: 1rem 1.25rem; border-left: 3px solid var(--brand); background: #f3f7f2; border-radius: 4px; font-weight: 600; }
.dimension-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.dimension-panel { padding: 1rem; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.dimension-panel h3 { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.dimension-panel p { font-size: .94rem; }
.likert-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .35rem; }
.likert-options .rating-option > span { height: 100%; min-height: 88px; padding: .45rem .2rem; }
.likert-options strong { font-size: 1.1rem; }
.likert-options small { width: 100%; font-size: .74rem; line-height: 1.35; font-weight: 400; overflow-wrap: anywhere; hyphens: auto; }
.likert-options .rating-dk { margin-top: .2rem; }
.likert-options .rating-dk > span { min-height: 42px; }
.policy-pager { margin: 1rem 0; }
.selection-counter { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: #f2f7f2; margin: 1rem 0; }
.policy-list { display: grid; gap: .65rem; }
.select-policy-card { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.select-policy-card input, .ideal-select-line input { width: 20px; height: 20px; flex-shrink: 0; margin-top: .3rem; }
.select-policy-card:has(input:checked) { border-color: var(--brand); background: #f1f8f2; }
.select-policy-content { display: grid; gap: .5rem; }
.policy-text { line-height: 1.5; }
.selected-recap { padding: 1rem 1rem 1rem 2.5rem; border-radius: 8px; background: #f5f8f3; }
.selected-recap li { padding: .4rem .25rem; font-size: .9rem; }
.choice-card legend { padding: 0 .3rem; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.choice-option { display: flex; align-items: flex-start; gap: .65rem; padding: .55rem; cursor: pointer; border-radius: 6px; }
.choice-option:has(input:checked) { background: #eaf4ed; }
.choice-option input { margin-top: .3rem; }
.choice-option.disabled { color: #65766c; opacity: .6; }
.belief-comparison-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.belief-panel { min-width: 0; }
.belief-reference { padding: .6rem .8rem; background: #f4f7f3; margin: .8rem 0 1.25rem; border-radius: 6px; display: flex; justify-content: space-between; gap: .75rem; font-size: .85rem; }
.builder-steps { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1rem 0; font-size: .88rem; }
.builder-steps strong { margin-right: .3rem; }
.builder-steps em { font-style: normal; }
.ideal-package-grid { display: grid; }
.ideal-package-card { display: grid; grid-template-columns: minmax(0, 1fr) 150px; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
.ideal-package-card.selected { background: #f4f9f3; }
.ideal-select-line { display: flex; gap: .8rem; cursor: pointer; }
.ideal-select-line > span { display: grid; gap: .35rem; }
.ideal-weight-row { font-size: .85rem; display: grid; gap: .4rem; }
.weight-hint { font-size: .78rem; color: var(--muted); }
.ideal-selected-badge { display: none; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table td, .admin-table th { padding: .6rem; text-align: left; border-bottom: 1px solid var(--line); }
.doc-pre { white-space: pre-wrap; }
@media (max-width: 1000px) {
  .matrix-row, .matrix-heading { grid-template-columns: 1fr; }
  .matrix-heading { display: none; }
  .dimension-grid { grid-template-columns: 1fr; }
  .likert-options .rating-option > span { min-height: 76px; }
}
@media (max-width: 700px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .2rem; padding: .8rem 1rem; }
  .home-grid, .stats-grid, .choice-grid, .belief-comparison-grid { grid-template-columns: 1fr; }
  .allocation-row { grid-template-columns: 1fr; gap: .65rem; }
  .allocation-controls { justify-content: end; }
  .vertical-layout { grid-template-columns: 64px minmax(0, 1fr); gap: .75rem; padding: .75rem; }
  .stacked-bar { height: 640px; }
  .stacked-segment > span { display: block; }
  .stacked-segment .segment-label { display: none; }
  .stacked-unassigned { font-size: .68rem; }
  .stacked-values .allocation-row { min-height: 156px; }
  .stacked-values .allocation-controls { grid-template-columns: 40px 56px 40px; gap: .2rem; }
  .stacked-values .allocation-input { width: 56px; }
  .stacked-values .allocation-category small { font-size: .72rem; }
  .exercise-body { padding: .6rem; }
  .exercise-summary { font-size: .75rem; }
  .rating-grid, .matrix-row .rating-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .35rem; }
  .likert-options { gap: .25rem; }
  .likert-options small { font-size: .72rem; }
  .likert-options .rating-option > span { min-height: 100px; }
  .likert-options .rating-dk > span { min-height: 44px; }
  .dimension-panel { padding: .7rem; }
  .anchors { gap: 1rem; font-size: .78rem; }
  .form-nav > .button { flex: 1; }
  .ideal-package-card { grid-template-columns: 1fr; }
  .policy-pager { flex-direction: column; align-items: stretch; }
  .policy-pager .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

/* Second UX pass: shared colors, visible distribution, and a single survey action. */
:root {
  --allocation-1: #356ba6;
  --allocation-2: #9e6b17;
  --allocation-3: #80599c;
  --allocation-4: #217c76;
  --allocation-5: #aa5264;
  --allocation-6: #87ceeb;
  background: #f5f6f2;
}
.survey-card { box-shadow: 0 8px 30px #1d302d08; }
h1 { font-weight: 700; }
.help { line-height: 1.55; }
.button, .step-button, .rating-option > span { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
.rating-option > span { transition: none; }
.button:disabled { opacity: 1; background: #e2e9e3; border-color: #d4ded5; color: #53675b; }
.button.primary { padding-inline: 1.6rem; }
.form-nav { padding-top: 1.2rem; border-top: 1px solid var(--line); }
.intro-steps { list-style: none; padding: 0; margin: 1.75rem 0; counter-reset: intro; display: grid; gap: 1.2rem; }
.intro-steps li { counter-increment: intro; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .15rem 1rem; }
.intro-steps li::before { content: counter(intro); grid-row: 1 / 3; width: 30px; height: 30px; border-radius: 50%; background: #e8f0ea; display: grid; place-items: center; color: var(--brand-dark); font-size: .85rem; font-weight: 700; }
.intro-steps h2 { font-size: 1rem; margin: .1rem 0 .2rem; }
.intro-steps p { font-size: .92rem; color: var(--muted); margin: 0; }
.intro-footer { padding-top: 1rem; border-top: 1px solid var(--line); font-size: .92rem; }
.intro-context { padding: clamp(1rem, 2.5vw, 1.5rem); margin-bottom: 2rem; border: 1px solid var(--line); border-radius: 12px; background: #f4f7f4; }
.intro-context h2 { margin-bottom: 1.1rem; }
.intro-context-body { margin-bottom: 0; color: var(--muted); font-size: .95rem; line-height: 1.65; }
.intro-domain-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem 1.75rem; margin: 0; }
.intro-domain dt { margin-bottom: .35rem; font-size: .95rem; font-weight: 700; }
.intro-domain dd { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.intro-context-note { margin: 1.25rem 0 0; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; line-height: 1.6; }
.intro-instructions > h2 { color: var(--brand-dark); margin-bottom: 1rem; }
.intro-instructions .intro-question { font-size: 1.06rem; font-weight: 600; line-height: 1.6; }
.intro-instructions .intro-steps { margin: 1.4rem 0; }
.intro-instructions .intro-steps h3 { font-size: 1rem; margin: .1rem 0 .2rem; }
.intro-scale { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; padding: 1.15rem 1.25rem; margin: 1.25rem 0 .75rem; border: 1px solid var(--line); border-radius: 10px; background: #f4f7f4; }
.intro-scale > div:last-child { text-align: right; }
.intro-scale dt { color: var(--brand-dark); font-size: 2rem; line-height: 1.2; font-weight: 750; }
.intro-scale dd { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; line-height: 1.4; }
.intro-answer-note { margin: 0; font-size: .9rem; font-weight: 600; }
.intro-answer-note + .intro-footer { margin-top: 1.25rem; }
.intro-policies { margin: 1.5rem 0 2rem; }
.intro-policy-list { display: grid; gap: .75rem; list-style: none; padding: 0; margin: 0; }
.intro-policy-card { display: grid; grid-template-columns: 2rem minmax(0, 1fr); align-items: start; gap: .85rem; padding: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #fafcf9; }
.intro-policy-number { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #e8f0ea; color: var(--brand-dark); font-size: .85rem; font-weight: 700; }
.intro-policy-card p { margin: .35rem 0 0; font-size: .96rem; line-height: 1.6; }
@media (max-width: 640px) {
  .intro-domain-grid { grid-template-columns: 1fr; gap: 1rem; }
  .intro-context { margin-bottom: 1.5rem; }
}
.spontaneous-fields { display: grid; gap: 1.1rem; margin-top: 1.75rem; }
.spontaneous-fields .text-label { margin: 0; gap: .55rem; }
.spontaneous-fields .text-label > span { font-size: .85rem; color: var(--muted); font-weight: 500; }
.spontaneous-fields input { min-height: 54px; background: #fafcf9; border-color: #bfd0c3; }
.spontaneous-fields input:focus { background: white; border-color: var(--brand); }
/* Colors are attached to the category, and used by the overview and its row. */
.classic-allocation { border: 0; overflow: visible; }
.allocation-overview { background: #f3f6f2; padding: 1.1rem; border-radius: 12px; margin-bottom: .8rem; }
.allocation-overview .allocation-meter { padding: 0 0 .8rem; background: transparent; font-size: .9rem; }
.allocation-distribution { height: 32px; border-radius: 7px; overflow: hidden; background: #e2e9e3; }
.allocation-distribution > span { flex: 0 0 auto; background: var(--category); display: grid; place-items: center; min-width: 0;  }
.allocation-distribution > span b { font-size: .77rem; font-weight: 650; color: white; }
.allocation-distribution > [data-distribution-segment="5"] b { color: var(--ink); }
.allocation-distribution .distribution-remaining { background: #e2e9e3; }
.allocation-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.5rem; margin-top: 1rem; }
.allocation-legend-item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: .5rem; font-size: .78rem; line-height: 1.4; }
.category-dot { display: block; height: 10px; width: 10px; border-radius: 3px; background: var(--category); }
.allocation-legend-item a { color: var(--ink); text-decoration: none; }
.allocation-legend-item a:hover { text-decoration: underline; }
.allocation-legend-item output { font-variant-numeric: tabular-nums; font-weight: 650; }
.classic-allocation .allocation-row { padding: 1.1rem .1rem; }
.classic-allocation .allocation-category label { position: relative; padding-left: 1.2rem; }
.classic-allocation .allocation-category label::before { content: ''; position: absolute; top: .45rem; left: 0; width: 9px; height: 9px; border-radius: 3px; background: var(--category); }
.classic-allocation .allocation-bar { margin-left: 1.2rem; height: 5px; }
/* A short live overview remains beside the editable domain values on small screens. */
.vertical-allocation { overflow: visible; margin: .8rem 0; border: 0; }
.vertical-allocation .allocation-meter { position: sticky; top: 0; z-index: 4; border-radius: 8px; padding: .75rem .8rem; }
.vertical-layout { grid-template-columns: 132px minmax(0, 1fr); gap: 1.5rem; padding: 1rem .5rem; align-items: start; }
.stacked-bar { position: sticky; top: 65px; height: 400px; }
.stacked-values .allocation-row { min-height: 100px; padding: .75rem 0; grid-template-columns: minmax(0, 1fr) auto; }
.stacked-values .allocation-category { display: grid; grid-template-columns: minmax(0, 1fr) 24px; align-items: start; gap: .4rem; }
.stacked-values .allocation-category label { flex: 1 1 auto; font-size: .94rem; color: var(--ink); }
.stacked-values .allocation-category label::before { content: ''; display: inline-block; width: 9px; height: 9px; background: var(--category); border-radius: 3px; margin-right: .4rem; }
.stacked-values .allocation-bar { grid-column: 1 / -1; width: 100%; margin-top: .1rem; }
.domain-definition { position: relative; font-weight: 400; }
.domain-definition summary { font-size: .73rem; line-height: 1; width: 24px; height: 24px; border: 1px solid #9fb1a6; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--muted); }
.domain-definition[open] { grid-column: 1 / -1; }
.domain-definition p { margin: .5rem 0 0; font-size: .8rem; color: var(--muted); }
.allocation-exercise { border-radius: 10px; }
.allocation-exercise[open] { border-color: #a5bfb0; }
.allocation-exercise > summary { padding: .9rem 1rem; }
.exercise-summary { display: flex; align-items: center; gap: .65rem; margin-left: auto; }
.summary-distribution { display: flex; width: 76px; height: 12px; background: #e2e9e3; border-radius: 3px; overflow: hidden; }
.summary-distribution i { height: 100%; background: var(--category); }
.exercise-body > .help { font-size: .8rem; margin-bottom: .75rem; }
.exercise-body > p:first-child { margin-bottom: .6rem; }
/* Light numeric matrices; their headers contain only the scale positions. */
.rating-matrix { border: 0; border-radius: 0; }
.matrix-heading { background: transparent; padding: .4rem 0 .6rem; font-size: .76rem; }
.matrix-row { padding: 1.2rem 0; gap: 1.25rem; }
.matrix-row h3 { line-height: 1.55; }
.matrix-row .rating-grid { gap: 0; }
.matrix-row .rating-option > span { border-radius: 0; border-right-width: 0; }
.matrix-row .rating-option:first-child > span { border-radius: 7px 0 0 7px; }
.matrix-row .rating-option:nth-child(11) > span { border-right-width: 1px; border-radius: 0 7px 7px 0; }
.matrix-row .rating-dk > span { border: 1px solid #9fb1a6; border-radius: 7px; margin-top: .5rem; }
.series-progress { color: var(--muted); font-size: .85rem; margin: .75rem 0; }
/* One policy, four readable question rows, one Continue action. */
.policy-followup > h2 { padding: 1.1rem 1.25rem; margin-bottom: 1rem; background: #f0f5ee; font-size: 1.14rem; line-height: 1.55; }
.policy-progress { display: flex; justify-content: space-between; align-items: center; margin: 1.3rem 0 .75rem; font-size: .82rem; color: var(--muted); }
.policy-progress-dots { display: flex; gap: 5px; }
.policy-progress-dots i { height: 5px; width: 22px; border-radius: 4px; background: #dce6df; }
.policy-progress-dots i.current { background: var(--brand); }
.policy-sequence { scroll-margin-top: 1rem; }
.assessment-list { display: grid; }
.assessment-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); align-items: start; gap: 1.8rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
.assessment-row:last-child { border-bottom: 0; padding-bottom: .5rem; }
.assessment-question h3 { color: var(--muted); font-size: .82rem; font-weight: 550; margin: 0 0 .45rem; }
.assessment-question p { font-size: .95rem; line-height: 1.55; margin: 0; }
.assessment-response { min-width: 0; }
.assessment-response .likert-options { gap: 0; }
.assessment-response .likert-options .rating-option > span { min-height: 104px; padding: .6rem .4rem; border-radius: 0; border-right: 0; height: 100%; }
.assessment-response .likert-options .rating-option:first-child > span { border-radius: 8px 0 0 8px; }
.assessment-response .likert-options .rating-option:nth-child(5) > span { border-right: 1px solid #9fb1a6; border-radius: 0 8px 8px 0; }
.assessment-response .likert-options .rating-option small { font-size: .77rem; hyphens: auto; overflow-wrap: normal; }
.assessment-response .likert-options .rating-dk { justify-self: start; margin-top: .65rem; }
.assessment-response .likert-options .rating-dk > span { min-height: 40px; padding: .5rem .8rem; font-size: .8rem; border: 1px solid #a7b9ac; border-radius: 7px; }
.scale-key { display: none; }
.policy-followup:not([hidden]) { animation: reveal-policy .16s ease-out; }
@keyframes reveal-policy { from { opacity: .55; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.survey-card:has(.policy-sequence) .form-nav { padding: 1rem 0 .5rem; margin-top: 1rem; }
.selection-counter { position: sticky; top: .5rem; z-index: 5; box-shadow: 0 3px 12px #173a2908; }
.policy-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.select-policy-card { gap: .7rem; padding: 1rem; }
.select-policy-card input { margin-top: .25rem; }
.belief-comparison-card { border: 0; border-top: 1px solid var(--line); border-radius: 0; margin: 0; padding: 1.4rem 0; }
.choice-grid-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: .8rem 0 1.5rem; margin: 1.25rem 0; }
.choice-grid-card legend { padding: 0; font-size: 1.02rem; }
.choice-option { border: 1px solid transparent; }
.choice-option:has(input:checked) { border-color: #bbd0c1; }
.survey-v6 [data-page-type="choice_questions"] .choice-grid-card { padding: .35rem 0 .7rem; margin: .6rem 0; }
.survey-v6 [data-page-type="choice_questions"] .choice-grid-card legend { margin-bottom: .25rem; }
.survey-v6 [data-page-type="choice_questions"] .choice-grid { row-gap: .1rem; column-gap: 1rem; }
.survey-v6 [data-page-type="choice_questions"] .choice-option { align-items: center; gap: .45rem; min-height: 32px; padding: .2rem .4rem; line-height: 1.35; }
.survey-v6 [data-page-type="choice_questions"] .choice-option input { flex-shrink: 0; margin: 0; }
.survey-v6 [data-page-type="choice_questions"] .conditional-field { padding-top: .35rem; }
@media (max-width: 700px) {
  .survey-v6 [data-page-type="choice_questions"] .choice-option { min-height: 44px; }
}
.conditional-field { padding: .6rem .65rem 0; max-width: 30rem; animation: reveal-policy .15s ease-out; }
.conditional-field .text-label { margin: .4rem 0 0; font-size: .9rem; }
@media (max-width: 1000px) {
  .assessment-row { grid-template-columns: 1fr; gap: .85rem; padding: 1.25rem 0; }
  .assessment-response .likert-options .rating-option > span { min-height: 84px; }
  .assessment-response .likert-options .rating-dk > span { min-height: 40px; }
  .matrix-row { gap: .75rem; }
}
@media (max-width: 700px) {
  .survey-card { border-radius: 12px; }
  .allocation-overview { padding: .9rem; }
  .allocation-legend { grid-template-columns: 1fr; gap: .6rem; }
  .allocation-distribution { height: 30px; }
  .classic-allocation .allocation-row { gap: .8rem; }
  .vertical-layout { grid-template-columns: 58px minmax(0, 1fr); gap: .8rem; padding: .75rem .2rem; }
  .stacked-bar { height: 360px; top: 70px; }
  .stacked-values .allocation-row { min-height: 90px; grid-template-columns: 1fr; gap: .4rem; padding: .65rem 0; }
  .stacked-values .allocation-category { gap: .25rem; }
  .stacked-values .allocation-category label { font-size: .85rem; }
  .stacked-values .allocation-bar { margin-top: .15rem; }
  .stacked-values .allocation-controls { grid-template-columns: 40px 54px 40px; gap: .3rem; justify-content: start; }
  .stacked-values .allocation-input { width: 54px; }
  .exercise-body { padding: .75rem; }
  .allocation-exercise > summary { padding: .8rem; }
  .exercise-summary { font-size: .76rem; gap: .4rem; }
  .summary-distribution { width: 58px; }
  .domain-definition summary { width: 24px; height: 24px; }
  .matrix-row .rating-grid { gap: .35rem; }
  .matrix-row .rating-option > span, .matrix-row .rating-option:first-child > span, .matrix-row .rating-option:nth-child(11) > span { border: 1px solid #9fb1a6; border-radius: 7px; }
  .policy-followup > h2 { font-size: 1.03rem; padding: .85rem 1rem; }
  .assessment-question p { font-size: .93rem; }
  .assessment-response .likert-options .rating-option > span { min-height: 46px; height: 46px; }
  .assessment-response .likert-options .rating-option small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .assessment-response .likert-options .rating-dk > span { min-height: 44px; height: 44px; }
  .scale-key { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); list-style: none; padding: 0; margin: .75rem 0 0; gap: .45rem .75rem; color: var(--muted); font-size: .79rem; line-height: 1.4; }
  .scale-key li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: .3rem; }
  .scale-key b { font-weight: 650; color: var(--ink); }
  .policy-list { grid-template-columns: 1fr; }
  .policy-progress { margin-top: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Final pass: actual shared table columns, stable row order, and one prediction at a time. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.policy-domain-label { display: inline-flex; align-items: baseline; gap: .4rem; color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.4; }
.policy-domain-label i { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--category); }
.select-policy-content .policy-domain-label { margin-bottom: .15rem; }
.evaluated-policy-intro { padding: .4rem 0 1.25rem; border-bottom: 1px solid var(--line); }
.evaluated-policy-intro h2 { font-size: 1.12rem; font-weight: 650; line-height: 1.55; margin: .45rem 0 0; }
.evaluated-policy-intro .policy-domain-label { font-size: .8rem; }
.rating-matrix-table, .assessment-table { width: 100%; table-layout: fixed; border-spacing: 0; border-collapse: separate; }
.rating-matrix-table .matrix-question-column { width: 38%; }
.rating-matrix-table.has-dk .matrix-question-column { width: 33%; }
.rating-matrix-table .matrix-dk-column { width: 13%; }
.rating-matrix-table thead th, .assessment-table thead th { padding: .45rem 2px .7rem; color: var(--muted); font-size: .79rem; text-align: center; font-weight: 500; border-bottom: 1px solid var(--line); }
.rating-matrix-table tbody th, .rating-matrix-table tbody td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.rating-matrix-table tbody th { text-align: left; font-weight: 400; padding: 1.2rem 1.25rem 1.2rem 0; }
.rating-matrix-table tbody td { padding: 1.1rem 2px; text-align: center; }
.matrix-question-text { display: block; font-size: .93rem; line-height: 1.5; }
.matrix-theme { display: block; color: var(--muted); font-size: .77rem; margin: 0 0 .35rem; }
.rating-matrix-table .policy-domain-label { margin-bottom: .4rem; }
.matrix-choice { width: 100%; }
.matrix-choice > span { min-height: 46px; padding: .25rem; font-variant-numeric: tabular-nums; text-align: center; }
.matrix-data-row .matrix-choice > span { border-radius: 6px; }
.matrix-dk > span { font-size: .78rem; line-height: 1.35; }
.assessment-table .assessment-question-column { width: 37%; }
.assessment-table .assessment-dk-column { width: 13%; }
.assessment-table tbody th, .assessment-table tbody td { border-bottom: 1px solid var(--line); vertical-align: middle; }
.assessment-table tbody th { padding: 1.25rem 1.3rem 1.25rem 0; text-align: left; font-weight: 400; }
.assessment-table tbody td { padding: 1.1rem 2px; text-align: center; }
.assessment-table .dimension-name { display: block; font-size: .8rem; font-weight: 550; color: var(--muted); margin: 0 0 .45rem; }
.assessment-prompt { display: block; font-size: .94rem; line-height: 1.55; }
.assessment-choice > span { display: grid; grid-template-rows: 24px 1fr; align-items: center; gap: .35rem; height: 110px; padding: .65rem .25rem; }
.assessment-choice strong { font-size: 1rem; align-self: center; }
.assessment-choice small { display: block; align-self: center; font-size: .75rem; font-weight: 400; line-height: 1.4; hyphens: auto; overflow-wrap: anywhere; }
.assessment-table .assessment-other-cell { padding-left: .65rem; }
.mobile-scale-key { display: none; }
.assessment-other-cell .matrix-dk > span { min-height: 46px; font-weight: 400; }
/* A source percentage is entered independently; the second source never inherits its value. */
.share-sequence { scroll-margin-top: 1rem; }
.share-policy .policy-progress { margin-bottom: .6rem; }
.share-policy .share-policy-summary { padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: #f4f7f4; }
.share-policy .share-policy-summary .policy-progress { margin: 0 0 .4rem; font-size: .78rem; }
.share-policy .share-policy-summary h2 { margin: 0; font-size: .95rem; line-height: 1.55; font-weight: 500; }
.share-policy .share-audience { padding-top: 1.1rem; }
.share-policy .share-range-track { padding-top: 0; }
.share-policy .share-range-track output { display: none; }
.share-audience { border: 0; padding: 1.5rem 0 .75rem; margin: 0; min-width: 0; }
.share-audience legend { float: left; width: 100%; font-size: 1rem; font-weight: 650; color: var(--brand-dark); margin: 0 0 .55rem; }
.share-question { clear: both; font-size: 1.1rem; line-height: 1.55; margin: 0 0 .55rem; }
.share-definition { font-size: .82rem; color: var(--muted); margin: 0; }
.share-controls { display: grid; grid-template-columns: minmax(0,1fr) 118px; align-items: end; gap: 2rem; margin: 1rem 0 .8rem; }
.share-range-track { position: relative; padding-top: 2.7rem; }
.share-range-track output { position: absolute; top: .2rem; left: 50%; transform: translateX(-50%); font-size: .86rem; font-weight: 600; padding: .4rem .65rem; color: var(--muted); white-space: nowrap; background: #eef2ed; border-radius: 6px; }
.share-audience.answered .share-range-track output { background: var(--brand); color: white; }
.share-range-track input { appearance: none; display: block; height: 44px; width: 100%; margin: 0; background: transparent; cursor: pointer; }
.share-range-track input::-webkit-slider-runnable-track { height: 12px; background: linear-gradient(to right, var(--brand) var(--share-percentage,0%), #dce6dd var(--share-percentage,0%)); border-radius: 9px; }
.share-range-track input::-moz-range-track { height: 12px; background: #dce6dd; border-radius: 9px; }
.share-range-track input::-moz-range-progress { height: 12px; background: var(--brand); border-radius: 9px; }
.share-range-track input::-webkit-slider-thumb { appearance: none; width: 26px; height: 26px; border: 3px solid white; border-radius: 50%; margin-top: -7px; background: var(--brand); box-shadow: 0 0 0 1px var(--brand); opacity: 0; }
.share-range-track input::-moz-range-thumb { width: 23px; height: 23px; border: 3px solid white; border-radius: 50%; background: var(--brand); opacity: 0; }
.share-audience.answered input::-webkit-slider-thumb { opacity: 1; }
.share-audience.answered input::-moz-range-thumb { opacity: 1; }
.share-anchors { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.share-number-label { display: grid; gap: .45rem; margin-bottom: 1.4rem; }
.share-number-label > span:first-child { font-size: .76rem; color: var(--muted); }
.share-number-wrap { display: flex; align-items: center; border: 1px solid #8ca59a; border-radius: 8px; background: white; color: var(--muted); }
.share-number-wrap:focus-within { outline: 3px solid #306bce; outline-offset: 2px; }
.share-number-wrap input { width: 100%; min-width: 0; min-height: 46px; padding: .55rem .2rem .55rem .6rem; border: 0; background: transparent; font-variant-numeric: tabular-nums; font-size: 1.15rem; color: var(--ink); text-align: center; border-radius: 8px; }
.share-number-wrap input:focus-visible { outline: none; }
.share-number-wrap > span { padding-right: .65rem; }
.share-dk { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; border: 1px solid #b2c3b7; padding: .55rem .8rem; border-radius: 7px; cursor: pointer; font-size: .88rem; }
.share-dk input { width: 18px; height: 18px; margin: 0; }
.share-dk:has(input:checked) { background: #edf3ee; border-color: var(--brand); }
.share-audience.is-dk .share-controls { opacity: .5; }
.share-recap { padding: 1.35rem 0 .5rem; }
.share-recap h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.share-recap-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: .45rem .9rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.share-recap-row > span { font-size: .92rem; }
.share-recap-row strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.share-recap-bar { grid-column: 1 / 3; height: 9px; background: #e2e9e3; border-radius: 6px; overflow: hidden; }
.share-recap-bar i { display: block; height: 100%; width: 0; background: var(--brand); }
.text-button { border: 0; min-height: 44px; padding: .4rem .2rem; color: var(--brand-dark); background: transparent; text-decoration: underline; text-underline-offset: 3px; font-size: .84rem; cursor: pointer; }
.share-recap-row .text-button { grid-column: 3; grid-row: 1 / 3; }
.share-audience:not([hidden]), .share-recap:not([hidden]) { animation: reveal-policy .12s ease-out; }
@media (max-width: 1000px) {
  .rating-matrix-table, .assessment-table { display: block; }
  .rating-matrix-table colgroup, .rating-matrix-table thead, .assessment-table colgroup, .assessment-table thead { display: none; }
  .rating-matrix-table tbody, .assessment-table tbody { display: block; }
  .rating-matrix-table .matrix-data-row { display: grid; grid-template-columns: repeat(11,minmax(0,1fr)); gap: .35rem; border-bottom: 1px solid var(--line); padding: 1.15rem 0; }
  .rating-matrix-table tbody th { display: block; grid-column: 1 / -1; border: 0; padding: 0 0 .45rem; }
  .rating-matrix-table tbody td { display: block; border: 0; padding: 0; }
  .rating-matrix-table .matrix-other-cell { grid-column: 1 / -1; }
  .assessment-table .assessment-table-row { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .35rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
  .assessment-table tbody th { display: block; grid-column: 1 / -1; border: 0; padding: 0 0 .65rem; }
  .assessment-table tbody td { display: block; border: 0; padding: 0; }
  .assessment-table tbody .assessment-other-cell { grid-column: 1 / -1; text-align: left; padding: 0; }
  .assessment-choice > span { height: 52px; min-height: 52px; display: flex; justify-content: center; }
  .assessment-choice small { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mobile-scale-key { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem 1rem; list-style: none; margin: .55rem 0 .75rem; padding: 0; color: var(--muted); font-size: .81rem; line-height: 1.4; }
  .mobile-scale-key li { display: grid; grid-template-columns: 14px minmax(0,1fr); gap: .3rem; }
  .mobile-scale-key b { color: var(--ink); font-weight: 650; }
  .assessment-other-cell .matrix-dk { display: inline-block; width: auto; }
  .assessment-other-cell .matrix-dk > span { padding: .5rem 1rem; }
}
@media (max-width: 700px) {
  .rating-matrix-table .matrix-data-row { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .evaluated-policy-intro h2 { font-size: 1.02rem; }
  .share-question { font-size: 1.03rem; }
  .share-controls { grid-template-columns: 1fr; gap: .6rem; }
  .share-number-label { grid-template-columns: 1fr 114px; align-items: center; margin: .25rem 0 .3rem; }
  .share-number-label > span:first-child { font-size: .85rem; }
  .share-number-wrap input { font-size: 1.1rem; }
  .share-range-track { margin-inline: .6rem; }
  .share-recap-row { gap: .4rem .65rem; }
  .share-recap-row > span { font-size: .84rem; }
  .share-recap-row strong { font-size: .95rem; }
}
@media (max-width: 360px) {
  .rating-matrix-table .matrix-data-row { grid-template-columns: repeat(4,minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* v4: four answer columns remain fixed; titles and DK are omitted where the protocol requires it. */
.assessment-table.no-dk .assessment-question-column { width: 43%; }
.assessment-table.no-dk tbody th { padding-block: 1.15rem; }
.assessment-table.no-dk .assessment-choice > span { height: 102px; }
/* One reusable SVG person, repeated exactly 100 times per estimate. */
.people-sprite { position: absolute; overflow: hidden; }
.people-response-layout { display: grid; grid-template-columns: minmax(200px,.8fr) minmax(0,1.25fr); grid-template-areas: "people editor"; align-items: center; gap: 2rem; margin-top: 1.1rem; }
.people-response-editor { grid-area: editor; min-width: 0; }
.people-response-editor .share-controls { grid-template-columns: minmax(0,1fr) 110px; gap: 1rem; margin-top: 0; }
.people-estimate { grid-area: people; margin: 0; padding: 0; justify-self: center; width: min(100%,230px); }
.people-grid { display: block; width: 100%; height: auto; overflow: visible; }
.people-grid [data-person] { fill: none; stroke: #849387; stroke-width: .65px; stroke-linejoin: round; }
.people-estimate[data-state="answered"] [data-person] { fill: #dce4dd; stroke: #7b8b7e; }
.people-estimate[data-state="answered"] [data-person].is-favorable { fill: var(--brand); stroke: var(--brand); }
.people-estimate figcaption { min-height: 2.6rem; padding: .65rem 0 0; color: var(--muted); text-align: center; font-size: .81rem; line-height: 1.45; }
.people-estimate[data-state="answered"] figcaption { color: var(--ink); }
.people-estimate[data-state="unknown"] .people-grid { opacity: .65; }
.people-response-editor .share-dk { margin-top: .3rem; }
@media (max-width: 1000px) {
  .assessment-table.no-dk .assessment-choice > span { height: 52px; }
  .assessment-table.no-dk tbody th { padding: 0 0 .45rem; }
  .assessment-table.no-dk .mobile-scale-key { margin-bottom: .35rem; }
  .people-response-layout { grid-template-columns: minmax(180px,.75fr) minmax(0,1fr); gap: 1.5rem; }
  .people-response-editor .share-controls { grid-template-columns: 1fr; gap: .5rem; }
  .people-response-editor .share-number-label { grid-template-columns: 1fr 110px; align-items: center; margin: .3rem 0 .5rem; }
}
@media (max-width: 700px) {
  .people-response-layout { grid-template-columns: 1fr; grid-template-areas: "editor" "people"; gap: 1.25rem; }
  .people-estimate { width: min(100%,225px); }
  .people-response-editor .share-controls { margin-bottom: .6rem; }
  .people-response-editor .share-number-label { margin-bottom: 0; }
}

/* v6: a shared compact scale and allocation component, without changing archives. */
.home-grid.two-starts { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pilot-notice { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #f7f8f5; }
.survey-v6 { padding: clamp(1rem,2.3vw,1.8rem); }
.survey-v6 h1 { margin-bottom: .9rem; font-size: clamp(1.4rem,2.4vw,1.8rem); }
.survey-v6 .progress-wrap { margin-bottom: 1rem; }
.survey-v6 .lead { line-height: 1.5; }
.survey-v6 .intro-context { margin-block: 1rem; }
.survey-v6 .intro-domain-grid { gap: .75rem; }
.survey-v6 .form-nav { margin-top: 1.2rem; }
.survey-v6 .series-progress { color: var(--muted); font-size: .9rem; margin-bottom: .65rem; }
.consent-information { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.consent-information dl > div { margin-bottom: .8rem; }
.consent-information dt { font-weight: 650; }
.consent-information dd { margin: .25rem 0 0; overflow-wrap: anywhere; }
.consent-choice { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.consent-choice input { flex: 0 0 22px; width: 22px; height: 22px; margin: .15rem 0 0; }
.allocation-examples { font-size: .9rem; line-height: 1.5; padding-left: 1.2rem; }
.allocation-examples li { margin-block: .35rem; }
.survey-v6 .allocation-row { padding: .7rem .9rem; gap: .8rem; }
.survey-v6 .allocation-category label { font-size: .95rem; line-height: 1.4; }
.survey-v6 .allocation-bar { margin-top: .35rem; }
.survey-v6 .allocation-distribution { height: 10px; }
.survey-v6 .allocation-overview { padding: 0; }
.allocation-footer { border-top: 2px solid var(--line); }
.allocation-feedback { color: var(--muted); font-size: .86rem; margin: 0; padding: .6rem .9rem; }
.allocation-feedback:empty { display: none; }
.survey-v6 .exercise-body { padding: .9rem; }
.survey-v6 .allocation-exercise > summary { padding: .8rem .9rem; }
.survey-v6 .allocation-meter { padding: .7rem .9rem; }
.survey-v6 .rating-matrix { overflow: visible; border: 0; }
.survey-v6 .matrix-question-column { width: 42%; }
.survey-v6 .rating-matrix-table tbody th { padding: .6rem .9rem .6rem 0; }
.survey-v6 .rating-matrix-table tbody td { padding: .55rem 2px; }
.survey-v6 .matrix-question-text { font-size: .95rem; line-height: 1.4; }
.matrix-endpoint { display: block; font-size: .78rem; line-height: 1.3; margin-top: .25rem; overflow-wrap: anywhere; }
.mobile-matrix-scale { display: none; }
.survey-v6 .assessment-table.no-dk .assessment-question-column { width: 38%; }
.survey-v6 .assessment-table tbody th { padding: .65rem .85rem .65rem 0; }
.survey-v6 .assessment-table tbody td { padding: .6rem 2px; }
.survey-v6 .assessment-prompt { font-weight: 600; font-size: .94rem; line-height: 1.4; }
.survey-v6 .assessment-table .assessment-choice > span { display: flex; height: auto; min-height: 66px; padding: .5rem .25rem; }
.survey-v6 .assessment-choice small { font-size: .82rem; line-height: 1.4; }
.survey-v6 .assessment-choice .matrix-score { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.survey-v6 .assessment-table thead { display: none; }
.survey-v6 .evaluated-policy-intro { padding: .4rem 0 .8rem; margin-bottom: .6rem; }
.survey-v6 .evaluated-policy-intro h2 { font-size: 1rem; line-height: 1.45; }
.paired-audiences { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-top: .8rem; }
.survey-v6 .paired-audiences .share-audience { border: 1px solid var(--line); border-radius: 10px; padding: .9rem; min-width: 0; }
.survey-v6 .paired-audiences .share-audience legend { font-size: .94rem; line-height: 1.4; }
.survey-v6 .paired-audiences .share-question { font-size: .95rem; line-height: 1.45; }
.survey-v6 .paired-audiences .people-response-layout { grid-template-columns: 135px minmax(0,1fr); gap: .8rem; margin-top: .8rem; }
.survey-v6 .paired-audiences .people-response-editor .share-controls { grid-template-columns: 1fr; gap: .4rem; }
.survey-v6 .paired-audiences .share-number-label { display: grid; grid-template-columns: 1fr 92px; align-items: center; margin: .3rem 0; }
.survey-v6 .paired-audiences .share-number-label > span:first-child { font-size: .82rem; }
.survey-v6 .paired-audiences .share-number-wrap input { font-size: 1rem; min-height: 44px; }
.survey-v6 .paired-audiences .people-estimate { width: 135px; }
.survey-v6 .paired-audiences .people-estimate figcaption { font-size: .78rem; min-height: 2.4rem; }
[data-people-interactive] [data-person] { cursor: pointer; pointer-events: all; }
[data-people-interactive] [data-person]:hover { stroke: var(--brand-dark); stroke-width: 1.4px; }
.global-confidence { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.global-confidence h2 { font-size: 1rem; }
@media (min-width:1101px) {
  .shell:has(.survey-v6.wide) { max-width: 1280px; padding: 1.5rem; }
  .survey-v6.wide { max-width: 1232px; }
  .survey-v6 .rating-matrix-table .matrix-question-column { width: 48%; }
  .survey-v6 .rating-matrix-table thead th { position: relative; height: 80px; vertical-align: top; padding-top: .65rem; }
  .survey-v6 .matrix-endpoint { position: absolute; top: 2.1rem; left: -20px; width: 100px; font-size: .78rem; line-height: 1.35; overflow-wrap: normal; }
  .survey-v6 [data-score-header="10"] .matrix-endpoint { left: auto; right: 0; text-align: right; }
  .survey-v6 .native-matrix .matrix-score { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .survey-v6 .native-matrix .matrix-choice > span::after { content: ''; width: 13px; height: 13px; border: 1px solid currentColor; border-radius: 50%; }
  .survey-v6 .native-matrix .matrix-choice input:checked + span::after { background: white; }
}
@media (max-width:1100px) {
  .survey-v6 .rating-matrix-table { display: block; }
  .survey-v6 .rating-matrix-table colgroup, .survey-v6 .rating-matrix-table thead { display: none; }
  .survey-v6 .rating-matrix-table tbody { display: block; }
  .survey-v6 .rating-matrix-table .matrix-data-row { display: grid; grid-template-columns: repeat(11,minmax(0,1fr)); gap: .35rem; padding: .8rem 0; }
  .survey-v6 .rating-matrix-table tbody th { display: block; grid-column: 1/-1; padding: 0 0 .5rem; border: 0; }
  .survey-v6 .rating-matrix-table tbody td { display: block; border: 0; padding: 0; }
  .survey-v6 .mobile-matrix-scale { display: flex; justify-content: space-between; gap: 1rem; font-size: .84rem; color: var(--muted); padding-bottom: .4rem; }
  .survey-v6 .mobile-matrix-scale > span { max-width: 48%; }
  .survey-v6 .mobile-matrix-scale > span:last-child { text-align: right; }
  .survey-v6 .assessment-choice small { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .survey-v6 .mobile-scale-key { display: none; }
}
@media (max-width:800px) {
  .paired-audiences { grid-template-columns: 1fr; }
  .survey-v6 .paired-audiences .people-response-layout { grid-template-columns: 130px minmax(0,1fr); grid-template-areas: "people editor"; }
  .home-grid.two-starts { grid-template-columns: 1fr; }
}
@media (max-width:700px) {
  .survey-v6 .rating-matrix-table .matrix-data-row { grid-template-columns: repeat(6,minmax(0,1fr)); }
  .survey-v6 .allocation-row { grid-template-columns: 1fr; gap: .55rem; }
  .survey-v6 .allocation-controls { justify-content: end; }
  .survey-v6 .allocation-category label { font-size: .95rem; }
  .survey-v6 .assessment-table .assessment-table-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .survey-v6 .assessment-table .assessment-choice > span { min-height: 48px; padding: .45rem; }
  .survey-v6 .assessment-choice small { font-size: .88rem; overflow-wrap: normal; hyphens: none; }
  .survey-v6 .paired-audiences .share-audience { padding: .8rem; }
  .survey-v6 .paired-audiences .people-response-layout { grid-template-columns: 120px minmax(0,1fr); gap: .65rem; }
  .survey-v6 .paired-audiences .people-estimate { width: 120px; }
  .survey-v6 .paired-audiences .share-number-label { grid-template-columns: 1fr; gap: .3rem; }
  .survey-v6 .paired-audiences .share-dk { font-size: .85rem; padding: .45rem; }
}
@media (max-width:360px) {
  .survey-v6 .paired-audiences .people-response-layout { grid-template-columns: 1fr; grid-template-areas: "editor" "people"; }
}

/* v7: one shared bounded allocation, with numeric and keyboard alternatives. */
.segmented-allocation .allocation-overview { background: transparent; }
.allocation-bar-control { position: relative; padding-bottom: .3rem; }
.allocation-boundary-rail { position: relative; height: 54px; }
.allocation-connectors { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.allocation-connectors line { stroke: #73867c; stroke-width: 1; }
.allocation-boundary { position: absolute; top: 0; left: 0; display: flex; align-items: center; justify-content: center; transform: translateX(-50%); width: 44px; height: 44px; border: 1px solid #7e968b; border-radius: 9px; color: var(--brand-dark); background: white; cursor: ew-resize; touch-action: none; user-select: none; box-shadow: 0 1px 3px #183b2614; z-index: 2; }
.allocation-boundary:hover, .allocation-boundary.is-dragging { border-color: var(--brand); background: #eef5f0; }
.allocation-boundary > span { font-size: 1.3rem; line-height: 1; }
.survey-v6 .segmented-allocation .allocation-distribution { height: 32px; display: flex; overflow: hidden; border-radius: 7px; }
.segmented-allocation .allocation-distribution .distribution-remaining { display: flex; align-items: center; justify-content: center; }
.segmented-allocation [data-remaining-label] { font-size: .75rem; color: #465b50; white-space: nowrap; overflow: hidden; }
.allocation-interaction-help { font-size: .8rem; line-height: 1.45; color: var(--muted); margin: .6rem 0 .85rem; }
.segmented-allocation .allocation-controls { display: grid; grid-template-columns: 44px 44px minmax(52px,72px) 44px 44px; gap: .25rem; max-width: 100%; }
.segmented-allocation .allocation-controls input { width: 100%; min-width: 0; padding-inline: .2rem; }
.segmented-allocation .step-button { width: 44px; min-width: 44px; height: 44px; padding: .25rem; }
.segmented-allocation .step-button:disabled { opacity: .38; cursor: not-allowed; }
.segmented-allocation .allocation-field-error { grid-column: 1/-1; color: var(--error); font-size: .83rem; line-height: 1.5; margin: .15rem 0 0; }
.segmented-allocation.allocation-disabled .allocation-table { opacity: .5; }
.visual-examples { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .8rem; padding: 0; margin: 1rem 0; list-style: none; }
.visual-examples li { padding: .9rem; border: 1px solid var(--line); border-radius: 9px; margin: 0; }
.visual-examples h3 { font-size: .9rem; line-height: 1.4; margin-bottom: .4rem; }
.visual-examples p { font-size: .84rem; line-height: 1.5; margin-bottom: .7rem; }
.allocation-example-bar { display: flex; height: 10px; overflow: hidden; border-radius: 4px; background: #e2e9e3; }
.allocation-example-bar > span { background: var(--category); }
@media (max-width:800px) {
  .visual-examples { grid-template-columns: 1fr; }
  .survey-v6 .segmented-allocation .allocation-row { grid-template-columns: 1fr; padding-inline: .25rem; }
  .segmented-allocation .allocation-controls { justify-content: end; justify-self: end; }
}
.prediction-confidence-label { display: grid; gap: .5rem; border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .8rem; font-size: .86rem; line-height: 1.4; }
.prediction-confidence-label select { width: 100%; max-width: 100%; min-width: 0; min-height: 44px; border: 1px solid #8ca59a; border-radius: 7px; padding: .5rem; background: white; color: var(--ink); font: inherit; }
.prediction-confidence-label select:disabled { opacity: .55; }

/* Compact policy forecasts use the same controls and scale as the questionnaire. */
.prediction-compact .prediction-instructions { margin: 1rem 0 .4rem; font-size: 1rem; line-height: 1.55; }
.prediction-compact .share-policy-summary { border-left: 4px solid var(--brand); background: #edf4f0; padding: 1rem 1.1rem; }
.prediction-compact .share-policy-summary .policy-progress { font-weight: 650; color: var(--brand-dark); }
.prediction-compact .share-policy-summary h2 { font-size: 1.06rem; font-weight: 650; line-height: 1.55; text-align: justify; }
.prediction-compact .share-definition { font-size: .82rem; line-height: 1.5; margin-bottom: 1rem; }
.survey-v6 .prediction-compact .share-audience { padding: 1rem; }
.survey-v6 .prediction-compact .share-audience legend { min-height: 2.8em; margin-bottom: .65rem; font-size: .96rem; line-height: 1.4; }
.prediction-estimate-row { display: flex; clear: both; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: .65rem; }
.prediction-estimate-value { font-size: 2.2rem; line-height: 1.15; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--muted); }
.prediction-compact .answered .prediction-estimate-value { color: var(--brand-dark); }
.survey-v6 .prediction-compact .share-number-label { display: grid; grid-template-columns: 1fr; gap: .3rem; width: 110px; margin: 0; }
.prediction-compact .share-range-track { margin: 0; }
.prediction-compact .policy-confidence { border-top: 1px solid var(--line); padding-top: 1.1rem; margin-top: 1.35rem; }
.prediction-compact .policy-confidence h2 { margin: 0 0 .6rem; font-size: 1.05rem; }
.prediction-confidence-scale { border: 0; padding: 0; margin: 0; min-width: 0; }
.prediction-confidence-scale legend { padding: 0; margin-bottom: .3rem; font-size: .94rem; font-weight: 400; line-height: 1.5; }
.prediction-confidence-scale .rating-grid, .prediction-confidence-scale .anchors { max-width: 800px; }
.prediction-confidence-scale .anchors { margin: .4rem 0 0; font-size: .8rem; }
.prediction-confidence-scale:disabled .rating-option > span { opacity: .5; cursor: default; }
.site-header { display: block; padding-block: .8rem; }
.institution-logos { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; max-width: 900px; margin: 0 auto; padding: .25rem 0 .9rem; }
.institution-logos img { display: block; max-width: 23%; height: 44px; object-fit: contain; }
.survey-header-line { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: .75rem; max-width: 1200px; margin: 0 auto; }
.survey-header-line .brand { font-size: .9rem; font-weight: 600; letter-spacing: 0; }
.survey-card { border-top: 3px solid var(--brand); box-shadow: 0 8px 30px #173a290a; }
.admin-export-title { margin-top: 1.8rem; }
.admin-raw-exports { margin: 1.5rem 0 2rem; }
.admin-raw-exports summary { cursor: pointer; color: var(--brand-dark); font-size: .9rem; }
@media (max-width: 600px) {
  .institution-logos { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .8rem 1.25rem; justify-items: center; padding-bottom: .8rem; }
  .institution-logos img { width: auto; max-width: 100%; height: 34px; }
  .survey-header-line { gap: .75rem; align-items: start; }
  .survey-header-line .brand { max-width: 66%; font-size: .83rem; }
}
@media (max-width: 800px) {
  .survey-v6 .prediction-compact .share-audience legend { min-height: 0; }
}
