LocalWebAgent / css /app.css
ereniko's picture
LocalWebAgent v0.3.0: LFM3-1.7B agent + CheerpX Linux + file viewer, fully offline
a8f5a2f verified
Raw History Blame
29.8 kB
@font-face {
font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
src: url(../vendor/fonts/inter-latin.woff2) format("woff2");
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
src: url(../vendor/fonts/inter-latin-ext.woff2) format("woff2");
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap;
src: url(../vendor/fonts/jetbrains-mono-latin.woff2) format("woff2");
}
/* ---------- tokens ---------- */
:root {
--bg: #fafafa;
--surface: #ffffff;
--surface-2: #f4f4f5;
--surface-3: #ececee;
--border: #e4e4e7;
--border-strong: #d4d4d8;
--text: #09090b;
--text-2: #52525b;
--text-3: #8a8a93;
--primary: #09090b;
--primary-ink: #fafafa;
--focus: #3b82f6;
--ok: #16a34a;
--warn: #ca8a04;
--bad: #dc2626;
--code-bg: #f4f4f5;
--code-text: #27272a;
--term-bg: #0c0c0e;
--term-border: #1f1f23;
--shadow-lg: 0 16px 48px -12px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
--sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
--mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
--radius: 12px;
--radius-sm: 9px;
--radius-lg: 18px;
color-scheme: light;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--bg: #0c0c0e;
--surface: #111113;
--surface-2: #18181b;
--surface-3: #202024;
--border: #232327;
--border-strong: #2e2e33;
--text: #ececef;
--text-2: #a1a1aa;
--text-3: #6b6b74;
--primary: #ececef;
--primary-ink: #0c0c0e;
--focus: #60a5fa;
--ok: #3fb950;
--warn: #d29922;
--bad: #f85149;
--code-bg: #0c0c0e;
--code-text: #d4d4d8;
--shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .06);
color-scheme: dark;
}
}
:root[data-theme="dark"] {
--bg: #0c0c0e; --surface: #111113; --surface-2: #18181b; --surface-3: #202024; --border: #232327; --border-strong: #2e2e33;
--text: #ececef; --text-2: #a1a1aa; --text-3: #6b6b74; --primary: #ececef; --primary-ink: #0c0c0e; --focus: #60a5fa;
--ok: #3fb950; --warn: #d29922; --bad: #f85149; --code-bg: #0c0c0e; --code-text: #d4d4d8; color-scheme: dark;
}
/* ---------- base ---------- */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
background: var(--bg); color: var(--text);
font: 13.5px/1.55 var(--sans); font-feature-settings: "cv11", "ss03";
-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
display: grid; grid-template-rows: auto 1fr; overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--text-2); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .92em; }
.spacer { flex: 1; }
svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--focus) 30%, transparent); }
kbd { font: 500 11px var(--mono); padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; color: var(--text-2); background: var(--surface); }
/* ---------- title bar ---------- */
.titlebar {
height: 44px; display: flex; align-items: center; gap: 20px; padding: 0 10px 0 16px;
border-bottom: 1px solid var(--border); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; white-space: nowrap; }
.brand-name { font-weight: 600; letter-spacing: -.01em; }
.brand-sep { color: var(--border-strong); }
.brand-model { color: var(--text-2); }
.brand-device { color: var(--text-3); font-size: 11px; border: 1px solid var(--border); border-radius: 999px; padding: 0 8px; line-height: 18px; }
.status { display: flex; align-items: center; gap: 16px; margin-left: auto; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.status-item { display: inline-flex; align-items: center; gap: 7px; }
.status-item i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); opacity: .6; }
.status-item[data-state="ok"] i { background: var(--ok); opacity: 1; }
.status-item[data-state="busy"] i { background: var(--warn); opacity: 1; animation: blink 1.2s ease-in-out infinite; }
.status-item[data-state="warn"] i { background: var(--warn); opacity: 1; }
.status-item[data-state="bad"] i { background: var(--bad); opacity: 1; }
.status-item[data-state="bad"] { color: var(--bad); }
.status-text { font-variant-numeric: tabular-nums; }
@keyframes blink { 50% { opacity: .3; } }
.titlebar-actions { display: flex; gap: 2px; padding-left: 12px; border-left: 1px solid var(--border); }
.icon-btn {
width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 10px;
background: none; color: var(--text-2);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
/* ---------- workspace ---------- */
.tabs { display: none; }
.workspace { --left: 46%; display: grid; grid-template-columns: minmax(380px, var(--left)) 1px minmax(360px, 1fr); min-height: 0; }
.pane { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.splitter { background: var(--border); position: relative; cursor: col-resize; }
.splitter::after { content: ""; position: absolute; inset: 0 -4px; z-index: 2; }
.splitter:hover, .splitter.dragging { background: var(--focus); }
body.resizing { cursor: col-resize; user-select: none; }
body.resizing iframe, body.resizing #terminal { pointer-events: none; }
/* ---------- chat ---------- */
.chat { background: var(--bg); }
.scroller { flex: 1; overflow-y: auto; scrollbar-gutter: stable; }
.thread { max-width: 760px; margin: 0 auto; padding: 28px 28px 12px; display: flex; flex-direction: column; gap: 22px; min-height: 100%; }
.empty { margin: auto 0; padding-bottom: 8vh; }
.empty h1 { font-size: 20px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 6px; }
.empty p { color: var(--text-2); margin: 0 0 28px; max-width: 520px; }
.examples-label, .section-label { font-size: 11.5px; font-weight: 500; color: var(--text-3); margin-bottom: 8px; }
.examples { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.example {
display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 14px; border: 0; background: none;
color: var(--text); border-top: 1px solid var(--border);
}
.example:first-child { border-top: 0; }
.example svg { color: var(--text-3); width: 14px; height: 14px; transition: transform .15s; }
.example:hover { background: var(--surface-2); }
.example:hover svg { transform: translateX(2px); color: var(--text-2); }
.msg.user {
align-self: stretch; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
padding: 11px 15px; white-space: pre-wrap; overflow-wrap: anywhere;
}
.msg.agent { display: flex; flex-direction: column; gap: 8px; }
.step { display: flex; flex-direction: column; gap: 8px; }
/* reasoning */
.reasoning summary {
list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none;
color: var(--text-3); font-size: 12.5px; padding: 2px 0;
}
.reasoning summary::-webkit-details-marker { display: none; }
.reasoning summary svg { width: 12px; height: 12px; transition: transform .15s; }
.reasoning[open] summary svg { transform: rotate(90deg); }
.reasoning summary:hover { color: var(--text-2); }
.reasoning .r-body {
margin: 6px 0 2px 5px; padding: 2px 0 2px 13px; border-left: 1px solid var(--border-strong);
color: var(--text-2); font-size: 12.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow-y: auto;
}
.reasoning .r-time { font-variant-numeric: tabular-nums; }
/* answer */
.md { overflow-wrap: anywhere; }
.md:empty { display: none; }
.md p { margin: 0 0 10px; } .md p:last-child { margin-bottom: 0; }
.md ul, .md ol { margin: 4px 0 10px; padding-left: 20px; } .md li { margin: 2px 0; }
.md h3, .md h4, .md h5, .md h6 { margin: 14px 0 6px; font-size: 13.5px; font-weight: 600; }
.md strong { font-weight: 600; }
.md code { font: 12.5px var(--mono); background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 6px; }
.md pre.md-code { background: var(--code-bg); border: 1px solid var(--border); color: var(--code-text); padding: 12px 14px; border-radius: var(--radius); overflow-x: auto; margin: 8px 0; }
.md pre.md-code code { background: none; border: 0; padding: 0; font-size: 12.5px; line-height: 1.6; }
.md-link { text-decoration: underline dotted; text-underline-offset: 2px; }
/* tool calls */
.tool { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tool-head {
display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 12px; border: 0; background: none; text-align: left;
font-size: 12.5px; min-height: 38px;
}
.tool-head:hover { background: var(--surface-2); }
.tool-head > svg { color: var(--text-3); }
.tool-head .chev { width: 12px; height: 12px; color: var(--text-3); transition: transform .15s; }
.tool.open .tool-head .chev { transform: rotate(90deg); }
.tool-label { font-family: var(--mono); font-size: 12px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tool-label .verb { font-family: var(--sans); color: var(--text-2); font-size: 12.5px; margin-right: 6px; }
.tool-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 10px; }
.tool-meta .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.tool[data-state="running"] .dot { background: var(--warn); animation: blink 1s infinite; }
.tool[data-state="ok"] .dot { background: var(--ok); }
.tool[data-state="fail"] .dot, .tool[data-state="error"] .dot, .tool[data-state="timeout"] .dot { background: var(--bad); }
.tool[data-state="fail"] .t-status, .tool[data-state="error"] .t-status, .tool[data-state="timeout"] .t-status { color: var(--bad); }
.tool-body { border-top: 1px solid var(--border); }
.tool:not(.open) .tool-body { display: none; }
.tool-body pre {
margin: 0; padding: 10px 12px; font: 12px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere;
max-height: 300px; overflow-y: auto; background: var(--code-bg); color: var(--code-text);
}
.tool-body .sub { padding: 5px 12px; font-size: 11px; color: var(--text-3); background: var(--surface); border-top: 1px solid var(--border); }
.tool-body .sub:first-child { border-top: 0; }
.confirm { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.confirm span { margin-right: auto; }
.run-status { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--border-strong); border-top-color: var(--text-2); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.run-foot { color: var(--text-3); font-size: 11.5px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.notice { color: var(--text-3); font-size: 12.5px; }
.notice.center { align-self: center; text-align: center; }
.notice.error { color: var(--bad); }
.notice.warn { color: var(--warn); }
/* ---------- composer ---------- */
.composer-wrap { max-width: 760px; width: 100%; margin: 0 auto; padding: 8px 28px 10px; }
.composer {
border: 1px solid var(--border-strong); border-radius: 20px; background: var(--surface);
transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--text-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-3) 15%, transparent); }
.composer textarea {
display: block; width: 100%; resize: none; border: 0; outline: 0; background: none; padding: 14px 16px 4px;
min-height: 46px; max-height: 220px; line-height: 1.5;
}
.composer textarea::placeholder { color: var(--text-3); }
.composer-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 8px 8px; }
.toggle {
display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
border: 1px solid transparent; background: none; color: var(--text-3); font-size: 12px;
}
.toggle svg { width: 13px; height: 13px; }
.toggle:hover { color: var(--text-2); background: var(--surface-2); }
.toggle[aria-pressed="true"] { color: var(--text); background: var(--surface-2); border-color: var(--border); }
.hint { color: var(--text-3); font-size: 11.5px; margin-right: 6px; }
.send {
width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; border: 0;
background: var(--primary); color: var(--primary-ink);
}
.send svg { width: 15px; height: 15px; stroke-width: 2.2; }
.send:disabled { opacity: .3; cursor: not-allowed; }
.send.stop { background: var(--surface-3); color: var(--text); }
.meta { display: flex; justify-content: space-between; padding: 6px 2px 0; font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; min-height: 22px; }
/* ---------- buttons ---------- */
.btn {
height: 32px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface);
color: var(--text); font-size: 12.5px; font-weight: 500; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 88%, var(--bg)); }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; height: 42px; font-size: 13.5px; border-radius: var(--radius); }
.btn.small { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
/* ---------- side pane (terminal + files) ---------- */
.side { background: var(--surface); }
.side-head {
height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 10px;
border-bottom: 1px solid var(--border); background: var(--surface);
}
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.seg button {
display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 13px; border: 0; border-radius: 999px;
background: none; color: var(--text-2); font-size: 12.5px; font-weight: 500;
}
.seg button svg { width: 14px; height: 14px; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--border); }
.seg.small button { height: 24px; padding: 0 10px; font-size: 12px; }
.side-meta { color: var(--text-3); font-size: 11px; }
.led { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); transition: background .2s, box-shadow .2s; }
.led[data-on="1"] { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.badge { width: 7px; height: 7px; border-radius: 50%; background: var(--focus); }
.mini-btn {
height: 30px; min-width: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 7px;
border-radius: 9px; border: 0; background: none; color: var(--text-2); font-size: 12px;
}
.mini-btn svg { width: 15px; height: 15px; }
.mini-btn.labeled { padding: 0 11px 0 9px; }
.mini-btn:hover { background: var(--surface-2); color: var(--text); }
.mini-btn[aria-pressed="true"] { color: var(--text); background: var(--surface-2); }
.term-actions { display: inline-flex; gap: 2px; }
.side[data-view="files"] .term-actions, .side[data-view="files"] .side-meta { display: none; }
.side-body { flex: 1; min-height: 0; display: flex; }
.view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view-term { background: var(--term-bg); }
#terminal { flex: 1; min-height: 0; padding: 10px 0 4px 14px; }
#terminal .xterm { height: 100%; }
#terminal .xterm-viewport { scrollbar-width: thin; scrollbar-color: #2e2e33 transparent; }
body.side-max .workspace { grid-template-columns: 0 0 1fr; }
body.side-max .chat { visibility: hidden; }
/* ---------- file viewer ---------- */
.files { flex-direction: row; container-type: inline-size; background: var(--bg); }
.explorer { width: 240px; flex: none; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); min-height: 0; }
.ex-head { display: flex; align-items: center; gap: 2px; padding: 8px 8px 4px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 1px; padding: 2px 10px 8px; font: 11.5px var(--mono); color: var(--text-3); }
.crumb { border: 0; background: none; padding: 1px 4px; border-radius: 6px; color: var(--text-2); font: inherit; }
.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb-sep { color: var(--border-strong); }
.ex-list { flex: 1; overflow-y: auto; padding: 0 6px 8px; display: flex; flex-direction: column; gap: 1px; scrollbar-width: thin; }
.ex-list.loading { opacity: .5; }
.ex-item {
display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 9px; border: 0; border-radius: 9px; background: none;
text-align: left; font-size: 12.5px; color: var(--text); min-height: 32px;
}
.ex-item svg { width: 15px; height: 15px; color: var(--text-3); }
.ex-item:hover { background: var(--surface-2); }
.ex-item.active { background: color-mix(in srgb, var(--focus) 14%, transparent); }
.ex-item.active svg { color: var(--focus); }
.ex-item.dim { color: var(--text-3); }
.ex-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-size { color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.ex-empty, .ex-error { padding: 12px; color: var(--text-3); font-size: 12px; }
.ex-error { color: var(--bad); }
.viewer { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.vw-head { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.vw-path { display: flex; min-width: 0; font: 12px var(--mono); white-space: nowrap; }
.vw-dir { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vw-file { color: var(--text); flex: none; font-weight: 500; }
.vw-meta { color: var(--text-3); font-size: 11.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vw-actions { display: inline-flex; align-items: center; gap: 4px; }
.vw-body { flex: 1; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.vw-empty { margin: auto; text-align: center; color: var(--text-3); padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.vw-empty svg { width: 28px; height: 28px; stroke-width: 1.4; margin-bottom: 4px; }
.vw-empty-title { color: var(--text-2); font-weight: 500; }
.vw-empty-sub { font-size: 12px; max-width: 280px; }
.vw-loading { margin: auto; }
.vw-code { display: flex; align-items: flex-start; min-width: max-content; min-height: 100%; background: var(--code-bg); }
.vw-code pre { margin: 0; padding: 14px 0; font: 12.5px/1.65 var(--mono); }
.vw-code .gutter { padding: 14px 14px 14px 16px; text-align: right; color: var(--text-3); opacity: .7; user-select: none; position: sticky; left: 0; background: var(--code-bg); border-right: 1px solid var(--border); }
.vw-code .code { padding-left: 16px; padding-right: 24px; color: var(--code-text); tab-size: 4; }
.vw-note { padding: 8px 16px; font-size: 12px; color: var(--text-3); border-top: 1px solid var(--border); background: var(--surface); }
.vw-note.top { border-top: 0; border-bottom: 1px solid var(--border); }
.vw-doc { padding: 24px 28px; max-width: 760px; }
.vw-image { flex: 1; display: grid; place-items: center; padding: 24px; overflow: auto;
background-color: var(--surface); background-image: linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%), linear-gradient(45deg, var(--surface-2) 25%, transparent 25%, transparent 75%, var(--surface-2) 75%);
background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.vw-image img { border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.2); cursor: zoom-in; image-rendering: auto; }
.vw-image img.fit { max-width: 100%; max-height: 100%; cursor: zoom-out; }
.vw-media { flex: 1; display: grid; place-items: center; padding: 24px; }
.vw-media video { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.vw-binary .hex { margin: 0; padding: 14px 16px; font: 12px/1.6 var(--mono); color: var(--text-2); }
.vw-frame-wrap { flex: 1; display: flex; padding: 12px; background: var(--surface-2); }
.vw-frame { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
@container (max-width: 560px) {
.files { flex-direction: column; }
.explorer { width: auto; max-height: 38%; border-right: 0; border-bottom: 1px solid var(--border); }
}
/* syntax highlighting (highlight.js classes) */
.hljs-comment, .hljs-quote { color: var(--text-3); font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type, .hljs-built_in { color: #c084fc; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute, .hljs-template-tag { color: #4ade80; }
.hljs-number, .hljs-symbol, .hljs-bullet, .hljs-variable.constant_ { color: #fbbf24; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: #60a5fa; }
.hljs-attr, .hljs-variable, .hljs-template-variable, .hljs-params, .hljs-property { color: #f9a8d4; }
.hljs-meta, .hljs-meta .hljs-keyword, .hljs-doctag { color: #22d3ee; }
.hljs-deletion { color: var(--bad); }
.hljs-tag { color: var(--text-2); }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 600; }
:root[data-theme="light"] .hljs-keyword, :root[data-theme="light"] .hljs-built_in, :root[data-theme="light"] .hljs-type, :root[data-theme="light"] .hljs-literal { color: #7c3aed; }
@media (prefers-color-scheme: light) {
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type, .hljs-built_in { color: #7c3aed; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute { color: #15803d; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #b45309; }
.hljs-title, .hljs-title.function_, .hljs-section, .hljs-name { color: #1d4ed8; }
.hljs-attr, .hljs-variable, .hljs-params, .hljs-property { color: #be185d; }
.hljs-meta, .hljs-doctag { color: #0e7490; }
}
/* "Open" link on tool rows */
.tool-open { border: 0; background: none; color: var(--text-2); font-size: 11.5px; padding: 2px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; }
.tool-open svg { width: 12px; height: 12px; }
.tool-open:hover { background: var(--surface-3); color: var(--text); }
/* ---------- setup ---------- */
.setup { position: fixed; inset: 0; z-index: 20; background: var(--bg); overflow-y: auto; display: flex; padding: 48px 16px; }
.setup-inner { width: min(540px, 100%); margin: auto; }
.setup-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 36px; }
.setup h2 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 8px; }
.lede { color: var(--text-2); margin: 0 0 28px; }
.checks { list-style: none; margin: 0 0 24px; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.checks li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.checks li:first-child { border-top: 0; }
.checks li svg { width: 14px; height: 14px; stroke-width: 2.2; }
.checks li.ok svg { color: var(--ok); }
.checks li.bad { color: var(--text); }
.checks li.bad svg { color: var(--bad); }
.checks li.warn svg { color: var(--warn); }
.components { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin-bottom: 20px; }
.component { display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 12px 14px 0; border-top: 1px solid var(--border); }
.component:first-child { border-top: 0; }
.c-main { display: flex; flex-direction: column; min-width: 0; }
.c-name { font-weight: 500; }
.c-desc { color: var(--text-3); font-size: 12px; }
.c-side { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.c-size { color: var(--text-2); }
.row-state { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.component[data-state="done"] .row-state { color: var(--ok); }
.component[data-state="busy"] .row-state { color: var(--text-2); }
.component progress {
grid-column: 1 / -1; width: calc(100% + 28px); margin: 10px -14px 0; height: 2px; border: 0; appearance: none; background: transparent; display: block;
}
.component progress::-webkit-progress-bar { background: transparent; }
.component progress::-webkit-progress-value { background: var(--text); transition: width .25s; }
.component progress::-moz-progress-bar { background: var(--text); }
.component[data-state="done"] progress::-webkit-progress-value { background: var(--ok); }
.component[data-state="done"] progress::-moz-progress-bar { background: var(--ok); }
.note { min-height: 20px; font-size: 12.5px; color: var(--text-2); margin: 12px 0 0; }
.note.error { color: var(--bad); }
.fine { font-size: 11.5px; color: var(--text-3); margin: 28px 0 0; line-height: 1.6; }
/* ---------- settings dialog ---------- */
dialog {
width: min(460px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 20px;
background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog[open] { animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(4px) scale(.99); } }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 6px 22px; }
.dlg-head h2 { margin: 0; font-size: 14.5px; font-weight: 600; }
.dlg-section { padding: 10px 22px 16px; }
.dlg-section + .dlg-section { border-top: 1px solid var(--border); padding-top: 14px; }
.row-setting { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 0; cursor: default; }
.rs-title { display: block; font-weight: 500; }
.rs-desc { display: block; color: var(--text-3); font-size: 12px; }
.num {
width: 76px; height: 32px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border-strong);
background: var(--surface-2); text-align: right; font-variant-numeric: tabular-nums;
}
.switch {
appearance: none; flex: none; width: 32px; height: 18px; border-radius: 99px; background: var(--surface-3);
border: 1px solid var(--border-strong); position: relative; cursor: pointer; transition: background .15s; margin: 0;
}
.switch::after {
content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
background: var(--text-2); transition: transform .15s, background .15s;
}
.switch:checked { background: var(--primary); border-color: var(--primary); }
.switch:checked::after { transform: translateX(14px); background: var(--primary-ink); }
/* ---------- narrow screens ---------- */
@media (max-width: 900px) {
body { grid-template-rows: auto auto 1fr; }
.brand-sep, .brand-model, .brand-device { display: none; }
.status { gap: 12px; }
.status-text { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--border); background: var(--surface); padding: 0 8px; }
.tabs button { padding: 9px 12px; border: 0; background: none; color: var(--text-3); font-weight: 500; border-bottom: 1.5px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--text); }
.workspace { grid-template-columns: 1fr; }
.splitter { display: none; }
body[data-tab="chat"] .side, body[data-tab="term"] .chat, body[data-tab="files"] .chat { display: none; }
.side .seg, #side-max { display: none; }
.thread { padding: 20px 16px 8px; }
.composer-wrap { padding: 8px 16px 10px; }
.hint { display: none; }
}
@media (max-width: 480px) {
.toggle { padding: 0 7px; }
.toggle-text { display: none; }
}
/* Code should show exactly what is typed: no programming ligatures (=> stays =>). */
code, pre, kbd, .mono, .tool-label, .crumbs, .vw-path, .hex, #terminal * { font-variant-ligatures: none !important; font-feature-settings: "liga" 0, "calt" 0 !important; }