/* arwx design system — tokens + component classes shared by every surface.
   Extracted verbatim from index.html so the dashboard stays byte-identical;
   new pages link this instead of re-styling. Cached hard by Caddy (/shared/*). */
:root {
  --bg: #f5f6f8; --card: #ffffff; --line: #e5e8ec; --line2: #eef0f3;
  --ink: #1b2230; --muted: #6b7280; --faint: #9aa1ad;
  --side: #161b26; --side-line: #262d3b; --side-ink: #c8cfda; --side-muted: #7e879a;
  --side-active: #232c3e; --accent: #1f9d57; --accent2: #34c77b;
  --keep: #26c76f; --best: #2aa866; --discard: #cdd2da; --crash: #e05252; --target: #d98c2b;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.04);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; }
.app { display: grid; grid-template-columns: 264px 1fr; height: 100vh; }

/* ---- sidebar ---- */
aside.side { background: var(--side); color: var(--side-ink); border-right: 1px solid var(--side-line);
  display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 9px; padding: 16px 16px 12px; }
.brand b { font-size: 16px; letter-spacing: .2px; color: #fff; }
.brand .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent2); box-shadow: 0 0 0 3px rgba(52,199,123,.18); }
.brand .tag { margin-left: auto; font-size: 11px; color: var(--side-muted); }
.side section { padding: 6px 10px; }
.side .lbl { display: flex; align-items: center; gap: 6px; padding: 10px 8px 6px;
  font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--side-muted); }
.side .lbl .count { margin-left: auto; font-variant-numeric: tabular-nums; }
.scroll { overflow: auto; min-height: 0; }
.scroll::-webkit-scrollbar { width: 8px; } .scroll::-webkit-scrollbar-thumb { background: #2c3445; border-radius: 8px; }
.item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--side-ink);
  font: inherit; cursor: pointer; }
