:root{color-scheme:light;--ink:#17233d;--muted:#7c8aa2;--blue:#426df5;--blue2:#e9efff;--line:#e9edf4;--bg:#f5f7fb;--card:#fff;--nav:#101b32;--green:#36a989;--orange:#f29a50;--radius:19px;--shadow:0 8px 28px rgba(32,53,101,.035)}*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #9bb4ff;outline-offset:2px}button:disabled{opacity:.5;cursor:not-allowed}.app-shell{min-height:100vh;display:flex}.sidebar{position:fixed;z-index:10;left:0;top:0;bottom:0;width:232px;padding:31px 18px 22px;background:var(--nav);color:#fff;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:11px;padding:0 8px 34px}.brand-icon{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;background:linear-gradient(145deg,#7894ff,#4c72f2);box-shadow:0 5px 15px #335fe63b;color:white}.brand-name{font-size:21px;letter-spacing:-1px;font-weight:800}.brand-sub{display:block;font-size:10px;color:#94a2c2;letter-spacing:.13em;text-transform:uppercase;font-weight:700;margin-top:2px}.nav-label{color:#667590;text-transform:uppercase;letter-spacing:.12em;font-size:10px;font-weight:700;margin:0 12px 10px}.nav{display:grid;gap:5px}.nav-btn{width:100%;border:0;background:transparent;color:#9daac2;display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:11px;text-align:left;font-size:13.5px;font-weight:600}.nav-btn:hover{color:#fff;background:#1d2b47}.nav-btn.active{color:white;background:#293d67}.nav-btn .ico{width:19px;height:19px}.nav-count{margin-left:auto;background:#486ffa;border-radius:20px;padding:3px 7px;font-size:10px}.side-spacer{flex:1}.side-card{background:#192741;border:1px solid #263652;padding:14px;border-radius:14px;color:#aab9d2}.side-card p{font-size:11px;line-height:1.55;margin:7px 0 0}.side-card strong{color:#f5f8ff;font-size:12px}.side-card .dot{background:#73cfb5}.side-footer{padding:16px 7px 0;display:flex;align-items:center;gap:9px;color:#a9b7cd;font-size:12px}.work-avatar{width:32px;height:32px;display:grid;place-items:center;background:#42526f;border-radius:10px;color:white;font-weight:700}.main{margin-left:232px;width:calc(100% - 232px);min-width:0}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 43px;border-bottom:1px solid #e8edf5;background:#fff}.crumb{font-size:12px;color:#a0acbd;font-weight:500}.crumb b{color:#65738a;font-weight:600}.top-actions{display:flex;align-items:center;gap:13px}.demo-label{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;color:#7586a1;padding:8px 11px;background:#f5f7fb;border-radius:8px}.demo-label .dot{background:#71c8a9}.user-avatar{display:grid;place-items:center;width:37px;height:37px;border-radius:12px;background:#e7ecff;color:#526fde;font-size:12px;font-weight:800}.content{max-width:1510px;margin:0 auto;padding:36px 43px 70px}.page-head{display:flex;justify-content:space-between;align-items:flex-end;gap:20px;margin:0 0 25px}.eyebrow{display:flex;align-items:center;gap:8px;text-transform:uppercase;font-size:10px;font-weight:800;letter-spacing:.14em;color:#8c9bb0;margin-bottom:9px}.eyebrow .dot{background:#6e8dff}.page-head h1{font-size:30px;letter-spacing:-1.3px;margin:0;font-weight:750;line-height:1.18}.page-head p{font-size:13px;color:#8491a5;margin:8px 0 0;line-height:1.5}.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:10px;padding:12px 15px;font-size:12px;font-weight:700;transition:.15s;white-space:nowrap}.btn .ico{width:16px;height:16px}.btn-primary{color:#fff;background:var(--blue);box-shadow:0 5px 12px #426df526}.btn-primary:hover{background:#345fe4}.btn-light{background:#f1f4fa;color:#53617a}.btn-light:hover{background:#e7ecf7}.btn-outline{background:#fff;color:#52627b;border:1px solid #e4e9f1}.btn-outline:hover{border-color:#bac9f4;color:#426df5}.btn-ghost{background:transparent;color:#5476d6;padding:7px 0}.btn-sm{padding:9px 11px;font-size:11px}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:15px;margin-bottom:22px}.stat{background:white;border:1px solid #edf0f6;border-radius:15px;padding:18px 19px 15px;min-height:108px;box-shadow:var(--shadow)}.stat-top{display:flex;align-items:center;gap:10px;color:#8c99ad;font-size:10.5px;font-weight:700}.stat-icon{width:29px;height:29px;border-radius:9px;display:grid;place-items:center}.stat-icon .ico{width:15px;height:15px}.stat-icon.blue{background:#eaf0ff;color:#4e78ef}.stat-icon.violet{background:#f1edff;color:#9a78e5}.stat-icon.orange{background:#fff2e6;color:#e99a52}.stat-icon.green{background:#e7f7f0;color:#4bae90}.stat-bottom{display:flex;align-items:baseline;gap:8px;margin-top:8px}.stat-value{font-size:27px;line-height:1;font-weight:750;letter-spacing:-1px}.stat-caption{font-size:10.5px;color:#a0acbc}.layout{display:grid;grid-template-columns:minmax(0,1.62fr) minmax(280px,.82fr);gap:20px;align-items:start}.card{background:#fff;border:1px solid #edf0f6;border-radius:var(--radius);box-shadow:var(--shadow)}.card-head{padding:21px 23px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px}.card-title{font-size:15px;font-weight:750;letter-spacing:-.25px;margin:0}.card-subtitle{font-size:11px;color:#a0acbd;margin:5px 0 0;line-height:1.5}.card-head .count{background:#eff3fa;color:#8a99ad;font-size:10px;padding:4px 7px;border-radius:7px;margin-left:7px}.filters{display:flex;gap:4px;padding:0 19px 12px;border-bottom:1px solid #f0f2f7;overflow:auto}.filter{border:0;background:transparent;color:#9aa6b9;font-size:11px;font-weight:700;padding:9px 12px;border-radius:8px;white-space:nowrap}.filter.active{background:#edf2ff;color:#5274e2}.task-list{padding:0 22px}.task-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto auto;gap:12px;align-items:center;padding:19px 0;border-bottom:1px solid #f1f3f7}.task-row:last-child{border-bottom:0}.check{display:grid;place-items:center;width:19px;height:19px;border:1.5px solid #cad3e2;border-radius:6px;background:white;color:white;padding:0}.check.done{background:#6dc3a8;border-color:#6dc3a8}.check.done .ico{width:12px;height:12px}.task-main{min-width:0}.task-title{font-size:12.5px;font-weight:700;line-height:1.45;overflow-wrap:anywhere}.task-title.done{text-decoration:line-through;color:#a4afbd}.task-meta{display:flex;flex-wrap:wrap;align-items:center;gap:7px;color:#a1adbd;font-size:10.5px;margin-top:7px}.task-meta .ico{width:12px;height:12px}.meta-dot{width:3px;height:3px;border-radius:50%;background:#d2d9e3}.source-chip{color:#8390a5}.assign{display:flex;align-items:center;gap:7px;color:#8190a5;font-size:10.5px;white-space:nowrap}.mini-avatar{display:grid;place-items:center;flex:0 0 auto;width:25px;height:25px;border-radius:9px;font-size:9px;font-weight:800;background:#e4ecff;color:#5674d9}.mini-avatar.a1{background:#fff0e6;color:#d89155}.mini-avatar.a2{background:#e5f4ef;color:#53a88c}.mini-avatar.a3{background:#f1eafe;color:#9875cb}.mini-avatar.a4{background:#edf0f4;color:#99a4b3}.more{border:0;background:none;padding:4px;color:#a8b4c2;border-radius:6px}.more:hover{background:#eef2fa;color:#5873c7}.more .ico{width:18px;height:18px}.card-foot{padding:14px 22px 18px;border-top:1px solid #f2f4f7;color:#a7b2c1;font-size:10.5px;display:flex;align-items:center;gap:6px}.empty{padding:44px 20px;text-align:center;color:#9ba9bc;font-size:12px;line-height:1.6}.right-stack{display:grid;gap:17px}.brief-card{padding:21px 22px 20px;position:relative;overflow:hidden}.brief-card:before{content:"";position:absolute;right:-45px;top:-70px;width:145px;height:145px;border-radius:50%;background:#f5f7ff}.brief-top{display:flex;align-items:center;justify-content:space-between;position:relative}.section-icon{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:#edf2ff;color:#6685ed}.section-icon .ico{width:18px;height:18px}.tiny-tag{font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8293b1;background:#f1f4fa;border-radius:6px;padding:6px 7px}.brief-card h3{font-size:15px;margin:18px 0 5px;letter-spacing:-.3px}.brief-card>p{margin:0;color:#9aa7b8;font-size:11px;line-height:1.55}.brief-points{margin:18px 0 13px;display:grid;gap:12px}.brief-point{display:flex;gap:10px;font-size:11.5px;color:#5e6e84;line-height:1.45}.brief-point b{color:#394b68}.bullet{flex:0 0 6px;width:6px;height:6px;background:#85a0ff;border-radius:50%;margin-top:5px}.link-btn{display:flex;align-items:center;justify-content:space-between;width:100%;padding:14px 0 0;background:none;border:0;border-top:1px solid #eff2f7;color:#5476dc;font-size:11px;font-weight:750;text-align:left}.link-btn .ico{width:16px;height:16px}.tip-card{padding:19px 21px;background:#edf2ff;border:1px solid #e5ebff;border-radius:16px}.tip-head{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:800;color:#4e6fc4}.tip-head .ico{width:16px;height:16px}.tip-card p{color:#8395b5;font-size:11px;line-height:1.55;margin:8px 0 0}.demo-note{display:flex;gap:10px;align-items:flex-start;color:#94a1b3;font-size:10.5px;line-height:1.55;margin-top:19px}.demo-note .ico{width:15px;height:15px;flex-shrink:0;color:#90a7e2}.ico{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.dot{width:7px;height:7px;border-radius:50%;display:inline-block;flex:0 0 auto}.wide-card{padding:22px 24px}.overview-top{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:21px}.brief-intro{display:flex;align-items:center;gap:15px;padding:20px;background:#f5f7ff;border-radius:14px}.brief-intro .section-icon{background:white}.brief-intro strong{font-size:13px}.brief-intro p{font-size:11px;color:#93a0b3;margin:5px 0 0}.brief-section{padding:23px 0;border-bottom:1px solid #f0f3f7}.brief-section:last-child{border:0;padding-bottom:0}.brief-section h3{font-size:12px;display:flex;align-items:center;gap:8px;margin:0 0 14px}.brief-section h3 .ico{width:16px;height:16px;color:#718ee6}.brief-item{font-size:12px;color:#5e6f87;line-height:1.65;margin:9px 0;display:flex;gap:10px}.brief-item button{border:0;background:none;padding:0;color:#5b7be0;text-align:left;text-decoration:underline;text-decoration-color:#c7d2f6;text-underline-offset:3px}.brief-item small{display:block;color:#a5b1bf;margin-top:2px}.flow-list{display:grid;gap:10px}.flow-step{display:flex;gap:11px;align-items:flex-start}.flow-num{display:grid;place-items:center;background:#eff3ff;color:#6381de;min-width:25px;height:25px;border-radius:8px;font-size:10px;font-weight:800}.flow-step strong{font-size:11.5px}.flow-step p{font-size:10.5px;line-height:1.5;color:#9aa8ba;margin:4px 0 0}.chat-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:18px;border-bottom:1px solid #edf0f5}.chat-header strong{font-size:13px}.chat-header small{display:block;margin-top:4px;font-size:10px;color:#a1adbd}.chat-list{display:grid;gap:15px;padding:22px 0}.msg{display:flex;gap:10px;align-items:flex-start}.msg-bubble{background:#f6f8fc;border:1px solid #f1f3f8;border-radius:4px 13px 13px 13px;padding:12px 14px;max-width:92%;font-size:12px;color:#52627a;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}.msg-bubble strong{display:block;color:#526fde;font-size:10.5px;margin-bottom:4px}.msg-time{color:#a7b3c3;font-size:9px;margin-left:8px;font-weight:400}.msg.highlight .msg-bubble{border-color:#9eb4ff;background:#f1f5ff}.chat-compose{border-top:1px solid #edf0f5;padding-top:18px}.label{display:block;margin:0 0 7px;font-size:11px;font-weight:700;color:#6d7b91}.hint{font-size:10px;color:#a0adbd;line-height:1.5}.field{width:100%;border:1px solid #e3e9f3;border-radius:10px;padding:11px 12px;color:#34445f;background:#fff;font-size:12px}.field::placeholder{color:#bbc5d1}.field:focus{border-color:#8ea8ff}.textarea{resize:vertical;min-height:76px;line-height:1.5}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.form-row{margin-top:15px}.compose-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.candidate{padding:14px;border:1px solid #e9edf6;border-radius:12px;margin-top:10px}.candidate strong{font-size:11.5px;line-height:1.4;display:block}.candidate p{font-size:10px;color:#9aa7b9;line-height:1.5;margin:6px 0 12px}.candidate-actions{display:flex;gap:8px;flex-wrap:wrap}.settings-group{padding:19px 0;border-bottom:1px solid #edf1f6}.settings-group:first-child{padding-top:0}.settings-group:last-child{border:0;padding-bottom:0}.settings-group h3{font-size:13px;margin:0 0 8px}.settings-group p{font-size:11px;color:#8d9bae;line-height:1.6;margin:5px 0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:16px 0}.setting-row strong{font-size:11.5px}.setting-row small{display:block;color:#a0acbd;font-size:10px;margin-top:4px;line-height:1.5}.switch{position:relative;flex-shrink:0;width:38px;height:22px;border:0;border-radius:20px;background:#d7dfea;padding:2px}.switch:after{content:"";display:block;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 4px #64748b33;transition:.2s}.switch.on{background:#6284f3}.switch.on:after{transform:translateX(16px)}.modal-backdrop{position:fixed;z-index:50;inset:0;background:rgba(18,29,50,.52);display:grid;place-items:center;padding:18px}.modal{width:min(100%,470px);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:24px;box-shadow:0 20px 60px #192b4e33}.modal h2{font-size:19px;letter-spacing:-.5px;margin:0}.modal-top{display:flex;justify-content:space-between;align-items:center;gap:10px}.close{border:0;background:#f4f6fa;color:#8b98a9;width:31px;height:31px;border-radius:9px;display:grid;place-items:center}.close .ico{width:17px;height:17px}.modal p{font-size:11px;color:#9aa7b8;line-height:1.5}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.toast{position:fixed;z-index:70;bottom:24px;left:50%;transform:translate(-50%,18px);opacity:0;pointer-events:none;background:#172b46;color:white;padding:12px 17px;border-radius:10px;font-size:12px;box-shadow:0 10px 30px #0002;transition:.2s}.toast.show{opacity:1;transform:translate(-50%,0)}.mobile-nav{display:none}.danger{color:#da6c70}.status-pill{font-size:10px;border-radius:7px;padding:5px 7px;color:#65aa93;background:#edf8f4;font-weight:700}.status-pill.pending{color:#df9955;background:#fff4e9}@media(max-width:1100px){.content{padding:32px 26px 65px}.topbar{padding:0 26px}.layout{grid-template-columns:minmax(0,1.4fr) minmax(260px,.8fr);gap:14px}.stats-grid{gap:10px}.stat{padding:15px}.assign span:last-child{display:none}}@media(max-width:820px){.sidebar{width:70px;padding:22px 10px}.brand{padding:0 4px 28px}.brand-name,.brand-sub,.nav-label,.nav-btn>span:not(.nav-count),.nav-count,.side-card,.side-footer span{display:none}.nav-btn{justify-content:center;padding:13px}.side-footer{justify-content:center;padding:0}.main{margin-left:70px;width:calc(100% - 70px)}.layout{grid-template-columns:1fr}.right-stack{grid-template-columns:1fr 1fr}.stats-grid{grid-template-columns:repeat(2,1fr)}.assign span:last-child{display:inline}.brief-card{min-height:235px}}@media(max-width:560px){body{padding-bottom:71px}.sidebar{display:none}.main{margin:0;width:100%}.topbar{height:60px;padding:0 18px}.content{padding:25px 17px 35px}.crumb{font-size:11px}.user-avatar{width:32px;height:32px}.demo-label{padding:7px;font-size:10px}.page-head{align-items:flex-start;margin-bottom:20px}.page-head h1{font-size:27px}.page-head p{font-size:12px}.page-head>.btn{padding:11px;font-size:0}.page-head>.btn .ico{width:17px;height:17px}.stats-grid{gap:9px;margin-bottom:15px}.stat{min-height:92px;padding:13px}.stat-top{font-size:10px}.stat-value{font-size:23px}.stat-caption{font-size:10px}.layout{gap:14px}.right-stack{grid-template-columns:1fr}.brief-card{min-height:0}.card-head{padding:19px 17px 14px}.task-list{padding:0 17px}.task-row{grid-template-columns:19px minmax(0,1fr) auto;gap:10px}.task-row .assign{display:none}.task-row .more{grid-column:3}.task-meta{font-size:10px}.filters{padding-left:12px}.wide-card{padding:19px 17px}.mobile-nav{display:flex;position:fixed;z-index:20;bottom:0;left:0;right:0;height:68px;padding:5px 4px max(5px,env(safe-area-inset-bottom));background:#fff;border-top:1px solid #e7ecf4;justify-content:space-around}.mobile-nav button{border:0;background:none;color:#9aa8bb;font-size:9px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:4px;min-width:65px;padding:5px}.mobile-nav button.active{color:#5276e5}.mobile-nav .ico{width:19px;height:19px}.form-grid{grid-template-columns:1fr}.toast{bottom:86px;white-space:nowrap;max-width:90%;overflow:hidden;text-overflow:ellipsis}}
.search-box{display:flex;align-items:center;gap:9px;position:relative}.search-box>.ico{position:absolute;left:12px;color:#9aa9bf;width:16px;height:16px}.search-box input{padding-left:37px;min-width:0}.search-examples{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin:13px 0 0}.search-examples span{font-size:10px;color:#a2aebe}.search-examples button{border:1px solid #e9edf5;background:#f8f9fc;border-radius:7px;padding:6px 8px;font-size:10px;color:#7e8da3}.search-examples button:hover{border-color:#becdfc;color:#5275de}.search-divider{height:1px;background:#eff2f7;margin:22px 0}.search-empty{display:grid;justify-items:center;text-align:center;padding:45px 10px 55px}.search-empty h3{font-size:13px;margin:14px 0 6px}.search-empty p{font-size:11px;line-height:1.6;color:#9aa7b8;max-width:315px;margin:0}.result-heading{font-size:11px;color:#8998ac;font-weight:700;margin-bottom:14px}.search-result{border:1px solid #edf0f6;padding:15px;border-radius:13px;margin:10px 0}.result-top{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:11px}.result-top small{display:block;font-size:10px;color:#a1aebe;margin-top:3px}.search-result p{font-size:12px;line-height:1.6;color:#53657e;white-space:pre-wrap;overflow-wrap:anywhere}.search-result .btn-ghost{padding:0}.search-result .btn-ghost .ico{width:14px;height:14px}@media(max-width:560px){.mobile-nav button{flex:1;min-width:0}.search-box{flex-wrap:nowrap}.search-box .btn{padding:12px}}
.source-message{margin:20px 0 12px;padding:15px;background:#f5f7fc;border:1px solid #ecf0f7;border-radius:12px}.source-message-meta{display:flex;align-items:center;gap:9px;font-size:11px}.source-message-meta small{display:block;color:#9aa7b8;font-size:10px;margin-top:3px}.source-message p{font-size:12px;color:#52627a;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;margin:13px 0 0}
.chat-select{max-width:230px;padding:9px 12px;border:1px solid #e5eaf2;border-radius:9px;color:#53617a;font-size:11px;background:white}.inline-source{border:0;background:transparent;color:#5878db;padding:0;text-decoration:underline;text-underline-offset:2px;font-size:10px}.startup{max-width:400px;margin:15vh auto;padding:30px;text-align:center;color:#63738c}.startup h1{color:#17233d}.startup p{font-size:13px;line-height:1.6}.startup-icon{display:grid;place-items:center;margin:auto;background:#edf2ff;color:#5476e5;width:55px;height:55px;border-radius:17px;font-size:23px}@media(max-width:560px){.chat-select{max-width:125px}.mobile-nav button{flex:1;min-width:0}}
.task-actions{display:flex;align-items:center;gap:2px}.more.danger:hover{background:#fff0f0;color:#c8414a}.btn-delete{color:#fff;background:#cf4b55}.btn-delete:hover{background:#b63d47}
@media(max-width:560px){.page-head>.btn[data-act="new"]{width:40px;height:40px;flex:0 0 40px;gap:0;padding:0}}

/* Allow cards and long user-generated content to shrink with the viewport. */
.layout>*,.right-stack>*,.stats-grid>*,.card-head>*,.page-head>div,.setting-row>div,.brief-item>span{min-width:0}
.candidate strong,.candidate p,.brief-item>span,.setting-row,.modal p,.empty,.hint,.card-subtitle,.task-meta>*{overflow-wrap:anywhere}
.brief-topic{border:1px solid #e9edf6;border-radius:10px;margin:8px 0;overflow-wrap:anywhere}.brief-topic summary{cursor:pointer;padding:12px;color:#34445f;font-size:12px;font-weight:700}.brief-topic-body{padding:0 12px 12px;color:#52627a;font-size:12px;line-height:1.5}.brief-topic-body p{margin:0 0 8px;white-space:pre-wrap}.brief-topic-body button{border:0;background:none;color:#5276e5;cursor:pointer;padding:0 8px 0 0}
.stat-icon,.section-icon{flex:0 0 auto}
.assign{min-width:0;max-width:140px}
.assign span:last-child,.side-footer span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.form-grid>div{min-width:0}
.topbar{gap:12px}
.crumb{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top-actions,.user-avatar{flex-shrink:0}
.chat-select{min-width:0;text-overflow:ellipsis}
.filters{flex-wrap:wrap;overflow:visible}
.filter{flex:0 0 auto}
.modal{max-height:min(90vh,calc(100dvh - 36px));overscroll-behavior:contain}
.modal-actions{flex-wrap:wrap}

@media(max-width:820px){
 .right-stack,.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:560px){
 body{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
 .page-head{flex-wrap:wrap;gap:12px}
 .page-head>div{flex:1 1 140px}
 .page-head>.btn:not([data-act="new"]){font-size:11px;line-height:1.3;white-space:normal;text-align:center;max-width:100%;padding:10px 12px}
 .page-head>.btn .ico{flex:0 0 auto}
 .right-stack,.form-grid{grid-template-columns:minmax(0,1fr)}
 .filters{flex-wrap:wrap;overflow:visible;gap:4px}
 .task-actions{gap:0}
 .task-row .more{display:grid;place-items:center;width:34px;height:36px;padding:5px}
 .candidate-actions .btn{max-width:100%;white-space:normal}
 .mobile-nav{height:auto;min-height:68px;padding-bottom:max(8px,env(safe-area-inset-bottom,0px))}
 .toast{bottom:calc(86px + env(safe-area-inset-bottom,0px))}
 .modal{padding:20px;max-height:calc(100dvh - 36px)}
}
@media(max-width:280px){
 .stats-grid{grid-template-columns:minmax(0,1fr)}
 .topbar{padding-inline:12px}
 .chat-select{max-width:90px}
 .modal-actions .btn{flex:1 1 100%;white-space:normal}
}

.task-filters{padding:0 0 12px;margin-bottom:16px}
.task-search{max-width:520px;margin:0 0 18px}
.personal-card{margin-bottom:18px}
.personal-card>.card-title{margin-bottom:12px}
.personal-card .count{color:#8a99ad;font-size:11px}
.compact-empty{padding:18px 0}
.task-open{display:block;border:0;background:none;text-align:left;color:inherit;padding:0}
.task-open:hover{color:var(--blue)}
.task-modal{width:min(100%,620px)}
.image-input{padding:9px}
.image-input::file-selector-button{border:0;border-radius:7px;background:#edf2ff;color:#5274e2;padding:7px 10px;margin-right:10px;font-weight:700}
.task-details{margin-top:22px;border-top:1px solid var(--line)}
.details-section{padding:18px 0 0}
.details-section h3{font-size:13px;margin:0 0 12px}
.details-section h3 .count{color:#97a4b5;font-size:11px}
.image-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(100px,1fr));gap:10px}
.image-grid>.hint{grid-column:1/-1}
.image-item{position:relative;aspect-ratio:1;min-width:0}
.image-item a{display:block;width:100%;height:100%}
.image-item img{display:block;width:100%;height:100%;object-fit:cover;background:#f4f6fa;border:1px solid #edf0f6;border-radius:10px;font-size:10px;color:#8190a5}
.image-delete{position:absolute;top:5px;right:5px;display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:8px;background:#fff;color:#bf4b55;font-size:20px;line-height:1;box-shadow:0 2px 8px #18264622}
.comments{display:grid;gap:10px;margin-bottom:14px}
.comment{padding:11px 12px;background:#f7f9fc;border-radius:10px}
.comment>div{display:flex;justify-content:space-between;gap:10px;font-size:11px;color:#52627b}
.comment time{font-size:10px;color:#98a6b8;white-space:nowrap}
.comment p{margin:7px 0 0;color:#52627b;font-size:12px;white-space:pre-wrap;overflow-wrap:anywhere}
.comment-send{margin-top:9px}
@media(max-width:560px){
 .task-filters{margin-bottom:13px;padding-left:0}
 .task-search{margin-bottom:14px}
 .image-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
 .comment>div{flex-wrap:wrap}
}

/* Keep native, keyboard-accessible menus while giving their closed controls a consistent appearance. */
.top-actions{flex:0 1 auto;min-width:0;justify-content:flex-end}
.crumb{flex:1 1 auto}
.user-avatar{flex:0 0 auto}
.chat-select,select.field{
 -webkit-appearance:none;appearance:none;
 background-color:#fff;
 background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23566b91' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 7.5 5 5 5-5'/%3E%3C/svg%3E");
 background-repeat:no-repeat;background-position:right 12px center;background-size:16px 16px;
 border:1px solid #dce4f1;border-radius:10px;color:#34445f;
 min-height:42px;padding:10px 36px 10px 13px;cursor:pointer;box-shadow:none;
}
.chat-select{flex:0 1 230px;width:230px;max-width:100%;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
select.field{font-size:13px}
.chat-select:hover,select.field:hover{border-color:#b9c9e9}
.chat-select:focus-visible,select.field:focus-visible{border-color:#7292f0;outline:3px solid #c9d7ff;outline-offset:2px}
#group-tasks{scroll-margin-top:16px}
@media(max-width:560px){
 .top-actions{gap:9px;flex:0 1 230px}
 .chat-select{width:190px;max-width:100%;font-size:14px}
 select.field{font-size:16px}
 .filter{min-height:40px}
}

.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}@media(max-width:560px){.page-actions .btn[data-act=new]{width:40px;height:40px;padding:0;flex:0 0 40px;overflow:hidden;font-size:0}.page-actions .btn[data-act=new] .ico{flex:0 0 16px}}

.page-head{align-items:center;gap:12px}
.page-head>.page-actions{flex:0 1 auto;min-width:0}
.page-actions .btn{min-height:42px;white-space:normal;text-align:center}
.task-row,.candidate,.brief-topic,.comment{min-width:0}
.task-title,.candidate strong,.brief-topic summary{overflow-wrap:anywhere}
.task-open:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #b8caff;outline-offset:2px}
.btn:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:560px){
 .page-head>div:first-child{flex:1 1 auto}
 .page-head>.page-actions{flex:0 1 auto;max-width:100%;gap:6px}
 .page-actions .btn{min-height:40px;font-size:11px;padding:9px 11px}
 .page-actions .btn[data-act=new]{font-size:0}
 .brief-topic summary{min-height:44px;display:flex;align-items:center}
 .candidate-actions{gap:6px}
 .candidate-actions .btn{min-height:40px}
}
@media(max-width:340px){.page-head>.page-actions{flex:1 1 100%;justify-content:flex-start}}
