:root {
  --bg: #0b0d10;
  --fg: #e8edf2;
  --muted: #8b97a5;
  --accent: #c8d3e0;
  --card: #14181d;
  --line: #232a32;
  --well: #0f1216;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { height: 100%; }
body { min-height: 100%; display: flex; flex-direction: column; margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.5 system-ui, sans-serif; }
.column { max-width: 44rem; margin-left: auto; margin-right: auto; width: 100%; }
.bar { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.brand { color: var(--fg); text-decoration: none; font-weight: 600; letter-spacing: 0.02em; display: inline-flex; align-items: center; gap: 0.5rem; }
.brand .mark { width: 0.7rem; height: 0.7rem; border-radius: 999px; background: var(--accent); display: inline-block; box-shadow: -0.35rem 0 0 color-mix(in srgb, var(--accent) 45%, transparent); margin-left: 0.35rem; }
main { padding: 1rem; flex: 1; }
footer { padding: 1rem; font-size: 0.875rem; }
h1 { font-size: 1.4rem; margin: 0 0 0.6rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.6rem; }
p { margin: 0 0 0.75rem; }
a { color: var(--accent); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1rem; }
.muted { color: var(--muted); font-size: 0.875rem; }
.label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 0.25rem; }
.notice { background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.8rem; }
button { font: inherit; color: var(--fg); background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem 0.9rem; cursor: pointer; }
button:hover { border-color: var(--muted); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
button.quiet { background: transparent; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.75rem; flex: 1; min-width: 0; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
input, select { font: inherit; color: var(--fg); background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 0.45rem 0.6rem; width: 100%; color-scheme: dark; }
h2.inline { display: inline; margin: 0; }
summary { cursor: pointer; }
textarea { font: inherit; color: var(--fg); background: var(--well); border: 1px solid var(--line); border-radius: 8px; padding: 0.6rem 0.7rem; width: 100%; resize: vertical; color-scheme: dark; }
textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.progress { margin-top: 0.75rem; }
progress { width: 100%; height: 0.5rem; accent-color: var(--accent); }
.check { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.check input { width: auto; }
.servers, .tools, .log { list-style: none; margin: 0; padding: 0; }
.server { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.server-head { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; align-items: baseline; }
.url { overflow-wrap: anywhere; }
.tool-list { margin-top: 0.5rem; }
.tools { columns: 2 14rem; margin-top: 0.5rem; }
.tools li { break-inside: avoid; padding: 0.15rem 0; font-size: 0.9rem; }
.add-server { display: flex; gap: 0.5rem; align-items: flex-end; margin-top: 0.75rem; }
.add-server .field { margin-bottom: 0; }
.chat-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.log { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 0.75rem; }
.msg { border-radius: 10px; padding: 0.6rem 0.8rem; background: var(--well); border: 1px solid var(--line); }
.msg.user { background: color-mix(in srgb, var(--accent) 12%, var(--well)); }
.msg.tool { font-size: 0.9rem; }
.msg.note { background: transparent; border-style: dashed; }
.msg .who { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600; margin-bottom: 0.2rem; }
.msg .text { white-space: pre-wrap; overflow-wrap: anywhere; }
.thinking { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.4rem; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 0.5rem; font-size: 0.8rem; max-height: 18rem; overflow: auto; }
.composer .actions { align-items: center; }
@media (max-width: 30rem) { .add-server { flex-direction: column; align-items: stretch; } }
