/* One design system for the calculator and the figures in the README: neutral surfaces, one accent.
   Compache is always the blue, OpenClaw (or any default) the neutral grey. Text wears ink, never a series colour. */
:root {
  color-scheme: light dark;
  --page: #f9f9f7; --surface: #fcfcfb;
  --ink: #0b0b0b; --ink-2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --neutral: #c3c2b7; --border: rgba(11, 11, 11, .10); --wash: rgba(11, 11, 11, .04);
  --compache: #2a78d6; --compache-soft: #9ec5f4; --baseline: #898781;
  --series-2: #eb6834; --series-3: #1baf7a;
  --good: #006300; --bad: #d03b3b; --on-accent: #ffffff;
  --shadow: 0 6px 24px rgba(11, 11, 11, .12);
  --font: system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d0d0d; --surface: #1a1a19;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --neutral: #5a5954; --border: rgba(255, 255, 255, .10); --wash: rgba(255, 255, 255, .06);
    --compache: #3987e5; --compache-soft: #184f95; --baseline: #898781;
    --series-2: #d95926; --series-3: #199e70;
    --good: #0ca30c; --bad: #e66767;
    --shadow: 0 6px 24px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
main { max-width: 1280px; margin: auto; padding: 0 32px 32px; }
h1, h2, h3, p, ul { margin: 0; }
a { color: var(--compache); text-underline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; clip: rect(0, 0, 0, 0); width: 1px; height: 1px; overflow: hidden; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible, svg [tabindex]:focus-visible { outline: 2px solid var(--compache); outline-offset: 2px; }

/* Header */
.top { height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 650; letter-spacing: -.2px; color: var(--ink); text-decoration: none; }
.brand i { width: 22px; height: 22px; background: var(--compache); mask: url(./mark.svg) center / contain no-repeat; }
.actions { display: flex; gap: 6px; }
button { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; cursor: pointer; }
button:hover { background: var(--wash); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--compache); border-color: var(--compache); color: var(--on-accent); font-weight: 600; }
button.primary:hover { filter: brightness(.94); }
.title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 28px 0 20px; }
h1 { font-size: 30px; font-weight: 650; line-height: 1.15; letter-spacing: -.8px; }
.title-row p { color: var(--ink-2); margin-top: 4px; }
#status { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Cards */
.panel, .kpis article { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.panel { padding: 20px; }
.results > .panel, .results > .split { margin-top: 16px; }
.results[aria-busy=true] { opacity: .55; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 12px; }
.panel-head h2, .table-title { font-size: 15px; font-weight: 650; letter-spacing: -.1px; }
.table-title { margin-bottom: 12px; }
.caption { font-size: 12px; line-height: 1.5; color: var(--ink-2); margin-top: 6px; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; }
.split.even { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; }

/* Series keys: a square for a filled mark, a short stroke for a line. */
.key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.key::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--baseline); }
.key.line::before { width: 14px; height: 2px; border-radius: 1px; }
.key.compache::before { background: var(--compache); }
.key.openclaw::before { background: var(--baseline); }
.key.s2::before { background: var(--series-2); }
.key.s3::before { background: var(--series-3); }
.key.ink::before { background: var(--ink-2); }
.key.dash::before { background: repeating-linear-gradient(to right, var(--ink-2) 0 2px, transparent 2px 6px); }
.caption .keys { display: flex; flex-wrap: wrap; gap: 0 14px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 14px 0 6px; }

