/* CollectorsDashboard — shared stylesheet.
 *
 * One source of truth for the whole UI (overview / module / login). Served
 * publicly from /assets (CSS is not a secret and login needs it pre-session);
 * the session-gated HTML shells live one dir up and are NOT under this mount.
 *
 * Visual language adopted from the ArchBacktest-v2 ops dashboard: near-black
 * grid background, IBM Plex Mono body + Bricolage Grotesque display, cyan
 * accent, status pills. Semantic status tokens map the dashboard's tile
 * statuses (healthy/degraded/down/stopped/unknown/planned) onto green/amber/
 * red/dim. Presentation only — no behaviour lives here.
 */

:root {
  color-scheme: dark;

  /* ── Surfaces ── */
  --bg:        #07090d;
  --bg-2:      #0b0e14;
  --panel:     #0e1219;
  --panel-2:   #131822;
  --line:      #1d2531;
  --line-2:    #2a3543;

  /* ── Text ── */
  --fg:        #c4cedd;
  --fg-dim:    #5d6b7e;
  --fg-bright: #eef3fa;

  /* ── Accent + semantics ── */
  --cyan:      #2fe6d6;
  --blue:      #5b9dff;
  --green:     #36d399;
  --amber:     #f4be54;
  --red:       #ff5d5d;

  /* ── Type ── */
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-disp: "Bricolage Grotesque", system-ui, sans-serif;

  --radius:    8px;
  --radius-sm: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
/* Always reserve the scrollbar gutter so a collapsing/expanding section can't
   toggle the page scrollbar and shift the centred container sideways. */
html { scrollbar-gutter: stable; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(47, 230, 214, 0.05), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 44px 44px, 44px 44px;
  background-attachment: fixed;
}
/* Vignette + a hairline glow under the header band. */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 90% 60% at 50% 120%, rgba(0, 0, 0, 0.55), transparent),
    linear-gradient(180deg, rgba(47, 230, 214, 0.06), transparent 4px);
}

.wrap {
  position: relative; z-index: 1;
  max-width: 1240px; margin: 0 auto;
  padding: 0 22px 60px;
}

/* ── Header / brand ─────────────────────────────────────────────────────── */

header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  padding: 16px 22px; margin: 0 -22px 22px;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.97), rgba(7, 9, 13, 0.82));
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-2);
}
.brand {
  font-family: var(--font-disp);
  font-weight: 800; font-size: 19px; letter-spacing: -0.02em;
  color: var(--fg-bright);
  display: flex; align-items: baseline; gap: 1px;
  text-decoration: none;
}
.brand .slash { color: var(--cyan); margin: 0 1px; }
.brand .sub {
  color: var(--fg-dim); font-weight: 500; font-size: 11px;
  margin-left: 8px; letter-spacing: 0.14em; text-transform: uppercase;
}
.hdr-spacer { flex: 1; }
.hdr-meta { color: var(--fg-dim); font-size: 11px; letter-spacing: 0.04em; }

.hdr-action {
  color: var(--fg-dim); text-decoration: none; font: inherit;
  font-size: 11px; letter-spacing: 0.08em;
  padding: 6px 12px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); cursor: pointer;
  background: transparent;
  transition: color 0.15s, border-color 0.15s;
}
.hdr-action:hover { color: var(--cyan); border-color: var(--cyan); }

.back { color: var(--fg-dim); text-decoration: none; letter-spacing: 0.08em; font-size: 11px; }
.back:hover { color: var(--cyan); }

/* ── Page title / section headings ──────────────────────────────────────── */

h1 {
  font-family: var(--font-disp);
  font-weight: 700; font-size: 28px; letter-spacing: -0.015em;
  color: var(--fg-bright); margin-bottom: 6px;
}
.lead { color: var(--fg-dim); font-size: 12px; letter-spacing: 0.04em; margin-bottom: 26px; }

section { margin-bottom: 30px; }
h2 {
  font-family: var(--font-disp);
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--fg);
  margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px;
}
/* Cyan tick makes each section scannable. */
h2::before {
  content: ''; flex: none; width: 3px; height: 13px;
  background: var(--cyan); border-radius: 2px;
}

.muted { color: var(--fg-dim); }

