/* Mycelium Cloud — dark-first, dense, calm. Bioluminescent teal accent. */
:root {
  --bg: #0c1110; --bg-2: #101716; --surface: #141c1a; --surface-2: #1a2422; --border: #24302d; --border-2: #2f3d39;
  --text: #e2ebe7; --text-2: #b4c2bd; --muted: #7f918b;
  --accent: #5fe0b0; --accent-2: #37b88c; --accent-ink: #062117;
  --run: #6fb6ff; --queue: #9aa7ff; --wait: #f0b54a; --review: #f59ad8; --ok: #5fe0b0; --fail: #ff7272; --evo: #b89cff;
  --radius: 10px; --radius-sm: 7px;
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.25);
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f6f5; --bg-2: #eef2f0; --surface: #ffffff; --surface-2: #f5f8f7; --border: #dde4e1; --border-2: #cbd5d1;
    --text: #13201c; --text-2: #34443f; --muted: #66756f; --accent: #139b6c; --accent-2: #0e7d57; --accent-ink: #fff;
    --run: #1f6fd1; --queue: #4b56c9; --wait: #b77606; --review: #b83b8f; --ok: #138a5f; --fail: #cc2f2f; --evo: #7147d6;
    --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.05); color-scheme: light; }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: .92em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
h2 { font-size: 20px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
p { margin: .35em 0; }
.small { font-size: 12.5px; } .muted { color: var(--muted); } .center { text-align: center; }
.tone-ok { color: var(--ok); } .tone-fail { color: var(--fail); } .tone-wait { color: var(--wait); } .tone-run { color: var(--run); } .tone-queue { color: var(--queue); } .tone-review { color: var(--review); } .tone-evo { color: var(--evo); } .tone-muted { color: var(--muted); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--bg-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 14px 10px; }
.brand { display: flex; align-items: center; gap: 9px; padding: 6px 8px 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.logo svg { width: 28px; height: 28px; stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; }
.logo svg circle { fill: var(--accent); stroke: none; }
.brand-name { font-weight: 700; letter-spacing: .02em; } .brand-sub { color: var(--muted); font-size: 12px; margin-left: -4px; }
.nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); }
.nav-link:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.nav-link.active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.nav-icon { width: 18px; text-align: center; color: var(--muted); } .nav-link.active .nav-icon { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; font-weight: 700; }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; padding: 8px; }
.linkish { background: none; border: 0; color: var(--muted); text-align: left; cursor: pointer; padding: 0; font: inherit; font-size: 12px; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.page-title { font-size: 17px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.stream-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
body.stream-down .stream-dot { background: var(--wait); box-shadow: none; }
.menu-btn { display: none; }
.icon-btn { background: none; border: 1px solid transparent; color: var(--text-2); border-radius: var(--radius-sm); padding: 4px 8px; cursor: pointer; font-size: 15px; position: relative; }
.icon-btn:hover { border-color: var(--border); }
.bell-count { position: absolute; top: -4px; right: -4px; background: var(--review); color: #000; font-size: 10px; font-weight: 700; border-radius: 8px; padding: 0 4px; }
.bell-count:empty { display: none; }
.view { padding: 20px 24px 60px; outline: none; }
.page { display: grid; gap: 16px; max-width: 1400px; }
.page.narrow { max-width: 860px; }

/* ---------- cards & layout ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 16px 0; }
.card-body { padding: 12px 16px 14px; }
.card.compact .card-body { padding-top: 8px; }
.card-actions { display: flex; gap: 6px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { display: grid; gap: 16px; min-width: 0; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar.tight { margin-bottom: 10px; justify-content: flex-start; }
.toolbar > p { margin: 0; max-width: 820px; }
.detail-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.detail-head h2 { margin: 6px 0 2px; }
.subhead { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; color: var(--text); display: block; }
a.stat:hover { border-color: var(--border-2); text-decoration: none; }
.stat-value { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12px; color: var(--text-2); } .stat-hint { font-size: 11px; color: var(--muted); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, currentColor 13%, transparent); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.tone-run .dot { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.pill { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); margin-left: 6px; white-space: nowrap; }
.pill.tone-muted { color: var(--muted); }
.inline-badge { margin-right: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); font-size: 12.5px; }
.chip.active, .chip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--muted); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-danger { color: var(--fail); border-color: color-mix(in srgb, var(--fail) 45%, transparent); background: transparent; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-sm { padding: 3px 9px; font-size: 12.5px; }
.btn-big { padding: 11px 20px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.field { display: grid; gap: 4px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 11.5px; color: var(--muted); }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 7px 10px; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
input[type=checkbox] { width: auto; accent-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 6px; font-size: 13.5px; cursor: pointer; }
.check.inline { display: inline-flex; margin-right: 10px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 0; }
legend { font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 4px; }
details.advanced { border: 1px dashed var(--border-2); border-radius: var(--radius-sm); padding: 8px 12px; display: grid; gap: 10px; }
details.advanced > summary { cursor: pointer; color: var(--text-2); font-weight: 500; }
details.advanced[open] > summary { margin-bottom: 8px; }
.inline-form { display: flex; gap: 8px; margin: 10px 0; }
.form-error { color: var(--fail); min-height: 1.2em; margin: 0; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; flex-wrap: wrap; }
.seg-btn { padding: 6px 12px; color: var(--text-2); font-size: 13px; border-right: 1px solid var(--border); }
.seg-btn:last-child { border-right: 0; }
.seg-btn.active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.seg-btn:hover { text-decoration: none; color: var(--text); }
.seg.tabs { justify-self: start; }

/* ---------- tables & lists ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; } .table tr.clickable:hover td { background: var(--surface-2); }
.table.mini td, .table.mini th { padding: 4px 6px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.compact-list, .live-list, .finding-list, .commit-list, .file-list, .notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.compact-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.compact-list li > a { font-weight: 500; }
.finding-list li { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.finding-list li:last-child { border-bottom: 0; }
.file-list .status-code { display: inline-block; width: 2.4em; color: var(--wait); }
.empty { color: var(--muted); padding: 10px 0; display: grid; gap: 10px; justify-items: start; }
.empty p { margin: 0; }
.callout { border: 1px solid color-mix(in srgb, currentColor 35%, transparent); background: color-mix(in srgb, currentColor 7%, transparent); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13.5px; }
.callout ul { margin: 6px 0 0; padding-left: 18px; color: var(--text); }
.callout.tone-evo, .callout.tone-review, .callout.tone-wait, .callout.tone-ok, .callout.tone-fail { color: var(--text); }
.callout.tone-evo { border-color: var(--evo); } .callout.tone-review { border-color: var(--review); } .callout.tone-wait { border-color: var(--wait); } .callout.tone-ok { border-color: var(--ok); } .callout.tone-fail { border-color: var(--fail); }
.error-panel { border: 1px solid var(--fail); border-radius: var(--radius); padding: 16px; }
.loading { color: var(--muted); display: flex; align-items: center; gap: 10px; padding: 30px 0; }
.spinner { width: 14px; height: 14px; border: 2px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- mission control ---------- */
.mission { display: grid; gap: 16px; max-width: 1400px; }
.live-item { padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); display: grid; gap: 6px; }
.live-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .live-top a { font-weight: 600; }
.live-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--text-2); }
.progress { position: relative; height: 16px; background: var(--bg-2); border-radius: 8px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--run) 50%, transparent), var(--run)); }
.progress-label { position: absolute; inset: 0; font-size: 10.5px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.meter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 10px; }
.meter-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.meter-track { height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.meter-fill { height: 100%; background: currentColor; }
.spark-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }
.spark { width: 140px; height: 28px; color: var(--accent); }
.evo-card { border-color: color-mix(in srgb, var(--evo) 35%, var(--border)); }
.evo-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.evo-active { margin: 8px 0; }
.stepper { list-style: none; display: flex; gap: 4px; padding: 0; margin: 6px 0; flex-wrap: wrap; counter-reset: s; }
.stepper li { font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.stepper li.done { color: var(--evo); border-color: color-mix(in srgb, var(--evo) 40%, transparent); }
.stepper li.current { color: #000; background: var(--evo); border-color: var(--evo); font-weight: 600; animation: pulse 2s ease-in-out infinite; }

/* ---------- sessions ---------- */
.session-page { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; height: calc(100vh - 110px); max-width: 1100px; }
.session-head { display: grid; gap: 6px; }
.session-title { display: flex; align-items: center; gap: 8px; }
.title-input { font-size: 18px; font-weight: 600; background: transparent; border-color: transparent; padding: 4px 6px; }
.title-input:hover, .title-input:focus { border-color: var(--border-2); }
.session-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; font-size: 13px; }
.controls { display: inline-flex; gap: 6px; }
.transcript { overflow-y: auto; background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 92%; border-radius: var(--radius); padding: 10px 14px; }
.msg-role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }
.msg-user { align-self: flex-end; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.msg-assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); }
.msg-assistant.forced { border-color: var(--wait); }
.msg-system { align-self: center; font-size: 12px; color: var(--muted); padding: 4px 10px; background: transparent; display: flex; gap: 8px; }
.msg-tool { align-self: flex-start; max-width: 92%; padding: 4px 10px; font-size: 12.5px; border-left: 2px solid var(--border-2); border-radius: 0; background: transparent; }
.msg-tool.error { border-left-color: var(--fail); }
.msg-tool > summary, .tool-call > summary { cursor: pointer; display: flex; gap: 10px; align-items: baseline; list-style: none; overflow: hidden; }
.msg-tool > summary::-webkit-details-marker, .tool-call > summary::-webkit-details-marker { display: none; }
.tool-name { font-family: var(--mono); color: var(--text-2); white-space: nowrap; }
.tool-calls { display: grid; gap: 4px; margin-top: 6px; }
.tool-call { font-size: 12.5px; }
.turn-divider { display: flex; justify-content: center; font-size: 12px; margin-top: 8px; }
.turn-divider > span { background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px; }
.typing { align-self: flex-start; color: var(--muted); display: flex; gap: 8px; align-items: center; font-size: 13px; }
.composer { display: grid; gap: 8px; }
.composer-bar { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.composer-bar label { display: flex; align-items: center; gap: 6px; }
.composer-bar select { max-width: 360px; }
.model-label { display: inline-flex; align-items: center; }

/* ---------- markdown / code / diff ---------- */
.md { overflow-wrap: anywhere; }
.md h3, .md h4, .md h5, .md h6 { margin: 12px 0 4px; font-size: 14px; }
.md ul { margin: 4px 0; padding-left: 20px; }
.md code { background: var(--bg-2); padding: 1px 4px; border-radius: 4px; }
pre.code { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; overflow: auto; font: 12px/1.45 var(--mono); max-height: 460px; white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; }
.diff { display: grid; gap: 8px; }
.diff-file { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.diff-file > summary { cursor: pointer; padding: 6px 10px; background: var(--surface-2); display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.diff-stat .add { color: var(--ok); } .diff-stat .del { color: var(--fail); }
.diff-body { margin: 0; font: 12px/1.45 var(--mono); overflow-x: auto; max-height: 600px; }
.diff-body > div { padding: 0 10px; white-space: pre; }
.l-add { background: color-mix(in srgb, var(--ok) 13%, transparent); } .l-del { background: color-mix(in srgb, var(--fail) 13%, transparent); } .l-hunk { color: var(--run); background: var(--bg-2); }

/* ---------- review ---------- */
.review-list { display: grid; gap: 8px; }
.review-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.review-row:hover { border-color: var(--border-2); text-decoration: none; }
.review-row-main { display: grid; gap: 4px; min-width: 0; } .review-row-main .pill:first-child { margin-left: 0; }
.review-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.clamp { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 700px; }
.action-bar { position: sticky; top: 56px; z-index: 4; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.test-block { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.test-block:last-child { border-bottom: 0; }
.test-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .test-head .pill { margin-left: 0; }
.eval-outcome { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; } .eval-outcome .pill { margin-left: 0; }

/* ---------- evolution ---------- */
.evo-hero { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 20px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--evo) 40%, var(--border));
  background: radial-gradient(1200px 300px at 0% 0%, color-mix(in srgb, var(--evo) 12%, transparent), transparent), var(--surface); }
.evo-hero-main { display: grid; gap: 12px; }
.evo-hero-side { display: grid; gap: 8px; justify-items: end; align-content: start; }
.evo-switch { display: flex; gap: 14px; align-items: center; }
.switch { width: 52px; height: 30px; border-radius: 15px; border: 1px solid var(--border-2); background: var(--bg-2); position: relative; cursor: pointer; flex-shrink: 0; padding: 0; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--muted); transition: all .18s; }
.switch.on { background: color-mix(in srgb, var(--evo) 35%, var(--bg-2)); border-color: var(--evo); }
.switch.on .knob { left: 25px; background: var(--evo); box-shadow: 0 0 10px var(--evo); }
.evo-models { display: flex; gap: 10px; flex-wrap: wrap; }
.model-chip { display: grid; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-2); }
.model-chip.dim { opacity: .55; }
.pipeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
.pipeline li { display: flex; gap: 8px; padding: 8px; border-radius: var(--radius-sm); background: var(--bg-2); }
.pl-num { width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--evo) 25%, transparent); color: var(--evo); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.proposal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.proposal { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 4px; }
.proposal .pill:first-of-type { margin-left: 0; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; max-height: 480px; overflow-y: auto; }
.timeline li { display: grid; grid-template-columns: 70px 120px 1fr; gap: 8px; padding: 2px 0; }
.timeline li.lvl-warn .tl-msg { color: var(--wait); } .timeline li.lvl-error .tl-msg { color: var(--fail); }
.tl-time { color: var(--muted); font-family: var(--mono); } .tl-type { color: var(--text-2); font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; } .tl-msg { overflow-wrap: anywhere; }

