:root {
  color-scheme: dark;
  --bg: #090d11;
  --surface: #111820;
  --surface-2: #17212b;
  --line: #263341;
  --text: #eef4f8;
  --muted: #8fa1af;
  --green: #45d483;
  --amber: #ffbd59;
  --blue: #65a9ff;
  --danger: #ff7070;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 92% -12%, #152a21 0, transparent 32%), var(--bg); color: var(--text); }
button { font: inherit; }
.topbar { max-width: 1120px; margin: 0 auto; padding: 22px 22px 10px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.eyebrow { color: var(--green); font: 700 10px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .16em; }
h1 { margin: 3px 0 0; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.045em; }
h2 { margin: 4px 0; font-size: 21px; letter-spacing: -.025em; }
.health { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 14px currentColor; }
.dot.ok { background: var(--green); }
.dot.bad { background: var(--danger); }
main { max-width: 1120px; margin: 0 auto; padding: 12px 22px 124px; }
.view { display: none; }
.view.active { display: block; animation: enter .18s ease-out; }
@keyframes enter { from { opacity: .3; transform: translateY(4px); } }
.panel { border: 1px solid var(--line); background: linear-gradient(155deg, rgba(23,33,43,.96), rgba(14,21,28,.96)); border-radius: 18px; box-shadow: 0 18px 50px rgba(0,0,0,.18); }
.hero { min-height: 142px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.hero h2 { margin-top: 12px; font-size: clamp(27px, 4vw, 36px); max-width: 720px; }
.hero p { margin: 8px 0 0; }
.pill { display: inline-flex; border: 1px solid rgba(69,212,131,.36); border-radius: 99px; color: var(--green); background: rgba(69,212,131,.08); padding: 5px 9px; font: 700 10px ui-monospace, monospace; letter-spacing: .09em; }
.muted, .empty { color: var(--muted); }
.secondary { border: 1px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: 11px; padding: 10px 13px; cursor: pointer; }
.refresh { width: 42px; height: 42px; padding: 0; font-size: 22px; line-height: 1; flex: 0 0 auto; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px,1fr)); gap: 12px; margin-top: 12px; }
.primary-metrics { grid-template-columns: minmax(260px, 2fr) repeat(2, minmax(140px, 1fr)); }
.metric { min-height: 104px; padding: 17px; display: flex; flex-direction: column; justify-content: space-between; }
.metric span, .label { color: var(--muted); font-size: 12px; }
.metric strong { font-size: clamp(22px, 4vw, 31px); letter-spacing: -.04em; overflow-wrap: anywhere; }
.metric strong.model-value { font: 700 clamp(19px, 3vw, 25px)/1.2 inherit; letter-spacing: -.035em; }
.metric strong.model-value.stale { color: var(--amber); }
.system-details { margin-top: 12px; color: var(--muted); font-size: 12px; }
.system-details summary { padding: 14px 17px; cursor: pointer; list-style-position: inside; }
.system-details[open] summary { border-bottom: 1px solid var(--line); }
.system-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 14px 17px 0; }
.system-grid div { display: flex; justify-content: space-between; gap: 8px; }
.system-grid strong { color: var(--text); }
.system-details p { margin: 10px 17px 15px; }
.section-head { margin: 5px 0 14px; display: flex; justify-content: space-between; }
.split { display: grid; grid-template-columns: minmax(250px,.72fr) minmax(0,1.5fr); gap: 12px; min-height: 560px; }
.list, .transcript, .timeline { padding: 10px; overflow: auto; max-height: calc(100vh - 190px); }
.item { width: 100%; display: block; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); padding: 14px 10px; text-align: left; cursor: pointer; }
.item:last-child { border-bottom: 0; }
.item:hover, .item.active { background: rgba(101,169,255,.08); border-radius: 10px; }
.item.current-session { box-shadow: inset 3px 0 0 var(--green); }
.item strong, .item small { display: block; }
.item strong { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.item small { color: var(--muted); margin-top: 4px; }
.message { padding: 13px; border: 1px solid var(--line); border-radius: 13px; margin: 8px 0; background: rgba(9,13,17,.35); white-space: pre-wrap; overflow-wrap: anywhere; }
.message.user { border-color: rgba(101,169,255,.34); }
.message .role { color: var(--muted); font: 700 10px ui-monospace, monospace; letter-spacing: .08em; margin-bottom: 7px; text-transform: uppercase; }
.tool, .reasoning, .event { color: var(--muted); font: 12px/1.5 ui-monospace, monospace; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.job-meta { margin: 4px 0 12px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { border: 1px solid var(--line); background: rgba(101,169,255,.07); border-radius: 99px; padding: 7px 10px; font: 11px ui-monospace, monospace; }
.chip.selected { color: var(--green); border-color: rgba(69,212,131,.48); background: rgba(69,212,131,.09); }
.models { margin-top: 12px; padding: 18px; }
.model-providers { display: grid; gap: 12px; margin-top: 12px; }
.model-provider { border-top: 1px solid var(--line); padding-top: 12px; }
.model-provider:first-child { border-top: 0; padding-top: 0; }
.model-provider-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.model-provider-head strong { color: var(--text); font-size: 13px; }
.dock { position: fixed; z-index: 5; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 3px; padding: 5px; background: rgba(16,23,30,.91); border: 1px solid var(--line); border-radius: 15px; backdrop-filter: blur(14px); box-shadow: 0 16px 48px rgba(0,0,0,.4); }
.nav { border: 0; background: transparent; color: var(--muted); padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.nav.active { background: var(--surface-2); color: var(--text); }
.error { position: fixed; z-index: 10; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 24px); background: #411d25; color: #ffdce1; border: 1px solid #71313f; border-radius: 12px; padding: 11px 15px; }
.hidden { display: none; }
@media (max-width: 760px) {
  .topbar { padding: 16px 14px 8px; }
  main { padding: 8px 14px 124px; }
  .health { max-width: 42%; text-align: right; }
  .hero { min-height: 150px; padding: 18px; align-items: center; }
  .hero h2 { font-size: 29px; }
  .hero p { max-width: 260px; }
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .primary-metrics .model-metric { grid-column: 1 / -1; min-height: 96px; }
  .metric { min-height: 96px; padding: 15px; }
  .system-grid { grid-template-columns: 1fr; }
  .split { display: block; min-height: auto; }
  .list { max-height: 230px; margin-bottom: 10px; }
  .transcript, .timeline { max-height: none; min-height: 320px; }
  .transcript.empty-state, .timeline.empty-state { min-height: 128px; }
  .dock { width: calc(100% - 24px); justify-content: stretch; }
  .nav { flex: 1; padding: 10px 5px; font-size: 12px; }
}