/* Headline tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis article { padding: 18px 20px; }
.kpis h2 { font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 14px; }
.compare { display: flex; gap: 24px; }
.compare > div { min-width: 0; flex: 1; }
.compare strong, .hero { display: block; font-size: 30px; font-weight: 650; letter-spacing: -.8px; line-height: 1.2; margin-top: 4px; overflow-wrap: anywhere; }
.hero { font-size: 44px; letter-spacing: -1.4px; line-height: 1.05; margin: 0; }
.delta { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.delta.good { color: var(--good); }
.delta.bad { color: var(--bad); }
.meta { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin: 12px 2px 16px; }
.meta .source { color: var(--ink); font-weight: 600; flex-basis: 100%; }
.alert { padding: 10px 14px; border: 1px solid var(--border); border-left: 3px solid var(--bad); border-radius: 6px; background: var(--surface); font-size: 13px; margin: 12px 0; }
.alert:empty { display: none; }
.action-status { font-size: 12px; color: var(--ink-2); margin: 6px 2px; min-height: 18px; }

/* Inputs */
.inputs { padding: 0; }
label { display: block; font-size: 12px; color: var(--ink-2); margin: 8px 0; }
input, select { font: inherit; color: var(--ink); }
input[type=number], select { display: block; width: 100%; min-width: 0; height: 32px; margin-top: 4px; padding: 5px 8px; font-size: 13px; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--axis); border-radius: 6px; }
input[type=number]:invalid { border-color: var(--bad); }
input:disabled { opacity: .45; }
input[type=checkbox] { accent-color: var(--compache); margin: 0; }
.slider { display: block; width: 100%; margin: 2px 0 6px; accent-color: var(--compache); cursor: pointer; }
label.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
label.inline input[type=number] { width: 112px; margin: 0; text-align: right; }
label.check { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.unit { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.model-row > label { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; }
.model-row select { margin: 0; width: auto; min-width: 180px; }
.model-row .check { margin-left: auto; }
.chip { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.input-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 18px 0; }
.input-grid fieldset { display: flex; flex-direction: column; min-width: 0; margin: 0; padding: 0 20px; border: 0; border-right: 1px solid var(--border); }
.input-grid fieldset:last-child { border-right: 0; }
legend { padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 650; color: var(--ink); }
legend span { margin-right: 6px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.needs { display: grid; grid-template-columns: max-content repeat(3, minmax(0, 1fr)); gap: 6px 8px; align-items: center; margin: 8px 0; }
.needs .col { font-size: 11px; color: var(--ink-2); text-align: right; white-space: nowrap; }
.needs .rowhead { font-size: 12px; color: var(--ink-2); white-space: nowrap; padding-right: 2px; }
.needs input[type=number] { margin: 0; text-align: right; padding: 5px 6px; -moz-appearance: textfield; appearance: textfield; }
.needs input[type=number]::-webkit-inner-spin-button, .needs input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mini { height: 72px; margin-top: auto; padding-top: 10px; }
.mini svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mini + .caption { min-height: 18px; }
.policy-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; padding: 14px 20px; border-top: 1px solid var(--border); }
.retention { width: 290px; max-width: 100%; }
.retention label { margin: 0 0 4px; font-size: 13px; color: var(--ink); }
.retention input[type=number] { width: 76px; }
.retention .slider { margin: 4px 0 0; }
.selected-policy { flex: 1; min-width: 260px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.selected-policy.infeasible { color: var(--bad); }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: '+'; width: 12px; font-size: 16px; font-weight: 400; color: var(--muted); }
details[open] > summary::before { content: '−'; }
.settings { padding: 14px 20px; border-top: 1px solid var(--border); }
.groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 36px; margin-top: 12px; }
.groups .wide { grid-column: 1 / -1; }
.groups h3 { font-size: 12px; font-weight: 650; color: var(--ink); margin: 12px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 14px; align-items: end; }
.fields .check { align-self: center; margin: 14px 0 0; }
.wide .fields { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }

/* Where the workload comes from */
.starts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 16px; }
.starts .label, .starts .source { font-size: 12px; color: var(--ink-2); }
.starts #starts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.starts button[aria-pressed=true] { border-color: var(--compache); box-shadow: inset 0 0 0 1px var(--compache); }
.starts .own { border-style: dashed; border-color: var(--axis); }
.starts .source { margin-left: auto; }

/* The saving and every side */
.lead { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 16px; }
.lead > .panel { margin: 0; }
.saving h2, .sides h2 { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.saving h2 b { font-weight: 650; color: var(--ink); }
.saving .hero { font-size: 56px; letter-spacing: -2px; margin: 10px 0 0; }
.saving .delta { font-size: 15px; }
.saving dl { margin: 16px 0 0; font-size: 13px; }
.saving dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--grid); }
.saving dt { color: var(--ink-2); } .saving dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sides .panel-head { margin-bottom: 4px; } .sides .panel-head .caption { margin: 0; }
.side { display: grid; grid-template-columns: minmax(0, 11fr) minmax(60px, 12fr) 92px 58px; align-items: center; gap: 12px; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: 13px; color: var(--ink); }
button.side:hover { background: var(--wash); }
.side[aria-checked=true] { background: var(--wash); font-weight: 650; }
.side.head { padding-bottom: 2px; font-size: 11px; color: var(--muted); } .side.head span { text-align: right; }
.side .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .side.us .name { font-weight: 650; }
.side .name i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; background: var(--compache); }
.side .track i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--neutral); } .side .track i.compache { background: var(--compache); } .side .track i.picked { background: var(--baseline); }
.side .value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; } .side .value.muted { color: var(--muted); } .side .value.bad { color: var(--bad); }