/* ---------- models ---------- */
.provider-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.provider-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 2px; }
.provider-card.selected { border-color: var(--accent); }
.provider-head { display: flex; gap: 8px; align-items: center; }

/* ---------- modal, toast, login ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.modal.wide { width: min(900px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px; overflow-y: auto; display: grid; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.notif-list li { padding: 8px 0; border-bottom: 1px solid var(--border); display: grid; gap: 2px; } .notif-list li.read { opacity: .6; }
.notif-head { display: flex; justify-content: space-between; }
.toasts { position: fixed; bottom: 16px; right: 16px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--surface-2); border: 1px solid var(--border-2); border-left: 3px solid currentColor; border-radius: var(--radius-sm); padding: 10px 14px; box-shadow: var(--shadow); max-width: 380px; transition: opacity .5s, transform .5s; }
.toast.tone-info { color: var(--run); } .toast { color: var(--text); } .toast.out { opacity: 0; transform: translateY(6px); }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.brand-big { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.brand-big .logo svg { width: 44px; height: 44px; } .brand-big h1 { font-size: 24px; } .brand-big p { margin: 0; }
.notice { display: grid; gap: 4px; }
.worker-pill .badge { white-space: normal; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .grid-main, .grid-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; width: 240px; transform: translateX(-100%); transition: transform .2s; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .menu-btn { display: inline-block; }
  .topbar { padding: 10px 16px; } .view { padding: 14px 16px 60px; }
  .evo-hero { grid-template-columns: 1fr; } .evo-hero-side { justify-items: start; }
  .meter-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .stat { padding: 10px; } .stat-value { font-size: 19px; }
  .review-row { flex-direction: column; } .review-row-side { align-items: flex-start; text-align: left; flex-direction: row; flex-wrap: wrap; }
  .session-page { height: calc(100vh - 90px); } .msg { max-width: 100%; }
  .timeline li { grid-template-columns: 60px 1fr; } .tl-type { display: none; }
  .action-bar { top: 50px; }
  .clamp { max-width: 70vw; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