/* Semantic value colours — subtle accents that read at a glance. */
.v-ok { color: var(--green); }
.v-warn { color: var(--amber); }
.v-info { color: var(--blue); }
.v-bad { color: var(--red); }
.mv.ph-live { color: var(--green); }
.mv.ph-backfill { color: var(--amber); }
.mv.ph-bootstrap { color: var(--blue); }
.mv.ph-stopped { color: var(--red); }

/* Collapse caret — a CSS triangle (font-independent), rotates when collapsed. */
.caret {
  flex: none; width: 0; height: 0; margin-left: auto;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--fg-dim); transition: transform 0.15s;
}

/* ── Status pills ───────────────────────────────────────────────────────── */

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 10px;
  font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg-dim);
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-dim); flex: none; }
/* Poll age, small + dim, inline to the right of the status label. */
.pill .pill-age { font-size: 9px; font-weight: 400; letter-spacing: 0; opacity: 0.6; margin-left: 5px; }

/* Map tile statuses → semantic colour. healthy=green, degraded=amber,
   down=red, stopped/unknown/planned=dim. */
.pill.healthy  { background: rgba(54, 211, 153, 0.12); color: var(--green); border-color: rgba(54, 211, 153, 0.3); }
.pill.healthy  .dot { background: var(--green); box-shadow: 0 0 6px rgba(54, 211, 153, 0.6); }
.pill.degraded { background: rgba(244, 190, 84, 0.12); color: var(--amber); border-color: rgba(244, 190, 84, 0.3); }
.pill.degraded .dot { background: var(--amber); box-shadow: 0 0 6px rgba(244, 190, 84, 0.6); }
.pill.down     { background: rgba(255, 93, 93, 0.12); color: var(--red); border-color: rgba(255, 93, 93, 0.3); }
.pill.down     .dot { background: var(--red); box-shadow: 0 0 6px rgba(255, 93, 93, 0.6); }
.pill.stopped, .pill.unknown, .pill.planned { background: var(--panel-2); color: var(--fg-dim); border-color: var(--line-2); }

/* ── Tiles (overview) ───────────────────────────────────────────────────── */

.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;  /* rows align to the container's left edge */
}

/* Archetype sub-row inside the Signals group. */
.sig-arch { margin-bottom: 34px; }
.sig-arch:last-child { margin-bottom: 0; }
.sig-arch-label {
  font-family: var(--font-disp);
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 13px;
}

