:root {
  --ground: #f4f4f5; --surface: #ffffff; --surface-2: #ececee; --ink: #111113; --ink-2: #55555c; --ink-3: #8a8a91;
  --line: #dedee1; --accent: #0e6f69; --accent-soft: #d8ecea; --good: #2c7d46; --good-soft: #dcefe1;
  --warn: #a8660a; --warn-soft: #f5e7cf; --bad: #b33a2a; --bad-soft: #f5dcd7; --muted-soft: #ececee;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --display: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --body: "Geist", ui-sans-serif, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --ground: #0a0a0b; --surface: #141415; --surface-2: #1c1c1e; --ink: #ededee; --ink-2: #a1a1a6; --ink-3: #6e6e73;
    --line: #2a2a2d; --accent: #45b9ad; --accent-soft: #14302d; --good: #5cc37d; --good-soft: #13291b;
    --warn: #e0a24a; --warn-soft: #30230d; --bad: #ec7b69; --bad-soft: #351a15; --muted-soft: #222224;
    --shadow: 0 1px 2px rgba(0,0,0,.5);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 14px/1.5 var(--body); padding: 0 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: "ss01", "cv11"; }
h1, h2, h3, .brand, .strip .v, .name, .killbar strong { letter-spacing: -.02em; }
.shell { max-width: 1280px; margin: 0 auto; padding: 18px 0 56px; display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
@media (max-width: 900px) { .shell { grid-template-columns: minmax(0, 1fr); gap: 14px; } nav.rail { position: static !important; } nav.rail ul { display: flex !important; flex-wrap: wrap; } }
nav.rail { position: sticky; top: 18px; align-self: start; display: grid; gap: 18px; }
.brand { font: 600 18px/1.1 var(--display); }
.brand small { display: block; font: 400 12px var(--body); color: var(--ink-3); margin-top: 4px; letter-spacing: 0; }
nav.rail ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
nav.rail a { display: block; padding: 6px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
nav.rail a:hover, nav.rail a:focus-visible { background: var(--surface-2); color: var(--ink); outline: none; }
.whoami { font: 12px var(--mono); color: var(--ink-3); display: grid; gap: 6px; }
main { display: grid; gap: 26px; min-width: 0; }
.topline { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
h1 { font: 600 clamp(22px, 3vw, 28px)/1.1 var(--display); margin: 0; }
h2 { font: 600 18px/1.2 var(--display); margin: 0; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
h2 .sub { font: 400 13px var(--body); color: var(--ink-3); }
h3 { font: 600 15px var(--display); margin: 0; }
section { display: grid; gap: 12px; scroll-margin-top: 14px; }
.eyebrow { font: 500 12px var(--body); color: var(--ink-3); }
.fresh { font: 12px var(--mono); color: var(--ink-3); display: flex; gap: 8px; align-items: center; }
.fresh .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.fresh.stale .dot { background: var(--bad); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 0; }
.panel-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.strip > div { padding: 14px 16px; border-left: 1px solid var(--line); min-width: 0; }
.strip > div:first-child { border-left: 0; }
.strip .v { font: 600 22px/1.2 var(--display); font-variant-numeric: tabular-nums; }
.strip .d { font-size: 12px; color: var(--ink-2); }
@media (max-width: 900px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip > div { border-left: 0; border-top: 1px solid var(--line); } .strip > div:nth-child(-n+2) { border-top: 0; } .strip > div:nth-child(even) { border-left: 1px solid var(--line); } .strip > div:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.killbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.killbar.off { border-color: var(--bad); background: var(--bad-soft); }
.killbar strong { font: 600 16px var(--display); }
/* ── Badges (shadcn-style): default = solid ink, secondary = muted, outline = hairline, destructive = solid red.
   Existing status classes map onto those four: good → default, plain/accent → secondary, warn → outline (amber), bad → destructive. ── */
:root { --destructive: #dc2626; --on-destructive: #fff; }
@media (prefers-color-scheme: dark) { :root { --destructive: #b3261e; } }
.pill, .st, .ins-tag { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 4px; width: fit-content;
  padding: 2px 8px; border: 1px solid transparent; border-radius: 6px; font: 500 12px/16px var(--body); white-space: nowrap;
  background: var(--surface-2); color: var(--ink); transition: color 120ms, background-color 120ms, border-color 120ms; }
.pill.good, .st.green { background: var(--ink); color: var(--surface); }
.pill.warn, .st.orange { background: transparent; border-color: var(--line); color: var(--warn); }
.pill.bad, .st.red { background: var(--destructive); color: var(--on-destructive); }
.ins-tag { background: transparent; border-color: var(--line); color: var(--ink-2); }
button, .btn { font: 600 13px var(--body); padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--ink-3); }
button:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.ghost-danger { color: var(--bad); border-color: var(--bad); background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }
select, input[type=text], input[type=password] { font: 14px var(--body); padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--ground); color: var(--ink); min-width: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tr:first-child td { border-top: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.name { font: 500 14px var(--display); }
.sub2 { font: 12px var(--mono); color: var(--ink-3); }
.pos { color: var(--good); } .neg { color: var(--bad); } .muted { color: var(--ink-3); }
.controls { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.server { padding: 14px; display: grid; gap: 12px; align-content: start; }
.server-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.meters { display: grid; gap: 8px; }
.meter { display: grid; grid-template-columns: 70px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font-size: 12.5px; }
.meter .bar { height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.meter .bar i { display: block; height: 100%; background: var(--accent); }
.meter .bar i.hot { background: var(--warn); } .meter .bar i.crit { background: var(--bad); }
.meter span:last-child { font: 12px var(--mono); color: var(--ink-2); text-align: right; }
.svc { display: flex; flex-wrap: wrap; gap: 6px; }
dl.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--ink-3); } dl.kv dd { margin: 0; font: 12.5px var(--mono); overflow-wrap: anywhere; }
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.job { padding: 11px 14px; border-top: 1px solid var(--line); border-right: 1px solid var(--line); display: grid; gap: 3px; min-width: 0; }
.job .row { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.job .nm { font: 600 13px var(--mono); overflow-wrap: anywhere; }
.job .meta, .job .err { font: 12px var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
.job .err { color: var(--bad); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .two { grid-template-columns: minmax(0, 1fr); } }
.feed { display: grid; }
.feed > div { padding: 9px 14px; border-top: 1px solid var(--line); font-size: 13px; display: grid; gap: 2px; }
.feed > div:first-child { border-top: 0; }
.feed .when { font: 11.5px var(--mono); color: var(--ink-3); }
.empty { color: var(--ink-3); font-size: 13px; padding: 12px 14px; }
dialog { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); max-width: min(460px, calc(100vw - 32px)); padding: 0; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog form { display: grid; gap: 12px; padding: 18px; }
dialog .actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 8px 14px; border-radius: 8px; font-size: 13px; z-index: 10; }
.login { max-width: 360px; margin: 12vh auto; display: grid; gap: 14px; }
.login form { display: grid; gap: 10px; padding: 20px; }
.login label { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.login .err { color: var(--bad); font-size: 13px; }

td a { color: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 2px; }
td a:hover { text-decoration-color: var(--accent); }
#whale-filter { width: min(260px, 100%); }

.fleet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .fleet { grid-template-columns: minmax(0, 1fr); } }
.fleet .server-col { display: grid; gap: 0; }
.fleet .col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.fleet .group { border-top: 1px solid var(--line); }
.fleet .group:first-of-type { border-top: 0; }
.fleet .group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 10px 14px 4px; }
.fleet .group-head .eyebrow { color: var(--ink-2); }
.fleet .subgroup { padding: 6px 14px 0; font: 500 12px var(--body); color: var(--ink-3); }
.fleet .item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 8px 14px; }
.fleet .item + .item { border-top: 1px dashed var(--line); }
.fleet .item .nm { font: 600 13px var(--mono); overflow-wrap: anywhere; }
.fleet .item .ds { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.fleet .item .mt { grid-column: 1 / -1; font: 12px var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
.fleet .item .er { grid-column: 1 / -1; font: 12px var(--mono); color: var(--bad); overflow-wrap: anywhere; }

/* ── Loading state: pixel-grid loader + shimmering label + elapsed timer ──────────────
   Drive: square cells, chevron wavefront (650ms cycle < sweep, so two fronts in flight)
   Dots:  same wavefront, round cells.  Orbit: a comet lapping the grid perimeter.
   Reduced motion freezes the grid dim; the timer still ticks.                        */
:root { --shadow-overlay: 0 1px 2px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.14); }
@media (prefers-color-scheme: dark) { :root { --shadow-overlay: 0 1px 2px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.5); } }
@keyframes pixel-on { 0%, 100% { opacity: .15; } 35% { opacity: 1; } 70% { opacity: .15; } }
@keyframes shimmer-text { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes pop-in { from { opacity: 0; transform: scale(.96) translateY(-2px); } to { opacity: 1; transform: none; } }
.ls { display: inline-flex; align-items: center; gap: 10px; width: fit-content; }
.ls-grid { display: grid; grid-template-columns: repeat(3, 4px); gap: 1.5px; flex-shrink: 0; }
.ls-grid > span { width: 4px; height: 4px; background: var(--ink); border-radius: 1px; opacity: .15; }
.ls-grid.round > span { border-radius: 50%; }
.ls-grid > span.off { opacity: .07; animation: none !important; }
.ls-label { font-size: 13px; font-weight: 500; color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image: linear-gradient(90deg, var(--ink-3) 35%, var(--ink) 50%, var(--ink-3) 65%);
  background-size: 200% 100%; animation: shimmer-text 1.4s linear infinite; }
.ls-time { font: 12px var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ls-block { padding: 14px; }
@media (prefers-reduced-motion: reduce) {
  .ls-grid > span { animation: none !important; opacity: .15; }
  .ls-label { animation: none; color: var(--ink-2); background: none; }
  .ls-card, .toast { animation: none !important; }
}
.ls-card { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px;
  box-shadow: var(--shadow-overlay); animation: pop-in 200ms cubic-bezier(.16, 1, .3, 1) both; transform-origin: bottom right; }
.toast { box-shadow: var(--shadow-overlay); animation: pop-in 200ms cubic-bezier(.16, 1, .3, 1) both; }
.fresh .ls { gap: 8px; }

/* ── Filter table: status chips filter a grid-lined card table; hidden rows collapse ── */
:root {
  --grid-line: #e6e6e9; --hover: #f2f2f3; --field: #ececee;
  --shadow-card: 0 0 0 1px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.05), 0 2px 6px rgba(0,0,0,.04);
  --shadow-btn: 0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.08);
  --st-orange-fg: #b8680c; --st-orange-bg: #fdf1e2; --st-orange-bd: #f3d0a2;
  --st-teal-fg: #0f7f99;   --st-teal-bg: #e3f5fa;   --st-teal-bd: #a9dfec;
  --st-green-fg: #1b8a60;  --st-green-bg: #e2f5ec;  --st-green-bd: #a7dfc6;
  --st-red-fg: #b33a2a;    --st-red-bg: #fbe7e3;    --st-red-bd: #efb8ae;
}
@media (prefers-color-scheme: dark) {
  :root {
    --grid-line: #262628; --hover: #1a1a1c; --field: #222224;
    --shadow-card: 0 0 0 1px rgba(255,255,255,.06), 0 2px 8px rgba(0,0,0,.35);
    --shadow-btn: 0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.4);
    --st-orange-fg: #f3b061; --st-orange-bg: #33240f; --st-orange-bd: #5c4018;
    --st-teal-fg: #5ccbe3;   --st-teal-bg: #0f2c33;   --st-teal-bd: #1b5360;
    --st-green-fg: #5dd3a3;  --st-green-bg: #0f2c21;  --st-green-bd: #1d5640;
    --st-red-fg: #f08b79;    --st-red-bg: #35190f;    --st-red-bd: #5e2a20;
  }
}
.ft { display: grid; gap: 4px; min-width: 0; }
.ft-chips { display: flex; align-items: center; gap: 4px; overflow-x: auto; margin: -4px; padding: 4px; scrollbar-width: none; }
.ft-chips::-webkit-scrollbar { display: none; }
.ft-chip { flex-shrink: 0; height: 26px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0;
  border-radius: 999px; background: transparent; color: var(--ink-2); font: 500 12px var(--body); cursor: pointer;
  transition: background-color .2s, box-shadow .2s, color .2s; }
.ft-chip:hover { background: var(--hover); border-color: transparent; }
.ft-chip[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-btn); }
.ft-chip .dot { width: 6px; height: 6px; border-radius: 50%; }
.ft-chip .ct { border-radius: 4px; padding: 0 4px; font-size: 10.5px; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.ft-chip[aria-pressed="true"] .ct { background: var(--field); color: var(--ink-2); }
.ft-card { overflow-x: auto; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-card); scrollbar-width: none; }
.ft-card::-webkit-scrollbar { display: none; }
.ft-head, .ft-cells { display: grid; }
.ft-head { border-bottom: 1px solid var(--grid-line); font: 500 12.5px var(--body); color: var(--ink-2); }
.ft-head > span, .ft-cells > span { display: flex; align-items: center; min-width: 0; padding: 8px 12px; border-right: 1px solid var(--grid-line); }
.ft-head > span:last-child, .ft-cells > span:last-child { border-right: 0; }
.ft-head > span.num, .ft-cells > span.num { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.ft-cells > span.num { font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.ft-cells > span.stack { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; }
.ft-row { display: grid; grid-template-rows: 1fr; opacity: 1;
  transition: grid-template-rows 300ms cubic-bezier(.23, 1, .32, 1), opacity 300ms cubic-bezier(.23, 1, .32, 1); }
.ft-row.hide { grid-template-rows: 0fr; opacity: 0; }
.ft-clip { overflow: hidden; min-height: 0; }
.ft-cells { border-bottom: 1px solid var(--grid-line); font-size: 13px; transition: background-color 100ms; }
.ft-cells:hover { background: var(--hover); }
.ft-row:last-child .ft-cells { border-bottom: 0; }
.ft-empty { padding: 14px 12px; color: var(--ink-3); font-size: 13px; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (prefers-reduced-motion: reduce) { .ft-row, .ft-chip, .ft-cells { transition: none; } }
/* plain tables (small ones) share the grid-lined look */
th { font: 500 12.5px var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-2); padding: 8px 12px; border-bottom: 1px solid var(--grid-line); }
td { padding: 8px 12px; border-top: 1px solid var(--grid-line); }
th + th, td + td { border-left: 1px solid var(--grid-line); }
tbody tr { transition: background-color 100ms; }
tbody tr:hover { background: var(--hover); }


/* ── Insight cards: "Insights N ‹ ›" carousel with embedded mini-visualizations ── */
:root { --inset: #f7f7f8; --orange: #f68f3c; --blue: #3d9aff; --red: #e5484d; --green: #2f9e62;
  --shadow-hairline: 0 0 0 1px rgba(0,0,0,.07); --line-strong: #c9c9ce; }
@media (prefers-color-scheme: dark) { :root { --inset: #101011; --red: #ee5c61; --green: #4cc38a;
  --shadow-hairline: 0 0 0 1px rgba(255,255,255,.07); --line-strong: #3a3a3e; } }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 18px; align-items: stretch; }
.overview-grid > .left { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.overview-grid > .ins { align-self: start; }
/* "Latest" fills whatever height the insights column leaves; its rows are absolutely placed so they never grow the row */
.latest { flex: 1; display: flex; flex-direction: column; min-height: 180px; }
.latest-all { font-size: 12.5px; color: var(--ink-2); text-decoration: none; } .latest-all:hover { color: var(--ink); }
.latest-body { position: relative; flex: 1; overflow: hidden; }
.latest-body > .feed { position: absolute; inset: 0 0 auto 0; }
.latest-body::after { content: ""; position: absolute; inset: auto 0 0 0; height: 36px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.feed > div.lt { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.lt .tx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .overview-grid { grid-template-columns: minmax(0, 1fr); } .latest-body { height: 260px; flex: none; } }
.ins { width: 100%; min-height: 408px; }
.ins-head { display: flex; align-items: center; justify-content: space-between; }
.ins-title { display: flex; align-items: baseline; gap: 6px; font-size: 13px; }
.ins-title b { font-weight: 600; color: var(--ink); } .ins-title span { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ins-nav { display: flex; gap: 2px; }
.ins-nav button { width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--ink-3); transition: background-color .1s, color .1s, transform .1s; }
.ins-nav button:hover { background: var(--hover); color: var(--ink); } .ins-nav button:active { transform: scale(.96); }
.ins-page { transition: opacity 250ms, filter 250ms; }
.ins-page.out { opacity: 0; filter: blur(4px); }
.ins-prose { margin: 6px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.ins-prose b { font-weight: 500; color: var(--ink); }
.ent { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; color: var(--ink); vertical-align: baseline; }
.ent i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mono-r, .mono-g { font: 11.5px var(--mono); } .mono-r { color: var(--red); } .mono-g { color: var(--green); }
.ins-card { margin-top: 8px; min-height: 278px; padding: 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-hairline); }
.ins-legend { display: flex; gap: 16px; }
.ins-legend > div { flex: 1; min-width: 0; }
.ins-legend .nm { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); }
.ins-legend .nm i { width: 8px; height: 8px; border-radius: 50%; }
.ins-big { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ins-big.r { color: var(--red); } .ins-big.g { color: var(--green); } .ins-big.n { color: var(--ink); }
.ins-inset { margin-top: 8px; overflow: hidden; border-radius: 8px; background: var(--inset); box-shadow: var(--shadow-hairline); }
.ins-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ins-bar .l { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ins-seg { display: flex; border-radius: 999px; background: var(--field); padding: 2px; }
.ins-seg button { border: 0; border-radius: 999px; padding: 2px 8px; font: 500 10.5px var(--body); color: var(--ink-3); background: transparent;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s; }
.ins-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-btn); }
.ins-seg button:active { transform: scale(.96); }
.ins-stage { position: relative; height: 166px; touch-action: none; }
.ins-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ins-cursor { position: absolute; top: 28px; bottom: 18px; width: 1px; background: var(--line-strong); pointer-events: none; }
.ins-tip { position: absolute; top: 6px; transform: translateX(-50%); display: flex; gap: 8px; padding: 3px 8px; border-radius: 6px;
  background: var(--surface); box-shadow: var(--shadow-overlay); font: 11px var(--mono); color: var(--ink); white-space: nowrap; pointer-events: none; }
.ins-tip span { display: inline-flex; align-items: center; gap: 4px; } .ins-tip i { width: 6px; height: 6px; border-radius: 50%; }
.ins-foot { margin-top: 6px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ins-foot .sm { font-size: 11px; color: var(--ink-3); }
.alloc-bar { margin-top: 12px; display: flex; height: 36px; gap: 2px; overflow: hidden; border-radius: 999px; background: var(--field); padding: 2px; }
.alloc-bar button { position: relative; height: 100%; overflow: hidden; border: 0; padding: 0; border-radius: 999px; min-width: 6px;
  transition: opacity 300ms cubic-bezier(.16, 1, .3, 1), box-shadow 300ms, transform 150ms; }
.alloc-bar button:active { transform: scale(.98); }
.alloc-bar button::after { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: 0; border-radius: 999px;
  background: rgba(255,255,255,.2); opacity: 0; transition: width 500ms cubic-bezier(.16, 1, .3, 1), opacity 500ms; }
.alloc-bar button[aria-pressed="true"]::after { width: calc(100% - 8px); opacity: 1; }
.alloc-legend { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.alloc-legend button { display: inline-flex; align-items: center; gap: 4px; border: 0; border-radius: 999px; padding: 2px 6px; font-size: 11px;
  color: var(--ink-2); background: transparent; transition: background-color .15s, color .15s, transform .15s; }
.alloc-legend button:hover { background: var(--hover); color: var(--ink); }
.alloc-legend button[aria-pressed="true"] { background: var(--field); color: var(--ink); }
.alloc-legend i { width: 6px; height: 6px; border-radius: 50%; }
.alloc-detail { margin-top: 12px; min-height: 64px; padding: 8px 10px; border-radius: 8px; background: var(--inset); box-shadow: var(--shadow-hairline); }
.alloc-detail .t { display: block; font-size: 11.5px; font-weight: 500; }
.alloc-detail .d { display: block; margin-top: 4px; font-size: 11px; line-height: 1.6; color: var(--ink-3); }
.ins-pill { margin-top: 8px; border: 0; border-radius: 999px; background: var(--surface); padding: 6px 12px; text-align: left;
  font: 12px var(--body); color: var(--ink); box-shadow: var(--shadow-btn); transition: background-color .1s; }
.ins-pill:hover { background: var(--hover); }
@media (prefers-reduced-motion: reduce) { .ins-page, .alloc-bar button, .alloc-bar button::after { transition: none; } }