.item:hover { background: #1d2434; }
.item.active { background: var(--side-active); color: #fff; box-shadow: inset 2px 0 0 var(--accent2); }
.item .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .meta { margin-left: auto; font-size: 11px; color: var(--side-muted); font-variant-numeric: tabular-nums; }
.item.active .meta { color: #aeb7c6; }
.sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.empty { padding: 10px; color: var(--side-muted); font-size: 12.5px; }

/* connection */
.conn { border-top: 1px solid var(--side-line); padding: 10px 12px; }
.conn summary { cursor: pointer; color: var(--side-muted); font-size: 12px; list-style: none; display: flex; align-items: center; gap: 6px; }
.conn summary::-webkit-details-marker { display: none; }
.conn[open] summary { color: var(--side-ink); margin-bottom: 8px; }
.conn input { width: 100%; margin: 4px 0; padding: 7px 9px; border: 1px solid #2c3445; border-radius: 6px;
  background: #0f1420; color: #e6eaf0; font: 12px ui-monospace, monospace; }
.conn .ok { color: var(--accent2); } .conn .bad { color: #ef6f6f; }
.conn #connbtn { width: 100%; margin: 6px 0 0; padding: 7px 9px; border: 1px solid var(--accent);
  border-radius: 6px; background: var(--accent); color: #fff; font: 12px ui-monospace, monospace;
  cursor: pointer; }
.conn #connbtn:hover { background: var(--accent2); border-color: var(--accent2); }
.connmsg { margin-top: 6px; font: 11.5px ui-monospace, monospace; color: var(--side-muted);
  white-space: pre-wrap; word-break: break-all; }
.connmsg.bad { color: #ef6f6f; }

/* ---- main ---- */
main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: var(--card);
  border-bottom: 1px solid var(--line); }
.goal h1 { margin: 0; font-size: 15px; font-weight: 650; }
.goal .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.goal code { background: #eef1f4; padding: 1px 6px; border-radius: 5px; font-size: 12px; }
.reached { color: var(--accent); font-weight: 600; }
.spacer { flex: 1; }
.live { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; cursor: pointer;
  user-select: none; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; }
.live input { accent-color: var(--accent); }
.docslink { font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; }
.docslink:hover { color: var(--ink); border-color: var(--muted); }
.status { font-size: 12px; color: var(--faint); min-width: 90px; text-align: right; }
/* live freshness clock — tells you at a glance the screen is current */
.fresh { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums; }
.fresh .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent2); }
.fresh.warn { color: #b9701c; } .fresh.warn .dot { background: #e0962f; }
.fresh.bad { color: #c0392b; } .fresh.bad .dot { background: #e25b4a; }
@keyframes freshpulse { 0% { box-shadow: 0 0 0 0 rgba(52,199,123,.5); }
  70% { box-shadow: 0 0 0 6px rgba(52,199,123,0); } 100% { box-shadow: 0 0 0 0 rgba(52,199,123,0); } }
.fresh.live .dot { animation: freshpulse 1.8s infinite; }
/* Standalone "live / watching" pulse dot (onboarding first-run indicator, etc.). */
.livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent2);
  flex: none; animation: freshpulse 1.8s infinite; }
.newpill { font-size: 11px; font-weight: 600; color: #fff; background: var(--accent);
  border-radius: 11px; padding: 2px 9px; opacity: 0; transform: translateY(-2px);
  transition: opacity .25s ease, transform .25s ease; pointer-events: none; white-space: nowrap; }
.newpill.show { opacity: 1; transform: none; }
@keyframes cardflash { 0% { box-shadow: 0 0 0 2px var(--accent2); } 100% { box-shadow: var(--shadow); } }
.chartcard.flash { animation: cardflash 1.2s ease-out; }

.content { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 0; gap: 18px; padding: 18px 22px; transition: grid-template-columns .18s ease; }
.content.detail { grid-template-columns: 1fr 360px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.chartcard { padding: 8px 8px 4px; min-height: 0; display: flex; flex-direction: column; }
.chart { width: 100%; flex: 1; min-height: 380px; }
.chart .u-cursor-pt { display: none; }

.panel { overflow: auto; padding: 0; opacity: 1; }
.content:not(.detail) .panel { opacity: 0; pointer-events: none; }
.panel .ph { padding: 22px; color: var(--faint); }
.panel .hd { padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.panel .hd h3 { margin: 0 0 8px; font-size: 15px; }
.panel .bd { padding: 14px 18px; }
.panel .x { float: right; cursor: pointer; color: var(--faint); border: 0; background: 0; font-size: 18px; line-height: 1; }
.row { margin: 12px 0; } .row:first-child { margin-top: 0; }
.k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 11px; font-size: 12px; font-weight: 600; color: #fff; }
.mono { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }
code.sha { background: #eef1f4; padding: 1px 5px; border-radius: 4px; }
pre.diff { white-space: pre-wrap; word-break: break-word; background: #0d1117; color: #d6deeb; margin: 0;
  padding: 12px; border-radius: 8px; max-height: 340px; overflow: auto; font: 12px ui-monospace, monospace; }
.diff-add { color: #7ee787; } .diff-del { color: #ffa198; } .diff-hunk { color: #79c0ff; }
.note { background: #f7f9fb; border: 1px solid var(--line2); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.tree { border: 1px solid var(--line2); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.tf { display: flex; gap: 8px; padding: 5px 9px; cursor: pointer; font: 12px ui-monospace, monospace; border-top: 1px solid var(--line2); }
.tf:first-child { border-top: 0; } .tf:hover { background: #f3f6f9; }
.tf .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tf .sz { color: var(--faint); }
.snaplink { color: var(--accent); cursor: pointer; }

.center { display: grid; place-items: center; height: 100%; color: var(--faint); text-align: center; }
.center .big { font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.crosshair { pointer-events: none; }
/* Only the data-point circles should catch clicks/taps — never the axis
   labels, annotations, target line or legend sitting near a dot. */
#chart text, #chart rect, #chart path, #chart line { pointer-events: none; }
/* Only the invisible hit-target circles catch input; the visible markers
   are decorative so they can never block an overlapping point/crash. */
#chart circle { pointer-events: none; }
#chart circle.hit { pointer-events: auto; }

/* ---- Experiments | Artifacts segmented toggle (in-project lens switch) -- */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--card); color: var(--muted); font: inherit; font-size: 12.5px;
  padding: 6px 14px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.active { background: var(--side-active); color: #fff; }
.seg button:not(.active):hover { background: #f0f2f5; }

/* ---- Artifacts panel ---------------------------------------------------- */
#artifactsBox { flex: 1; min-height: 0; overflow: auto; padding: 18px 22px; }
.artgrid { display: flex; flex-direction: column; gap: 10px; max-width: 900px; }
.artrow { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; cursor: pointer; box-shadow: var(--shadow); }
.artrow:hover { border-color: #cdd3da; }
.artrow .nm { font-weight: 600; font-size: 13.5px; }
.atype { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  background: #eef1f4; padding: 2px 8px; border-radius: 6px; }
.artrow .ver { margin-left: auto; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.refbadge { font-size: 11px; font-weight: 600; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 11px; }
.refbadge.winner { background: #b9810a; }
.refbadge.production { background: #1f6feb; }
.refbadge.latest { background: #6b7280; }
.artcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  max-width: 900px; overflow: hidden; }
.vrow { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--line2); font-size: 12.5px; }
.vrow:first-child { border-top: 0; }
.vrow .vn { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 34px; }
.vrow .sha { color: var(--faint); font: 11px ui-monospace, monospace; }
.vrow .sc { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.arthd { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; max-width: 900px; }
.arthd h2 { margin: 0; font-size: 15px; }
.arthd .back { cursor: pointer; color: var(--muted); border: 1px solid var(--line); background: var(--card);
  border-radius: 8px; padding: 5px 11px; font-size: 12px; }
.arthd .back:hover { background: #f0f2f5; }
.artempty { color: var(--faint); padding: 40px; text-align: center; }
/* ---- metrics lens (W&B-style auto-panels) ---- */
#metricsBox { flex: 1; min-height: 0; overflow: auto; scrollbar-gutter: stable; padding: 14px 22px 40px; }
.runlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 2px 14px; align-items: center; }
.runlegend .rl-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 4px; }
.runchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink);
  cursor: pointer; user-select: none; padding: 2px 4px; border-radius: 6px; }
.runchip:hover { background: var(--line2); }
.runchip.off { color: var(--faint); }
.runchip .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.runchip.off .sw { opacity: .3; }
.runchip .rst { font-size: 10px; color: var(--accent2); }
.mgroup { margin-bottom: 6px; }
.mgroup .ghd { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: .03em;
  padding: 10px 2px 6px; border-top: 1px solid var(--line2); margin-top: 8px;
  display: flex; align-items: center; gap: 8px; }
.mgroup .ghd .mgcaret { cursor: pointer; color: var(--faint); width: 12px; text-align: center;
  user-select: none; font-size: 10px; }
.mgroup .ghd .mgtitle { cursor: pointer; }
.mgroup .ghd .mgcount { color: var(--faint); font-weight: 600; }
/* W&B-style per-section pager ("1–6 of 7" with ‹ ›) */
.mgroup .ghd .mgpager { margin-left: auto; display: flex; align-items: center; gap: 6px;
  font-weight: 500; color: var(--faint); font-variant-numeric: tabular-nums; }
.mgroup .ghd .mgpager button { border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 6px; padding: 0 7px; line-height: 18px; cursor: pointer; font: inherit; }
.mgroup .ghd .mgpager button:disabled { opacity: .4; cursor: default; }
.metricgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.panelcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
  padding: 8px 10px 4px; }
.panelcard.obj { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset, var(--shadow); }
.panelcard .ptitle { font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 2px 2px 4px;
  display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panelcard .ptitle .obj-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--accent); border-radius: 9px; padding: 1px 6px; }
.panelcard svg { width: 100%; height: 150px; display: block; }
/* runs table (doubles as the legend) */
.runstable-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; background: var(--card); box-shadow: var(--shadow); }
.runstable { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.runstable th { text-align: right; padding: 7px 12px; color: var(--muted); font-weight: 600; font-size: 11px;
  text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--card); }
.runstable th.rt-run { text-align: left; }
.runstable th.rt-obj { color: var(--accent); }
.runstable td { padding: 6px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.runstable tr:last-child td { border-bottom: 0; }
.runstable .rt-row { cursor: pointer; }
.runstable .rt-row:hover td { background: var(--line2); }
.runstable .rt-row.off { color: var(--faint); }
.runstable .rt-run { text-align: left; font-weight: 550; color: var(--ink); }
.runstable .rt-row.off .rt-run { color: var(--faint); }
.runstable .rt-num { text-align: right; font-variant-numeric: tabular-nums; }
.runstable .rt-dash { color: var(--faint); }
.runstable .sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: middle; }
.runstable .rt-row.off .sw { opacity: .3; }
.runstable .rt-state { font-size: 11px; color: var(--muted); }
.runstable .rt-state.live { color: var(--accent2); font-weight: 600; }
.runstable .rt-cfg { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.runstable th.rt-cfg { color: var(--faint); font-weight: 500; }
.runstable .rt-divide { border-left: 2px solid var(--line); }
/* uPlot panels */
.uchart { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px 8px 2px; }
.uchart.obj { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2) inset, var(--shadow); }
.uchart .unodata { height: 260px; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 24px; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.uchart .uhd { font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 2px 2px 4px;
  display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uchart .uhd .obj-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: #fff; background: var(--accent); border-radius: 9px; padding: 1px 6px; }

/* Media panels: a per-(run,key) card holding a logged image/html sample with a
   step scrubber. Same card chrome as .uchart; the body is a fixed-height media
   stage so cards in the grid stay aligned regardless of image/sample size. */
.mediacard { background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px 8px 8px; display: flex; flex-direction: column; }
.mediacard .uhd { font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 2px 2px 4px;
  display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.mediacard .mediastep { margin-left: auto; font-weight: 500; font-size: 11px; color: var(--faint); flex: none; }
.mediabody { height: 240px; display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.mediaimg { max-width: 100%; max-height: 100%; object-fit: contain; image-rendering: auto; display: block; }
.mediahtml { width: 100%; height: 100%; border: 0; background: #fff; }
.mediaload, .medianodata { color: var(--faint); font-size: 12px; text-align: center; padding: 0 16px; }
a.medianodata { text-decoration: none; color: var(--accent); }
.mediacap { font-size: 11.5px; color: var(--faint); padding: 5px 2px 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.mediascrubrow { display: flex; align-items: center; gap: 8px; padding: 6px 2px 0; }
.mediascrub { flex: 1; min-width: 0; accent-color: var(--accent); }
.mediaidx { font-size: 11px; color: var(--faint); flex: none; font-variant-numeric: tabular-nums; }

/* Metrics lens = chart-first: a compact runs rail on the left, the panel grid
   leading on the right, and the wide config table demoted to a drawer below. */
.mlayout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.mmain { min-width: 0; }
.panelsearch { width: 100%; box-sizing: border-box; padding: 8px 13px; margin-bottom: 14px;
  border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 13px;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.panelsearch::placeholder { color: var(--faint); }
/* Chart controls toolbar: x-axis toggle · smoothing · panel search on one row. */
.mctl { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.mctl .panelsearch { flex: 1; min-width: 180px; margin-bottom: 0; }
/* Settings: a gear button opening a popover that owns every workspace-wide chart
   control (x-axis, smoothing, y-scale, outliers) — like W&B's "Line plots" panel. */
.setwrap { position: relative; }
.gearbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
  font: inherit; font-size: 12.5px; box-shadow: var(--shadow); white-space: nowrap; }
.gearbtn:hover { border-color: var(--muted); }
.gearbtn.on { border-color: var(--accent); color: var(--accent); }
.gearbtn .gico { font-size: 13px; line-height: 1; }
.setbackdrop { position: fixed; inset: 0; z-index: 40; }
.setpop { position: absolute; top: calc(100% + 8px); left: 0; z-index: 41; width: 320px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 8px 28px rgba(16,24,40,.16); padding: 14px 16px; }
.setttl { font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line2); }
.setttl .setsub { display: block; font-weight: 400; font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.setrow { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.setrow + .setrow { border-top: 1px solid var(--line2); }
.setrow > label { flex: 0 0 64px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.setfield { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.setfield input[type=range] { flex: 1; min-width: 80px; accent-color: var(--accent); }
.setfield .smval { font: 12px ui-monospace, monospace; color: var(--ink); min-width: 26px; }
.setfield .sethint { font-size: 11px; color: var(--faint); white-space: nowrap; }
.setrow .chk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted);
  cursor: pointer; flex: 1; }
.setrow .chk input { accent-color: var(--accent); }
/* Integrity receipt: the provable one-liner. Subtle by default, green when intact. */
.receipt { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin: -4px 0 14px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  font: 12.5px ui-monospace, monospace; color: var(--muted); box-shadow: var(--shadow); }
.receipt.ok { border-color: rgba(38,199,111,.4); background: rgba(38,199,111,.05); }
.receipt.warn { border-color: rgba(217,140,43,.45); background: rgba(217,140,43,.06); }
.receipt .rck { font-weight: 700; }
.receipt.ok .rck { color: var(--keep); }
.receipt.warn .rck { color: var(--target); }
.receipt b { color: var(--ink); font-weight: 600; }
.receipt i { color: var(--faint); font-style: normal; }
.receipt code { background: var(--line2); padding: 1px 5px; border-radius: 4px; color: var(--ink); }
.runrail { position: sticky; top: 0; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow); padding: 10px; max-height: calc(100vh - 96px);
  display: flex; flex-direction: column; }
.runrail .rr-hd { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650;
  color: var(--muted); letter-spacing: .03em; margin-bottom: 8px; }
.runrail .rr-hd .mgcount { color: var(--faint); font-weight: 600; }
.runrail .rr-search { width: 100%; box-sizing: border-box; padding: 6px 9px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 12.5px;
  background: var(--card); color: var(--ink); }
.runrail .rr-list { overflow: auto; flex: 1; min-height: 0; margin: 0 -4px; }
.runrow { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px;
  cursor: pointer; font-size: 12.5px; color: var(--ink); }
.runrow:hover { background: var(--line2); }
.runrow .eye { width: 13px; flex: none; color: var(--muted); font-size: 11px; text-align: center; }
.runrow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runrow .live-dot { color: var(--accent2); font-size: 9px; flex: none; }
.runrow .rr-ord { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 11px; flex: none; min-width: 24px; }
.runrow.off .rr-ord { opacity: .55; }
.runrow.off { color: var(--faint); }
.runrow.off .sw { opacity: .3; }
.runrow.off .eye { opacity: .45; }
.rr-pager { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 8px;
  color: var(--faint); font-size: 11px; }
.rr-pager button { border: 1px solid var(--line); background: var(--card); color: var(--ink);
  border-radius: 6px; cursor: pointer; padding: 1px 8px; line-height: 1.4; }
.rr-pager button:disabled { opacity: .4; cursor: default; }
.rt-drawer { margin-top: 20px; }
.rt-drawer > summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 650;
  letter-spacing: .03em; padding: 6px 2px; list-style: none; }
.rt-drawer > summary::-webkit-details-marker { display: none; }
.rt-drawer > summary::before { content: "\25B8\00a0"; color: var(--faint); }
.rt-drawer[open] > summary::before { content: "\25BE\00a0"; }
.u-tooltip { position: absolute; z-index: 20; pointer-events: none; background: #161b26; color: #e6eaf0;
  font: 11px ui-monospace, monospace; border-radius: 6px; padding: 6px 8px; box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; display: none; }
.u-tooltip .tt-step { color: #9aa1ad; margin-bottom: 3px; }
.u-tooltip .tt-row { display: flex; align-items: center; gap: 6px; }
.u-tooltip .tt-sw { width: 8px; height: 8px; border-radius: 2px; }
.u-tooltip .tt-val { margin-left: auto; font-variant-numeric: tabular-nums; }