/* Inputs you can draw */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.draw { margin-top: 6px; }
.draw svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; user-select: none; }
.draw .hit { cursor: ns-resize; } .draw .hit:hover { fill: var(--wash); }
.draw .caption { display: flex; justify-content: space-between; gap: 8px; min-height: 18px; margin-top: 2px; }
.f-drawn { fill: var(--ink-2); }
.g-mark { stroke: var(--series-2); stroke-width: 1.5; }
.tabs { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--wash); }
.tabs button { border: 0; background: none; padding: 4px 10px; font-size: 12px; color: var(--ink-2); border-radius: 6px; }
.tabs button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--border); }
fieldset .tabs { width: 100%; } fieldset .tabs button { flex: 1; padding: 4px 4px; }
button.link { border: 0; background: none; padding: 0; font-size: 12px; color: var(--compache); text-decoration: underline; text-underline-offset: 3px; }
details.more { margin-top: 8px; } details.more > summary { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.settings .more { margin: 12px 0 0; }
.fields.app { margin-top: 12px; }
.settings > summary .chip { font-weight: 400; }

/* The policy */
.policy-text { font-size: 17px; font-weight: 650; letter-spacing: -.2px; line-height: 1.4; }
#policyPanel .split { margin-top: 18px; }
#windowsChart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: none; user-select: none; }
#windowsChart .hit { cursor: ew-resize; }
.g-edge { stroke: var(--compache); stroke-width: 2; pointer-events: none; }
.knob { fill: var(--compache); stroke: var(--surface); stroke-width: 2; cursor: ew-resize; }
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; } .stepper .check { font-size: 12px; color: var(--ink-2); } .stepper label { display: inline-flex; align-items: center; gap: 10px; } .stepper input[type=number] { width: 72px; margin: 0; }
.table-title.gap { margin-top: 22px; }
.line.thin { stroke-width: 1.25; }
.chart.tall { height: 300px; }
.f-ghost { fill: var(--grid); } .pick { fill: var(--wash); pointer-events: none; }
.key.ghost::before { background: var(--grid); }
.key.dotkey::before { border-radius: 50%; } .key.cutkey::before { width: 0; height: 0; border-radius: 0; background: none; border: 5px solid transparent; border-top: 8px solid var(--compache); border-bottom: 0; }
.key.ping::before { content: '✓'; background: none; width: auto; height: auto; color: var(--compache); font-weight: 700; }
#threadPanel .legend { margin: 4px 0 8px; }
.turn-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 4fr); gap: 32px; margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--grid); }
.turn-detail h3 { font-size: 15px; font-weight: 650; } .turn-detail .table-title { margin-bottom: 6px; }
#turnParts svg { display: block; width: 100%; max-width: 340px; height: auto; margin-top: 8px; }
#turnParts .legend { margin: 2px 0 0; }
.turn-detail .chart.ping { height: 150px; }

