/* New-study creation only; existing studies and editor styles remain unchanged. */
@font-face{font-family:TwiggleSetupSerif;src:url('/static/fonts/SourceSerif4-latin.woff2') format('woff2');font-style:normal;font-weight:200 900;font-display:swap}
@font-face{font-family:TwiggleSetupSans;src:url('/static/fonts/Inter-latin.woff2') format('woff2');font-style:normal;font-weight:100 900;font-display:swap}
body.researcher[data-view=setup-view]{background:#f2f5f8;color:#243044}
#setup-view{font:400 18px/1.5 TwiggleSetupSans,Inter,Arial,sans-serif;max-width:1008px;margin:24px auto 0;padding:0 24px;min-width:0}
#setup-view h1,#setup-view legend,#setup-view .setup-method-heading{font-family:TwiggleSetupSerif,'Source Serif 4',Georgia,serif;font-weight:400}
#setup-view h1{font-size:40px;margin:8px 0 24px;line-height:1.2}
#setup-view .text-button{font-weight:400;min-width:44px;min-height:44px;color:#406b95}
#setup-view .setup-title-label{font-weight:400;margin:0 0 8px}
#setup-view #study-title{height:56px;margin:0;border:2px solid #537dab;border-radius:10px;font-size:18px;width:100%;min-width:0}
#setup-view input::placeholder{color:#60728b;opacity:1}
#setup-view .setup-secondary{font-size:16px;line-height:1.5;color:#50627b;font-weight:400}
#setup-view .setup-method-fieldset{padding:0;margin:24px 0 0;border:0;min-width:0}
#setup-view legend{font-size:26px;margin-bottom:12px;padding:0;max-width:100%}
#setup-view .setup-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
#setup-view .setup-method-card{position:relative;display:flex;flex-direction:column;gap:10px;min-width:0;margin:0;padding:20px;border:2px solid #d2dce7;border-radius:14px;background:#fff;font-weight:400;overflow-wrap:anywhere}
#setup-view .setup-method-card:has(input:checked){border-color:#507dab}
#setup-view .setup-method-card:focus-within{outline:3px solid #245c7c;outline-offset:3px}
#setup-view .setup-illustration{display:block;width:176px;max-width:100%;height:80px;flex:none;align-self:center}
#setup-view .setup-method-heading{display:flex;align-items:center;gap:12px;font-size:28px;line-height:1.2;min-height:44px;margin:0;cursor:pointer}
/* The native label's hit area covers its card; the list stays valid sibling content.
   No new tab stop or scripted click forwarding is needed. */
#setup-view .setup-method-heading::after{content:"";position:absolute;inset:0;border-radius:12px;cursor:pointer}
#setup-view .setup-method-card:has(input:disabled) .setup-method-heading::after{cursor:wait}
#setup-view input[type=radio]{display:inline-block;width:24px;height:24px;min-height:24px;flex:0 0 24px;margin:0;accent-color:#507dab}
#setup-view .setup-method-card ul{margin:0;padding-left:24px;list-style:disc;font-size:18px;line-height:1.5}
#setup-view .setup-mode-note{margin:0}
/* In-flow actions cannot cover fields or software keyboards. */
#setup-view .setup-actions{display:flex;align-items:center;gap:16px;margin:24px 0 0;padding:16px 0 24px;border-top:1px solid #d6dee8;flex-wrap:wrap}
#setup-view .setup-actions p{margin:0 auto 0 0;min-width:0}
#setup-view .setup-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:48px;min-width:120px;flex-shrink:0;line-height:1.3;padding:12px 20px;font-weight:400;font-size:18px;border-radius:10px;text-align:center}
#setup-view .setup-actions .primary{background:#b5df46;color:#243414;min-width:264px;margin:0}
#setup-view .setup-actions .secondary{border-color:#9badc5;color:#406b95}
#setup-view .setup-submit-small{display:none}
#setup-view .setup-field-error{font-size:16px;color:#982725;margin:12px 0;overflow-wrap:anywhere}
#setup-view #setup-error{background:#fff1ef;border:1px solid #c98e88;padding:16px;border-radius:10px}
#setup-view [aria-invalid=true]{border-color:#982725!important}
@media(max-width:767px){
 #setup-view{margin:12px auto 0;padding:0 16px}
 #setup-view h1{font-size:34px;margin:8px 0 20px}
 #setup-view .setup-methods{grid-template-columns:1fr}
 #setup-view .setup-method-card{padding:16px;gap:8px}
 #setup-view legend{font-size:25px}
 #setup-view .setup-actions{gap:12px;padding-bottom:max(16px,env(safe-area-inset-bottom))}
 #setup-view .setup-actions p{flex-basis:100%}
 #setup-view .setup-actions button{min-width:88px;flex:1;padding-inline:12px}
 #setup-view .setup-actions .primary{min-width:0;flex:2}
 #setup-view .setup-submit-wide{display:none}
 #setup-view .setup-submit-small{display:inline}
 body.researcher[data-view=setup-view] .brand-header{padding-inline:16px}
}
