@import url("/static/fonts.fa3cb9dde80c.css");
.json-example{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--paper);padding:18px;border-radius:10px;font:13px/1.6 ui-monospace,monospace}#import-questionnaire textarea{font:13px/1.6 ui-monospace,monospace}
.json-dialog{width:min(900px,calc(100% - 32px));max-height:85vh;overflow:auto;border:1px solid var(--line);border-radius:16px;padding:24px;color:var(--ink);background:white}.json-dialog::backdrop{background:rgb(24 47 77 / 55%)}.json-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;background:var(--paper);padding:18px;border-radius:8px;font:13px/1.6 ui-monospace,monospace}.json-dialog h2{margin-top:0}
:root{--ink:#182f4d;--muted:#607087;--primary:#245fba;--primary-soft:#e3edfc;--paper:#f6f8fc;--line:#dce3ee;--orange:#edbb72}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,-apple-system,Segoe UI,sans-serif}a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}header{border-bottom:1px solid var(--line);background:#fff}nav{max-width:1180px;margin:auto;padding:22px 32px;display:flex;align-items:center;gap:25px}.logo{font-size:23px;font-weight:800;letter-spacing:-1px;display:flex;align-items:center;gap:10px}.logo img{width:32px;height:32px}.navlinks{margin-left:auto;display:flex;align-items:center;gap:23px;font-size:14px}main{max-width:1180px;margin:auto;padding:48px 32px 80px}.hero{display:grid;grid-template-columns:1.1fr 1fr;gap:70px;align-items:center;padding:38px 0 68px}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:800;color:var(--primary);text-transform:uppercase}h1{font-size:clamp(36px,5vw,66px);line-height:1.08;letter-spacing:-2.5px;margin:20px 0 25px;font-weight:650}h2{font-size:27px;line-height:1.25;letter-spacing:-.6px}h3{font-size:18px}.lead{font-size:18px;color:var(--muted);max-width:590px}.button,button{background:var(--primary);color:white;border:1px solid var(--primary);border-radius:9px;padding:12px 21px;display:inline-block;font:600 14px/1.4 inherit;cursor:pointer;text-decoration:none}.button:hover,button:hover{background:#1b4992;text-decoration:none}.secondary{background:transparent;color:var(--ink);border:1px solid var(--line)}.secondary:hover{color:#fff}.actions{display:flex;gap:12px;flex-wrap:wrap;align-items:center;margin-top:24px}.card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:27px;margin-bottom:22px;box-shadow:0 7px 20px #18305204}.report-preview{transform:rotate(-2deg);box-shadow:0 22px 55px #21457518;padding:30px}.report-preview h3{font-size:22px;margin:10px 0}.preview-top,.row{display:flex;justify-content:space-between;gap:20px;align-items:center}.badge{display:inline-block;background:var(--primary-soft);color:var(--primary);padding:5px 10px;border-radius:30px;font-size:11px;font-weight:700}.muted,small{color:var(--muted)}.metric{font-size:43px;font-weight:650;letter-spacing:-2px;display:block}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.grid2{display:grid;grid-template-columns:repeat(2,1fr);gap:24px}.band{background:#e8eef8;border-radius:20px;padding:35px;margin:35px 0}.stepnum{display:inline-flex;width:35px;height:35px;align-items:center;justify-content:center;border:1px solid #a5b6d0;border-radius:50%;font-weight:600}.formwrap{max-width:650px;margin:auto}.formwrap h1{font-size:39px}.form-card p{margin:20px 0}label{display:block;font-weight:600;font-size:14px;margin:13px 0 7px}input:not([type=checkbox]):not([type=radio]),textarea,select{width:100%;border:1px solid #c4d0e2;background:#fff;padding:12px;border-radius:8px;font:inherit;color:var(--ink)}input:focus,textarea:focus{outline:2px solid #779fde}textarea{min-height:120px}input[type=checkbox],input[type=radio]{accent-color:var(--primary);margin-right:8px;width:17px;height:17px}.helptext{font-size:12px;color:var(--muted)}.errorlist,.notice.error{color:#9c3232}.notice{padding:15px 20px;background:var(--primary-soft);border-radius:10px;margin-bottom:20px}.notice.error{background:#fce9e6}.titlebar{display:flex;justify-content:space-between;gap:30px;align-items:center;margin-bottom:32px}.titlebar h1{font-size:43px;margin-bottom:10px}.study-card h2{margin:14px 0}.empty{text-align:center;padding:65px 25px}.empty h2{font-size:32px}.wide{grid-column:1/-1}.progress{width:100%;height:9px;accent-color:var(--primary);border:none;margin:18px 0}.chart{width:100%;height:12px;margin:8px 0 18px;accent-color:var(--primary)}.option{display:flex;align-items:center;gap:10px;padding:13px;border:1px solid var(--line);border-radius:8px;margin:8px 0;font-weight:400}.option input{flex-shrink:0}fieldset{border:0;padding:0;margin:0 0 30px}legend{font-size:19px;font-weight:650;margin-bottom:10px}.survey{max-width:740px;margin:auto}.survey h1{font-size:40px}.tablewrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}td,th{text-align:left;padding:13px;border-bottom:1px solid var(--line)}th{font-size:12px;color:var(--muted)}footer{border-top:1px solid var(--line);padding:28px 32px;text-align:center;color:var(--muted);font-size:12px}footer a{margin:0 10px}.mini{font-size:12px}.plain{border:0;padding:0;background:none;color:var(--primary);font-size:14px}.big-number{font-size:70px;font-weight:600;color:var(--primary);line-height:1.3}.report-title{max-width:850px}.report-title h1{font-size:45px}.locked{background:#f0f4fa;padding:14px;border-radius:9px;font-size:13px}.note{border-left:3px solid var(--orange);padding-left:16px;color:var(--muted)}details{margin:15px 0}summary{cursor:pointer;font-weight:600}.chart-demo{display:flex;height:140px;gap:15px;align-items:end;margin:22px 0}.bar{background:#8aabdc;border-radius:6px 6px 0 0;flex:1}.bar:nth-child(1){height:38%}.bar:nth-child(2){height:69%}.bar:nth-child(3){height:95%;background:var(--primary)}.bar:nth-child(4){height:54%}.bar:nth-child(5){height:29%}.form-card button{margin-top:15px}.preline{white-space:pre-line}.questions-edit textarea{font-family:ui-monospace,monospace;font-size:13px}.divider{height:1px;background:var(--line);margin:24px 0}.admin-banner{background:#1c3457;color:#fff;padding:12px 25px;border-radius:12px;margin-bottom:25px;font-size:14px}@media(max-width:760px){nav{padding:16px 20px}.navlinks{gap:12px}main{padding:28px 20px}.hero{grid-template-columns:1fr;gap:32px;padding:20px 0}.grid,.grid2{grid-template-columns:1fr}.report-preview{transform:none}.titlebar{display:block}.titlebar .button{margin-top:10px}h1{letter-spacing:-1.5px}.navlinks .optional{display:none}.card{padding:22px}.band{padding:24px}.hero h1{font-size:46px}}

.lang-switch{display:flex;gap:6px;align-items:center;white-space:nowrap}.lang-switch button{font-size:12px}

.question-edit{border:1px solid var(--line,#d9e3f0);border-radius:14px;padding:20px;margin:20px 0}.question-edit legend{font-weight:700;padding:0 8px}.questions-edit .question-edit textarea{font-family:inherit;font-size:1rem}

.numbered-option{display:flex;align-items:center;gap:12px;margin:10px 0}.numbered-option strong,.choice-code{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:32px;border-radius:8px;background:#e8efff;color:#234e9b}.numbered-option input{flex:1;min-width:0;margin:0}.numbered-option button{padding:9px 12px}.options-editor{margin-bottom:24px}.options-editor p{font-size:.9rem}textarea[hidden]{display:none}
.service-dialog{width:min(480px,calc(100% - 32px));border:1px solid var(--line);border-radius:24px;padding:36px;color:var(--ink);box-shadow:0 24px 90px #182f4d40}.service-dialog::backdrop{background:rgb(24 47 77 / 55%);backdrop-filter:blur(4px)}.service-dialog .eyebrow{display:block;margin-top:18px}.service-dialog h2{margin:10px 0 14px}.service-dialog p{color:var(--muted)}.service-dialog form{margin-top:26px}.service-dialog button{width:100%}.service-icon{display:inline-flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:16px;background:var(--primary-soft);color:var(--primary);font-size:26px}.ai-preview-action{margin:20px 0;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--paper)}.ai-preview-action button{width:100%}.ai-preview-action p{margin-bottom:0}

.target-editor{background:var(--primary-soft);border:2px solid var(--primary);border-radius:14px;padding:22px;margin:20px 0;scroll-margin-top:24px}.target-editor h2{margin-top:0}.target-editor input[type=number]{font-size:26px;font-weight:700}.target-editor:target{outline:4px solid var(--orange);outline-offset:3px}

/* Server dashboard */
.server-dashboard{max-width:1120px;margin:auto}.server-dashboard h2{margin-top:0}.server-tabs{display:flex;gap:12px;flex-wrap:wrap;margin:20px 0 28px;padding:0}.server-tabs a{padding:10px 18px;border-radius:24px;background:#eaf0fc;text-decoration:none;font-weight:600}.server-dashboard section[id]{scroll-margin-top:24px}.server-badge{background:#e6f6ee;color:#176640;padding:8px 14px;border-radius:24px;font-size:.85rem}.routine-card{border:1px solid #cbd9ee;background:#f6f9ff;border-radius:16px;padding:24px;margin:12px 0 20px}.routine-hours{font-size:2.5rem;font-weight:700;margin:10px 0;color:#153860}.routine-hours span{color:#7593b7;font-weight:400}.day-chip{display:inline-block;background:#e3ebfa;color:#244f90;border-radius:8px;padding:5px 10px;margin:3px}.routine-next{display:flex;gap:40px;flex-wrap:wrap}.server-dashboard details{margin-top:18px}.server-dashboard summary{cursor:pointer;font-weight:650;padding:10px 0}.server-dashboard details[open]>summary{margin-bottom:18px}.weekday-picker{border:0;padding:12px 0;display:flex;gap:10px;flex-wrap:wrap}.weekday-picker label{display:flex;align-items:center;gap:8px;border:1px solid #cbd9ee;border-radius:10px;padding:10px 12px}.weekday-picker input{width:auto;margin:0}.weekday-picker label:has(input:checked){background:#e6efff;border-color:#3068bf}.danger-text{color:#a32929!important}.server-dashboard .actions{gap:10px;margin-top:16px}.server-dashboard .card{margin-bottom:20px}@media(max-width:600px){.routine-card{padding:16px}.routine-hours{font-size:2rem}.server-badge{display:inline-block;margin-top:10px}.server-tabs a{padding:8px 12px}}

.survey-question fieldset{min-width:0;margin:0;padding:0;border:0}.survey-question legend{float:none;width:100%;padding:0;margin:0 0 16px;line-height:1.45;overflow-wrap:anywhere}.survey-question fieldset>p:first-of-type{margin-top:0}

.survey-intro{padding:20px 0 40px}.survey-intro .button{margin-top:24px;min-width:150px;text-align:center}

.agent-steps{display:flex;gap:12px;flex-wrap:wrap;padding:0;margin:24px 0}.agent-steps a{padding:12px 18px;border:1px solid var(--line);border-radius:10px;background:white}.agent-steps a[aria-current]{background:var(--primary);color:white}.agent-columns{display:grid;grid-template-columns:1fr 1fr;gap:24px}.agent-turn{border-bottom:1px solid var(--line);padding:24px 0}.agent-user{background:var(--primary-soft);padding:16px;border-radius:12px;margin-bottom:16px}.agent-answer{line-height:1.8}.agent-applied{color:#237144;font-weight:700}.agent-turn h3{margin-bottom:5px}.agent-turn pre{max-height:400px;overflow:auto}#start-prompt,#agent-prompt{font:13px/1.5 ui-monospace,monospace;min-height:300px}#study-start>label{margin-top:24px}@media(max-width:800px){.agent-columns{grid-template-columns:1fr}}

.study-create{max-width:800px;margin:auto}.study-create>.eyebrow{display:block;margin-top:20px}.study-create h1{font-size:clamp(32px,5vw,48px)}.study-create .lead{max-width:720px}.creation-step h2{display:flex;align-items:center;gap:12px;font-size:23px}.creation-step h2:first-child{margin-top:0}.creation-step .stepnum{flex-shrink:0}.creation-step label{margin-top:20px}.creation-step details>summary{margin:18px 0 12px}.creation-step textarea[readonly]{max-height:360px;min-height:230px}.readable-prompt{padding:24px;border:1px solid var(--line);border-radius:12px;background:var(--paper);max-height:520px;overflow:auto;overflow-wrap:anywhere}.readable-prompt[hidden]{display:none}.readable-prompt h3{font-size:21px;margin-top:0}.readable-prompt h4{margin-bottom:8px}.readable-prompt li{margin-bottom:12px}.prompt-inputs{padding:4px 18px;background:white;border-left:3px solid var(--primary);border-radius:6px}.creation-alternative{padding:8px 24px}.creation-step #id_question_goal{max-width:220px}.creation-step #id_response_json{font:13px/1.6 ui-monospace,monospace}.creation-step [role=status]:empty{display:none}.review-metrics{display:flex;gap:32px;flex-wrap:wrap}.review-choices{padding-left:28px}.review-choices li{padding:10px 14px;border:1px solid var(--line);border-radius:8px;margin-bottom:8px}.review-publish{border:2px solid var(--primary)}@media(max-width:600px){.creation-step h2{font-size:20px}.readable-prompt{padding:16px}.study-create .creation-step>button[type=submit]{width:100%}}
.study-editor{max-width:1000px;margin:auto}.editor-back{margin-bottom:24px}.editor-nav{display:flex;flex-wrap:wrap;gap:8px 18px;margin:20px 0}.editor-nav a{font-weight:600}.editor-item{padding:22px 0;border-top:1px solid #dce4ef;scroll-margin-top:24px}.editor-item:first-of-type{border-top:0}.editor-item-heading{display:flex;align-items:baseline;justify-content:space-between;gap:16px}.editor-item-heading h3{margin:0 0 10px}.editor-value p{margin:8px 0 16px;overflow-wrap:anywhere}.editor-question .question-label{font-size:1.12rem;font-weight:650}.editor-control>summary{display:inline-flex;align-items:center;gap:8px;color:#2459ac;font-weight:650;cursor:pointer;border:1px solid #cddbed;border-radius:9px;padding:8px 14px;list-style:none}.editor-control>summary::-webkit-details-marker{display:none}.editor-control[open]>summary{margin-bottom:12px}.editor-control form{padding:20px;background:#f4f7fd;border-radius:12px}.editor-section-title{display:flex;align-items:center;justify-content:space-between}.editor-section-title h2{margin:0}.editor-feedback:not(:empty){color:#a52a36;background:#fff0f1;padding:12px;border-radius:8px;white-space:pre-line}.editor-dialog{border:1px solid #dce4ef;border-radius:20px;padding:30px;max-width:560px;width:calc(100% - 32px);color:inherit;box-sizing:border-box;box-shadow:0 24px 80px #18314e33}.editor-dialog::backdrop{background:#14243b88;backdrop-filter:blur(3px)}.editor-dialog h2{margin-top:0}.text-danger{background:transparent;color:#a52a36;border:1px solid #e7bcc2}.danger{background:#ad2f3d}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}#editor-status:not(:empty){background:#eaf4ec;padding:12px 16px;border-radius:10px}#study-ai>summary{font-weight:650;cursor:pointer}@media(max-width:600px){.editor-control form{padding:14px}.editor-item{padding:18px 0}.editor-dialog{padding:22px}.editor-nav{gap:12px}.editor-item .actions{align-items:stretch}}

.editor-item:has(>.editor-control[open])>.editor-value{display:none}.study-editor>header{background:transparent;border:0}.study-editor .editor-nav{padding:12px 0}
/* Research assistant: a single conversation with reviewable proposals. */
.research-chat{max-width:1000px;margin:auto}.chat-topline{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 18px}.chat-topline a{font-weight:650}.chat-free{font-size:10px;letter-spacing:1.6px;font-weight:750;color:#33705d;background:#e7f4ed;padding:7px 12px;border-radius:30px}.chat-shell{border:1px solid #d7e3f4;border-radius:24px;background:#fff;box-shadow:0 18px 65px #2448770b;overflow:hidden}.chat-heading{display:flex;align-items:center;gap:16px;padding:24px 28px;background:linear-gradient(115deg,#f8faff,#eef4ff);border-bottom:1px solid #e4ebf6}.chat-heading h1{font-size:24px;letter-spacing:-.6px;margin:0 0 4px}.chat-heading p{margin:0;font-size:13px;color:#5a6e8b}.chat-avatar{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;flex-shrink:0;border-radius:16px;background:#245bb8;color:white;font-size:26px;box-shadow:0 6px 16px #245bb820}.chat-state{margin-left:auto;font-size:12px;border:1px solid #ceddf1;padding:6px 12px;border-radius:30px;white-space:nowrap;color:#41618b}.chat-context{padding:13px 28px;border-bottom:1px solid #e5ecf5;background:#fbfcff;font-size:13px}.chat-context summary{cursor:pointer;color:#506786}.chat-context summary span{font-weight:700;margin-left:8px}.chat-context p{overflow-wrap:anywhere}.chat-messages{height:clamp(310px,54vh,680px);overflow:auto;overscroll-behavior:contain;padding:28px;scroll-behavior:smooth;scrollbar-width:thin;outline-offset:-4px}.chat-welcome{max-width:640px;margin:12px auto 32px;text-align:center}.chat-welcome .chat-avatar{width:40px;height:40px;font-size:23px}.chat-welcome h2{font-size:25px;letter-spacing:-.4px;margin:18px 0 10px}.chat-welcome p{color:#60728b;font-size:15px;line-height:1.7}.chat-suggestion{background:#f6f9ff;color:#285baa;border:1px solid #d5e2f4;border-radius:20px;font-size:13px;line-height:1.5;padding:11px 18px}.chat-turn{margin:28px 0}.chat-user{max-width:83%;margin-left:auto;background:#edf3ff;border:1px solid #dce7fb;border-radius:18px 18px 4px 18px;padding:14px 18px;overflow-wrap:anywhere}.chat-speaker{display:block;font-size:11px;font-weight:750;letter-spacing:.7px;margin-bottom:8px;color:#46678e}.chat-assistant{margin:22px 0 0;padding:0 6px;overflow-wrap:anywhere}.chat-prose{font-size:15px;line-height:1.85}.chat-proposal{margin-top:18px;border:1px solid #cdddf2;border-radius:14px;background:#fbfdff;padding:20px}.chat-proposal-title{display:flex;justify-content:space-between;gap:12px;color:#204a85}.chat-proposal-title>span{font-size:12px;white-space:nowrap}.chat-proposal summary{cursor:pointer;font-weight:650;font-size:13px;color:#47658d}.chat-change{padding-top:14px;margin-top:12px;border-top:1px solid #dce6f3}.chat-change h3{font-size:16px;margin:0}.chat-reason{font-size:13px;color:#617694;margin:6px 0 12px}.chat-comparison{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:13px}.chat-comparison>div{border-radius:10px;padding:14px;min-width:0}.chat-before{background:#f0f3f8;color:#66758b}.chat-after{background:#ecf6f0;color:#224f3c}.chat-change-label{font-size:10px;text-transform:uppercase;letter-spacing:1.1px;font-weight:750}.chat-comparison p{margin:8px 0;line-height:1.6}.chat-comparison ul{padding-left:20px}.chat-comparison li{margin-bottom:4px}.chat-comparison .mini{font-size:11px}.chat-proposal-actions{display:flex;gap:10px;flex-wrap:wrap;margin:20px 0 12px}.chat-proposal-actions form{margin:0}.chat-proposal-actions button{font-size:13px;padding:10px 16px}.chat-json{margin-top:12px}.chat-json summary{font-size:11px;color:#6a7e99}.chat-json pre{max-height:280px;overflow:auto}.chat-thinking{color:#6882a7;font-size:14px}.chat-thinking span{letter-spacing:3px;margin-right:8px;animation:chat-pulse 1.5s infinite}.chat-compose{padding:18px 24px 12px;border-top:1px solid #e0e8f5;background:#fff}.chat-compose form{display:flex;align-items:flex-end;gap:12px;background:#f7f9fc;border:1px solid #d6e1f0;border-radius:16px;padding:10px}.chat-compose form:focus-within{border-color:#7095cc;box-shadow:0 0 0 3px #e8effc}.chat-compose textarea{margin:0;border:0;background:transparent;min-height:52px;max-height:160px;resize:vertical;padding:8px 10px;font:inherit;font-size:14px;flex:1;box-shadow:none;outline:none}.chat-compose button{border-radius:11px;padding:12px 18px;white-space:nowrap}.chat-compose>.mini{font-size:11px;color:#75859b;margin:10px 0 0;text-align:center}.chat-external{padding:20px 4px}.chat-external>summary{cursor:pointer;color:#49658a;font-size:13px}.chat-external>p,.chat-privacy{font-size:12px;color:#76879f}.chat-external form{margin-top:18px}.chat-privacy{margin-top:0}.chat-entry{display:flex;align-items:center;justify-content:space-between;gap:20px;background:#f0f5ff;border-radius:14px;padding:18px;margin:20px 0 0}.chat-entry p{margin:4px 0;font-size:13px;color:#5d7393}.chat-entry button,.chat-entry a{white-space:nowrap}.chat-entry strong{font-size:15px}@keyframes chat-pulse{50%{opacity:.35}}@media(prefers-reduced-motion:reduce){.chat-thinking span{animation:none}.chat-messages{scroll-behavior:auto}}@media(max-width:650px){.chat-heading{padding:18px 16px;gap:10px;flex-wrap:wrap}.chat-heading h1{font-size:19px}.chat-heading p{font-size:11px}.chat-state{display:none}.chat-avatar{width:38px;height:38px}.chat-context{padding:12px 16px}.chat-messages{padding:18px 14px;height:51vh}.chat-compose{padding:12px}.chat-compose form{gap:6px}.chat-compose button{padding:12px}.chat-proposal{padding:14px}.chat-comparison{grid-template-columns:1fr}.chat-user{max-width:92%}.chat-welcome h2{font-size:22px}.chat-entry{align-items:flex-start;flex-direction:column}.chat-free{font-size:8px;letter-spacing:1px}.chat-topline{font-size:13px}}
main:has(.research-chat){padding-top:24px}.chat-shell{height:max(460px,calc(100dvh - 160px));display:flex;flex-direction:column}.chat-heading,.chat-compose{flex-shrink:0}.chat-context{flex-shrink:0;margin:0;max-height:150px;overflow:auto}.chat-messages{height:auto;min-height:140px;flex:1}.chat-prose p{margin:0 0 12px}.chat-prose ul,.chat-prose ol{padding-left:24px}.chat-prose li{margin-bottom:8px}.chat-suggestion:hover{color:white}@media(max-width:650px){main:has(.research-chat){padding:18px 12px}.chat-shell{height:max(430px,calc(100dvh - 145px))}.chat-messages{height:auto}.chat-heading{padding:16px}.chat-compose textarea{min-height:46px}}
/* Give the conversation at least two thirds of the viewport. */
body:has(.research-chat)>header,body:has(.research-chat)>footer{display:none}
main:has(.research-chat){max-width:1400px;padding:10px 24px 24px}
.research-chat{max-width:1240px}.chat-topline{margin-bottom:8px;min-height:30px;font-size:13px}.chat-top-tools{display:flex;align-items:center;gap:20px}.chat-top-tools .lang-switch{font-size:12px}
.chat-shell{height:max(480px,calc(100dvh - 58px));border-radius:18px}.chat-heading{padding:10px 20px;gap:12px}.chat-heading h1{font-size:18px;letter-spacing:-.3px;margin-bottom:2px}.chat-heading p{font-size:11px}.chat-heading .chat-avatar{height:32px;width:32px;border-radius:10px;font-size:20px}.chat-state{font-size:11px;padding:4px 10px}
.chat-messages{min-height:66dvh;padding:20px 24px}.chat-compose{padding:8px 16px}.chat-compose form{padding:5px 6px 5px 10px;border-radius:12px;gap:8px}.chat-compose textarea{min-height:34px;height:34px;max-height:74px;padding:6px 4px;resize:none}.chat-compose button{padding:8px 14px;border-radius:9px}.chat-compose>.mini{margin-top:5px;font-size:10px}.chat-compose .editor-feedback:empty{display:none}
.chat-selection-hint{font-size:13px;color:#536c8e;background:#eef4ff;padding:10px 14px;border-radius:8px}.chat-change-select{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid #cfddf0;border-radius:10px;background:#f4f8ff;cursor:pointer;margin:12px 0 0;font-size:13px}.chat-change-select input{width:18px;height:18px;margin:0;accent-color:#245bb8;flex-shrink:0}.chat-change-select:has(input:checked){border-color:#2865bc;background:#e4efff;color:#174582}.chat-change-applied{font-size:13px;color:#256346;font-weight:650;margin:12px 0 0}.chat-proposal-actions{align-items:flex-end}.chat-selection-count{font-size:12px;color:#506888;margin:0 0 8px}.chat-proposal-actions button:disabled{opacity:.5;cursor:not-allowed}.chat-external{padding:12px 4px}
@media(max-width:650px){main:has(.research-chat){padding:8px}.chat-shell{height:max(460px,calc(100dvh - 54px))}.chat-heading{padding:9px 12px;flex-wrap:nowrap}.chat-heading h1{font-size:16px}.chat-heading p{font-size:10px}.chat-messages{min-height:66dvh;padding:16px 12px}.chat-compose{padding:6px 10px}.chat-compose textarea{min-height:34px}.chat-top-tools{gap:10px}.chat-topline{font-size:12px}.chat-free{padding:5px 8px}.chat-proposal-actions{align-items:stretch}.chat-proposal-actions form{width:100%}.chat-proposal-actions form button{width:100%}}
.chat-comparison>.chat-before,.chat-comparison>.chat-after{display:flex;flex-direction:column;border:1px solid transparent}.chat-version-content{flex:1}.chat-comparison .chat-version-help{font-size:12px;line-height:1.5;margin:12px 0 0;padding-top:10px;border-top:1px solid #c8d5d0;color:inherit}.chat-before .chat-version-help{border-top-color:#d6dfe9}.chat-after .chat-change-select{background:#fff;border-color:#9fc8ae;color:#20543b;align-items:flex-start}.chat-after .chat-change-select input{accent-color:#247349;margin-top:1px}.chat-after:has([data-change-select]:checked){border-color:#28764b;box-shadow:0 0 0 1px #28764b}.chat-after .chat-change-select:has(input:checked){background:#d8f0e1;border-color:#28764b;color:#174b30}.chat-after .chat-change-applied{padding-top:12px;border-top:1px solid #b4d3c0}

.chat-generated{padding:22px;border:1px solid #b4d3c0;border-radius:16px;background:#edf8f1}.chat-generated>strong{font-size:18px;color:#20543b}.chat-generated>p{margin:12px 0 18px}.chat-generated .chat-json{margin-top:18px}

/* Keep numeric validation and keyboard editing without browser spinner controls. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.study-editor .editor-nav[role="tablist"]{gap:6px;padding:6px;margin:24px 0 16px;background:#eaf0fa;border:1px solid var(--line);border-radius:14px}
.editor-nav[role="tablist"] a{flex:1 1 auto;text-align:center;padding:12px 14px;border-radius:9px;color:#53667e;text-decoration:none;line-height:1.35}
.editor-nav[role="tablist"] a:hover{background:#f7f9fe;color:#174c99}
.editor-nav[role="tablist"] a[aria-selected="true"]{background:#fff;color:#174c99;box-shadow:0 2px 8px #18314e12}
.editor-nav[role="tablist"] a:focus-visible,[data-editor-panel]:focus-visible{outline:3px solid #2459ac;outline-offset:3px}
[data-editor-panel][hidden]{display:none!important}
[data-editor-panel]>.card:first-child{margin-top:0}
#editor-status:empty{display:none}
@media(max-width:600px){.editor-nav[role="tablist"] a{flex:1 1 calc(50% - 6px);box-sizing:border-box;padding:11px 8px;font-size:.9rem}}
