:root {
color-scheme: light dark;
--bg: #f6f6f7;
--bg-raised: #ffffff;
--bg-sunken: #eeeef1;
--border: #d9d9de;
--border-strong: #b9b9c2;
--fg: #16161a;
--fg-muted: #62626d;
--fg-faint: #8a8a95;
--accent: #b4400b;
--accent-fg: #ffffff;
--accent-soft: #fdeee5;
--ok: #1c7a4a;
--warn: #9a6000;
--err: #b32020;
--code-bg: #f2f2f5;
--shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 8px 24px rgb(0 0 0 / 0.05);
--radius: 10px;
--radius-sm: 6px;
--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
--sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #131315;
--bg-raised: #1b1b1f;
--bg-sunken: #101012;
--border: #2e2e34;
--border-strong: #43434c;
--fg: #ececf0;
--fg-muted: #a2a2ae;
--fg-faint: #74747f;
--accent: #f4703a;
--accent-fg: #1a0d06;
--accent-soft: #2a1710;
--ok: #4fc287;
--warn: #e0a53a;
--err: #f0736b;
--code-bg: #17171a;
--shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px rgb(0 0 0 / 0.3);
}
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
font-family: var(--sans);
font-size: 15px;
line-height: 1.55;
color: var(--fg);
background: var(--bg);
display: flex;
flex-direction: column;
}
a { color: var(--accent); }
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
border-radius: var(--radius-sm);
}
.skip-link {
position: absolute;
left: -9999px;
top: 0;
background: var(--bg-raised);
padding: 0.5rem 0.75rem;
z-index: 20;
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.topbar {
display: flex;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
padding: 0.6rem 1rem;
background: var(--bg-raised);
border-bottom: 1px solid var(--border);
position: sticky;
top: 0;
z-index: 10;
}
.brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 650; }
.brand-mark {
display: grid;
place-items: center;
width: 1.6rem;
height: 1.6rem;
border-radius: var(--radius-sm);
background: var(--accent);
color: var(--accent-fg);
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.02em;
}
.nav { display: flex; gap: 0.25rem; flex: 1; flex-wrap: wrap; }
.nav a {
padding: 0.35rem 0.7rem;
border-radius: var(--radius-sm);
color: var(--fg-muted);
text-decoration: none;
font-weight: 500;
}
.nav a:hover { background: var(--bg-sunken); color: var(--fg); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.health-pill {
display: flex;
align-items: center;
gap: 0.45rem;
padding: 0.3rem 0.65rem;
border: 1px solid var(--border);
border-radius: 999px;
background: var(--bg-raised);
color: var(--fg-muted);
font: inherit;
font-size: 0.82rem;
cursor: pointer;
}
.health-pill:hover { border-color: var(--border-strong); }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--fg-faint); }
.dot[data-state="ready"] { background: var(--ok); }
.dot[data-state="detecting"] { background: var(--warn); }
.dot[data-state="unavailable"], .dot[data-state="down"] { background: var(--err); }
.health-detail {
padding: 0.75rem 1rem;
background: var(--bg-sunken);
border-bottom: 1px solid var(--border);
font-size: 0.85rem;
}
.health-detail ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.health-detail li { margin: 0.15rem 0; }
.cap-no { color: var(--fg-muted); }
.cap-yes { color: var(--ok); }
main {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
padding: 1rem;
gap: 1rem;
width: 100%;
max-width: 72rem;
margin: 0 auto;
}
main:focus { outline: none; }
.screen { display: flex; flex-direction: column; gap: 1rem; min-height: 0; flex: 1; }
.panel {
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 1rem;
}
.panel-title {
margin: 0 0 0.6rem;
font-size: 0.78rem;
font-weight: 650;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--fg-muted);
}
.row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--fg-muted); }
.faint { color: var(--fg-faint); }
.small { font-size: 0.85rem; }
.mono { font-family: var(--mono); }
.err { color: var(--err); }
button, .btn {
font: inherit;
padding: 0.4rem 0.85rem;
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
background: var(--bg-raised);
color: var(--fg);
cursor: pointer;
}
button:hover:not(:disabled) { background: var(--bg-sunken); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button.primary {
background: var(--accent);
border-color: var(--accent);
color: var(--accent-fg);
font-weight: 600;
}
button.primary:hover:not(:disabled) {
background: var(--accent);
filter: brightness(1.08);
}
button.danger { color: var(--err); }
button.small { padding: 0.2rem 0.5rem; font-size: 0.8rem; }
input, textarea, select {
font: inherit;
color: var(--fg);
background: var(--bg);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
padding: 0.4rem 0.55rem;
max-width: 100%;
}
textarea { resize: vertical; font-family: inherit; }
label { font-size: 0.85rem; color: var(--fg-muted); display: flex; flex-direction: column; gap: 0.2rem; }
.field-inline { flex-direction: row; align-items: center; gap: 0.4rem; }
.controls { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.controls label { min-width: 6.5rem; }
.controls input[type="number"] { width: 6.5rem; }
details.settings > summary {
cursor: pointer;
font-size: 0.85rem;
color: var(--fg-muted);
list-style: revert;
}
details.settings[open] > summary { margin-bottom: 0.7rem; }
.chat { flex: 1; display: flex; flex-direction: column; min-height: 0; gap: 0.75rem; }
.messages {
flex: 1;
min-height: 14rem;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 0.9rem;
padding: 1rem;
background: var(--bg-raised);
border: 1px solid var(--border);
border-radius: var(--radius);
}
.msg { display: flex; flex-direction: column; gap: 0.3rem; max-width: 100%; }
.msg-role {
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--fg-faint);
font-weight: 650;
}
.msg-body {
padding: 0.6rem 0.8rem;
border-radius: var(--radius);
border: 1px solid var(--border);
background: var(--bg);
overflow-wrap: anywhere;
}
.msg-user .msg-body { background: var(--accent-soft); border-color: transparent; }
.msg-error .msg-body { border-color: var(--err); color: var(--err); }
.msg-stats {
font-size: 0.76rem;
color: var(--fg-faint);
font-family: var(--mono);
overflow-x: auto;
white-space: nowrap;
}
.composer { display: flex; gap: 0.6rem; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 3.2rem; max-height: 14rem; }
.empty {
margin: auto;
text-align: center;
color: var(--fg-faint);
font-size: 0.9rem;
max-width: 26rem;
}
.cursor::after {
content: "▌";
color: var(--accent);
animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .cursor::after { animation: none; } }
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 { margin: 0.9em 0 0.4em; line-height: 1.3; }
.md h1 { font-size: 1.35em; }
.md h2 { font-size: 1.2em; }
.md h3 { font-size: 1.08em; }
.md p { margin: 0.55em 0; }
.md ul, .md ol { margin: 0.5em 0; padding-left: 1.4em; }
.md li { margin: 0.15em 0; }
.md blockquote {
margin: 0.6em 0;
padding-left: 0.8em;
border-left: 3px solid var(--border-strong);
color: var(--fg-muted);
}
.md hr { border: none; border-top: 1px solid var(--border); margin: 1em 0; }
.md code {
font-family: var(--mono);
font-size: 0.88em;
background: var(--code-bg);
border: 1px solid var(--border);
border-radius: 4px;
padding: 0.05em 0.3em;
}
.codeblock {
margin: 0.7em 0;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
background: var(--code-bg);
overflow: hidden;
}
.codeblock-head {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.25rem 0.5rem;
border-bottom: 1px solid var(--border);
font-size: 0.75rem;
color: var(--fg-muted);
font-family: var(--mono);
}
.codeblock pre { margin: 0; padding: 0.7rem; overflow-x: auto; }
.codeblock pre code {
background: none;
border: none;
padding: 0;
font-size: 0.86em;
white-space: pre;
}
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.87rem; }
th, td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
th {
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--fg-muted);
font-weight: 650;
}
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-family: var(--mono); }
.badge {
display: inline-block;
padding: 0.05rem 0.45rem;
border-radius: 999px;
font-size: 0.72rem;
font-weight: 650;
border: 1px solid var(--border-strong);
color: var(--fg-muted);
}
.badge-loaded { color: var(--ok); border-color: currentColor; }
.badge-loading { color: var(--warn); border-color: currentColor; }
.badge-error { color: var(--err); border-color: currentColor; }
.counters {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
gap: 0.75rem;
}
.counter { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0.55rem 0.7rem; }
.counter-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-muted); }
.counter-value { font-family: var(--mono); font-size: 1.05rem; }
.task { border-top: 1px solid var(--border); padding: 0.6rem 0; }
.task:first-of-type { border-top: none; }
.bar { height: 0.45rem; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; margin: 0.35rem 0; }
.bar > span { display: block; height: 100%; background: var(--accent); transition: width 0.25s linear; }
.bar.indeterminate > span { width: 35%; animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .bar.indeterminate > span { animation: none; width: 100%; opacity: 0.4; } }
.notice {
padding: 0.7rem 0.9rem;
border: 1px solid var(--border-strong);
border-left-width: 3px;
border-radius: var(--radius-sm);
background: var(--bg-raised);
font-size: 0.88rem;
}
.notice-error { border-left-color: var(--err); }
.notice-warn { border-left-color: var(--warn); }
.snippet { margin-bottom: 1rem; }
.snippet-head { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.35rem; }
.snippet-head h3 { margin: 0; font-size: 0.95rem; }
@media (max-width: 640px) {
main { padding: 0.6rem; }
.topbar { padding: 0.5rem 0.6rem; gap: 0.5rem; }
.brand-name { display: none; }
body { font-size: 14px; }
}