.survey-body{display:flex;flex-direction:column;height:100dvh;min-height:100dvh}
.survey-body>.site-header,.survey-body>.site-footer{flex:none;width:min(1200px,100%);margin-left:auto;margin-right:auto}
.survey-body>.site-header{display:block;min-height:0;padding-top:10px;padding-bottom:0}
.site-header-primary{display:flex;align-items:center;justify-content:space-between;width:100%}
.survey-header-meta{display:grid;width:min(732px,100%);grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:8px;margin:8px auto 0;color:var(--text-secondary);font-size:clamp(10.5px,.9vw,12px);line-height:1.4;font-weight:600}
.survey-header-meta>:last-child{text-align:right}
.survey-header-meta a{display:inline-flex;align-items:center;min-height:32px;padding:6px 8px;margin:-6px -8px;color:var(--accent-dark);text-decoration:underline;text-underline-offset:3px}
.survey-page{max-width:840px;flex:1;min-height:0;padding-bottom:0;margin-top:clamp(4px,.5vw,8px);display:flex;flex-direction:column}
.survey-card{background:transparent;border:0;border-radius:0;outline:none;box-shadow:none;overflow:visible;display:flex;flex:1;min-height:0;flex-direction:column}
.survey-progress{padding:8px clamp(22px,5vw,54px) 0}
.survey-progress-meta{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px 16px;color:var(--text-secondary);font-size:12px;font-weight:600}
.survey-progress-track{height:6px;background:var(--muted);border-radius:20px;margin-top:0;overflow:hidden}
.survey-progress-track span{display:block;height:100%;background:var(--accent-dark);border-radius:inherit;transition:width .2s ease}
.survey-content{display:flex;flex:1;min-height:0;flex-direction:column;padding:clamp(10px,1.4vw,18px) clamp(22px,5vw,54px) 0}
.survey-content h1{font-size:var(--survey-title-size);line-height:1.18;margin:clamp(8px,1vw,14px) 0 clamp(16px,1.5vw,24px);overflow-wrap:anywhere}
#survey-title:focus-visible{outline:none}
.answer-list{display:grid;gap:10px}
.answer-card{display:flex;align-items:flex-start;gap:14px;min-height:48px;padding:clamp(10px,.9vw,14px) 16px;border:1px solid var(--border);border-radius:14px;background:#fff;cursor:pointer;line-height:1.45;overflow-wrap:anywhere;transition:border-color .16s ease,background .16s ease}
.answer-card:hover{border-color:var(--sage);background:#fbfcfa}
.answer-card:has(input:checked){border-color:var(--accent-dark);background:#F2F6F2}
.answer-card input{accent-color:var(--accent-dark);width:19px;height:19px;flex:0 0 auto;margin:2px 0 0}
.text-field{width:100%;min-height:54px;padding:13px 15px;border:1px solid var(--border);border-radius:13px;background:#fff;color:var(--ink)}
.survey-textarea{min-height:150px;resize:vertical;line-height:1.55}
.other-field{display:grid;gap:8px;padding:2px 4px 10px;color:var(--text-secondary);font-size:14px;line-height:1.45}
.other-field[hidden]{display:none!important}
.other-field textarea{min-height:88px}
.other-field textarea[hidden]{display:none}
.price-reference{padding:12px 14px;border-radius:12px;background:var(--surface-soft);color:var(--ink)}
.survey-progress-meta a{color:var(--accent-dark);text-decoration:underline;text-underline-offset:3px}
.survey-actions button:disabled{opacity:.55;cursor:not-allowed}
.text-field:focus-visible{border-color:var(--accent-dark)}
.survey-form fieldset{border:0;padding:0;margin:0;min-width:0}
.survey-form .form-field{display:grid;gap:8px;margin:0 0 18px}
.survey-form .form-field label{font-weight:600;color:var(--ink)}
.survey-form .form-field input{width:100%;min-height:48px;padding:11px 14px;border:1px solid var(--border);border-radius:12px;background:#fff;color:var(--ink);font:inherit}
.survey-form .form-field input[type=checkbox]{width:20px;min-height:20px;accent-color:var(--accent-dark)}
.survey-form .form-field input:focus-visible{outline:3px solid var(--accent-dark);outline-offset:2px}
.survey-form .form-field input[aria-invalid="true"]:focus{outline:3px solid var(--error);outline-offset:3px}
.field-hint,.survey-intro-note{color:var(--text-secondary);font-size:14px;margin:0 0 13px}
.survey-actions{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;width:calc(100% + clamp(44px,10vw,108px));margin:28px calc(-1 * clamp(22px,5vw,54px)) 0;padding:12px clamp(22px,5vw,54px) calc(12px + env(safe-area-inset-bottom));background:rgba(250,249,246,.98);border-top:1px solid rgba(220,229,223,.75);}
.survey-content>form.survey-actions{margin-top:auto}
.survey-form{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.survey-question-panel{display:flex;flex:1;flex-direction:column;min-height:0;max-height:none;overflow:visible}
.survey-question-panel>.survey-client-validation-error{flex:none}
.survey-question-panel>.survey-form{flex:1;min-height:0}
.survey-question-panel .survey-actions{position:static;flex:none;margin:0 calc(-1 * clamp(22px,5vw,54px))}
.survey-video-panel{display:flex;flex:1;flex-direction:column;min-height:0;max-height:none;overflow:hidden}
.survey-video-scroll{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.survey-video-panel .survey-actions,.beta-presentation-panel .survey-actions{margin:0 calc(-1 * clamp(22px,5vw,54px))}
.survey-video-panel .survey-actions{position:static;flex:none}
.beta-presentation-panel{display:flex;flex:1;flex-direction:column;min-height:0;max-height:none;overflow:hidden}
.beta-presentation-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.answer-scroll{display:block}
.survey-form[data-beta-form]{display:flex;flex:1;flex-direction:column;min-height:0;max-height:none;overflow:hidden}
.survey-form-scroll{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain}
.survey-form[data-beta-form]>.survey-actions{flex:none;margin-top:0}
.beta-intro-paragraph{margin:0 0 14px;max-width:62ch;color:var(--text-secondary)}
.survey-actions .button{min-width:142px}
.survey-implicit-submit{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;}
.source-gap-note{padding:16px 18px;border:1px solid var(--border);border-radius:14px;background:#F8FAF7;color:var(--text-secondary);font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.source-gap-note strong{color:var(--ink)}
.survey-error{padding:12px 14px;border:1px solid #E8B8B2;border-radius:12px;background:var(--error-bg);color:var(--error)}
.survey-video{width:100%;max-height:65vh;background:#1b211f;border-radius:16px}
.survey-video-intro{margin:-10px 0 22px;color:var(--text-secondary);font-size:15px;line-height:1.55;max-width:62ch}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){.survey-actions{width:calc(100% + clamp(44px,10vw,108px))}}
@media(max-width:520px){.survey-header-meta{width:calc(100% - 40px);grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"label quit" "step step";gap:2px 8px;margin-top:4px;font-size:10.5px}.survey-header-meta>:first-child{grid-area:label}.survey-header-meta a{grid-area:quit;min-height:40px}.survey-header-meta>:last-child{grid-area:step;text-align:left}.survey-progress{padding-top:8px}.survey-progress-meta{font-size:11px}.survey-content{padding-top:16px;padding-bottom:0}.survey-content h1{margin:8px 0 18px}.answer-card{padding:13px 12px;gap:11px}.survey-actions{display:grid;grid-template-columns:1fr;width:calc(100% + 44px);margin-top:22px;padding-left:22px;padding-right:22px}.survey-question-panel .survey-actions{margin-top:0}.survey-actions .button{width:100%}.survey-video-panel .survey-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding-left:22px;padding-right:22px}.survey-video-panel .survey-actions .button{min-width:0;padding-left:8px;padding-right:8px;font-size:13px;line-height:1.3}.survey-video-panel .survey-actions button[value="dev_bypass_video"]{grid-column:1/-1}}
@media(max-height:520px) and (orientation:landscape){.survey-page{min-height:0}.survey-progress{padding-top:10px}.survey-content{padding-top:10px;padding-bottom:0}.survey-content h1{font-size:clamp(24px,3.6vw,30px);margin:4px 0 10px}.survey-actions{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}.survey-actions .button{min-height:48px;padding-top:8px;padding-bottom:8px}}
@media(max-width:400px){.survey-progress{padding-top:8px}.survey-progress-meta{font-size:10.5px;gap:6px 12px}.survey-content{padding-top:12px}.survey-content h1{font-size:24px;line-height:1.2;margin:6px 0 14px}.field-hint,.survey-intro-note{font-size:13px;line-height:1.45;margin-bottom:10px}.answer-list{gap:8px}.answer-card{min-height:48px;padding:10px;gap:9px;font-size:15px;line-height:1.4}.answer-card input{width:18px;height:18px}.survey-actions{gap:8px;padding-top:9px;padding-bottom:calc(9px + env(safe-area-inset-bottom))}.survey-actions .button{min-height:48px;padding:10px 14px;font-size:15px}.survey-body>.site-footer{padding:12px 16px 16px;font-size:11px}.survey-body>.site-footer span:first-child{font-size:12px}.survey-body>.site-footer span:last-child{font-size:11px}.beta-intro-paragraph{font-size:13px;line-height:1.5;margin-bottom:10px}.survey-video-intro{font-size:13.5px;line-height:1.45;margin:-6px 0 14px}.source-gap-note{padding:13px 14px;font-size:13px;line-height:1.5}.survey-form .form-field{gap:7px;margin-bottom:14px}.survey-form .form-field label{font-size:15px}.survey-form-scroll>p:first-child{font-size:14px;line-height:1.5}}
@media(max-width:380px) and (max-height:700px){.survey-body>.site-header{min-height:0;padding-top:8px;padding-bottom:0}.survey-header-meta{margin-top:4px}.survey-progress{padding-top:8px}.survey-content{padding-top:12px}.survey-content h1{font-size:23px;margin:4px 0 11px}.survey-actions{gap:7px}.survey-actions .button{min-height:48px;padding-top:9px;padding-bottom:9px}.survey-question-panel .survey-actions{padding-top:8px;padding-bottom:calc(8px + env(safe-area-inset-bottom))}}
/* On short screens, let a visible validation message expand the page instead of shrinking its answer form to zero. */
@media(max-height:700px){
  .survey-body:has(.survey-error:not([hidden])){height:auto}
  .survey-body:has(.survey-error:not([hidden])) .survey-page,
  .survey-body:has(.survey-error:not([hidden])) .survey-card,
  .survey-body:has(.survey-error:not([hidden])) .survey-content,
  .survey-body:has(.survey-error:not([hidden])) .survey-question-panel,
  .survey-body:has(.survey-error:not([hidden])) .survey-video-panel,
  .survey-body:has(.survey-error:not([hidden])) .beta-presentation-panel{flex:0 0 auto;min-height:auto;max-height:none}
  .survey-body:has(.survey-error:not([hidden])) .survey-video-panel,
  .survey-body:has(.survey-error:not([hidden])) .beta-presentation-panel{overflow:visible}
  .survey-body:has(.survey-error:not([hidden])) .survey-form{flex:none;min-height:auto;max-height:none;overflow:visible}
  .survey-body:has(.survey-error:not([hidden])) .survey-video-scroll,
  .survey-body:has(.survey-error:not([hidden])) .beta-presentation-scroll,
  .survey-body:has(.survey-error:not([hidden])) .survey-form-scroll{flex:none;min-height:auto;overflow:visible}
}
@media(prefers-reduced-motion:reduce){.survey-progress-track span,.answer-card{transition:none}}

/* Keep the compact mobile and short-landscape layouts unchanged while reducing
   the component scale on desktop-sized CSS viewports. */
@media (min-width:761px) and (min-height:521px){
  .survey-body{--survey-title-size:clamp(28px,calc(1vw + 15.2px),32px)}
  .survey-content h1{margin-top:10px;margin-bottom:clamp(14px,1.1vw,18px)}
  .answer-list{gap:8px}
  .answer-card{gap:12px;padding-top:9px;padding-bottom:9px;font-size:clamp(15px,calc(.2vw + 12.44px),16px);line-height:1.4}
  .survey-actions .button{min-height:48px;padding:8px 16px;font-size:14.5px}
  #survey-number{min-height:48px;padding:10px 13px}
  .survey-textarea{height:clamp(110px,14vh,124px);min-height:110px}
  .survey-video{display:block;width:min(100%,650px);max-width:650px;height:auto;margin-inline:auto}
  .survey-video-intro{margin-top:0}
  .field-hint,.survey-intro-note,.survey-video-intro,.other-field,.price-reference{font-size:clamp(13px,calc(.12vw + 11.464px),14px)}
  .price-reference{padding:10px 12px}
  .beta-intro-paragraph,.survey-form .form-field label,.survey-form-scroll>p:first-child{font-size:15px}
}
