:root {
  color-scheme: light;
  --ink: #18232b;
  --muted: #66747c;
  --line: #d9e2df;
  --paper: #f6f8f5;
  --panel: #ffffff;
  --teal: #1f7a73;
  --teal-soft: #dff0eb;
  --amber: #c7802d;
  --shadow: 0 16px 40px rgba(24, 35, 43, .08);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 28px; }
.hero { max-width: 720px; padding-bottom: 34px; }
.eyebrow { margin: 0 0 8px; color: var(--teal); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 12px; font-size: clamp(2.5rem, 6vw, 5rem); line-height: .98; letter-spacing: 0; }
h2 { margin-bottom: 8px; font-size: 1.15rem; letter-spacing: 0; }
.lede { max-width: 620px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }
.controls, .panel { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.controls { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 28px; align-items: end; padding: 24px; }
.muted { margin-bottom: 0; color: var(--muted); }
.budget-control { display: grid; gap: 9px; color: var(--muted); font-size: .9rem; }
.budget-control span { display: flex; justify-content: space-between; gap: 12px; }
output { color: var(--ink); font-weight: 750; }
input[type="range"] { width: 100%; accent-color: var(--teal); }
button { min-height: 42px; border: 0; border-radius: 6px; padding: 0 18px; background: var(--teal); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
button:hover { background: #155e59; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.metrics article { display: grid; gap: 5px; padding: 16px; border-top: 3px solid var(--teal-soft); background: #fff; }
.metrics span { color: var(--muted); font-size: .84rem; }
.metrics strong { font-size: 1.45rem; }
.workspace { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; }
.panel { padding: 22px; box-shadow: none; }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.status { white-space: nowrap; border-radius: 999px; padding: 4px 9px; background: var(--teal-soft); color: var(--teal); font-size: .78rem; font-weight: 700; }
.agent-list { display: grid; gap: 12px; }
.agent { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; }
.agent-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.agent-name { font-weight: 750; }
.agent-signal { color: var(--muted); font-size: .85rem; }
.bar { height: 9px; overflow: hidden; border-radius: 999px; background: #edf1ef; }
.bar > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width .35s ease; }
.agent-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: .78rem; }
.trace { display: grid; gap: 14px; min-height: 210px; padding-top: 14px; }
.trace-row { display: grid; gap: 5px; }
.trace-label { display: flex; justify-content: space-between; gap: 10px; font-size: .85rem; }
.trace-label strong { font-size: .9rem; }
.trace-bar { height: 8px; background: #edf1ef; }
.trace-bar span { display: block; height: 100%; background: var(--amber); }
.legend { color: var(--muted); font-size: .75rem; }
.dot { display: inline-block; width: 8px; height: 8px; margin: 0 4px 0 10px; border-radius: 50%; background: var(--teal); }
.dot:first-child { margin-left: 0; }
.dot.tradeoff { background: var(--amber); }
footer { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; color: var(--muted); font-size: .78rem; }
@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 620px); padding-top: 32px; }
  .controls, .workspace { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  footer { flex-direction: column; }
}