.tile {
  width: 280px;                 /* fixed → every tile the exact same size */
  max-width: 100%;              /* shrink only on a viewport narrower than one tile */
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  border-radius: var(--radius);
  padding: 18px;
  min-height: 220px;            /* equal height for all — sized to the tallest tile */
  flex: none;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.tile:hover {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
/* Left edge colour-codes status at a glance. */
.tile.healthy  { border-left-color: var(--green); }
.tile.degraded { border-left-color: var(--amber); }
.tile.down     { border-left-color: var(--red); }
.tile.stopped, .tile.unknown, .tile.planned { border-left-color: var(--line-2); }
/* Non-clickable tiles (infra sub-components) — no nav, so no hover lift. */
.tile.static { cursor: default; }
.tile.static:hover { transform: none; box-shadow: none; border-color: var(--line-2); }
.tile.static.healthy:hover  { border-left-color: var(--green); }
.tile.static.degraded:hover { border-left-color: var(--amber); }
.tile.static.down:hover     { border-left-color: var(--red); }

.tile-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.tile-name {
  font-family: var(--font-disp);
  font-weight: 700; font-size: 16px; color: var(--fg-bright);
  text-align: left; word-break: break-word;
}

/* Tile body: left-aligned, vertically stacked blocks (one per market / one
   metric grid for infra). Each block is a row of labels over a row of values. */
.tile-body {
  margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.mkt-name {
  font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 4px;
}
.mgrid {
  display: grid; grid-auto-flow: column; grid-template-rows: auto auto;
  column-gap: 16px; row-gap: 3px; justify-content: start;
}
.mgrid .ml {
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim);
}
.mgrid .mv {
  font-size: 14px; font-weight: 600; color: var(--fg-bright); font-variant-numeric: tabular-nums;
}
/* Side-by-side market blocks on the module page (Spot | Futures). */
.mkt-row { display: flex; flex-wrap: wrap; gap: 40px; }
.mkt-row .mgrid .mv { font-size: 18px; }

/* ── Key/value metric grid (module page) ────────────────────────────────── */

.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.cell { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; }
.cell .k { font-size: 10px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 0.08em; }
.cell .v { font-size: 16px; margin-top: 4px; color: var(--fg-bright); font-variant-numeric: tabular-nums; }
.cell .v code { font-family: var(--font-mono); font-size: 12px; color: var(--cyan); }

/* ── Tables ─────────────────────────────────────────────────────────────── */

table { border-collapse: collapse; width: 100%; font-size: 12px; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
th {
  color: var(--fg-dim); font-weight: 600; text-transform: uppercase;
  font-size: 10px; letter-spacing: 0.08em;
}
td { color: var(--fg); font-variant-numeric: tabular-nums; }

/* Panel: solid surface so the page's grid background can't bleed through a
   table. Common to every module page. */
.panel {
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); overflow: hidden;
}
.panel .scroll { overflow: auto; max-height: 420px; }
.panel thead th {
  position: sticky; top: 0; z-index: 1;
  background: var(--panel-2); border-bottom: 1px solid var(--line-2);
}
.panel tbody tr:hover { background: var(--panel-2); }
.panel tbody tr:last-child td { border-bottom: none; }

/* Collapsible section — click the heading to hide/show its body. */
.collapsible > h2 {
  cursor: pointer; user-select: none;
  display: flex; align-items: center; gap: 8px;
}
.collapsible > h2 .caret { font-size: 9px; color: var(--fg-dim); transition: transform 0.15s; }
.collapsible.collapsed > h2 { margin-bottom: 0; border-bottom-color: transparent; }
.collapsible.collapsed > h2 .caret { transform: rotate(-90deg); }
.collapsible.collapsed > .body { display: none; }

/* ── Status badge (module header) ───────────────────────────────────────── */

.st {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 10px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--fg-dim);
}
.st.healthy  { background: rgba(54, 211, 153, 0.12); color: var(--green); border-color: rgba(54, 211, 153, 0.3); }
.st.degraded { background: rgba(244, 190, 84, 0.12); color: var(--amber); border-color: rgba(244, 190, 84, 0.3); }
.st.down     { background: rgba(255, 93, 93, 0.12); color: var(--red); border-color: rgba(255, 93, 93, 0.3); }

/* ── Sparkline ──────────────────────────────────────────────────────────── */

svg.spark { background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); vertical-align: middle; }

/* Tile mini-graph (e.g. Server CPU over 6h). */
.spark-wrap { display: flex; flex-direction: column; gap: 4px; }
.spark-cap {
  display: flex; justify-content: space-between;
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-dim);
}
.spark6h { display: block; width: 100%; height: 34px; background: rgba(47, 230, 214, 0.04); border-radius: 4px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

button {
  font: inherit; font-size: 11px; letter-spacing: 0.06em;
  background: var(--panel-2); color: var(--fg); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: 7px 14px; cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
button:hover:not(:disabled) { color: var(--cyan); border-color: var(--cyan); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
button.danger { border-color: rgba(255, 93, 93, 0.4); color: var(--red); }
button.danger:hover:not(:disabled) { background: rgba(255, 93, 93, 0.12); border-color: var(--red); color: var(--red); }
.spacer { margin-left: auto; }

/* ── Login card ─────────────────────────────────────────────────────────── */

body.login { display: flex; align-items: center; justify-content: center; }
.card {
  position: relative; z-index: 1;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 2.5rem 2rem; width: 360px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.card .logo {
  font-family: var(--font-disp); font-weight: 800; font-size: 18px;
  letter-spacing: -0.01em; color: var(--fg-bright);
  display: flex; align-items: baseline; gap: 1px; margin-bottom: 0.35rem;
}
.card .logo .slash { color: var(--cyan); }
.card .subtitle {
  color: var(--fg-dim); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; margin-bottom: 2rem;
}
.card label {
  display: block; font-size: 0.7rem; color: var(--fg-dim);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-bottom: 0.4rem; margin-top: 1.1rem;
}
.card label:first-of-type { margin-top: 0; }
.card input {
  width: 100%; background: var(--bg); border: 1px solid var(--line-2);
  color: var(--fg-bright); padding: 0.6rem 0.75rem; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.875rem; transition: border-color 0.15s;
}
.card input:focus { outline: none; border-color: var(--cyan); }
.card button[type="submit"] {
  margin-top: 1.75rem; width: 100%; padding: 0.7rem;
  background: var(--cyan); color: var(--bg); border: none;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 0.08em;
}
.card button[type="submit"]:hover { filter: brightness(1.1); color: var(--bg); }
.card .error {
  display: none; margin-top: 1.1rem; padding: 0.55rem 0.75rem;
  background: rgba(255, 93, 93, 0.1); border: 1px solid rgba(255, 93, 93, 0.3);
  border-radius: var(--radius-sm); color: var(--red);
  font-size: 0.75rem; text-align: center;
}

/* ── Setups catalog page ────────────────────────────────────────────────── */

.filters {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px; align-items: end; margin-bottom: 14px;
}
.filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--fg);
}
.filters input, .filters select {
  font: inherit; font-size: 12px; background: var(--bg); color: var(--fg-bright);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 6px 9px;
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--cyan); }
/* the headline differentiator — make n_trades pop */
.filters label.key input { border-color: rgba(47, 230, 214, 0.4); }

.setup { width: 300px; cursor: pointer; }
.setup .big .mv { font-size: 20px; color: var(--cyan); }
.setup-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line);
  font-size: 10px; color: var(--fg-dim);
}

