@font-face{font-weight:100 900;font-family:Inter;src:url('/console/assets/inter-latin-wght-normal.woff2')}@font-face{font-weight:100 900;font-family:'Source Serif 4';src:url('/console/assets/source-serif-4-latin-wght-normal.woff2')}@font-face{font-weight:100 900;font-family:'JetBrains Mono';src:url('/console/assets/jetbrains-mono-latin-wght-normal.woff2')}
/* Shared console primitives. Component headers and navigation stay independent. */
:root{color-scheme:dark;--bg:#161615;--surface:#1f1e1d;--pill:#2b2a28;--line:#33322f;--strong:#f5f4ef;--text:#e2e0d9;--muted:#aaa69e;--accent:#7ea6ff;--usage-mid:#f0a04b;--usage-high:#f06a5e;--header-height:56px;--viewport-height:100dvh}
html.light{color-scheme:light;--bg:#f5f4ef;--surface:#eeece5;--pill:#e6e3da;--line:#e2dfd6;--strong:#2a2925;--text:#3a3833;--muted:#75726a;--accent:#3a66c9;--usage-mid:#c46a12;--usage-high:#c9372c}
*{box-sizing:border-box}html{min-height:100%;background:var(--bg)}
body{min-height:100vh;min-height:100dvh;margin:0;background:var(--bg);color:var(--text);font:14px/1.5 Inter,sans-serif}
button,input,select,textarea{font:inherit}button,a,input,select,textarea,summary{outline-offset:3px}
:focus-visible{outline:2px solid var(--muted)}input:focus,input:focus-visible,select:focus,select:focus-visible,textarea:focus,textarea:focus-visible{outline:none;border-color:var(--muted)}dialog:focus,dialog:focus-visible{outline:none}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}
button{cursor:pointer;border:1px solid var(--line);border-radius:7px;background:transparent;color:var(--text);padding:7px 12px;min-height:36px}button:hover{background:var(--pill)}button:disabled{opacity:.5;cursor:default}
.topbar{height:var(--header-height);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:24px;padding:0 24px;background:var(--bg)}
.brand{display:flex;align-items:center;gap:8px;font:500 22px 'Source Serif 4',serif;color:var(--strong);flex:none}.brand:hover{text-decoration:none}.brand img{width:26px;height:26px}
.pill{background:var(--pill);border-radius:7px;padding:4px 10px}.header-actions{margin-left:auto;display:flex;align-items:center;gap:12px}
.layout{max-width:1600px;margin:auto;display:grid;grid-template-columns:220px minmax(0,1fr);min-height:calc(100dvh - var(--header-height))}
.layout>aside{border-right:1px solid var(--line);padding:24px 16px;min-width:0}.layout>aside nav{display:grid;gap:4px;margin:20px 0}.layout>aside nav button{text-align:left;border:0}.selected{background:var(--pill)}
.layout>main{padding:28px 32px;max-width:1140px;width:100%;min-width:0}h1{font:500 30px/1.2 Inter,sans-serif;letter-spacing:-.8px;color:var(--strong);margin:6px 0 8px}h2{font-size:15px;color:var(--strong);margin:0 0 6px}p{margin:0 0 12px}
.eyebrow,.small{color:var(--muted);font-size:12px}.intro{font-size:14px;color:var(--muted);margin-bottom:22px;max-width:70ch}
.card{min-width:0;border:1px solid var(--line);background:var(--surface);border-radius:10px;padding:18px;margin-bottom:14px;overflow-wrap:anywhere}.card>p:last-child{margin-bottom:0}.scope{font-size:12px;color:var(--muted);margin-bottom:12px}
.settings-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.settings-cards>.card{margin:0}
label{display:block;margin:10px 0 5px}input:not([type=checkbox]):not([type=radio]),select,textarea{display:block;width:100%;min-width:0;padding:8px 10px;background:var(--bg);color:var(--text);border:1px solid var(--line);border-radius:6px}textarea{resize:vertical}input[type=checkbox]{width:16px;height:16px;margin:0 8px 0 0;vertical-align:middle;accent-color:var(--accent)}
.row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.row>*{min-width:0}.primary{display:inline-block;background:var(--strong);color:var(--bg);border:0;border-radius:7px;padding:8px 14px;min-height:36px}.primary:hover{background:var(--strong);color:var(--bg);opacity:.9;text-decoration:none}.card .primary{margin-top:14px}
.welcome{max-width:520px;margin:64px auto;padding:24px}.welcome>p:not(.small){font-size:16px;color:var(--muted)}.welcome h1{font:500 38px/1.15 'Source Serif 4',serif;letter-spacing:-.5px}
#notice{position:fixed;z-index:100;bottom:max(16px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:max-content;max-width:calc(100% - 24px);white-space:pre-wrap;background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 8px 10px 14px;display:flex;align-items:flex-start;gap:8px;box-shadow:0 8px 32px rgb(0 0 0 / .25)}#notice-text{flex:1;min-width:0;overflow-wrap:anywhere}#notice .notice-close{flex:none;display:grid;place-items:center;width:32px;min-height:32px;padding:0;border:0;background:none;color:var(--muted);font-size:20px}#notice .notice-close:hover{color:var(--strong)}
pre{font:12px/1.6 'JetBrains Mono',monospace;white-space:pre-wrap;overflow-wrap:anywhere;max-width:100%}.field{border-top:1px solid var(--line);padding:10px 0}[hidden]{display:none!important}
@media(max-width:1000px){.settings-cards{grid-template-columns:1fr}.layout>main{padding:24px}}
@media(max-width:760px){
 .topbar{padding:0 12px;gap:12px;padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}.header-actions{gap:6px}.brand{font-size:20px;gap:6px}.brand img{width:24px;height:24px}
 .layout{display:block}.layout>aside{border-right:0;border-bottom:1px solid var(--line);padding:12px}.layout>aside nav{display:flex;overflow-x:auto;gap:4px;margin:12px -12px 0;padding:0 12px 2px;scrollbar-width:thin}.layout>aside nav button{flex:none;white-space:nowrap}.layout>aside>p{display:none}
 .layout>main{padding:18px 12px}h1{font-size:25px;letter-spacing:-.5px}.intro{margin-bottom:16px}.card{padding:14px}.row{gap:10px}.welcome{margin:32px auto;padding:20px}.welcome h1{font-size:32px}
 input:not([type=checkbox]):not([type=radio]),select,textarea{font-size:16px}button{min-height:40px}.primary{min-height:40px}.server-pick #role{margin:4px 0 0}.settings-cards{gap:12px}
}
@media(max-width:380px){.row{grid-template-columns:1fr}.topbar{gap:8px}.brand{font-size:0;gap:0}}
.server-pick{margin-bottom:8px}.server-pick label{display:block;margin:0 0 8px}.server-row{display:flex;align-items:center;gap:10px}.server-row select{flex:1;min-width:0}.server-icon{width:20px;height:20px;border-radius:50%;flex:none;object-fit:cover}#role{margin:8px 0 0}
.boot{min-height:calc(100vh - 80px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;color:var(--muted)}.boot p,.busy p{margin:0}.busy{display:flex;flex-direction:column;align-items:center;gap:12px;padding:60px 0;color:var(--muted)}
.loader{display:block;width:72px;height:72px;flex:none;overflow:visible}.loader.md{width:40px;height:40px}.loader.sm{width:18px;height:18px}button>.loader{margin:0 auto}button[aria-busy=true]{opacity:1}
.petal{fill:var(--strong)}.loader .p2{fill:#5B8CFF}
.loader .all{transform-origin:32px 32px;animation:twist 2.2s ease-in-out infinite}
.loader .p{transform-box:view-box;transform-origin:32px 32px;animation:pulse 2.2s ease-in-out infinite}
.loader .p0{--dx:0px;--dy:12px;animation-delay:0s}.loader .p1{--dx:-10.4px;--dy:6px;animation-delay:.04s}.loader .p2{--dx:-10.4px;--dy:-6px;animation-delay:.08s}.loader .p3{--dx:0px;--dy:-12px;animation-delay:.12s}.loader .p4{--dx:10.4px;--dy:-6px;animation-delay:.16s}.loader .p5{--dx:10.4px;--dy:6px;animation-delay:.2s}
@keyframes pulse{0%,70%,100%{transform:translate(0,0) scale(1)}35%{transform:translate(var(--dx),var(--dy)) scale(.4)}}
@keyframes twist{0%,70%,100%{transform:rotate(0)}35%{transform:rotate(25deg)}}
@media (prefers-reduced-motion:reduce){.loader .all,.loader .p{animation:none}}
.chan-list{list-style:none;margin:0 0 20px;padding:0 20px;border:1px solid var(--line);border-radius:10px}
.chan{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px 16px;padding:14px 0;border-top:1px solid var(--line)}.chan:first-child{border-top:0}
.chan-info strong{color:var(--strong)}.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:4px}
.chip{font-size:12px;color:var(--muted);background:var(--pill);border-radius:999px;padding:1px 10px}.chip.on{color:var(--accent)}
.chan-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.chan-window{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:0}.chan-window label{display:flex;align-items:center;gap:8px;margin:0}.chan-window input{width:110px;padding:7px 10px}.chan-window .small{margin:0}.chan-window button{padding:7px 14px}
.filter{margin:0 0 16px}
.switch{display:flex;align-items:center;gap:8px;margin:0}.switch input{margin:0}
@media(max-width:760px){.chan{grid-template-columns:1fr}.chan-actions{justify-content:flex-start}.chan-window input{width:100px}}
.table-wrap{overflow-x:auto;margin:0 0 16px}table{width:100%;border-collapse:collapse}th,td{text-align:left;vertical-align:top;padding:9px 8px;border-top:1px solid var(--line)}th{font-weight:500;color:var(--muted);font-size:12px}td code{font-size:12px}td .chan-actions{justify-content:flex-start}
.admin-user{border-top:1px solid var(--line);padding:14px 0}.admin-user p{margin:2px 0}.admin-user .chan-actions{margin-top:10px}

.reply-box textarea{width:100%;box-sizing:border-box}
.admin-head{display:flex;align-items:center;gap:8px;min-width:0}
.admin-person{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%;overflow-wrap:anywhere}
.admin-avatar{width:24px;height:24px;border-radius:50%;flex:none;object-fit:cover;display:block}
.admin-avatar-blank{display:inline-grid;place-items:center;background:var(--pill);color:var(--muted);font-size:12px}
.admin-name{color:var(--strong)}
.admin-handle{color:var(--muted);font-size:13px}
.admin-search{position:relative;display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin:0 0 8px}
.admin-search label{flex:1 1 260px;min-width:0;margin:0}
.admin-search input{width:100%;box-sizing:border-box}
@media(max-width:760px){.admin-search label{flex-basis:100%}}
.pick-slot{position:relative;flex:1;min-width:0}.pick{display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);text-align:left}.pick:hover:not(:disabled){background:var(--surface);border-color:var(--muted)}.pick:disabled{opacity:1;cursor:default}.pick::after{content:"";margin-left:auto;flex:none;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg);opacity:.6}.pick:disabled::after{display:none}.pick-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pick-menu{max-height:min(360px,60dvh);overflow-y:auto;position:absolute;left:0;right:0;top:100%;z-index:30;margin-top:4px;padding:4px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 8px 24px rgb(0 0 0 / .25)}.pick-item{display:block;width:100%;padding:7px 10px;border:0;border-radius:6px;background:none;color:var(--text);font-size:13px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pick-item:hover,.pick-item:focus-visible{background:var(--pill);color:var(--strong)}.pick-item[aria-checked=true]{color:var(--strong);font-weight:600}
/* Confirm dialog from askConfirm (web/app.js). Colors come from the tokens above. */
.confirm-dialog{background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:12px;padding:20px;max-width:420px;width:calc(100% - 32px);font:14px/1.6 Inter,sans-serif}
.confirm-dialog::backdrop{background:rgb(0 0 0 / .5)}
.confirm-dialog h2{font:500 20px/1.25 'Source Serif 4',serif;color:var(--strong);margin:0 0 8px}
.confirm-dialog p{margin:0;color:var(--muted);font-size:14px}
.confirm-dialog .actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;margin-top:20px}
.confirm-dialog .confirm-ok{border:0;background:var(--strong);color:var(--bg)}
.confirm-dialog .confirm-ok:hover{background:var(--strong);opacity:.9}
.confirm-dialog .confirm-ok.danger{background:var(--usage-high);color:var(--bg)}
.confirm-dialog .confirm-ok.danger:hover{background:var(--usage-high);opacity:.9}

