:root{--bg:#f5f6f8;--paper:#fff;--ink:#202637;--muted:#7c8494;--line:#e7e9ee;--purple:#6558d9;--purplebg:#eeebfc;--orange:#b87822;--green:#318974;--red:#bd535e}*{box-sizing:border-box}body{margin:0;font:14px/1.5 "Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer;border:1px solid var(--line);background:#fff;padding:9px 13px;border-radius:8px;color:var(--ink);transition:.15s}button:hover{border-color:#b8b2e5;background:#faf9ff}button:disabled{opacity:.5;cursor:wait}input,select,textarea{border:1px solid var(--line);background:#fff;padding:11px 12px;border-radius:8px;color:var(--ink);width:100%;outline:none}input:focus,textarea:focus,select:focus{border-color:var(--purple);box-shadow:0 0 0 3px #6558d914}a{color:var(--purple);text-decoration:none}button.primary{background:var(--purple);color:#fff;border-color:var(--purple)}button.primary:hover{background:#5749c6}.hidden{display:none!important}.muted{color:var(--muted)}.smalltext{font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--muted)}h1,h2,h3,p{margin-top:0}h1{font-size:30px;font-weight:650;letter-spacing:-.9px;margin-bottom:7px}h2{font-size:20px;line-height:1.35}.shell{display:grid;grid-template-columns:236px 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:#fff;border-right:1px solid var(--line);padding:28px 18px;display:flex;flex-direction:column}.logo{display:flex;align-items:center;gap:9px;color:var(--ink);font-size:23px;letter-spacing:-1px;font-weight:750}.logo sup{font-size:10px;color:var(--purple);letter-spacing:0;background:var(--purplebg);padding:1px 5px;border-radius:4px;margin-left:1px}.brandmark{background:var(--purple);color:#fff;width:54px;height:54px;display:grid;place-content:center;font-size:31px;font-weight:750;letter-spacing:-7px;padding-right:7px;border-radius:15px;position:relative}.brandmark span{color:#c7bfff;position:absolute;right:8px;top:4px}.brandmark.small{width:30px;height:30px;font-size:20px;border-radius:8px;letter-spacing:-4px;padding-right:6px}.brandmark.small span{right:5px;top:0}.workspace{display:flex;gap:10px;align-items:center;padding:23px 4px 25px;font-size:12px;font-weight:600}.workspace small{display:block;color:var(--muted);font-size:10px;font-weight:400}.avatar{padding:8px;background:#f0f0f6;color:#68617e;border-radius:8px}.navlabel{font-size:10px;letter-spacing:1.5px;color:#969caa;margin:15px 12px 9px}.nav{display:flex;align-items:center;gap:12px;width:100%;border:0;background:none;padding:11px 12px;margin:2px 0;text-align:left;color:#737b8c}.nav span{flex:1}.nav b{font-size:11px;font-weight:500;background:#f1f2f5;padding:0 6px;border-radius:4px}.nav.active{background:var(--purplebg);color:var(--purple);font-weight:600}.projectDot{width:8px;height:8px;border-radius:3px;display:inline-block}.sidebarBottom{margin-top:auto;border-top:1px solid var(--line);padding-top:20px}.quiet{font-size:11px;border:0;background:none;padding:8px 5px;color:var(--muted)}.connection{font-size:11px;display:flex;gap:7px;align-items:center;margin:8px 5px}.connection i,.liveDot{height:6px;width:6px;border-radius:50%;background:#b7bdc9;display:inline-block}.connection.online i,.liveDot{background:#56ad92}main{min-width:0}.topbar{height:69px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;padding:0 34px;font-size:11px;color:var(--muted);background:#ffffff9c}.topbar strong{color:#545c6d;font-weight:500}.topbar button{border:0;background:none}.slash{padding:0 12px;color:#c3c6cf}.content{padding:34px;max-width:2000px;margin:auto}.pagehead{display:flex;justify-content:space-between;gap:20px;align-items:center;margin-bottom:25px}.pagehead .muted{font-size:12px}.headActions{display:flex;gap:8px}.headActions button{font-size:12px;white-space:nowrap}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:26px}.metric{padding:18px 21px;background:#fff;border:1px solid var(--line);border-radius:11px}.metric .metricTop{display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.metric strong{display:block;font-size:27px;font-weight:600;line-height:1.4;margin:6px 0 2px;letter-spacing:-.5px}.metric small{color:#8e95a3;font-size:10px}.metric.attention{background:#f0edfc;border-color:#e1dcf7}.metric.attention strong{color:var(--purple)}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;gap:14px}.segmented{display:flex;padding:3px;background:#eaecef;border-radius:8px}.segmented button{background:none;border:0;border-radius:6px;color:var(--muted);font-size:12px;padding:6px 14px}.segmented .selected{background:#fff;color:var(--ink);box-shadow:0 1px 3px #0000000d}.filters{display:flex;gap:10px}.filters input{width:310px;font-size:12px}.filters select{width:160px;font-size:12px}.board{display:grid;grid-template-columns:repeat(5,minmax(210px,1fr));gap:15px;overflow-x:auto;min-height:400px;padding-bottom:15px}.column{background:#eef0f3;border-radius:10px;padding:12px;min-height:360px}.columnhead{display:flex;gap:8px;align-items:center;font-size:11px;font-weight:650;margin-bottom:15px;color:#657082}.columnhead .dot{width:6px;height:6px;border-radius:50%;background:#9299a8}.columnhead .count{background:#e2e5eb;font-size:10px;padding:1px 6px;border-radius:4px;color:#7b8292}.columnhead .extra{margin-left:auto;color:#a0a6b2}.column.attention .dot{background:var(--purple)}.column.running .dot{background:#4b8dc9}.column.blocked .dot{background:#c98640}.column.done .dot{background:var(--green)}.card{padding:15px;background:#fff;border:1px solid #e4e7ed;border-radius:9px;margin-bottom:11px;cursor:pointer;box-shadow:0 2px 3px #20263703}.card:hover{border-color:#b8b2e5;transform:translateY(-1px);box-shadow:0 5px 14px #20263708}.cardtop{display:flex;align-items:center;justify-content:space-between;font-size:10px;color:#9197a5;margin-bottom:10px}.card h3{font-size:13px;line-height:1.5;margin-bottom:13px;font-weight:600}.tag{display:inline-flex;gap:5px;align-items:center;font-size:9px;border-radius:4px;background:#f2f3f6;color:#777e8e;padding:2px 6px}.tag.bug{background:#fff0f0;color:#c45e65}.tag.review{background:#f0edfc;color:#7965bb}.tag.analysis{background:#eaf3fb;color:#548eb6}.cardstage{border-top:1px solid #f0f1f4;margin-top:12px;padding-top:10px;font-size:10px;color:#7b8493}.cardaction{margin-top:9px;background:var(--purplebg);color:var(--purple);padding:6px 8px;border-radius:5px;font-size:10px}.cardnote{font-size:10px;color:#a17342;margin-top:8px;line-height:1.45}.emptyColumn{padding:35px 5px;text-align:center;color:#a0a7b4;font-size:11px}.footnote{font-size:10px;color:#979eab;padding-top:8px}.notice{padding:10px 14px;border:1px solid #e6dcbc;background:#fffaf0;color:#8b7443;border-radius:8px;font-size:12px;margin-bottom:18px}.backdrop{position:fixed;inset:0;background:#18213540;z-index:10;backdrop-filter:blur(2px)}.drawer{position:fixed;right:0;top:0;height:100vh;width:min(820px,90vw);z-index:11;background:#fff;box-shadow:-10px 0 50px #20263712;display:flex;flex-direction:column}.drawerhead{display:flex;justify-content:space-between;align-items:start;padding:25px 28px 10px}.drawerhead h2{margin:8px 0 0}.drawerhead button{border:0}.taskMeta{padding:0 28px 15px;display:flex;gap:8px;align-items:center;flex-wrap:wrap;font-size:11px;color:var(--muted)}.flow{display:flex;gap:5px;padding:0 28px 18px;overflow:auto}.step{font-size:10px;white-space:nowrap;color:#9a9eaa;padding:5px 8px;border-radius:5px;background:#f4f5f7}.step.current{background:var(--purplebg);color:var(--purple);font-weight:600}.step.past{background:#edf5f1;color:var(--green)}.decision{margin:0 28px 16px;border-radius:9px;background:#f4f1fd;padding:16px;line-height:1.5}.decision:empty{display:none}.decision strong{font-size:13px;display:block}.decision p{font-size:12px;color:#787091;margin:5px 0 12px}.decision button{font-size:12px}.tabs{display:flex;border-bottom:1px solid var(--line);padding:0 28px;gap:20px}.tabs button{border:0;border-radius:0;padding:12px 0;font-size:12px;color:var(--muted)}.tabs .selected{border-bottom:2px solid var(--purple);color:var(--purple)}.detailContent{padding:25px 28px;overflow:auto;flex:1}.detailContent pre{white-space:pre-wrap;word-break:break-word;font:13px/1.8 "Segoe UI",sans-serif}.sectionlabel{font-size:10px;letter-spacing:1.1px;color:var(--muted);margin:22px 0 10px}.check{padding:10px 12px;background:#f4f6f8;border-radius:7px;font-size:12px;margin:5px 0;overflow-wrap:anywhere}.message{padding:15px 18px;border:1px solid var(--line);border-radius:9px;margin-bottom:12px}.message.user{background:#f6f4fc;border-color:#e9e3f7;margin-left:30px}.message .author{font-size:10px;font-weight:700;letter-spacing:.8px;color:var(--purple);margin-bottom:8px}.message pre{margin:0;max-height:550px;overflow:auto}.composer{margin-top:18px;display:flex;flex-direction:column;gap:8px}.composer textarea{resize:vertical;min-height:75px}.composer button{align-self:flex-end}.drawerfoot{padding:15px 28px;border-top:1px solid var(--line);display:flex;gap:8px;flex-wrap:wrap}.drawerfoot button{font-size:12px}.event{border-left:2px solid #e9e6f5;padding:0 0 18px 15px;margin-left:5px;font-size:12px}.event time{display:block;font-size:10px;color:var(--muted)}.event pre{font-size:11px;color:#777e8c;margin:4px 0}.emptyState{padding:35px;text-align:center;color:var(--muted)}dialog{width:480px;max-width:92vw;border:1px solid var(--line);padding:28px;border-radius:14px;box-shadow:0 20px 90px #20263730}dialog::backdrop{background:#18213560;backdrop-filter:blur(3px)}.dialoghead{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.dialoghead h2{margin:0}.dialoghead button{border:0}label{display:block;font-size:12px;color:#687183;margin:15px 0}label input,label select,label textarea{margin-top:6px}dialog .primary{width:100%}.dialogActions{display:flex;gap:10px;justify-content:flex-end}.dialogActions .primary{width:auto}#confirmDetails{white-space:pre-wrap;max-height:300px;overflow:auto;font-size:12px;background:#f5f6f8;padding:12px;border-radius:8px;word-break:break-word}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);padding:12px 20px;background:#282b3c;color:#fff;z-index:100;border-radius:9px;max-width:80vw;box-shadow:0 8px 30px #0002}.login{display:grid;grid-template-columns:1fr 1fr;min-height:100vh;background:#fff}.login form{align-self:center;justify-self:center;max-width:370px;width:80%}.login .brandmark{margin-bottom:30px}.login h1{font-size:34px;line-height:1.25}.login button{width:100%;margin-top:10px}.loginArt{background:#edeafa;display:flex;flex-direction:column;justify-content:center;padding:70px;position:relative;overflow:hidden}.loginArt:before{content:'';position:absolute;width:600px;height:600px;border:90px solid #e3def7;border-radius:50%;right:-300px;bottom:-250px}.loginArt span{font-size:45px;color:#5f51b1;line-height:1.2;letter-spacing:-1.5px;z-index:1}.loginArt small{margin-top:30px;color:#9086b5;font-size:15px}.tasktable{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden;font-size:12px}.tasktable th,.tasktable td{padding:15px;text-align:left;border-bottom:1px solid var(--line)}.tasktable th{color:var(--muted);font-weight:500;background:#f9fafb}.tasktable tbody tr{cursor:pointer}.tasktable tbody tr:hover{background:#faf8ff}.board.tablemode{display:block}.status-pill{padding:3px 7px;border-radius:5px;background:#f0edfc;color:#7667b8;font-size:10px}@media(max-width:1200px){.shell{grid-template-columns:195px 1fr}.content{padding:25px}.pagehead{align-items:start;flex-direction:column}.board{grid-template-columns:repeat(5,230px)}.topbar{padding:0 25px}.metrics{gap:10px}.metric{padding:14px}}@media(max-width:760px){.shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto;padding:14px 18px;display:block;border-right:0}.workspace,.navlabel,.sidebarBottom,#projectNav{display:none}.sidebar>.nav{display:inline-flex;width:auto;margin-top:12px;padding:8px}.logo{font-size:20px}.topbar{display:none}.content{padding:20px 15px}.pagehead h1{font-size:26px}.headActions{width:100%;flex-wrap:wrap}.headActions button{font-size:11px}.metrics{grid-template-columns:repeat(2,1fr)}.toolbar{flex-wrap:wrap}.filters{width:100%}.filters input{width:100%}.filters select{width:135px}.board{grid-template-columns:repeat(5,245px)}.drawer{width:100vw}.drawerhead,.detailContent{padding:20px}.taskMeta,.flow{padding-left:20px;padding-right:20px}.decision{margin-left:20px;margin-right:20px}.login{grid-template-columns:1fr}.loginArt{display:none}.tabs{gap:18px;padding:0 20px}}

@media(min-width:761px){.board:not(.tablemode){height:max(350px,calc(100vh - 370px));min-height:350px}.column{overflow-y:auto;min-height:0}.columnhead{position:sticky;top:-12px;background:#eef0f3;padding:7px 0;z-index:1}.card h3{display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}.decision{max-height:36vh;overflow:auto}.decision pre{white-space:pre-wrap;overflow-wrap:anywhere}}

/* The workspace uses the viewport; refresh keeps each scroll container mounted. */
fieldset{border:0;padding:0;margin:0}fieldset:disabled{opacity:.65}
.drawer{height:100dvh;width:min(1040px,96vw)}
.drawerhead{padding:16px 24px 8px;flex-shrink:0}.drawerhead h2{font-size:18px;margin-top:5px}
.taskMeta{padding:0 24px 9px}.flow{padding:0 24px 10px;flex-shrink:0}
.decision{margin:0 24px 10px;padding:10px 12px;max-height:24dvh;overflow:auto;flex-shrink:0}
.decision p{margin:4px 0}.decision pre{white-space:pre-wrap;overflow-wrap:anywhere}
.tabs{padding:0 24px;gap:20px;flex-shrink:0;overflow-x:auto}.tabs button{white-space:nowrap;padding:9px 0}
.detailContent{min-height:0;padding:16px 24px;overscroll-behavior:contain;overflow-anchor:none}
.drawerfoot{padding:10px 24px;flex-shrink:0}.message pre{max-height:none}
.board,.column{overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable}
.card:focus-visible{outline:2px solid var(--purple);outline-offset:2px}
@media(min-width:761px){
 html,body{height:100%;overflow:hidden}.shell{height:100dvh;min-height:0}
 .sidebar{height:100dvh;padding:20px 14px;overflow-y:auto}.workspace{padding:15px 4px}
 main{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
 .topbar{height:42px;flex-shrink:0;padding:0 24px}
 .content{width:100%;flex:1;min-height:0;display:flex;flex-direction:column;padding:16px 24px 8px}
 .pagehead{margin-bottom:12px;gap:10px;flex-shrink:0;flex-direction:row;align-items:center}
 .pagehead .eyebrow,.pagehead>.muted,.pagehead>div>.muted{display:none}.pagehead h1{font-size:25px;margin:0}
 .metrics{gap:10px;margin-bottom:12px;flex-shrink:0}.metric{padding:8px 12px;display:flex;gap:8px;align-items:center}
 .metric strong{font-size:21px;margin:0;order:-1}.metric .metricTop{font-size:11px}.metric .metricTop span,.metric small{display:none}
 .toolbar{margin-bottom:12px;flex-shrink:0}.notice{margin-bottom:10px;padding:7px 10px;flex-shrink:0}
 .board,.board:not(.tablemode){flex:1;min-height:0;height:auto;padding-bottom:4px;overflow-y:hidden}
 .board.tablemode{overflow:auto}.tasktable thead{position:sticky;top:0}
 .column{height:100%;min-height:0}.footnote{margin:4px 0 0;padding:0;flex-shrink:0}
}
@media(min-width:761px) and (max-width:1100px){.pagehead{flex-wrap:wrap}.content{padding:12px 16px 6px}.filters input{width:220px}}
@media(max-width:760px){.drawerhead{padding:12px 16px 6px}.drawerhead h2{font-size:16px}.taskMeta,.flow{padding-left:16px;padding-right:16px}.decision{margin-left:16px;margin-right:16px;max-height:20dvh}.tabs{padding:0 16px;gap:15px}.detailContent{padding:12px 16px}.drawerfoot{padding:8px 16px}.metrics{gap:8px;margin-bottom:12px}.metric{padding:9px}.metric small{display:none}.pagehead{margin-bottom:14px}.content{padding-top:12px}}

/* B24-style board: columns grow with their cards, one vertical page scroll. */
html,body{height:auto;overflow:visible;overflow-anchor:none}
.shell{height:auto;min-height:100dvh}
main{height:auto;display:block;overflow:visible}
.content{display:block;min-height:0}
.board,.board:not(.tablemode){display:grid;height:auto;min-height:calc(100dvh - 230px);max-height:none;overflow-x:auto;overflow-y:hidden;align-items:stretch;flex:none}
.board.tablemode{display:block}
.column{height:auto;max-height:none;min-height:360px;overflow:visible;scrollbar-gutter:auto}
.columnhead{position:static}
.card h3{display:block;overflow:visible;-webkit-line-clamp:unset}
.sidebar{align-self:start}

.notificationItem{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%;white-space:normal;text-align:left;margin:10px 0;padding:16px;line-height:1.5}.notificationItem.unread{border-left:4px solid var(--purple,#6b67e9);background:#f5f4ff}.notificationItem small{color:#737b89}.notificationItem strong{overflow-wrap:anywhere}#notificationSettings input[type=checkbox]{width:auto;display:inline;margin-right:8px}#notificationsDialog{width:min(620px,94vw);max-height:88dvh}#notificationCount{margin-left:5px}

/* Wheel must propagate from the horizontal board to the page. */
.board,.board:not(.tablemode),.column{overscroll-behavior:auto}

#settingsDialog{width:min(640px,94vw);max-height:90dvh;overflow:auto;padding-top:0}
#settingsDialog>.dialoghead{position:sticky;top:0;background:white;padding:20px 0 12px;z-index:1}
.tokenStatus{background:#eeebfc;color:#504398;padding:12px;border-radius:8px;font-size:13px}
.connectionDetails{margin-top:24px;border-top:1px solid var(--line);padding-top:16px}.connectionDetails summary{cursor:pointer}.connectionDetails pre{white-space:pre-wrap;overflow-wrap:anywhere}
.deliveryError{color:#a33232}#telegramDelivery{margin:16px 0}#settingsBtn{color:var(--purple);font-weight:600}
@media(max-width:760px){.sidebarBottom{display:block;margin-top:12px;padding-top:8px}.sidebarBottom .connection,.sidebarBottom #logout{display:none}}

.threadSearchBox{margin:16px 0;padding:16px;border:1px solid var(--line,#ddd);border-radius:12px}.threadChoices{display:grid;gap:6px;max-height:360px;overflow-y:auto;overscroll-behavior:contain}.threadChoices button{display:flex;flex-direction:column;gap:4px;text-align:left;width:100%;white-space:normal;overflow-wrap:anywhere}.threadChoices small{opacity:.65;font-weight:400}.threadPages{display:flex;justify-content:space-between;margin-top:12px}#threadSearch{width:100%}