/* Modal overlay (setup detail) */
.ov {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: flex-start; justify-content: center; padding: 56px 20px; overflow: auto;
}
.ov[hidden] { display: none; }
.ov-panel {
  position: relative; z-index: 1; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); max-width: 760px; width: 100%; padding: 22px;
}
.ov-close {
  position: absolute; top: 12px; right: 14px; cursor: pointer; color: var(--fg-dim);
  font-size: 18px; line-height: 1; background: none; border: none;
}
.ov-close:hover { color: var(--cyan); border: none; background: none; }
.leg-tbl td, .leg-tbl th { padding: 5px 10px; }

/* ── Setups — full-width row layout (redesign) ──────────────────────────── */

.setup-row {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--line-2); border-left-width: 3px;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 8px;
  transition: border-color 0.15s;
}
.setup-row:hover { border-color: var(--cyan); }
.setup-row.active { border-left-color: var(--green); }
.sr-sel { flex: none; }
.sr-sel input { width: 15px; height: 15px; accent-color: var(--cyan); cursor: pointer; }
.sr-id { flex: none; width: 250px; cursor: pointer; }
.sr-id .sym { font-family: var(--font-disp); font-weight: 700; font-size: 15px; color: var(--fg-bright); }
.sr-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.sr-metrics { flex: 1; cursor: pointer; display: flex; gap: 24px; flex-wrap: wrap; }
.sr-sub { flex: none; width: 180px; text-align: right; }

/* value-only identity chips (no type label) */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 10px;
  padding: 2px 8px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--fg); letter-spacing: 0.02em; white-space: nowrap; }
.chip .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.chip.dir-long { color: var(--green); border-color: rgba(54,211,153,.4); background: rgba(54,211,153,.1); }
.chip.dir-short { color: var(--red); border-color: rgba(255,93,93,.4); background: rgba(255,93,93,.1); }
.chip.mkt-spot { color: var(--blue); border-color: rgba(91,157,255,.4); }
.chip.mkt-fut { color: var(--amber); border-color: rgba(244,190,84,.4); }
.chip.tf { color: var(--fg-bright); font-weight: 600; }
.chip.grid { font-family: var(--font-mono); color: var(--fg-dim); }
.chip.prof { color: var(--cyan); border-color: rgba(47,230,214,.3); }

/* metric cells */
.met { display: flex; flex-direction: column; min-width: 52px; }
.met .l { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-dim); }
.met .v { font-size: 14px; font-weight: 600; color: var(--fg-bright); font-variant-numeric: tabular-nums; }
.met.hot .v { font-size: 18px; color: var(--cyan); }
.met.qlty { cursor: help; }

