:root {
  color-scheme: light;
  --canvas: #fff;
  --rail: #f5f6f8;
  --sidebar: #f9fafb;
  --line: #e8e9eb;
  --ink: #202123;
  --muted: #8d8f95;
  --hover: #eceef0;
  --accent: #9a57e8;
  --accent-dark: #8544d2;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, textarea { font: inherit; }
button { color: inherit; }
.app-shell { display: flex; width: 100%; height: 100dvh; min-height: 520px; overflow: hidden; background: var(--canvas); }
.rail { width: 52px; flex: 0 0 52px; padding: 12px 8px; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--rail); border-right: 1px solid #eceef0; }
.rail-spacer { flex: 1; }
.icon-button { width: 36px; height: 36px; border: 0; background: transparent; display: inline-grid; place-items: center; border-radius: 10px; color: #777b81; cursor: pointer; transition: background .16s, color .16s, transform .16s; }
.icon-button:hover { background: var(--hover); color: var(--ink); }
.icon-button:active { transform: scale(.95); }
.icon-button svg, .project-row svg, .context-button svg, .access-button svg, .send-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.rail-home { color: #222; }
.rail-home svg { fill: currentColor; stroke: currentColor; }
.rail-home.active { background: #e9ebee; }
.profile-dot { border-radius: 50%; background: #e6ddcf; color: #5f503d; font-size: 12px; font-weight: 700; }
.sidebar { width: 256px; flex: 0 0 256px; background: var(--sidebar); border-right: 1px solid #e5e6e8; display: flex; flex-direction: column; padding: 0 12px; min-width: 0; }
.sidebar-header { height: 58px; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.brand-button { border: 0; background: transparent; font-size: 17px; font-weight: 650; padding: 8px 4px; cursor: pointer; border-radius: 8px; }
.brand-button:hover { background: var(--hover); }
.chevron { color: #888; padding-left: 3px; }
.header-actions { display: flex; gap: 2px; }
.icon-button.small { width: 31px; height: 31px; }
.icon-button.small svg { width: 17px; height: 17px; }
.new-chat { height: 40px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; text-align: left; font-size: 14px; cursor: pointer; }
.new-chat:hover, .project-row:hover, .history-row:hover { background: var(--hover); }
.new-chat svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-section { margin-top: 20px; }
.section-label { color: #909399; font-size: 12px; padding: 0 8px 8px; }
.project-row { width: 100%; height: 36px; display: flex; align-items: center; gap: 9px; border: 0; border-radius: 8px; padding: 0 8px; background: transparent; text-align: left; font-size: 13px; cursor: pointer; white-space: nowrap; overflow: hidden; }
.project-row svg { width: 16px; height: 16px; flex: 0 0 auto; }
.project-row span { overflow: hidden; text-overflow: ellipsis; }
.section-heading { display: flex; align-items: center; justify-content: space-between; }
.main-panel { position: relative; display: flex; flex: 1; min-width: 0; flex-direction: column; background: var(--canvas); }
.topbar { height: 58px; display: flex; align-items: center; padding: 0 20px; }
.topbar-spacer { flex: 1; }
.topbar-layout svg { width: 17px; height: 17px; }
.mobile-sidebar-toggle, .mobile-brand { display: none; }
.conversation { position: relative; flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.welcome { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 0 24px 80px; text-align: center; transition: opacity .18s, transform .18s; }
.sparkle-mark { width: 49px; height: 49px; display: grid; place-items: center; margin-bottom: 20px; color: #a8a9ac; }
.sparkle-mark svg { width: 43px; height: 43px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.welcome h1 { margin: 0; font-size: clamp(22px, 2.1vw, 28px); font-weight: 550; letter-spacing: -.045em; }
.welcome p { margin: 9px 0 0; color: #92949a; font-size: 14px; }
.message { max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; font-size: 15px; }
.composer-wrap { width: min(760px, calc(100% - 48px)); margin: 0 auto 12px; position: relative; z-index: 2; }
.composer-shell { padding: 0 1px 1px; border-radius: 25px; background: #f5f5f6; box-shadow: 0 0 0 1px rgba(0,0,0,.035); }
.composer-context { height: 39px; display: flex; align-items: center; gap: 4px; padding: 5px 14px 0; }
.context-button { height: 29px; display: inline-flex; align-items: center; gap: 7px; padding: 0 7px; border: 0; border-radius: 7px; background: transparent; color: #92949a; font-size: 12px; cursor: pointer; }
.context-button:hover { background: #e9eaec; color: #55585d; }
.context-button svg { width: 15px; height: 15px; }
.local-context { color: #46494f; }
.composer { background: #fff; border: 1px solid #e8e9eb; border-radius: 22px; padding: 12px 9px 8px 13px; box-shadow: 0 3px 12px rgba(0,0,0,.035); }
.composer:focus-within { border-color: #d9dadd; box-shadow: 0 3px 16px rgba(0,0,0,.065); }
.composer textarea { width: 100%; min-height: 42px; max-height: 180px; resize: none; border: 0; outline: 0; color: var(--ink); background: transparent; padding: 2px 0 7px; font-size: 14px; line-height: 1.5; }
.composer textarea::placeholder { color: #a5a6aa; }
.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.send-button { width: 33px; height: 33px; flex: 0 0 auto; border: 0; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--accent); cursor: pointer; transition: background .16s, transform .16s; }
.send-button:hover { background: var(--accent-dark); }
.send-button:active { transform: scale(.94); }
.send-button svg { width: 17px; height: 17px; stroke-width: 2; }
.disclaimer { margin-top: 9px; color: #9b9da2; text-align: center; font-size: 10px; }
@media (max-width: 760px) {
  .rail { width: 46px; flex-basis: 46px; padding-inline: 5px; }
  .sidebar { width: 235px; flex-basis: 235px; }
  .composer-wrap { width: calc(100% - 28px); }
}
@media (max-width: 590px) {
  .rail { display: none; }
  .sidebar { position: absolute; z-index: 10; inset: 0 auto 0 0; width: min(290px, 84vw); transform: translateX(-102%); transition: transform .2s ease; box-shadow: 8px 0 30px rgba(0,0,0,.08); }
  .sidebar.open { transform: translateX(0); }
  .mobile-sidebar-toggle { display: inline-grid; margin-left: -8px; }
  .mobile-brand { display: inline-block; margin-left: 7px; font-size: 15px; font-weight: 650; }
  .mobile-brand span { color: #86888d; }
  .topbar { padding: 0 14px; }
  .welcome { padding-bottom: 55px; }
  .welcome p { max-width: 260px; line-height: 1.5; }
  .composer-wrap { width: calc(100% - 20px); margin-bottom: 9px; }
  .composer-shell { border-radius: 21px; }
  .composer { border-radius: 19px; padding: 11px 7px 7px 11px; }
  .composer-context { padding-left: 10px; }
  .access-button { font-size: 11px; }
  .model-button { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
  .disclaimer { font-size: 9px; }
}

/* Live workspace: Rust templates, existing agent and staff authentication. */
:root{--bg:var(--canvas);--side:var(--sidebar);--text:var(--ink);--bubble:#f3f4f6;--green:#15805d}
html,body{height:100%;font-size:14px}body{overflow:hidden}a{color:inherit;text-decoration:none}input{font:inherit;color:inherit}button,a,input,textarea,summary,label{outline-offset:4px}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.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}
.app-shell{min-height:0}.sidebar-toggle{position:absolute;opacity:0;width:1px;height:1px;left:0;top:0}.sidebar-toggle:focus-visible~.rail .rail-layout{outline:2px solid var(--accent);outline-offset:2px}.sidebar-toggle:focus-visible~.workspace .mobile-sidebar-toggle{outline:2px solid var(--accent)}label.icon-button{cursor:pointer}.sidebar-close{display:inline-grid}.sidebar-section{flex-shrink:0}.project-detail{display:block;color:var(--muted);font-size:12px;padding:6px 8px 0 33px}.project-detail:hover{color:var(--ink)}.history-search{display:flex;align-items:center;gap:9px;margin:20px 8px 16px;color:var(--muted)}.history-search svg{width:16px;height:16px;flex-shrink:0}.history-search input{width:100%;min-width:0;border:0;background:transparent;font-size:12px;padding:7px 0}.history-heading{padding:0 8px 8px}.history-list{flex:1;overflow:auto;min-height:0;scrollbar-width:thin}.history-item{display:flex;align-items:center;gap:10px;border-radius:8px;padding:9px 8px;font-size:13px}.history-item>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.history-item>time{font-size:10px;color:var(--muted);display:none}.history-item:hover,.history-item.selected{background:var(--hover)}.history-item:hover>time,.history-item.selected>time{display:block}.history-empty{font-size:12px;color:var(--muted);padding:0 8px;line-height:1.8}
.account-menu{position:relative;margin-top:10px;padding:6px 0}.account-menu summary{display:flex;align-items:center;gap:10px;padding:10px 7px;cursor:pointer;border-radius:9px;list-style:none}.account-menu summary::-webkit-details-marker{display:none}.account-menu summary:hover{background:var(--hover)}.avatar{border-radius:50%;width:29px;height:29px;background:#e6ddcf;color:#5f503d;display:grid;place-items:center;font-weight:600;flex-shrink:0}.account-menu strong{display:block;font-size:12px;max-width:150px;overflow:hidden;text-overflow:ellipsis}.account-menu small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.account-dots{margin-left:auto;letter-spacing:1px}.account-popup{position:absolute;z-index:12;bottom:65px;left:2px;right:2px;background:var(--canvas);border:1px solid var(--line);padding:14px;border-radius:13px;box-shadow:0 6px 25px #0000000c}.account-popup p{font-size:11px;overflow-wrap:anywhere;color:var(--muted);margin:0 0 12px}.account-popup button{width:100%;border:0;background:var(--bubble);color:var(--ink);text-align:left;border-radius:7px;padding:9px}
.workspace{height:100dvh}.workspace .topbar{flex-shrink:0}.workspace-context{color:var(--muted);font-size:12px;margin-right:12px}.composer-wrap{flex-shrink:0}.composer-context{white-space:nowrap}.context-button{cursor:default}.context-button[href]{cursor:pointer}.source-context{color:#46494f}.access-status{display:inline-flex;align-items:center;gap:5px;color:#b5683b;font-size:12px;white-space:nowrap}.access-status svg{width:15px;height:15px}.agent-caption{font-size:12px;color:#54565b;margin-right:7px}.composer textarea{display:block;field-sizing:content}.send-button:disabled{background:#d4c5e6;cursor:default}.welcome-shortcuts{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:24px}.welcome-shortcuts>a{border:1px solid var(--line);border-radius:20px;padding:8px 12px;font-size:11px;color:var(--muted)}.welcome-shortcuts>a:hover{background:var(--sidebar);color:var(--ink)}.welcome{padding-bottom:55px}.sparkle-mark{flex-shrink:0}.conversation-scroll{flex:1;overflow:auto;scrollbar-width:thin;scroll-behavior:smooth;min-height:0}.thread{width:min(760px,calc(100% - 48px));margin:0 auto;padding:12px 0 40px}.thread .message{max-width:100%;margin:18px 0 31px;line-height:1.85;font-size:14px;white-space:normal}.user-message{display:flex;justify-content:flex-end}.user-bubble{background:var(--bubble);padding:12px 17px;border-radius:22px;max-width:88%;white-space:pre-wrap;overflow-wrap:anywhere}.assistant-label{display:flex;align-items:center;gap:10px;font-size:12px;font-weight:600;margin-bottom:15px}.assistant-mark{font-family:Georgia,serif;font-size:23px;width:24px;line-height:1}.answer-content{padding-left:34px;overflow-wrap:anywhere}.answer-content p{margin:.25em 0 1em}.answer-content h1,.answer-content h2,.answer-content h3{font-size:17px;line-height:1.6;margin:1.2em 0 .6em}.answer-content ul,.answer-content ol{padding-left:22px}.answer-content a{color:var(--green);text-decoration:underline;text-underline-offset:3px}.answer-content pre{background:var(--sidebar);border:1px solid var(--line);padding:16px;border-radius:12px;overflow:auto;font-size:12px}.answer-content code{font-size:.9em;background:var(--bubble);padding:2px 4px;border-radius:4px}.answer-content pre code{padding:0;background:none}.answer-content table{border-collapse:collapse;max-width:100%;font-size:12px;display:block;overflow:auto}.answer-content td,.answer-content th{border:1px solid var(--line);padding:8px 11px}.answer-meta{padding-left:34px;font-size:10px;color:var(--muted);margin-top:14px}.thinking{display:flex;align-items:center;gap:9px;color:var(--muted);padding-left:34px;font-size:13px}.thinking-dot{width:7px;height:7px;background:var(--ink);border-radius:50%;animation:pulse 1.5s infinite}.thinking-dots{margin-left:-8px}.stop-button{margin:16px 0 0 34px;color:var(--muted);border:1px solid var(--line);background:var(--canvas);border-radius:18px;font-size:11px;padding:6px 10px}.stop-button:hover{background:var(--bubble)}.htmx-indicator{display:none;font-size:11px;color:var(--muted)}.htmx-request .htmx-indicator,.htmx-request.htmx-indicator{display:inline-block}.notice{padding:14px 18px;margin:0 24px 12px;border:1px solid #efd5c6;background:#fff9f4;border-radius:12px;font-size:12px;line-height:1.7;color:#8e5738}.notice p{margin:0 0 5px}.notice a{text-decoration:underline}.sidebar-overlay{display:none}
.dashboard-scroll{flex:1;overflow:auto}.dashboard{max-width:1180px;margin:28px auto;padding:0 36px 45px}.dashboard-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px}.dashboard-heading h1{font-size:25px;font-weight:600;letter-spacing:-.8px;margin:0 0 9px}.dashboard-heading p{font-size:12px;color:var(--muted);margin:0}.refresh-button{font-size:11px;padding:9px 12px;border:1px solid var(--line);border-radius:8px}.refresh-button:hover{background:var(--side)}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:34px}.metric-grid article{border:1px solid var(--line);border-radius:14px;padding:21px}.metric-grid article>span{font-size:11px;color:var(--muted)}.metric-grid strong{display:block;font-size:30px;font-weight:550;margin:12px 0 9px;letter-spacing:-.7px}.metric-grid em{font-style:normal;font-size:15px;color:var(--muted);font-weight:400}.metric-grid small{font-size:10px;color:var(--muted)}.attention{color:#b95b35}.education-list{border:1px solid var(--line);border-radius:14px;overflow:hidden}.section-heading{display:flex;justify-content:space-between;padding:20px}.section-heading h2{font-size:14px;font-weight:600;margin:0}.section-heading>span{font-size:10px;color:var(--muted)}.table-scroll{overflow:auto}.education-list table{width:100%;border-collapse:collapse;white-space:nowrap;text-align:left;font-size:11px}.education-list th{background:var(--side);font-weight:500;color:var(--muted);padding:12px 18px;border-top:1px solid var(--line)}.education-list td{padding:17px 18px;border-top:1px solid var(--line)}.education-list td strong{display:block;font-size:12px;font-weight:500}.education-list td small{display:block;margin-top:5px;font-size:10px;color:var(--muted)}.education-list td a:hover{text-decoration:underline}.status-pill{border-radius:20px;background:var(--bubble);padding:5px 9px;font-size:10px}progress{display:block;width:95px;height:4px;border:0;background:var(--bubble);border-radius:5px;margin-top:7px;accent-color:var(--green)}progress::-webkit-progress-bar{background:var(--bubble);border-radius:5px}progress::-webkit-progress-value{background:var(--green);border-radius:5px}.education-list .empty-state{padding:50px 20px;text-align:center;white-space:normal;color:var(--muted);line-height:1.8}.source-panel{margin-top:22px;padding:21px;border:1px solid var(--line);border-radius:14px;display:flex;align-items:center;gap:18px}.source-panel-icon{font-size:24px;color:var(--muted)}.source-panel h2{font-size:13px;margin:0 0 6px;font-weight:500}.source-panel p{font-size:11px;color:var(--muted);margin:0;line-height:1.8}.source-panel>a{margin-left:auto;flex-shrink:0;font-size:11px;border:1px solid var(--line);border-radius:8px;padding:9px 12px}.source-panel>a:hover{background:var(--side)}.dashboard-updated{text-align:right;font-size:10px;color:var(--muted);margin-top:17px}.login-shell{height:100dvh;width:100%;display:flex;flex-direction:column}.login-brand{display:flex;align-items:center;gap:10px;margin:27px 32px;font-size:16px;font-weight:550;letter-spacing:-.5px}.login-brand .brand-mark{width:27px;height:27px;font-size:23px}.login-card{margin:auto;text-align:center;padding:20px;max-width:430px;width:100%}.login-symbol{font-family:Georgia,serif;font-size:42px;font-weight:bold;margin:0 auto 22px;border:1px solid var(--line);border-radius:20px;width:70px;height:70px;display:grid;place-items:center;padding-bottom:6px}.login-card h1{font-size:30px;font-weight:550;letter-spacing:-1px;margin:0 0 18px}.login-card>p{font-size:14px;line-height:1.9;color:var(--muted);margin:0 0 34px}.microsoft-login{display:flex;align-items:center;justify-content:center;gap:12px;border:1px solid #cfcfd2;border-radius:12px;padding:16px 19px;font-size:13px;font-weight:500}.microsoft-login:hover{background:var(--side)}.ms-logo{display:grid;grid-template-columns:repeat(2,8px);gap:2px}.ms-logo>i{display:block;width:8px;height:8px}.ms-logo>i:nth-child(1){background:#f25022}.ms-logo>i:nth-child(2){background:#7fba00}.ms-logo>i:nth-child(3){background:#00a4ef}.ms-logo>i:nth-child(4){background:#ffb900}.login-domain{display:block;font-size:11px;color:var(--muted);margin-top:16px}.login-footer{text-align:center;font-size:10px;color:#a1a2a7;margin:25px}

@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}
@media(min-width:591px){.sidebar-toggle:checked~.sidebar{display:none}}
@media(max-width:1100px){.metric-grid{gap:10px}.metric-grid article{padding:17px}.dashboard{padding:0 24px}}
@media(max-width:760px){.dashboard{margin-top:20px;padding:0 17px 30px}.dashboard-heading h1{font-size:22px}.metric-grid{grid-template-columns:repeat(2,1fr)}.metric-grid strong{font-size:26px}.source-panel{align-items:flex-start;gap:12px;flex-wrap:wrap}.source-panel>div{flex:1}.source-panel>a{margin-left:36px}}
@media(max-width:590px){.sidebar-toggle:checked~.sidebar{transform:translateX(0)}.sidebar-toggle:checked~.sidebar-overlay{display:block;position:fixed;inset:0;background:#0005;z-index:9}.workspace-context{display:none}.thread{width:calc(100% - 36px)}.answer-content,.answer-meta,.thinking{padding-left:0}.stop-button{margin-left:0}.welcome h1{font-size:25px}.welcome-shortcuts{gap:6px;margin-top:20px}.welcome-shortcuts>a{padding:7px 10px;font-size:10px}.welcome{padding-bottom:25px}.agent-caption{font-size:11px}.access-status{font-size:11px}.source-context{font-size:11px}.composer-context{gap:0;padding-right:8px}.context-button{font-size:11px}.login-brand{margin:23px}.login-card h1{font-size:27px}.notice{margin:0 14px 10px}}
@media(prefers-color-scheme:dark){:root{color-scheme:dark;--canvas:#212121;--rail:#18191c;--sidebar:#1c1d20;--line:#37373a;--ink:#ececec;--muted:#a1a1a6;--hover:#303033;--bubble:#2f3034;--green:#70cba2}.rail{border-color:var(--line)}.rail-home{color:var(--ink)}.rail-home.active,.rail .active{background:var(--hover)}.sidebar{border-color:var(--line)}.composer-shell{background:#2b2c30}.composer{background:var(--canvas);border-color:var(--line)}.composer:focus-within{border-color:#5f5f65}.context-button:hover{background:var(--hover);color:var(--ink)}.source-context,.agent-caption{color:var(--muted)}.access-status{color:#d9986f}.profile-dot,.avatar{background:#514737;color:#e9d9bf}.account-popup{background:var(--sidebar)}.notice{background:#392e27;border-color:#634c3d;color:#e4baa0}.microsoft-login{border-color:#55555a}.attention{color:#e6a185}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.toolbar-right{display:flex;align-items:center;gap:4px;min-width:0}

/* Public operation status, driven only by actual server calls. */
.activity-list{margin:0 0 17px 34px;color:var(--muted);font-size:12px}.activity-list summary{cursor:pointer;list-style:none;padding:5px 0;line-height:1.7}.activity-list summary::before{content:"›";display:inline-block;margin-right:8px;transition:transform .15s}.activity-list[open] summary::before{transform:rotate(90deg)}.activity-list summary::-webkit-details-marker{display:none}.activity-list summary>span{font-size:10px}.activity-list ol{list-style:none;margin:7px 0 0;padding:0;display:grid;gap:12px}.operation{display:flex;align-items:flex-start;gap:9px;line-height:1.7}.operation-icon{flex:0 0 16px;text-align:center;font-size:14px}.operation-label{flex:1;overflow-wrap:anywhere}.operation-status{font-size:10px;white-space:nowrap}.operation.running .operation-label{color:var(--ink);animation:operation-pulse 1.7s ease-in-out infinite}.operation.failed .operation-icon{color:#b5683b}.operation.complete .operation-icon{color:var(--muted)}@keyframes operation-pulse{0%,100%{opacity:.95}50%{opacity:.4}}@media(max-width:590px){.activity-list{margin-left:0}.operation-status{font-size:9px}}@media(prefers-reduced-motion:reduce){.operation.running .operation-label{animation:none}}