.chan-info{min-width:0;overflow-wrap:anywhere}.chan-list{padding:0 14px}.chan{padding:12px 0}.chan-window input{flex:none}.table-wrap{max-width:100%;overscroll-behavior-x:contain}.table-wrap table{min-width:480px}.admin-head{flex-wrap:wrap}summary{cursor:pointer;overflow-wrap:anywhere}
.confirm-dialog,.share-dialog{max-height:calc(var(--viewport-height) - 32px);overflow-y:auto;overscroll-behavior:contain}.confirm-dialog .actions,.share-dialog .actions{gap:8px}
@media(max-width:760px){.pick{min-height:40px}.pick-item.chan-actions{gap:6px}.chan-actions button{padding:6px 10px;font-size:12px}.chan-window{gap:8px}.chan-window label{flex-wrap:wrap}.chan-window input{width:88px}.chan-list{padding:0 12px}.confirm-dialog,.share-dialog{padding:16px}}

.checkbox-field{display:flex;align-items:flex-start;gap:8px}.checkbox-field input[type=checkbox]{flex:none;margin:2px 0 0}.skip-link{position:fixed;top:8px;left:8px;z-index:120;padding:8px 12px;background:var(--strong);color:var(--bg);border-radius:6px;transform:translateY(-160%)}.skip-link:focus{transform:none}
@media(max-width:760px){.checkbox-field{min-height:32px;align-items:center}.checkbox-field input[type=checkbox]{margin:0}.server-pick label{margin-bottom:4px}}

.radios{display:flex;flex-wrap:wrap;gap:6px 14px;min-width:0;border:0;padding:0;margin:10px 0}.radios legend{margin-bottom:4px}.radios label{display:flex;align-items:center;gap:6px;margin:0;min-height:32px}.radios input{width:16px;height:16px;margin:0;accent-color:var(--accent)}

/* The theme switch cross-fades the whole page. */
::view-transition-old(root),::view-transition-new(root){animation-duration:.25s;animation-timing-function:ease-out}

/* LLM mode banner under the top bar and the composer note (web/app.js). Colors come from the tokens above. */
.llm-banner{margin:0;padding:10px 24px;background:var(--surface);border-bottom:1px solid var(--line);border-left:3px solid var(--usage-mid);color:var(--text)}
.llm-banner.offline{border-left-color:var(--usage-high)}
.llm-pause{margin:0 0 8px;color:var(--usage-high)}
.llm-status{margin-bottom:8px}
.llm-form h3{font-size:13px;color:var(--strong);margin:18px 0 4px}
.llm-form .llm-zdr{margin-top:22px}
@media(max-width:760px){.llm-banner{padding:10px 12px}.llm-form .llm-zdr{margin-top:0}}
