/* Audience survey (R005) — UX review 2026-09-30. Colours from the identity guide; error red #B42318 approved by Hussain. */
.survey-page{--survey-error:#B42318;background:var(--brand-offWhite,#F7F7F5);padding-bottom:64px}
body:has(.survey-page) .wa-bar{display:none}
body:has(#measurement-choice:not([hidden])) .survey-page{padding-bottom:280px}
.survey-container{max-width:640px;margin:0 auto;padding-top:24px}
.survey-page h1{font-size:30px;font-weight:600;line-height:1.3;color:var(--brand-midnight,#101820);margin:0 0 12px}
.survey-page h1:focus{outline:none}
.survey-intro{font-size:17px;line-height:1.7;color:var(--brand-graphite,#30343B);margin:0 0 8px}
.survey-privacy{font-size:14px;line-height:1.7;color:var(--brand-muted,#5C656B);margin:0 0 20px}
.survey-privacy a,.survey-links a{color:var(--brand-accessibleTeal,#006D70);text-decoration:underline;text-underline-offset:3px;display:inline-flex;align-items:center;min-height:44px}
.survey-card{background:#fff;border:1px solid var(--brand-line,#DDE2E2);border-radius:12px;padding:20px;margin:0 0 16px}
.survey-section{font-size:14px;font-weight:500;color:var(--brand-accessibleTeal,#006D70);margin:0 0 16px}
.survey-question{border:0;margin:0;padding:0 0 0 0;min-width:0}
.survey-question+.survey-question{margin-top:24px}
.survey-question[hidden]{display:none}
.survey-question legend{font-size:17px;font-weight:600;line-height:1.5;color:var(--brand-midnight,#101820);padding:0;margin:0 0 6px}
.survey-question.has-error{border-inline-start:2px solid var(--survey-error);padding-inline-start:12px}
.survey-help{font-size:14px;line-height:1.6;color:var(--brand-muted,#5C656B);margin:0 0 10px}
.survey-help.is-limit{color:var(--brand-accessibleTeal,#006D70);font-weight:500}
.survey-error{display:flex;gap:6px;align-items:flex-start;font-size:14px;line-height:1.5;color:var(--survey-error);margin:0 0 10px}
.survey-error[hidden]{display:none}
.survey-alert-icon{flex:0 0 16px;margin-top:3px}
.survey-options{display:grid;gap:8px}
.survey-option{position:relative;display:flex;margin:0;align-items:center;gap:12px;min-height:48px;padding:12px 16px;border:1px solid var(--brand-line,#DDE2E2);border-radius:8px;background:#fff;cursor:pointer;font-size:16px;line-height:1.5;color:var(--brand-midnight,#101820);box-sizing:border-box}
.survey-option input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.survey-mark{flex:0 0 20px;width:20px;height:20px;border:2px solid var(--brand-muted,#5C656B);border-radius:50%;box-sizing:border-box;background:#fff;display:inline-flex;align-items:center;justify-content:center}
.survey-question[data-kind="many"] .survey-mark{border-radius:4px}
.survey-option:has(input:checked){background:var(--brand-tealTint,#E6F3F2);border:2px solid var(--brand-accessibleTeal,#006D70);padding:11px 15px}
.survey-option input:checked+.survey-mark{background:var(--brand-accessibleTeal,#006D70);border-color:var(--brand-accessibleTeal,#006D70)}
.survey-option input[type=radio]:checked+.survey-mark::after{content:"";width:8px;height:8px;border-radius:50%;background:#fff}
.survey-option input[type=checkbox]:checked+.survey-mark{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-size:14px;background-position:center;background-repeat:no-repeat}
.survey-option:has(input:focus-visible){outline:3px solid var(--brand-accessibleTeal,#006D70);outline-offset:2px}
.survey-option-text{flex:1;min-width:0;overflow-wrap:anywhere}
.survey-other{margin-top:12px}
.survey-other[hidden]{display:none}
.survey-page label[for],.survey-email label{display:block;font-size:15px;font-weight:500;line-height:1.5;color:var(--brand-midnight,#101820);margin:0 0 6px}
.survey-hp label{margin:0}
.survey-page input[type=text],.survey-page input[type=email],.survey-page textarea{width:100%;box-sizing:border-box;min-height:50px;font:inherit;font-size:16px;line-height:1.6;padding:12px 14px;border:1px solid var(--brand-muted,#5C656B);border-radius:8px;background:#fff;color:var(--brand-midnight,#101820)}
.survey-page textarea{min-height:0;resize:vertical}
.survey-page input[type=email]{text-align:left}
.survey-page input:focus-visible,.survey-page textarea:focus-visible{outline:3px solid var(--brand-accessibleTeal,#006D70);outline-offset:2px}
.survey-page input[aria-invalid=true]{border:2px solid var(--survey-error)}
.survey-count{font-size:14px;color:var(--brand-muted,#5C656B);margin:6px 0 0;text-align:end;font-family:Inter,sans-serif}
.survey-hp{position:absolute;inset-inline-start:-10000px;width:1px;height:1px;overflow:hidden}
.survey-summary{background:#fff;border:2px solid var(--survey-error);border-radius:8px;padding:16px 20px;margin:0 0 16px}
.survey-summary[hidden]{display:none}
.survey-summary:focus{outline:3px solid var(--brand-accessibleTeal,#006D70);outline-offset:2px}
.survey-summary h2{font-size:17px;font-weight:600;color:var(--survey-error);margin:0 0 8px}
.survey-summary ul{margin:0;padding-inline-start:20px}
.survey-summary a{color:var(--brand-accessibleTeal,#006D70);text-decoration:underline;display:inline-block;min-height:44px;line-height:44px}
.survey-failed{font-size:15px;line-height:1.6;color:var(--survey-error);background:#fff;border:2px solid var(--survey-error);border-radius:8px;padding:12px 16px;margin:0 0 12px}
.survey-failed[hidden]{display:none}
.survey-submit,.survey-secondary{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-height:48px;border-radius:8px;font:inherit;font-size:16px;font-weight:600;cursor:pointer}
.survey-submit{background:var(--brand-accessibleTeal,#006D70);color:#fff;border:0}
.survey-secondary{background:#fff;color:var(--brand-accessibleTeal,#006D70);border:1.5px solid var(--brand-accessibleTeal,#006D70);margin-top:12px}
.survey-submit:focus-visible,.survey-secondary:focus-visible{outline:3px solid var(--brand-accessibleTeal,#006D70);outline-offset:2px}
.survey-submit[disabled],.survey-secondary[disabled]{opacity:.85;cursor:progress}
.survey-spinner{width:16px;height:16px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:survey-spin .8s linear infinite}
@keyframes survey-spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.survey-spinner{animation-duration:2.4s}}
.survey-final{font-size:14px;color:var(--brand-muted,#5C656B);text-align:center;margin:8px 0 0}
.survey-email h2{font-size:17px;font-weight:600;color:var(--brand-midnight,#101820);margin:0 0 6px}
.survey-done{font-size:16px;color:var(--brand-midnight,#101820);background:var(--brand-tealTint,#E6F3F2);border-radius:8px;padding:14px 16px}
.survey-links{margin:4px 0;font-size:16px}
.survey-again p{margin:0 0 8px;font-size:16px}
/* Thank-you code (R016, R015 review checklist): code in a 1.5px Accessible Teal frame on Off White, copy button 48px */
.survey-visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.survey-code h2{font-size:17px;font-weight:600;color:var(--brand-midnight,#101820);margin:0 0 10px}
.survey-code-value{font-family:Inter,ui-monospace,monospace;font-size:28px;font-weight:600;letter-spacing:.06em;text-align:center;color:var(--brand-midnight,#101820);background:var(--brand-offWhite,#F7F7F5);border:1.5px solid var(--brand-accessibleTeal,#006D70);border-radius:8px;padding:12px 16px;margin:0 0 10px;user-select:all}
.survey-code-terms{font-size:15px;line-height:1.6;color:var(--brand-graphite,#30343B);text-align:center;margin:0 0 4px}
.survey-code .survey-copy{margin-top:8px}
.survey-check-icon{flex:0 0 16px}
.survey-code-use{font-size:15px;line-height:1.6;color:var(--brand-graphite,#30343B);margin:12px 0}
.survey-browse{text-decoration:none}
.survey-browse:hover{color:#fff}
/* Admin results */
.survey-result h3{font-size:16px;margin:0 0 4px}
.survey-table{width:100%;border-collapse:collapse}
.survey-table th{text-align:start;font-weight:500;padding:6px 0;width:45%}
.survey-table td{padding:6px 8px;white-space:nowrap}
.survey-table td:nth-child(2){width:40%}
.survey-bar{display:block;width:100%;height:10px;border:0;border-radius:5px;overflow:hidden;background:var(--brand-tealTint,#E6F3F2);appearance:none;accent-color:var(--brand-accessibleTeal,#006D70)}
.survey-bar::-webkit-progress-bar{background:var(--brand-tealTint,#E6F3F2)}
.survey-bar::-webkit-progress-value{background:var(--brand-accessibleTeal,#006D70)}
.survey-bar::-moz-progress-bar{background:var(--brand-accessibleTeal,#006D70)}
.survey-texts{margin:8px 0 0;padding-inline-start:20px;line-height:1.7}
.survey-admin-actions{display:flex;flex-wrap:wrap;gap:8px}
@media (max-width:640px){.survey-card{padding:16px}.survey-table th{width:auto}.survey-table td:nth-child(2){display:none}}