.sub-btn { font-size: 10px; padding: 5px 12px; margin-top: 6px; }

/* applied-filter chips */
.applied { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 16px; min-height: 1px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  padding: 4px 6px 4px 10px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--fg-dim); }
.fchip b { color: var(--cyan); font-weight: 600; }
.fchip .x { cursor: pointer; color: var(--fg-dim); font-size: 14px; line-height: 1; }
.fchip .x:hover { color: var(--red); }

/* toolbar + pager */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar select { font: inherit; font-size: 12px; background: var(--bg); color: var(--fg-bright);
  border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 5px 8px; }
.pager { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }

/* qlty hover sparkline tooltip */
.qtip { position: fixed; z-index: 60; background: var(--panel); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 8px 10px; pointer-events: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.qtip[hidden] { display: none; }

/* ── Setups redesign v2: filter sub-sections, toolbar 3-up, subscribe channels ── */
.filters .fsub { grid-column: 1 / -1; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .1em; color: var(--cyan); margin: 12px 0 2px;
  border-top: 1px solid var(--line); padding-top: 12px; }
.filters .fsub:first-child { border-top: none; padding-top: 0; margin-top: 0; }

/* toolbar: three labelled groups */
.tbar { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; margin-bottom: 12px; }
.tbar .grp { display: flex; flex-direction: column; gap: 5px; }
.tbar .grp > .lbl { font-size: 9px; text-transform: uppercase; letter-spacing: .5px; color: var(--fg-dim); }
.tbar .grp .row { display: flex; align-items: center; gap: 10px; }
.tbar .spacer { flex: 1; }
.tbar .grp.sel { width: 340px; flex: none; }
.tbar .grp.sel .row { justify-content: space-between; }
.selall { display: flex; gap: 6px; align-items: center; font-size: 11px; color: var(--fg-dim); cursor: pointer; }
.selcount { white-space: nowrap; font-size: 11px; color: var(--muted, var(--fg-dim)); }
.selnum { display: inline-block; min-width: 3ch; text-align: right; font-family: var(--font-disp);
  font-weight: 800; font-size: 18px; color: var(--cyan); font-variant-numeric: tabular-nums; }
.dirbtn { width: 26px; padding: 5px 0; text-align: center; }
.trunc { font-size: 11px; color: var(--amber); margin: 4px 0 12px; }

/* subscribe channel pills on the card */
.sr-sub { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ch { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 10px; padding: 4px 9px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--fg-dim); cursor: pointer; transition: all .12s; }
.ch:hover { border-color: var(--fg-dim); }
.ch .st { font-weight: 700; }
.ch.on { color: var(--green); border-color: rgba(54,211,153,.4); background: rgba(54,211,153,.08); }
.ch.pend { color: var(--amber); border-color: rgba(244,190,84,.4); background: rgba(244,190,84,.08); cursor: wait; }
.ch.off { color: var(--fg-dim); }

/* ── Inline setup chart (expander panel) ─────────────────────────────────────── */
.setup-wrap { margin-bottom: 8px; }
.setup-wrap .setup-row { margin-bottom: 0; }
.sr-exp { flex: none; width: 30px; align-self: stretch; background: transparent; border: none;
  color: var(--fg-dim); font-size: 13px; cursor: pointer; border-radius: var(--radius-sm); transition: color .12s; }
.sr-exp:hover { color: var(--cyan); background: var(--panel-2); }
.sr-exp.open { color: var(--cyan); }
.setup-chart { background: var(--panel); border-left: 3px solid var(--cyan);
  border-radius: 0 0 var(--radius) var(--radius); padding: 12px; }
.ch-wrap { display: flex; gap: 14px; }
.ch-canvas { flex: 1; min-width: 0; height: 360px; }
.ch-side { width: 200px; flex: none; }
.ch-mtitle { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--cyan); margin: 4px 0 6px; }
.ch-metrics { margin-bottom: 14px; }
.cm { display: flex; justify-content: space-between; font-size: 11px; padding: 2px 0; }
.cm .l { color: var(--fg-dim); }
.cm .v { font-variant-numeric: tabular-nums; color: var(--fg-bright); }
.lg { font-size: 10px; color: var(--fg-dim); padding: 2px 0; }