/* Tables: numbers in aligned columns. */
table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ledger th { text-align: left; font-weight: 400; color: var(--ink-2); padding: 6px 0; }
.ledger td, .ledger thead th + th { text-align: right; padding: 6px 0 6px 18px; white-space: nowrap; }
.ledger thead th { font-size: 12px; border-bottom: 1px solid var(--axis); }
.ledger thead .key { justify-content: flex-end; }
.ledger tbody tr + tr th, .ledger tbody tr + tr td { border-top: 1px solid var(--grid); }
.ledger .group th { padding-top: 16px; border-top: 0; font-size: 11px; font-weight: 650; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.ledger .total th, .ledger .total td, .ledger tr.selected td { font-weight: 650; color: var(--ink); }
.ledger.policies th, .ledger.policies td { text-align: right; padding-left: 18px; }
.ledger.bars td { width: 30%; vertical-align: top; }
.ledger.bars td i { display: block; height: 4px; margin: 5px 0 1px auto; border-radius: 2px; background: linear-gradient(to right, var(--fill) var(--share), var(--grid) var(--share)); }
.ledger.bars td i.compache { --fill: var(--compache); }
.ledger.bars td i.openclaw { --fill: var(--baseline); }

/* Charts */
.chart { height: 280px; }
.chart.ping { height: 260px; }
.count-chart { height: 150px; }
.chart svg, .count-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
svg text { font: 11px var(--font); fill: var(--muted); font-variant-numeric: tabular-nums; }
svg .t-2 { fill: var(--ink-2); }
svg .t-ink { fill: var(--ink); font-weight: 600; }
/* A label that may cross a data line keeps a rim of surface around it. */
svg .halo { paint-order: stroke; stroke: var(--surface); stroke-width: 4px; stroke-linejoin: round; }
.mark { pointer-events: none; }
.g-grid { stroke: var(--grid); stroke-width: 1; }
.g-axis { stroke: var(--axis); stroke-width: 1; }
.g-cross { stroke: var(--muted); stroke-width: 1; }
.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.line.dash { stroke-dasharray: 1 5; }
.s-compache { stroke: var(--compache); } .s-baseline { stroke: var(--baseline); } .s-2 { stroke: var(--series-2); } .s-3 { stroke: var(--series-3); } .s-ink { stroke: var(--ink-2); }
.f-compache { fill: var(--compache); } .f-compache-soft { fill: var(--compache-soft); } .f-baseline { fill: var(--baseline); } .f-2 { fill: var(--series-2); } .f-3 { fill: var(--series-3); }
.f-neutral { fill: var(--neutral); } .f-neutral-strong { fill: var(--ink-2); }
.dot { stroke: var(--surface); stroke-width: 2; }
.hit { fill: transparent; cursor: pointer; }
.hit:hover + .mark, .hit:focus + .mark { filter: brightness(1.12); }
.subchart { margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--grid); }
.subchart-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 6px; }
.subchart-head h3 { font-size: 13px; font-weight: 650; }
.subchart-head span { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chart-controls { display: flex; align-items: center; gap: 14px; }
.chart-controls select, .run-control select { margin: 0; width: auto; }
.run-control { display: flex; align-items: center; gap: 10px; margin: 0; white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 4px 0 10px; }
.stats .label { font-size: 12px; color: var(--ink-2); }
.stats strong { display: block; font-size: 22px; font-weight: 650; letter-spacing: -.4px; margin-top: 2px; }
.stats .caption { margin-top: 2px; }

/* Tooltip: the value leads, the series name follows. */
.tip { position: fixed; z-index: 10; pointer-events: none; min-width: 150px; padding: 8px 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); font-size: 12px; }
.tip h4 { margin: 0 0 4px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.tip div { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.tip b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tip span { color: var(--ink-2); }
.tip i { flex: none; width: 12px; height: 2px; border-radius: 1px; background: transparent; }
.tip i.compache { background: var(--compache); } .tip i.openclaw { background: var(--baseline); } .tip i.s2 { background: var(--series-2); } .tip i.s3 { background: var(--series-3); }

.notes { padding: 14px 20px; }
.notes ul { padding-left: 18px; margin-top: 10px; max-width: 900px; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.notes li { margin: 5px 0; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--ink-2); }

/* Text page (methodology) */
.document { max-width: 820px; padding-top: 28px; padding-bottom: 48px; }
.document h1 { margin: 20px 0 8px; }
.document h2 { margin: 34px 0 8px; font-size: 20px; font-weight: 650; letter-spacing: -.3px; }
.document p, .document li { line-height: 1.65; color: var(--ink-2); }
.document p { margin: 10px 0; }
.document ul { padding-left: 20px; margin: 10px 0; }
.document li { margin: 6px 0; }
.document strong { color: var(--ink); }
.document code { font: 12.5px ui-monospace, SFMono-Regular, Menlo, monospace; }
.document pre { margin: 12px 0; padding: 14px 16px; overflow: auto; white-space: pre; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; line-height: 1.55; }
.document .table-scroll { overflow: auto; margin: 12px 0; }
.document table { min-width: 560px; }
.document th, .document td { text-align: left; vertical-align: top; padding: 8px 14px 8px 0; border-bottom: 1px solid var(--grid); white-space: normal; }
.document th { font-size: 12px; font-weight: 650; color: var(--ink); border-bottom-color: var(--axis); }
.document td.num, .document th.num { text-align: right; white-space: nowrap; }
.document td:first-child, .document th:first-child { white-space: nowrap; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 0; }
  .input-grid fieldset:nth-child(2) { border-right: 0; }
  .split, .split.even, .lead, .turn-detail { grid-template-columns: minmax(0, 1fr); }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  main { padding: 0 16px 24px; }
  .top { height: 56px; }
  .actions { gap: 4px; }
  .actions button { padding: 6px 9px; font-size: 12px; }
  .title-row { flex-direction: column; align-items: flex-start; gap: 6px; margin: 22px 0 16px; }
  h1 { font-size: 26px; }
  .side { grid-template-columns: minmax(0, 9fr) minmax(24px, 4fr) 76px 46px; gap: 8px; padding: 6px 4px; font-size: 12px; }
  .starts .source { margin-left: 0; width: 100%; }
  #policyTabs { flex-wrap: wrap; }
  .hero { font-size: 40px; }
  .input-grid { grid-template-columns: minmax(0, 1fr); gap: 22px 0; }
  .input-grid fieldset { border-right: 0; padding: 0 16px; }
  .model-row, .policy-row, .settings, .notes { padding-left: 16px; padding-right: 16px; }
  .model-row .check { margin-left: 0; }
  .model-row select { min-width: 0; }
  .panel { padding: 16px; }
  .inputs { padding: 0; }
  .panel-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .chart-controls { flex-wrap: wrap; width: 100%; }
  .chart-controls select { margin-left: auto; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .ledger td, .ledger thead th + th { padding-left: 10px; }
  .ledger.policies th, .ledger.policies td { padding-left: 8px; }
  .chart { height: 250px; }
  .meta { flex-direction: column; }
  .subchart-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
