*{box-sizing:border-box} :root{font-family:Inter,"Microsoft YaHei","PingFang SC",sans-serif;color:#25272b;background:#fff;font-synthesis:none;line-height:1.7;font-size:15px;--muted:#767a84;--border:#e8eaee;--blue:#4565dc}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;border:1px solid var(--border);background:#fff;border-radius:10px;padding:10px 17px;color:inherit;transition:background .15s}button:hover{background:#f3f5f9}button:disabled{opacity:.5;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #97aaf0;outline-offset:3px}a{color:#3858bb;text-underline-offset:3px;overflow-wrap:anywhere}.primary{background:#27334c;color:white;border-color:#27334c}.primary:hover{background:#3a4863}.quiet{color:#737986;background:transparent}.shell{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100dvh}.sidebar{background:#f7f8fa;border-right:1px solid var(--border);padding:28px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100dvh}.brand{display:flex;align-items:center;gap:10px;font-size:16px;font-weight:650;letter-spacing:.02em}.mark{width:33px;height:33px;background:#27334c;color:white;display:inline-grid;place-items:center;border-radius:10px;font-size:17px}.sidebar .sub{font-size:12px;color:var(--muted);margin:8px 0 34px 43px}.steps{list-style:none;padding:0;margin:0;display:grid;gap:12px}.steps li{padding:9px 12px;color:#9498a1;font-size:13px;border-radius:8px}.steps .current{background:#e9edf6;color:#354567;font-weight:600}.stepnum{display:inline-block;width:26px}.sidebar footer{margin-top:auto;font-size:11px;color:#9297a0;line-height:1.8;overflow-wrap:anywhere}.sidebar footer button{font-size:12px;width:100%;margin-top:15px}.main{min-width:0}.topbar{height:73px;border-bottom:1px solid var(--border);padding:0 36px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:#ffffffed}.topbar .title{font-weight:600;font-size:14px}.status{font-size:12px;color:#77808e}.dot{display:inline-block;width:6px;height:6px;background:#6c9f83;border-radius:50%;margin-right:6px}.content{max-width:860px;padding:48px 44px 70px;margin:0 auto}.eyebrow{font-size:12px;letter-spacing:.08em;color:#7d8492;margin:0 0 14px}.content h1{font-size:28px;font-weight:600;line-height:1.4;margin:0 0 20px;letter-spacing:-.03em}.lead{color:#737986;margin:0 0 28px;line-height:1.9}.card{border:1px solid var(--border);border-radius:14px;padding:24px;margin:20px 0;background:#fff}.card.soft{background:#f9fafc}.card h2{font-size:16px;font-weight:600;margin:0 0 12px}.card p{margin:10px 0}.meta-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.meta-grid small{color:var(--muted);display:block;font-size:12px}.meta-grid strong{font-size:14px;font-weight:500}.actions{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-end;margin-top:26px}.field{margin:26px 0;border:0;padding:0;min-width:0}.field legend,.field>label{display:block;margin-bottom:12px;font-weight:500;line-height:1.8}.choices{display:grid;gap:9px}.choice{display:flex;align-items:flex-start;gap:10px;padding:11px 14px;border:1px solid var(--border);border-radius:9px;cursor:pointer}.choice:has(input:checked){background:#f0f3fc;border-color:#8ca0de}.choice input{margin-top:6px;accent-color:var(--blue)}.scale{display:grid;grid-template-columns:repeat(7,1fr);gap:8px}.scale label{position:relative;text-align:center;border:1px solid #e1e5ed;border-radius:9px;padding:10px 4px;cursor:pointer}.scale label:has(input:checked){background:#eaf0ff;border-color:#6885d7;color:#264eb3}.scale input{position:absolute;opacity:0;inset:0;width:100%;height:100%;cursor:pointer;margin:0}.scale label:focus-within{outline:2px solid #97aaf0}.anchors{display:flex;justify-content:space-between;font-size:11px;color:var(--muted);margin-top:6px;gap:15px}.anchors span:last-child{text-align:right}.hint{font-size:12px;color:#7d8390;line-height:1.8}.textinput,textarea{width:100%;border:1px solid #dfe3eb;border-radius:10px;background:#fff;padding:12px 14px;outline:none}textarea{resize:vertical;min-height:95px}.textinput:focus,textarea:focus{border-color:#7b95db}.progressrow{display:flex;align-items:center;gap:16px;font-size:12px;color:#7e8490;margin-bottom:24px}progress{appearance:none;height:4px;width:105px;border:0;border-radius:3px;overflow:hidden;background:#edf0f5}progress::-webkit-progress-bar{background:#edf0f5}progress::-webkit-progress-value{background:#7d8eae}.taskquestion{font-size:18px;line-height:1.9;font-weight:500;margin:0}.messagehead{display:flex;gap:9px;align-items:center;color:#535d6e;font-size:12px;margin-bottom:15px}.assistantmark{width:26px;height:26px;border-radius:8px;background:#edf1f9;display:inline-grid;place-items:center;color:#586d9d}.answer{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.95}.source-label{font-size:12px;color:#8a8f99;margin:17px 0 0}.tools{display:flex;gap:10px;margin:22px 0;flex-wrap:wrap}.tools button{font-size:13px;color:#566274;border-radius:20px;padding:8px 15px}.tools .selected{background:#eef2fa;border-color:#b7c5e3}.panel{background:#f8f9fb;border:1px solid var(--border);padding:22px;border-radius:12px;margin-bottom:20px}.panel h3{font-size:14px;margin:0 0 10px}.searchbar{display:flex;gap:8px}.searchbar input{min-width:0}.result{border-top:1px solid var(--border);padding:15px 0 3px}.result p{font-size:13px;color:#6d7582;margin:7px 0}.bubble.user{background:#f1f3f7;border-radius:14px 14px 3px 14px;padding:12px 17px;max-width:88%;margin:22px 0 22px auto;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.assistant{padding:5px 0 18px;white-space:pre-wrap;overflow-wrap:anywhere}.composer{border:1px solid #dfe3eb;border-radius:16px;padding:12px 14px;box-shadow:0 4px 18px #25355207;margin-top:25px}.composer textarea{border:0;padding:2px;min-height:58px;box-shadow:none;font-size:14px}.composer footer{display:flex;justify-content:space-between;align-items:center;gap:15px}.composer footer .hint{font-size:11px}.send{padding:5px 14px;font-size:19px}.finalbox{border-top:1px solid var(--border);margin-top:30px;padding-top:4px}.finalbox .choices{grid-template-columns:1fr 1fr}.demo{background:#fff7e9;color:#8e713e;padding:9px 18px;text-align:center;font-size:12px;border-bottom:1px solid #f0e4d0}.loading{padding:50px;color:#7e8490}.notice{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);background:#263144;color:white;padding:12px 20px;border-radius:11px;z-index:10;box-shadow:0 4px 30px #0002;font-size:13px}.notice button{margin-left:12px;padding:4px 9px}.successicon{width:54px;height:54px;background:#eff4f1;color:#59866d;display:grid;place-items:center;border-radius:50%;font-size:24px;margin-bottom:26px}.receipt{font-family:monospace;letter-spacing:.12em;font-size:21px;color:#394b6c}.admin{max-width:1100px;margin:auto;padding:40px 28px}table{border-collapse:collapse;width:100%;font-size:12px}td,th{border-bottom:1px solid var(--border);padding:10px;text-align:left}.scroll{overflow:auto}pre{white-space:pre-wrap;overflow-wrap:anywhere}details summary{cursor:pointer;color:#737986}.research-note{font-size:12px;color:#8d784f}.entrybuttons{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mobile-id{display:none}
@media(max-width:760px){.shell{display:block}.sidebar{display:none}.topbar{height:60px;padding:0 20px}.content{padding:29px 21px 44px}.content h1{font-size:24px}.card{padding:18px;border-radius:12px}.meta-grid{gap:15px}.scale{gap:5px}.scale label{padding:10px 2px}.field{margin:24px 0}.topbar .status{font-size:11px}.demo{font-size:11px;padding:7px 12px}.taskquestion{font-size:17px}.panel{padding:16px}.actions button{flex:1}.composer{position:relative}.mobile-id{display:block;font-size:11px;color:#89909b;margin-top:30px;overflow-wrap:anywhere}.mobile-id button{font-size:11px;padding:5px 9px;margin-left:8px}.entrybuttons{grid-template-columns:1fr}.content .lead{font-size:14px}.finalbox .choices{gap:9px}.anchors{font-size:10px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* Research monitor */
.admin{max-width:1600px;background:#f8f9fb;min-height:100vh}.dashboard-header,.detail-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:28px 0}.dashboard-header small{color:#8a909a;font-size:11px}.live-dot{display:inline-block;width:8px;height:8px;background:#4f9372;border-radius:50%;margin-right:8px}.stats-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:12px}.stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:20px}.stat small{display:block;color:#7c8290;font-size:12px}.stat strong{font-size:30px;font-weight:600}.badge{border-radius:15px;background:#eef0f4;padding:4px 8px;white-space:nowrap;font-size:11px}.badge.online,.badge.complete{background:#e7f3ec;color:#34724e}.badge.withdrawn,.badge.possibly_lost{background:#fff0e7;color:#966235}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.metric-grid small{display:block;color:#89909b}.metric-grid strong{font-size:13px;font-weight:500}.trial-detail{padding:15px 0;border-top:1px solid var(--border)}.trial-detail summary{color:#39455c}.error{padding:15px;background:#fff0ee;color:#973f38}.admin .searchbar{margin:16px 0}.admin select{border:1px solid var(--border);border-radius:8px;padding:8px;background:#fff}.admin td pre{max-width:650px;max-height:180px;overflow:auto;font-size:11px}.admin h3{font-size:15px;margin:25px 0 15px}.admin table{white-space:nowrap}.admin td{vertical-align:top}.admin td pre{white-space:pre-wrap}@media(max-width:900px){.stats-grid{grid-template-columns:repeat(2,1fr)}.admin{padding:20px 14px}.dashboard-header{flex-wrap:wrap}.metric-grid{grid-template-columns:repeat(2,1fr)}.admin .searchbar{flex-wrap:wrap}}

/* Chat-first task workspace: desktop sidebar and a mobile bottom composer. */
.task-mode .content{padding-bottom:220px;max-width:940px}.task-mode .content>.card.soft{background:#f4f4f5;border:0;border-radius:18px 18px 4px 18px;margin-left:auto;max-width:88%;padding:18px 23px}.task-mode .content>.card.soft .eyebrow{display:none}.task-mode .taskquestion{font-size:15px;font-weight:400}.task-mode #answer-region{border:0;border-radius:0;padding:24px 0;background:transparent}.task-mode .answer{font-size:15px;line-height:1.95}.task-mode .messagehead{font-size:12px;color:#74777f}.task-mode .assistantmark{background:#f3f3f4;color:#414347}.task-mode .composer{position:fixed;bottom:22px;left:calc(240px + (100vw - 240px)/2);transform:translateX(-50%);width:min(840px,calc(100vw - 308px));background:#fafafa;border:1px solid #e5e5e5;border-radius:24px;padding:15px 18px 11px;z-index:5;box-shadow:0 3px 20px #00000008}.task-mode .composer textarea{background:transparent;min-height:54px;max-height:140px}.task-mode .composer footer{gap:10px}.task-mode .composer .tools{margin:0;gap:7px}.task-mode .composer .tools button{background:transparent;border-color:#ddd;font-size:12px;padding:5px 11px}.task-mode .composer .tools .selected{background:#e9edfc;border-color:#c8d2f4;color:#4563c5}.task-mode .send{border-radius:50%;width:33px;height:33px;padding:0;font-size:20px;background:#303030;border-color:#303030;flex-shrink:0}.task-mode .finalbox{margin-top:30px;border-top:1px solid #eee}.task-mode .finalbox .field{margin:22px 0}.task-mode .finalbox .actions{margin-top:16px}.task-mode .source-label{font-size:11px}.task-mode .bubble.assistant{line-height:1.95}.task-mode .bubble.user{border-radius:18px 18px 4px 18px;background:#f4f4f5}.task-mode .primary:not(.send){background:#303030;border-color:#303030}.task-mode .progressrow{margin-bottom:22px}.task-mode .panel{background:#f8f9fc}.task-mode .mobile-id{padding-bottom:12px}
@media(max-width:760px){.task-mode .topbar{position:sticky;top:0;z-index:6;background:#ffffffed;border:0;height:58px}.task-mode .topbar .title{font-size:15px}.task-mode .topbar .title .hint{display:none}.task-mode .content{padding:20px 18px 210px}.task-mode .content>.card.soft{max-width:94%;padding:14px 17px;background:#eff3fc;border-radius:17px}.task-mode .taskquestion{font-size:15px;line-height:1.85}.task-mode #answer-region{padding:20px 2px 8px;margin-top:6px}.task-mode .assistantmark{color:#4c6cf1;background:transparent;font-size:20px}.task-mode .composer{left:50%;width:calc(100vw - 24px);bottom:max(12px,env(safe-area-inset-bottom));border:1px solid #efefef;border-radius:24px;background:#fafafa;box-shadow:0 1px 16px #00000009;padding:13px 14px 10px}.task-mode .composer textarea{font-size:15px;min-height:48px}.task-mode .composer .tools button{padding:5px 9px;font-size:11px;border:0;background:#eeeef0}.task-mode .send{background:#4b6bfb;border-color:#4b6bfb}.task-mode .primary:not(.send){background:#4b6bfb;border-color:#4b6bfb}.task-mode .progressrow{font-size:11px}.task-mode .finalbox{padding-top:0}.task-mode .finalbox .field legend{font-size:14px}.task-mode .source-label{line-height:1.7}.task-mode .composer .tools{flex-wrap:nowrap}.task-mode .tools .quiet{font-size:10px;padding:4px}}

/* Keep the scrollable transcript above the composer, including on short screens. */
.task-mode{height:100dvh;display:flex;flex-direction:column;overflow:hidden}.task-mode .topbar{flex-shrink:0}.task-mode .content{flex:1;min-height:0;width:100%;overflow-y:auto;margin-bottom:175px;padding-bottom:35px;scroll-padding-bottom:25px}#app:has(.demo) .task-mode{height:calc(100dvh - 40px)}.task-mode .composer{max-height:170px}.task-mode .content .finalbox{scroll-margin-bottom:25px}@media(max-width:760px){.task-mode .content{margin-bottom:155px;padding-bottom:26px}#app:has(.demo) .task-mode{height:calc(100dvh - 34px)}.task-mode .composer textarea{max-height:90px}}

[hidden]{display:none!important}.searchbar .textinput{flex:1;min-width:0;width:auto}.searchbar button{flex-shrink:0;white-space:nowrap}.admin .card>.scroll{max-height:62vh;overflow:auto}.admin thead{position:sticky;top:0;background:white;z-index:1}

.status.disconnected{color:#a35f43}.task-mode .status{max-width:47%;text-align:right}

.task-mode{height:var(--app-height,100dvh)}#app:has(.demo) .task-mode{height:calc(var(--app-height,100dvh) - 40px)}@media(max-width:760px){#app:has(.demo) .task-mode{height:calc(var(--app-height,100dvh) - 34px)}.task-mode .composer{bottom:calc(var(--keyboard-inset,0px) + max(12px,env(safe-area-inset-bottom)))}}.status:before{content:"";display:inline-block;width:6px;height:6px;background:#6c9f83;border-radius:50%;margin-right:6px}.status.disconnected:before{background:#b0754e}

.icp-footer{position:relative;text-align:center;padding:8px 12px;font-size:12px;background:#f8f9fb;color:#677080}.icp-footer a{color:inherit;text-decoration:none}
