:root {
  color-scheme: light;
  --bg-app: #f5f6f2;
  --bg-sidebar: #17362f;
  --bg-panel: #fff;
  --bg-elevated: #f9fbf7;
  --text-primary: #1a2925;
  --text-secondary: #68776f;
  --text-muted: #84918b;
  --border: #e7ebe6;
  --border-strong: #d4ded3;
  --accent: #315d45;
  --accent-soft: #edf5e8;
  --success: #6f9c68;
  --warning: #a87940;
  --danger: #a35b4d;
  --paper: #f5f6f2;
  --panel: #fff;
  --ink: #1a2925;
  --muted: #84918b;
  --faint: #aab4ae;
  --line: #e7ebe6;
  --green: #244a3f;
  --green-deep: #17362f;
  --lime: #b9f47d;
  --lime-soft: #eaf8db;
  --rose: #da795f;
  --shadow: 0 18px 50px rgba(23, 44, 36, .12);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
*[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; }
body { min-width: 360px; background: var(--paper); color: var(--ink); }
button, textarea, select, input { font: inherit; }
button { color: inherit; }
button:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid #8cbca1; outline-offset: 2px; }
.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 { display: grid; grid-template-columns: 250px minmax(0, 1fr); width: 100%; height: 100%; min-height: 560px; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; min-width: 0; padding: 22px 15px 15px; background: var(--green-deep); color: #f4f7ef; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 7px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(210,244,194,.12); border-radius: 12px; background: #244b40; color: #e0f8d1; }
.brand-mark svg { width: 32px; height: 32px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: Manrope, sans-serif; font-size: 13px; font-weight: 800; letter-spacing: -.025em; }
.brand-copy small { color: #93a79d; font-size: 10px; }
.brand-version { align-self: flex-start; margin: 3px 0 0 auto; padding: 3px 5px; border: 1px solid rgba(211,231,218,.15); border-radius: 5px; color: #9bb0a4; font: 9px "DM Mono", monospace; }
.new-chat { display: flex; align-items: center; gap: 10px; width: 100%; margin: 32px 0 10px; padding: 11px 10px; border: 1px solid rgba(220,239,226,.17); border-radius: 9px; background: rgba(255,255,255,.055); color: #f4f7ef; cursor: pointer; text-align: left; font-size: 11px; font-weight: 650; transition: background .16s, border-color .16s; }
.new-chat:hover { border-color: rgba(220,239,226,.35); background: rgba(255,255,255,.1); }
.new-chat .plus { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: var(--lime); color: #18332d; font-size: 18px; font-weight: 400; line-height: 1; }
kbd { padding: 2px 5px; border: 1px solid #dfe5df; border-radius: 4px; background: rgba(255,255,255,.65); color: #72817a; font: 9px "DM Mono", monospace; }
.sidebar kbd { margin-left: auto; border-color: rgba(218,236,222,.18); background: rgba(255,255,255,.06); color: #91a59a; font-size: 8px; }
.search-box { display: flex; align-items: center; gap: 8px; margin: 0 0 23px; padding: 8px 9px; border: 1px solid rgba(220,239,226,.12); border-radius: 8px; background: rgba(5,24,20,.14); color: #91a59a; }
.search-box > span { font-size: 16px; line-height: 12px; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #eff5ed; font-size: 10px; }
.search-box input::placeholder { color: #80978a; }
.search-box kbd { flex: 0 0 auto; border-color: rgba(218,236,222,.1); background: rgba(255,255,255,.035); font-size: 8px; }
.list-heading { display: flex; justify-content: space-between; padding: 0 8px 9px; color: #849b8f; font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.list-heading span:last-child { color: #9bb0a4; font: 9px "DM Mono", monospace; letter-spacing: 0; }
.conversation-list { display: flex; flex: 1; flex-direction: column; gap: 3px; min-height: 0; overflow: auto; scrollbar-color: #446355 transparent; scrollbar-width: thin; }
.conversation-row { display: flex; align-items: center; gap: 2px; min-width: 0; border-radius: 7px; }
.conversation-row.active { background: rgba(226,244,221,.11); }
.conversation-select { flex: 1; min-width: 0; padding: 9px 9px; overflow: hidden; border: 0; border-radius: 6px; background: transparent; color: #bbcbc1; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; font-size: 10px; }
.conversation-select::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 8px 1px 0; border: 1px solid #718a7d; border-radius: 2px; }
.conversation-row.active .conversation-select { color: #f0f7eb; font-weight: 650; }
.conversation-row.active .conversation-select::before { border-color: var(--lime); background: var(--lime); }
.conversation-delete { width: 26px; height: 26px; margin-right: 3px; border: 0; border-radius: 6px; background: transparent; color: #90a499; cursor: pointer; opacity: 0; }
.conversation-row:hover .conversation-delete, .conversation-row:focus-within .conversation-delete { opacity: 1; }
.conversation-delete:hover { background: rgba(255,255,255,.1); color: #ffb7a0; }
.empty-list { padding: 6px 9px; color: #8ba095; font-size: 10px; line-height: 1.6; }
.sidebar-foot { padding-top: 12px; border-top: 1px solid rgba(223,240,228,.12); }
.engine-state { display: flex; align-items: center; gap: 9px; padding: 7px 7px 12px; }
.engine-state > span:nth-child(2) { display: grid; flex: 1; gap: 3px; }
.engine-state strong { color: #e4eee5; font-size: 10px; font-weight: 600; }
.engine-state small { color: #82988c; font-size: 9px; }
.live-pill { padding: 3px 5px; border: 1px solid rgba(185,244,125,.16); border-radius: 4px; color: #b2d997; font: 8px "DM Mono", monospace; letter-spacing: .04em; }
.status-light { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #d29552; box-shadow: 0 0 0 3px rgba(210,149,82,.13); }
.status-light.online { background: #9fdb76; box-shadow: 0 0 0 3px rgba(159,219,118,.13); }
.status-light.offline { background: #e28169; box-shadow: 0 0 0 3px rgba(226,129,105,.14); }
.setup-button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 9px 8px; border: 0; border-radius: 7px; background: transparent; color: #b8c9be; text-align: left; cursor: pointer; font-size: 10px; }
.setup-button:hover { background: rgba(255,255,255,.07); color: white; }
.setup-icon { color: #b5dc9c; font-size: 14px; }
.setup-chevron { margin-left: auto; color: #80988c; font-size: 15px; }
.privacy-note { display: flex; align-items: center; gap: 7px; margin: 11px 8px 1px; color: #82988c; font-size: 9px; }
.privacy-note span { color: #aacd91; }

/* Main workspace */
.workspace { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--paper); }
.topbar { z-index: 1; display: flex; flex: 0 0 62px; align-items: center; justify-content: space-between; gap: 18px; padding: 0 25px; border-bottom: 1px solid #e8ebe5; background: rgba(255,255,255,.72); }
.page-label { display: flex; align-items: center; gap: 9px; min-width: 0; overflow: hidden; color: #76847c; font-size: 10px; }
.breadcrumb-muted { white-space: nowrap; }
.crumb-slash { color: #c5ccc5; }
.page-label strong { overflow: hidden; color: #293933; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.connection-chip { display: flex; align-items: center; gap: 7px; padding: 7px 9px; color: #68776f; font-size: 9px; white-space: nowrap; }
.connection-chip .status-light { width: 6px; height: 6px; box-shadow: none; }
.model-picker { display: flex; align-items: center; gap: 7px; min-width: 170px; padding: 7px 9px; border: 1px solid #e3e8e1; border-radius: 7px; background: #fff; }
.model-glyph { color: #4f7e62; font-size: 13px; }
.model-picker select { width: 100%; min-width: 90px; padding: 0; border: 0; outline: 0; appearance: none; background: transparent; color: #35453d; cursor: pointer; font-size: 9px; }
.select-caret { color: #87958d; font-size: 13px; }
.icon-button { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #79877f; cursor: pointer; font-size: 17px; }
.icon-button:hover { border-color: #e1e7df; background: white; color: #315a49; }
.refresh-button { font-size: 19px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 18px; }
.content-grid { display: grid; flex: 1; grid-template-columns: minmax(0, 1fr) 246px; min-height: 0; }
.chat-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.transcript { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: auto; scrollbar-color: #cbd5cb transparent; scrollbar-width: thin; }

/* Welcome view */
.welcome { width: min(100% - 60px, 700px); margin: auto; padding: 34px 0 27px; }
.welcome-eyebrow { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: #779180; font: 8px "DM Mono", monospace; letter-spacing: .14em; }
.eyebrow-line { width: 16px; height: 1px; background: #a8c0ad; }
.welcome-headline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.welcome h1 { margin: 0; color: #20372f; font-family: Manrope, "Segoe UI", sans-serif; font-size: clamp(42px, 5.6vw, 68px); font-weight: 600; letter-spacing: -.075em; line-height: .99; }
.welcome h1 em { color: #56816b; font-family: Georgia, serif; font-size: 1.04em; font-weight: 400; letter-spacing: -.065em; }
.welcome-copy { max-width: 430px; margin: 16px 0 28px; color: #74847b; font-size: 11px; line-height: 1.75; }
.web-onboarding { display: flex; gap: 10px; margin: -10px 0 22px; }.web-onboarding button { border: 1px solid var(--border-strong, #cbd6ce); background: var(--bg-elevated, #fff); color: var(--text-primary, #18332d); border-radius: 9px; padding: 9px 14px; font: inherit; cursor: pointer; }.web-onboarding button:first-child { background: var(--accent, #b9f47d); border-color: var(--accent, #b9f47d); font-weight: 700; }.web-onboarding button:focus-visible { outline: 2px solid var(--accent, #b9f47d); outline-offset: 2px; }
.welcome-orbit { position: relative; display: grid; flex: 0 0 106px; width: 106px; height: 106px; place-items: center; }
.orbit-ring { position: absolute; inset: 8px; border: 1px solid #cfdbce; border-radius: 50%; }
.orbit-ring::before, .orbit-ring::after { position: absolute; inset: 10px; border: 1px solid #dce4d8; border-radius: 50%; content: ""; }
.orbit-ring::after { inset: 22px; border-color: #e3e9df; }
.orbit-core { z-index: 1; display: grid; width: 37px; height: 37px; place-items: center; border-radius: 13px; background: var(--green); box-shadow: 0 8px 20px rgba(36,74,63,.18); color: var(--lime); font-size: 20px; }
.orbit-dot { position: absolute; z-index: 2; width: 9px; height: 9px; border: 2px solid var(--paper); border-radius: 50%; background: #b9f47d; }
.dot-one { top: 8px; right: 27px; }
.dot-two { bottom: 15px; left: 13px; width: 7px; height: 7px; background: #d88d75; }
.prompt-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 11px; color: #687a70; font-size: 9px; font-weight: 650; }
.prompt-rule { flex: 1; height: 1px; background: #e4e9e2; }
.starter-prompts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.starter-prompts button { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 55px; padding: 9px 10px; border: 1px solid #e7ebe5; border-radius: 8px; background: rgba(255,255,255,.72); text-align: left; cursor: pointer; transition: transform .16s, border-color .16s, box-shadow .16s, background .16s; }
.starter-prompts button:hover { transform: translateY(-2px); border-color: #bdcfbd; background: white; box-shadow: 0 7px 18px rgba(31,68,49,.06); }
.starter-prompts button > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.starter-prompts strong { color: #34453c; font-size: 9px; font-weight: 650; }
.starter-prompts small { overflow: hidden; color: #89958e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.prompt-icon { display: grid; flex: 0 0 29px; width: 29px; height: 29px; place-items: center; border-radius: 8px; font-size: 13px; }
.prompt-icon.violet { background: #eee9f8; color: #7867a2; }
.prompt-icon.lime { background: #edf6df; color: #628745; }
.prompt-icon.coral { background: #faebe4; color: #bf7055; }
.prompt-icon.blue { background: #e8eff5; color: #5d7a91; }
.prompt-arrow { margin-left: auto; color: #a1aea4; font-size: 13px; transition: transform .16s; }
.starter-prompts button:hover .prompt-arrow { transform: translateX(2px); color: #4d785f; }

/* Conversation and composer */
.message-list { display: flex; flex-direction: column; gap: 24px; width: min(100% - 64px, 710px); margin: 28px auto; }
.message { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 11px; animation: arrive .18s ease-out; }
.message-avatar { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid #dce7da; border-radius: 10px; background: #eaf3e4; color: #52755d; font-size: 10px; font-weight: 750; }
.message.user .message-avatar { border-color: #eee4da; border-radius: 50%; background: #f4ece3; color: #9a704d; }
.message-body { min-width: 0; padding-top: 2px; }
.message-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; color: #43554b; font-size: 10px; font-weight: 700; }
.message-meta time { color: #a1aaa3; font: 8px "DM Mono", monospace; }
.message-actions { margin-left: auto; opacity: 0; }
.message:hover .message-actions, .message:focus-within .message-actions { opacity: 1; }
.copy-message { padding: 2px 6px; border: 0; border-radius: 4px; background: transparent; color: #8a998f; cursor: pointer; font-size: 9px; }
.copy-message:hover { background: #edf1ea; color: #355d48; }
.message-content { color: #34463d; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; white-space: pre-wrap; }
.message.assistant .message-content { color: #263a30; }
.message-content pre { max-width: 100%; margin: 11px 0; padding: 12px; overflow: auto; border: 1px solid #e0e7de; border-radius: 7px; background: #eef2ec; color: #2e4036; font: 10px/1.65 "DM Mono", Consolas, monospace; white-space: pre; }
.thinking { color: #84938a; font-size: 10px; font-style: italic; }
.error-message { margin-top: 8px; padding: 9px 11px; border-left: 2px solid var(--rose); background: #fbf0eb; color: #895746; font-size: 10px; line-height: 1.6; }
@keyframes arrive { from { opacity: .5; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.composer-area { width: min(100% - 48px, 710px); margin: 0 auto; padding: 8px 0 14px; }
.composer { padding: 11px 12px 9px; border: 1px solid #e1e7df; border-radius: 10px; background: #fff; box-shadow: 0 5px 20px rgba(31,58,44,.045); transition: border-color .16s, box-shadow .16s; }
.composer:focus-within { border-color: #a8c3a8; box-shadow: 0 6px 23px rgba(53,104,68,.09); }
.composer textarea { display: block; width: 100%; min-height: 32px; max-height: 180px; padding: 3px 2px 7px; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; line-height: 1.55; }
.composer textarea::placeholder { color: #9aa69e; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid #edf0eb; }
.composer-tools { display: flex; align-items: center; gap: 7px; min-width: 0; color: #8c9990; }
.composer-model-dot { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: #88aa79; }
#composer-model-label { max-width: 115px; overflow: hidden; color: #6b7e70; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.tool-divider { width: 1px; height: 11px; margin: 0 1px; background: #e4e9e2; }
.composer-hint { overflow: hidden; color: #a1aba4; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.web-search-toggle { display: flex; flex: 0 0 auto; align-items: center; gap: 4px; padding: 5px 7px; border: 1px solid #e2e9df; border-radius: 6px; background: #f8faf6; color: #65796a; cursor: pointer; font-size: 8px; white-space: nowrap; }
.web-search-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.web-search-toggle[aria-pressed="true"] { border-color: #8cb99a; background: #eaf5e8; color: #286141; }
.web-search-toggle:focus-visible { outline: 2px solid #8cbca1; outline-offset: 2px; }
body.dark-theme .web-search-toggle { border-color: #3a4a3e; background: #263229; color: #c6deb8; }
body.dark-theme .web-search-toggle[aria-pressed="true"] { border-color: #668e6d; background: #263c2d; color: #a9d5ae; }
.composer-hint kbd { padding: 1px 3px; font-size: 7px; }
.send-button { display: flex; align-items: center; gap: 8px; padding: 7px 10px 7px 12px; border: 0; border-radius: 6px; background: var(--green); color: #fff; cursor: pointer; font-size: 9px; font-weight: 650; transition: background .16s; }
.send-button:hover { background: #315e4b; }
.send-button:disabled { background: #aabdb1; cursor: not-allowed; }
.send-arrow { display: grid; width: 18px; height: 18px; place-items: center; border-radius: 4px; background: var(--lime); color: #254233; font-size: 13px; line-height: 1; }
.send-button.stop { background: #a95e47; }
.send-button.stop .send-arrow { background: #f7d4c5; }
.composer-disclaimer { margin: 7px 2px 0; color: #9ea9a1; text-align: center; font-size: 8px; }

/* Session details */
.details-panel { display: flex; flex-direction: column; min-width: 0; padding: 19px 15px 12px; border-left: 1px solid #e7ebe5; background: #f9faf7; }
.details-head { display: flex; align-items: center; justify-content: space-between; margin: 1px 0 13px; }
.details-kicker, .detail-section h3 { color: #8b9990; font: 8px "DM Mono", monospace; letter-spacing: .12em; }
.details-close { display: none; width: 27px; height: 27px; border: 0; border-radius: 5px; background: transparent; color: #809087; cursor: pointer; font-size: 18px; }
.session-card { padding: 12px; border: 1px solid #e7ece5; border-radius: 9px; background: #fff; }
.session-card-top { display: flex; align-items: center; justify-content: space-between; }
.session-symbol { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 8px; background: var(--green); color: var(--lime); font-size: 14px; }
.session-live { display: flex; align-items: center; gap: 5px; color: #789273; font: 7px "DM Mono", monospace; letter-spacing: .06em; }
.session-live i { width: 5px; height: 5px; border-radius: 50%; background: #86b876; }
.session-card h2 { margin: 13px 0 4px; overflow: hidden; color: #33473c; font: 650 11px Manrope, sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.session-card p { margin: 0 0 12px; color: #8a978e; font-size: 8px; line-height: 1.55; }
.session-stat { display: flex; justify-content: space-between; padding-top: 9px; border-top: 1px solid #edf0eb; color: #929d95; font-size: 8px; }
.session-stat strong { color: #566b5a; font: 9px "DM Mono", monospace; }
.detail-section { margin-top: 23px; }
.detail-section h3 { margin: 0 0 10px 1px; }
.detail-model, .connection-detail { display: flex; align-items: center; gap: 9px; min-width: 0; }
.detail-model-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border: 1px solid #e0e9dc; border-radius: 8px; background: #edf4e8; color: #64824e; font-size: 13px; }
.detail-model > div, .connection-detail > div { display: grid; gap: 3px; min-width: 0; }
.detail-model strong, .connection-detail strong { overflow: hidden; color: #46594c; font-size: 8px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.detail-model small, .connection-detail small { color: #97a199; font-size: 8px; }
.detail-status-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #d6a15c; box-shadow: 0 0 0 3px #f4ead8; }
.detail-status-dot.online { background: #78ad67; box-shadow: 0 0 0 3px #e8f2e1; }
.detail-status-dot.offline { background: #cf715e; box-shadow: 0 0 0 3px #f8e9e3; }
.local-note { display: flex; gap: 9px; margin-top: auto; padding: 11px 10px; border: 1px solid #e5ebdf; border-radius: 8px; background: #f0f5e9; }
.local-note-icon { color: #6d8c55; font-size: 14px; }
.local-note strong { color: #566d4c; font-size: 8px; }
.local-note p { margin: 4px 0 0; color: #85927c; font-size: 8px; line-height: 1.65; }
.details-footer { display: flex; align-items: center; gap: 7px; padding: 13px 1px 0; color: #9aa59d; font-size: 8px; }
.footer-mark { display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; background: #e8eee5; color: #56735a; font: 700 7px Manrope, sans-serif; }
.footer-spacer { flex: 1; }
.theme-toggle { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid #e6ebe4; border-radius: 6px; background: white; color: #748377; cursor: pointer; font-size: 13px; }

/* Dialog, toast, responsive and theme */
.setup-dialog { width: min(92vw, 445px); padding: 21px 25px 19px; border: 1px solid #e3e9df; border-radius: 13px; background: #fbfcf9; color: var(--ink); box-shadow: var(--shadow); }
.setup-dialog::backdrop { background: rgba(17,37,30,.45); backdrop-filter: blur(3px); }
.dialog-close-row { display: flex; justify-content: flex-end; margin: -10px -11px 4px; }
.dialog-mark { display: grid; width: 34px; height: 34px; margin: 0 0 13px; place-items: center; border-radius: 10px; background: #eaf3e4; color: #507858; font-size: 18px; }
.dialog-kicker { margin: 0 0 7px; color: #78907d; font: 8px "DM Mono", monospace; letter-spacing: .13em; }
.setup-dialog h2 { margin: 0; color: #263d32; font: 600 25px Manrope, sans-serif; letter-spacing: -.05em; }
.dialog-copy { margin: 10px 0 17px; color: #75847a; font-size: 10px; line-height: 1.7; }
.setup-steps { display: grid; gap: 11px; margin: 0 0 17px; padding: 0; list-style: none; }
.setup-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 9px; }
.setup-steps li > span { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #e7f0e1; color: #567858; font: 9px "DM Mono", monospace; }
.setup-steps strong { font-size: 9px; }
.setup-steps p { margin: 3px 0 0; color: #849188; font-size: 9px; line-height: 1.5; }
.setup-command { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #e2e9e0; border-radius: 7px; background: #f2f5f0; }
.setup-command code, .setup-footnote code { font: 9px "DM Mono", Consolas, monospace; }
.setup-command button { padding: 6px 8px; border: 0; border-radius: 5px; background: #e1eddc; color: #426647; cursor: pointer; font-size: 8px; }
.setup-footnote { margin: 9px 0 15px; color: #849188; font-size: 9px; line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; }
.dialog-done { padding: 8px 13px; border: 0; border-radius: 6px; background: var(--green); color: white; cursor: pointer; font-size: 9px; }
.toast { position: fixed; right: 18px; bottom: 17px; z-index: 9; max-width: min(420px, calc(100vw - 36px)); padding: 10px 13px; border: 1px solid #e0e8dd; border-radius: 7px; background: #fff; color: #42564a; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity .16s, transform .16s; font-size: 10px; }
.toast.visible { opacity: 1; transform: translateY(0); }
.mobile-scrim { display: none; }
body.dark-theme { --paper: #17211d; --panel: #202b25; --ink: #e5ece5; --muted: #a6b4aa; --line: #344239; }
body.dark-theme .workspace, body.dark-theme .details-panel { background: #17211d; }
body.dark-theme .topbar { border-color: #344239; background: rgba(31,43,36,.92); }
body.dark-theme .page-label strong, body.dark-theme .welcome h1, body.dark-theme .message.assistant .message-content { color: #e5eee4; }
body.dark-theme .welcome h1 em { color: #a8d09a; }
body.dark-theme .welcome-copy, body.dark-theme .message-content { color: #aab8ad; }
body.dark-theme .prompt-heading, body.dark-theme .page-label { color: #a4b1a7; }
body.dark-theme .starter-prompts button, body.dark-theme .model-picker, body.dark-theme .composer, body.dark-theme .session-card { border-color: #35443a; background: #202b25; }
body.dark-theme .starter-prompts strong, body.dark-theme .message-meta, body.dark-theme .session-card h2 { color: #d6e3d7; }
body.dark-theme .starter-prompts small, body.dark-theme .session-card p { color: #9aaa9e; }
body.dark-theme .model-picker select, body.dark-theme .composer textarea { color: #dce8dc; }
body.dark-theme .composer-bottom { border-color: #35443a; }
body.dark-theme .message-content pre { border-color: #35443a; background: #202b25; color: #dce8dc; }
body.dark-theme .session-stat { border-color: #35443a; }
body.dark-theme .details-panel { border-color: #344239; }
body.dark-theme .local-note { border-color: #3a4a37; background: #263328; }
body.dark-theme .local-note strong { color: #cae1bb; }
body.dark-theme .local-note p { color: #a3b39b; }
body.dark-theme .theme-toggle { border-color: #3c4b40; background: #263229; color: #d3e1d0; }
@media (max-width: 1120px) {
  .content-grid { grid-template-columns: minmax(0,1fr); }
  .details-panel { position: fixed; z-index: 7; inset: 0 0 0 auto; width: 270px; max-width: 88vw; box-shadow: var(--shadow); transform: translateX(105%); transition: transform .2s ease; }
  .details-panel.open { transform: translateX(0); }
  .details-close { display: block; }
  .details-toggle { display: grid; }
}
.content-grid.details-hidden { grid-template-columns: minmax(0,1fr); }
.content-grid.details-hidden > .details-panel { display: none; }
@media (max-width: 700px) {
  body { min-width: 320px; }
  .app-shell { display: block; min-height: 100dvh; }
  .sidebar { position: fixed; z-index: 8; inset: 0 auto 0 0; width: min(82vw, 286px); height: 100dvh; transform: translateX(-103%); transition: transform .2s ease; box-shadow: 14px 0 32px rgba(17,39,30,.2); }
  .sidebar.open { transform: translateX(0); }
  .mobile-scrim.visible { position: fixed; z-index: 6; inset: 0; display: block; background: rgba(17,37,30,.35); }
  .workspace { height: 100dvh; min-height: 510px; }
  .topbar { flex-basis: 55px; gap: 7px; padding: 0 10px; }
  .mobile-menu { display: grid; flex: 0 0 28px; width: 28px; height: 32px; place-items: center; color: #64756b; cursor: pointer; font-size: 15px; }
  .page-label { flex: 1; gap: 6px; font-size: 9px; }
  .connection-chip { display: none; }
  .topbar-actions { gap: 4px; }
  .model-picker { min-width: 112px; gap: 5px; padding: 6px 7px; }
  .model-picker select { min-width: 55px; max-width: 103px; font-size: 8px; }
  .refresh-button, .details-toggle { width: 27px; height: 29px; }
  .welcome { width: calc(100% - 34px); padding: 25px 0 20px; }
  .welcome-eyebrow { margin-bottom: 12px; font-size: 7px; }
  .welcome h1 { font-size: clamp(41px, 11vw, 58px); }
  .welcome-orbit { flex-basis: 76px; width: 76px; height: 76px; }
  .orbit-core { width: 30px; height: 30px; border-radius: 10px; font-size: 17px; }
  .orbit-ring { inset: 5px; }
  .orbit-ring::before { inset: 7px; }
  .orbit-ring::after { inset: 16px; }
  .welcome-copy { max-width: 350px; margin: 12px 0 19px; font-size: 10px; }
  .starter-prompts { gap: 6px; }
  .starter-prompts button { min-height: 51px; gap: 7px; padding: 7px; }
  .prompt-icon { flex-basis: 25px; width: 25px; height: 25px; }
  .starter-prompts strong { font-size: 8px; }
  .starter-prompts small { font-size: 7px; }
  .message-list { width: calc(100% - 28px); margin: 20px auto; gap: 19px; }
  .composer-area { width: calc(100% - 20px); padding-bottom: max(11px, env(safe-area-inset-bottom)); }
  .composer-disclaimer { display: none; }
  .composer-hint { display: none; }
}
@media (max-width: 410px) {
  .breadcrumb-muted, .crumb-slash { display: none; }
  .welcome-headline { gap: 9px; }
  .welcome-orbit { flex-basis: 66px; width: 66px; height: 66px; }
  .starter-prompts { grid-template-columns: 1fr; }
  .starter-prompts button { min-height: 45px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Local model library */
.workspace-tabs { display: flex; flex: 0 0 auto; gap: 5px; padding: 9px 24px 8px; border-bottom: 1px solid #e8ebe5; background: rgba(255,255,255,.48); overflow-x: auto; scrollbar-width: none; }
.workspace-tabs::-webkit-scrollbar { display: none; }
.workspace-tabs button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #78867d; cursor: pointer; font-size: 9px; font-weight: 600; }
.workspace-tabs button:hover { background: rgba(234,241,231,.75); color: #365744; }
.workspace-tabs button.active { border-color: #dce8d8; background: #edf5e8; color: #315940; }
.model-workspace { flex: 1; min-height: 0; overflow: auto; padding: 26px clamp(16px, 4vw, 52px) 35px; scrollbar-color: #cbd5cb transparent; scrollbar-width: thin; }
.model-workspace:not([hidden]) { display: block; }
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; max-width: 1120px; margin: 0 auto 22px; }
.library-eyebrow { margin: 0 0 7px; color: #80937f; font: 8px "DM Mono", monospace; letter-spacing: .14em; }
.library-heading h1, .hardware-page-heading h2 { margin: 0; color: #263d32; font: 600 clamp(22px, 3vw, 31px) Manrope, "Segoe UI", sans-serif; letter-spacing: -.05em; }
.library-heading > div:first-child > p:last-child, .hardware-page-heading > div > p:last-child { margin: 8px 0 0; color: #7c8980; font-size: 10px; line-height: 1.6; }
.hardware-summary { display: flex; flex: 0 0 min(34%, 270px); align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #e3eade; border-radius: 9px; background: #f9fbf7; }
.hardware-mark { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border-radius: 8px; background: #eaf2e4; color: #527a5b; font-size: 14px; }
.hardware-summary > span:last-child { display: grid; gap: 4px; min-width: 0; }
.hardware-summary strong { overflow: hidden; color: #435b48; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.hardware-summary small { color: #89978d; font-size: 8px; line-height: 1.45; }
.hardware-link { margin-left: auto; border: 1px solid var(--border-strong); background: var(--bg-elevated); color: var(--text-secondary); border-radius: 8px; padding: 8px 11px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.hardware-link:hover, .hardware-link:focus-visible { color: var(--text-primary); border-color: var(--accent); outline: none; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 1120px; margin: 0 auto 10px; }
.library-search { display: flex; flex: 1; align-items: center; gap: 8px; max-width: 570px; padding: 6px 7px 6px 10px; border: 1px solid #e1e8df; border-radius: 7px; background: white; color: #819187; }
.library-search input { flex: 1; min-width: 80px; border: 0; outline: 0; background: transparent; color: #34473a; font-size: 9px; }
.library-search button, .library-filters button, .secondary-action { padding: 6px 9px; border: 1px solid #e0e8de; border-radius: 5px; background: #f9fbf7; color: #587160; cursor: pointer; font-size: 8px; font-weight: 650; }
.library-search button:hover, .secondary-action:hover { border-color: #c4d7bd; background: #edf5e8; }
.library-filters { display: flex; gap: 5px; }
.library-filters button.selected { border-color: #cbdcc5; background: #eaf3e4; color: #426c4a; }
.library-status { max-width: 1120px; min-height: 15px; margin: 0 auto 7px; color: #87948b; font-size: 8px; }
.model-list, .download-list, .component-grid, .hardware-specs { display: grid; max-width: 1120px; gap: 8px; margin: 0 auto; }
.model-card, .download-card, .component-card, .hardware-stat { min-width: 0; padding: 12px 13px; border: 1px solid #e4eae2; border-radius: 8px; background: rgba(255,255,255,.78); }
.model-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 11px 16px; align-items: center; }
.model-card-main { display: grid; gap: 5px; min-width: 0; }
.model-card-title { overflow: hidden; color: #34493a; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.model-card-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; color: #87938a; font-size: 8px; }
.model-card-description { overflow: hidden; color: #8d9990; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.model-card-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.primary-action { padding: 7px 10px; border: 1px solid #2f5942; border-radius: 5px; background: #315d45; color: #fff; cursor: pointer; font-size: 8px; font-weight: 650; }
.primary-action:hover { background: #244b38; }
.model-badge { display: inline-flex; align-items: center; width: fit-content; padding: 3px 6px; border-radius: 4px; background: #edf3e8; color: #597b50; font: 7px "DM Mono", monospace; }
.model-badge.good { background: #e4f2de; color: #467143; }
.model-badge.marginal { background: #fbf1dc; color: #99723a; }
.model-badge.too-tight { background: #f8e9e3; color: #9c5948; }
.load-more { display: block; margin: 12px auto; padding: 8px 12px; border: 1px solid #dfe8dc; border-radius: 6px; background: white; color: #55705a; cursor: pointer; font-size: 8px; }
.empty-state { padding: 30px 15px; border: 1px dashed #d8e2d7; border-radius: 8px; color: #88958c; text-align: center; font-size: 9px; line-height: 1.7; }
.download-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 12px; }
.download-card-main { display: grid; gap: 5px; min-width: 0; }
.download-card-main strong { overflow: hidden; color: #405443; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.download-card-main small { color: #89968d; font-size: 8px; }
.download-card progress, .runtime-progress progress { width: 100%; height: 6px; accent-color: #6c9c63; }
.download-card-actions { display: flex; gap: 5px; }
.download-card-actions button { padding: 5px 7px; border: 1px solid #e1e7df; border-radius: 4px; background: #fafbf8; color: #63776a; cursor: pointer; font-size: 7px; }
.runtime-page { display: grid; max-width: 1120px; gap: 13px; margin: 0 auto; }
.runtime-summary { display: flex; align-items: center; gap: 11px; padding: 14px; border: 1px solid #e3e9df; border-radius: 9px; background: white; }
.runtime-icon { display: grid; flex: 0 0 35px; width: 35px; height: 35px; place-items: center; border-radius: 10px; background: #eaf3e4; color: #4e7654; }
.runtime-summary > div { flex: 1; min-width: 0; }
.runtime-summary h2 { margin: 0; color: #364a3c; font-size: 11px; }
.runtime-summary p, .runtime-note { margin: 4px 0 0; color: #849188; font-size: 8px; line-height: 1.6; }
.runtime-status { padding: 5px 7px; border-radius: 5px; background: #edf3e8; color: #5b7c58; font: 7px "DM Mono", monospace; white-space: nowrap; }
.runtime-actions, .profile-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 11px; border: 1px solid #e5eae2; border-radius: 8px; background: rgba(255,255,255,.65); }
.runtime-actions label, .profile-picker label { color: #77867b; font-size: 8px; font-weight: 650; }
.runtime-actions select, .profile-picker select { min-width: 175px; padding: 6px 8px; border: 1px solid #e2e8e0; border-radius: 5px; background: white; color: #45594b; font-size: 8px; }
.runtime-progress { display: grid; gap: 6px; color: #839087; font-size: 8px; }
.component-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
.component-card { display: grid; gap: 5px; }
.component-card strong { color: #425644; font-size: 9px; }
.component-card small { color: #8b978e; font-size: 8px; line-height: 1.5; }
.component-state { color: #718b66; font: 7px "DM Mono", monospace; }
.component-state.off { color: #a1794e; }
.loaded-models { display: grid; gap: 6px; }
.loaded-models h3 { margin: 2px 0; color: #526356; font-size: 9px; }
.loaded-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #e3e9e1; border-radius: 6px; background: white; color: #647469; font-size: 8px; }
.hardware-page { display: grid; max-width: 1120px; gap: 14px; margin: 0 auto; }
.hardware-page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hardware-page-heading h2 { font-size: 18px; }
.hardware-specs { grid-template-columns: repeat(4, minmax(0,1fr)); }
.hardware-stat { display: grid; gap: 5px; }
.hardware-stat span { color: #87948a; font-size: 8px; }
.hardware-stat strong { overflow: hidden; color: #415541; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.hardware-footnote { margin: 0; color: #929d95; font-size: 8px; line-height: 1.6; }
.model-dialog { width: min(92vw, 650px); max-height: 82vh; padding: 19px; overflow: auto; border: 1px solid #e1e8df; border-radius: 12px; background: #fbfcf9; color: var(--ink); box-shadow: var(--shadow); }
.model-storage { max-width: 1120px; margin: 14px auto 0; overflow-wrap: anywhere; color: #89958c; font-size: 8px; line-height: 1.6; }
button:disabled { opacity: .52; cursor: not-allowed; }
.model-dialog::backdrop { background: rgba(17,37,30,.45); backdrop-filter: blur(3px); }
.model-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.model-dialog-head h2 { margin: 0; color: #34483b; font-size: 17px; }
.model-dialog-head p:last-child { margin: 5px 0 0; color: #87938b; font-size: 8px; }
.model-dialog-head .details-close { display: block; }
.model-quant-list { display: grid; gap: 7px; }
.quant-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid #e4eae2; border-radius: 7px; background: white; }
.quant-row > div { display: grid; gap: 4px; min-width: 0; }
.quant-row strong { color: #485c4a; font-size: 9px; }
.quant-row small { color: #89958d; font-size: 8px; }
body.dark-theme .workspace-tabs { border-color: #344239; background: rgba(31,43,36,.9); }
body.dark-theme .workspace-tabs button { color: #aab8ad; }
body.dark-theme .workspace-tabs button.active { border-color: #455a48; background: #2a3a2c; color: #d5e7cb; }
body.dark-theme .library-heading h1, body.dark-theme .hardware-page-heading h2 { color: #e3ece1; }
body.dark-theme .library-heading > div:first-child > p:last-child, body.dark-theme .hardware-page-heading > div > p:last-child { color: #a3b2a6; }
body.dark-theme .hardware-summary, body.dark-theme .model-card, body.dark-theme .download-card, body.dark-theme .component-card, body.dark-theme .hardware-stat, body.dark-theme .runtime-summary, body.dark-theme .loaded-row, body.dark-theme .quant-row { border-color: #37463b; background: #202b25; }
body.dark-theme .model-card-title, body.dark-theme .download-card-main strong, body.dark-theme .component-card strong, body.dark-theme .hardware-stat strong, body.dark-theme .runtime-summary h2, body.dark-theme .model-dialog-head h2, body.dark-theme .quant-row strong { color: #d8e5d7; }
body.dark-theme .library-search, body.dark-theme .library-search input, body.dark-theme .runtime-actions select, body.dark-theme .profile-picker select { border-color: #37463b; background: #202b25; color: #d7e4d8; }
body.dark-theme .runtime-actions, body.dark-theme .profile-picker { border-color: #37463b; background: #1c2720; }
body.dark-theme .runtime-status, body.dark-theme .model-badge { background: #2a392d; color: #b9d7a8; }
@media (max-width: 700px) {
  .workspace-tabs { gap: 2px; padding: 7px 8px; }
  .workspace-tabs button { padding: 7px 8px; font-size: 8px; }
  .model-workspace { padding: 18px 11px 28px; }
  .library-heading { flex-direction: column; gap: 12px; }
  .hardware-summary { flex-basis: auto; width: 100%; }
  .library-toolbar { align-items: stretch; flex-direction: column; }
  .library-search { max-width: none; }
  .model-card { grid-template-columns: 1fr; }
  .model-card-actions { justify-content: flex-start; }
  .component-grid { grid-template-columns: 1fr; }
  .hardware-specs { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .runtime-summary { align-items: flex-start; flex-wrap: wrap; }
  .runtime-status { margin-left: 46px; }
  .hardware-page-heading { align-items: flex-start; }
  .download-card { grid-template-columns: 1fr; }
}

/* Readable chat and file attachments */
.conversation-select, .search-box input, .page-label, .page-label strong { font-size: 12px; }
.workspace-tabs button { padding: 8px 12px; font-size: 11px; }
.message-list, .composer-area { width: min(100% - 64px, 780px); }
.message-list { gap: 27px; margin: 32px auto; }
.message-meta { gap: 9px; margin-bottom: 8px; font-size: 12px; }
.message-meta time { font-size: 10px; }
.message-content { font-size: 15px; line-height: 1.75; white-space: normal; }
.message-content .tool-status { display: block; margin-top: 8px; color: #789080; font-size: 12px; }
.message.user .message-content { white-space: pre-wrap; }
.message-content p { margin: 0 0 12px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content h2, .message-content h3, .message-content h4 { margin: 21px 0 9px; color: #20372f; font-weight: 700; line-height: 1.35; }
.message-content h2 { font-size: 20px; }
.message-content h3 { font-size: 17px; }
.message-content h4 { font-size: 15px; }
.message-content ul, .message-content ol { display: grid; gap: 5px; margin: 8px 0 15px; padding-left: 25px; }
.message-content li { padding-left: 3px; }
.message-content blockquote { margin: 12px 0; padding: 2px 0 2px 14px; border-left: 3px solid #9ab98d; color: #65766b; }
.message-content hr { height: 1px; margin: 17px 0; border: 0; background: #e4e9e2; }
.message-content a { color: #356c4c; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.message-content code { padding: 2px 5px; border-radius: 4px; background: #edf2e9; color: #3a6449; font: .88em "DM Mono", Consolas, monospace; }
.message-content pre { margin: 13px 0; padding: 14px 16px; border-radius: 8px; font-size: 13px; line-height: 1.7; }
.message-content pre code { padding: 0; background: transparent; color: inherit; font: inherit; }
.composer textarea { min-height: 38px; padding: 5px 2px 9px; font-size: 14px; }
.attach-button { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center; border: 1px solid #e2e9df; border-radius: 7px; background: #f8faf6; color: #506d58; cursor: pointer; }
.attach-button:hover { border-color: #b9ceb0; background: #edf5e8; }
.attach-button:focus-visible { outline: 2px solid #8cbca1; outline-offset: 2px; }
.attach-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 9px; }
.attachment-chip, .message-attachment { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 6px 9px; border: 1px solid #dce7da; border-radius: 7px; background: #f3f7ef; color: #4a6551; font-size: 11px; }
.attachment-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #6a806e; cursor: pointer; font-size: 15px; line-height: 1; }
.attachment-chip button:hover { background: #e3eddf; }
.message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.message-attachment { overflow-wrap: anywhere; }
.composer.drag-active { outline: 2px dashed #79a16e; outline-offset: 3px; background: #f3f8ef; }
body.dark-theme .message-content h2, body.dark-theme .message-content h3, body.dark-theme .message-content h4 { color: #e3ece1; }
body.dark-theme .message-content blockquote { border-color: #8eae80; color: #aab8ad; }
body.dark-theme .message-content hr { background: #3a4a3e; }
body.dark-theme .message-content a { color: #a9d18f; }
body.dark-theme .message-content .tool-status { color: #afc2b3; }
body.dark-theme .message-content code, body.dark-theme .attachment-chip, body.dark-theme .message-attachment { border-color: #3a4a3e; background: #26352a; color: #c6deb8; }
body.dark-theme .attach-button { border-color: #3a4a3e; background: #263229; color: #c6deb8; }
body.dark-theme .composer.drag-active { background: #26352a; }
@media (max-width: 700px) {
  .workspace-tabs button { padding: 7px 9px; font-size: 10px; }
  .message-list { width: calc(100% - 28px); margin: 20px auto; gap: 21px; }
  .composer-area { width: calc(100% - 20px); }
  .message-content { font-size: 14px; }
  .message-content h2 { font-size: 18px; }
  .message-content h3 { font-size: 16px; }
}

/* Phase 1 product shell: primary navigation, contextual model tools, and inspector. */
.primary-tabs { align-items: center; gap: 3px; padding-top: 8px; padding-bottom: 7px; }
.primary-tabs button { color: var(--text-secondary); font-size: 11px; }
.primary-tabs button.active, .primary-tabs button[aria-expanded="true"] { border-color: var(--border-strong); background: var(--accent-soft); color: var(--accent); }
.model-subnav { align-items: center; gap: 3px; padding: 5px 24px 6px; border-bottom-color: var(--border); background: rgba(249,251,247,.85); }
.model-subnav .subnav-label { margin-right: 8px; color: var(--text-muted); font-size: 9px; font-weight: 700; }
.model-subnav button { padding: 5px 9px; font-size: 10px; }
.model-subnav button.active { border-color: var(--border-strong); background: white; color: var(--accent); }
.detail-model div { display: grid; gap: 3px; min-width: 0; }
.detail-model small + small { color: var(--text-muted); }
.inspector-row { display: flex; align-items: flex-start; gap: 9px; }
.inspector-row > div { display: grid; gap: 3px; min-width: 0; }
.inspector-row strong { color: #41584a; font-size: 10px; }
.inspector-row small { color: var(--text-muted); font-size: 8px; line-height: 1.4; }
.inspector-icon { display: grid; flex: 0 0 25px; width: 25px; height: 25px; place-items: center; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-size: 12px; }
.product-page { flex: 1; min-height: 0; overflow: auto; padding: 35px clamp(20px, 5vw, 70px); background: var(--paper); }
.product-page-heading, .product-page-grid, .developer-routes { max-width: 900px; margin: 0 auto; }
.product-page-heading h1 { margin: 0; color: #263d32; font: 600 clamp(25px, 3vw, 34px) Manrope, "Segoe UI", sans-serif; letter-spacing: -.04em; }
.product-page-heading > p:last-child { max-width: 570px; margin: 9px 0 0; color: var(--text-muted); font-size: 11px; line-height: 1.65; }
.product-page-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 25px; }
.product-card { display: flex; align-items: flex-start; gap: 12px; padding: 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-panel); }
.product-card-icon { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: 15px; }
.product-card h2 { margin: 0; color: #385042; font-size: 12px; }
.product-card p { margin: 7px 0 11px; color: var(--text-muted); font-size: 10px; line-height: 1.6; }
.state-badge { display: inline-flex; padding: 4px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font: 8px "DM Mono", monospace; }
.product-note { max-width: 900px; margin: 17px auto 0; color: var(--text-muted); font-size: 9px; line-height: 1.6; }
.developer-routes { display: grid; gap: 1px; margin-top: 25px; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--border); }
.tool-registry-panel { max-width: 900px; margin: 18px auto 0; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-panel); }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.panel-heading h2 { margin:0; font-size:16px; }
.panel-heading p { margin:4px 0 0; color:var(--text-muted); font-size:12px; }
.tool-list, .mcp-list { display:grid; gap:8px; }
.tool-row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg-elevated); }
.tool-row strong { display:block; font-size:13px; }
.tool-row small { color:var(--text-muted); }
.tool-row label { display:flex; align-items:center; gap:6px; white-space:nowrap; font-size:12px; }
.mcp-row { margin-top:10px; padding-top:10px; border-top:1px solid var(--border); color:var(--text-secondary); font-size:12px; }
.tools-toggle { border:0; background:transparent; color:var(--text-secondary); cursor:pointer; font-size:12px; padding:4px 6px; }
.tools-toggle:disabled { opacity:.55; cursor:not-allowed; }
.tool-activity { margin-top:10px; padding:9px 11px; border-left:3px solid var(--accent); border-radius:6px; background:var(--bg-elevated); font-size:12px; }
.tool-activity summary { cursor:pointer; color:var(--text-secondary); }
.tool-activity pre { max-height:180px; overflow:auto; margin:7px 0 0; white-space:pre-wrap; color:var(--text-muted); }
.developer-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px; max-width:900px; margin:14px auto 0; }
.developer-facts div { padding:10px 12px; border:1px solid var(--border); border-radius:8px; background:var(--bg-panel); }
.developer-facts span { display:block; color:var(--text-muted); font-size:11px; }
.developer-facts strong { display:block; margin-top:4px; font-size:13px; }
.route-row { display: grid; grid-template-columns: minmax(235px, .9fr) minmax(150px, 1fr) auto; gap: 14px; align-items: center; padding: 13px 15px; background: var(--bg-panel); }
.route-row code { color: #315d45; font: 10px "DM Mono", Consolas, monospace; }
.route-row span { color: var(--text-secondary); font-size: 10px; }
.route-row b { color: var(--text-muted); font: 8px "DM Mono", monospace; font-weight: 500; }
body.dark-theme .model-subnav { background: rgba(28,39,32,.9); }
body.dark-theme .model-subnav button.active, body.dark-theme .product-card, body.dark-theme .route-row { background: #202b25; }
body.dark-theme .inspector-row strong, body.dark-theme .product-page-heading h1, body.dark-theme .product-card h2 { color: #d8e5d7; }
body.dark-theme .product-page { background: var(--paper); }
body.dark-theme .route-row code { color: #b9d7a8; }
@media (max-width: 700px) {
  .model-subnav { padding-left: 8px; padding-right: 8px; overflow-x: auto; }
  .model-subnav .subnav-label { display: none; }
  .product-page { padding: 25px 14px 30px; }
  .product-page-grid { grid-template-columns: 1fr; margin-top: 20px; }
  .route-row { grid-template-columns: 1fr; gap: 5px; padding: 11px 12px; }
}

/* Phase 2 lifecycle state presentation. */
.runtime-live-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 14px 0 12px; }
.runtime-live-summary > div { min-width: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elevated); }
.runtime-live-summary span { display: block; color: var(--text-muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.runtime-live-summary strong { display: block; margin-top: 6px; overflow: hidden; color: var(--text-primary); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.advanced-runtime { margin-top: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-elevated); }
.advanced-runtime summary { padding: 11px 13px; cursor: pointer; color: var(--text-secondary); font-size: 12px; }
.advanced-runtime[open] summary { border-bottom: 1px solid var(--border); }
.advanced-runtime .profile-picker { margin: 0; border: 0; border-radius: 0; background: transparent; }
.model-lifecycle-state { padding: 3px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.model-lifecycle-state.installed, .model-lifecycle-state.stopped { background: var(--bg-panel); color: var(--text-muted); }
.model-lifecycle-state.starting { background: #fff2c2; color: #8a6200; }
.model-lifecycle-state.ready { background: #dff5e6; color: #19643f; }
.model-lifecycle-state.failed { background: #fde4e4; color: #8b2d31; }
body.dark-theme .runtime-live-summary > div, body.dark-theme .advanced-runtime { border-color: #37463b; background: #202b25; }
body.dark-theme .model-lifecycle-state.starting { background: #4b3b1b; color: #f0c66b; }
body.dark-theme .model-lifecycle-state.ready { background: #214b34; color: #a7e3b9; }
body.dark-theme .model-lifecycle-state.failed { background: #4d292b; color: #f5a4a4; }
@media (max-width: 700px) { .runtime-live-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
