/* ChloeDB command center. Colors are tokens on :root, set again for dark
   mode (the system's, unless the viewer picked light, and the viewer's).
   Series colors are the validated categorical order: slot n is --sN. */
:root {
  color-scheme: light;
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f4f5f7; --surface-3: #e9ebef; --sunken: #eef0f3;
  --line: #e2e5ea; --line-2: #cfd4dc; --text: #0f1216; --text-2: #48505b; --muted: #77808b;
  --accent: #2f5bd3; --accent-2: #2449b3; --accent-ink: #ffffff; --accent-soft: #e6ecfb; --focus: rgba(47, 91, 211, .28);
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b; --good-ink: #006300; --crit-ink: #b42323;
  --good-soft: #e3f4e3; --warn-soft: #fdf2d8; --serious-soft: #fce9e1; --crit-soft: #f9e1e1;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --s6: #008300; --s7: #6250d6; --s8: #e34948;
  --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95; --seq-7: #0d366b;
  --grid: #e8e9ec; --axis: #c3c7ce; --code: #f3f4f6;
  --kw: #7b3fc4; --str: #0f7b4a; --num: #b45309; --fn: #1d63c9; --cmt: #8a919c; --op: #9d174d;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 1px rgba(16, 24, 40, .03);
  --shadow-2: 0 10px 30px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --shadow-3: 0 24px 64px rgba(16, 24, 40, .22);
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r: 10px; --r-sm: 7px;
  --side: 236px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0f12; --surface: #16181c; --surface-2: #1c1f24; --surface-3: #252930; --sunken: #111317;
    --line: #262a31; --line-2: #343942; --text: #eceef1; --text-2: #b5bbc5; --muted: #858c97;
    --accent: #7aa2ff; --accent-2: #9ab8ff; --accent-ink: #0b1430; --accent-soft: #1b2440; --focus: rgba(122, 162, 255, .3);
    --good-ink: #3fcf5c; --crit-ink: #ff8a80;
    --good-soft: #13281a; --warn-soft: #2e2611; --serious-soft: #2e1d15; --crit-soft: #321718;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
    --seq-1: #13233a; --seq-2: #104281; --seq-3: #184f95; --seq-4: #256abf; --seq-5: #3987e5; --seq-6: #6da7ec; --seq-7: #b7d3f6;
    --grid: #22262c; --axis: #383d46; --code: #111317;
    --kw: #c4a5ff; --str: #7fd6a4; --num: #f2b56b; --fn: #8ab8ff; --cmt: #6f7782; --op: #f58fb6;
    --shadow-1: none; --shadow-2: 0 12px 32px rgba(0, 0, 0, .45); --shadow-3: 0 24px 72px rgba(0, 0, 0, .6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0f12; --surface: #16181c; --surface-2: #1c1f24; --surface-3: #252930; --sunken: #111317;
  --line: #262a31; --line-2: #343942; --text: #eceef1; --text-2: #b5bbc5; --muted: #858c97;
  --accent: #7aa2ff; --accent-2: #9ab8ff; --accent-ink: #0b1430; --accent-soft: #1b2440; --focus: rgba(122, 162, 255, .3);
  --good-ink: #3fcf5c; --crit-ink: #ff8a80;
  --good-soft: #13281a; --warn-soft: #2e2611; --serious-soft: #2e1d15; --crit-soft: #321718;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #008300; --s7: #9085e9; --s8: #e66767;
  --seq-1: #13233a; --seq-2: #104281; --seq-3: #184f95; --seq-4: #256abf; --seq-5: #3987e5; --seq-6: #6da7ec; --seq-7: #b7d3f6;
  --grid: #22262c; --axis: #383d46; --code: #111317;
  --kw: #c4a5ff; --str: #7fd6a4; --num: #f2b56b; --fn: #8ab8ff; --cmt: #6f7782; --op: #f58fb6;
  --shadow-1: none; --shadow-2: 0 12px 32px rgba(0, 0, 0, .45); --shadow-3: 0 24px 72px rgba(0, 0, 0, .6);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 14px/1.45 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; }
.muted { color: var(--muted); }
.dim { color: var(--text-2); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.nw { flex-wrap: nowrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sep { flex: 1; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i.lg { width: 20px; height: 20px; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); grid-template-rows: 52px auto minmax(0, 1fr); height: 100vh; }
.shell.collapsed { --side: 60px; }
.side { grid-row: 1 / 4; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; transition: width .18s; }
.brand { height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--line); background: none; font-weight: 700; letter-spacing: .01em; white-space: nowrap; overflow: hidden; width: 100%; text-align: left; cursor: pointer; flex: none; }
.brand:hover { background: var(--surface-2); }
.brand .mark { width: 28px; height: 28px; flex: none; }
.brand .clu { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand .clu b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.brand .clu .chev { width: 13px; height: 13px; color: var(--muted); }
.brand small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 8px 12px; }
.nav h6 { margin: 12px 10px 3px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; white-space: nowrap; position: relative; text-decoration: none; }
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav a[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nav a .t { overflow: hidden; text-overflow: ellipsis; }
.nav a .count { margin-left: auto; font-size: 11px; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--crit); color: #fff; text-align: center; font-weight: 600; }
.nav a .count.warn { background: var(--warn); color: #0b0b0b; }
.nav a .kb { margin-left: auto; font: 10.5px var(--mono); color: var(--muted); opacity: 0; transition: opacity .12s; }
.nav a .count + .kb { margin-left: 6px; }
.nav a:hover .kb, .nav a:focus-visible .kb { opacity: 1; }
.nav a .lockic { margin-left: 4px; color: var(--muted); display: inline-flex; }
.nav a .lockic svg.i { width: 12px; height: 12px; }
.nav a.gated .kb { display: none; }
.nav .labs { margin: 10px 0 0; border: 1px dashed var(--line-2); border-radius: 9px; padding: 2px; }
.nav .labs-toggle { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 7px; color: var(--muted); font-weight: 500; cursor: pointer; white-space: nowrap; }
.nav .labs-toggle:hover { background: var(--surface-2); color: var(--text); }
.nav .labs-toggle .chev { margin-left: auto; width: 14px; height: 14px; }
.nav a.lab { padding-top: 4px; padding-bottom: 4px; font-size: 13px; }
.nav a.lab .pin { margin-left: auto; border: 0; background: none; padding: 2px; border-radius: 5px; color: var(--muted); cursor: pointer; opacity: 0; display: inline-flex; }
.nav a.lab .kb + .pin { margin-left: 4px; }
.nav a.lab:hover .pin, .nav a.lab .pin.on, .nav a.lab .pin:focus-visible { opacity: 1; }
.nav a.lab .pin.on { color: var(--accent); }
.nav a.lab .pin svg.i { width: 13px; height: 13px; }
.shell.collapsed .nav h6, .shell.collapsed .nav a span, .shell.collapsed .brand > div, .shell.collapsed .side-foot span, .shell.collapsed .nav .labs-toggle .t, .shell.collapsed .nav .labs-toggle .chev, .shell.collapsed .nav a .pin { display: none; }
.shell.collapsed .nav a, .shell.collapsed .nav .labs-toggle { justify-content: center; padding: 8px; }
.shell.collapsed .nav a span.count { display: block; position: absolute; top: 2px; right: 2px; min-width: 14px; font-size: 9px; padding: 0 3px; }
.side-foot { border-top: 1px solid var(--line); padding: 6px 8px; display: flex; gap: 4px; }
.side-foot button { flex: 1; }

.top { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); min-width: 0; z-index: 20; }
.crumbs { display: flex; align-items: center; gap: 8px; font-weight: 600; min-width: 0; white-space: nowrap; }
.crumbs .sub { color: var(--muted); font-weight: 500; }
.search-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 8px; padding: 5px 8px 5px 10px; min-width: 220px; cursor: pointer; white-space: nowrap; }
.search-btn:hover { border-color: var(--line-2); color: var(--text-2); }
.search-btn kbd { margin-left: auto; }
kbd { font: 11px var(--mono); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; background: var(--surface); color: var(--text-2); }
.conn { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.content { grid-column: 2; grid-row: 3; overflow: auto; min-width: 0; position: relative; }
.page { padding: 18px 20px 40px; max-width: 1680px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); padding: 6px 12px; border-radius: var(--r-sm); cursor: pointer; white-space: nowrap; font-weight: 500; line-height: 1.3; transition: background .12s, border-color .12s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.danger { color: var(--crit-ink); border-color: color-mix(in srgb, var(--crit) 45%, var(--line-2)); }
.btn.danger:hover { background: var(--crit-soft); }
.btn.danger.solid { background: var(--crit); border-color: var(--crit); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 3px 8px; font-size: 12.5px; }
.btn.xs { padding: 1px 6px; font-size: 11.5px; border-radius: 6px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.icon { padding: 6px; }
.btn.icon.sm { padding: 3px; }
.input, .select, textarea.input { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 6px 9px; outline: none; min-width: 0; transition: border-color .12s, box-shadow .12s; }
.input:focus, .select:focus, textarea.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.input.sm, .select.sm { padding: 3px 7px; font-size: 12.5px; }
textarea.input { font-family: var(--mono); font-size: 12.5px; resize: vertical; width: 100%; }
label.f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
label.f > .input, label.f > .select { color: var(--text); font-size: 14px; font-weight: 400; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 10px; border-radius: 6px; cursor: pointer; color: var(--text-2); font-weight: 500; font-size: 12.5px; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); outline: 1px solid var(--line); }
.switch { position: relative; width: 32px; height: 18px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line-2); border-radius: 18px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(14px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; cursor: pointer; white-space: nowrap; color: var(--text-2); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip .x { opacity: .6; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs button { border: 0; background: none; padding: 8px 14px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { font-size: 11px; padding: 0 6px; border-radius: 9px; background: var(--surface-3); color: var(--text-2); }

/* ---------------------------------------------------------------- status */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.ok, .dot.good { background: var(--good); }
.dot.warn, .dot.degraded, .dot.pending { background: var(--warn); }
.dot.serious { background: var(--serious); }
.dot.bad, .dot.down, .dot.failing, .dot.firing, .dot.crit, .dot.critical { background: var(--crit); }
.dot.pulse { box-shadow: 0 0 0 0 currentColor; animation: pulse 1.8s infinite; }
.dot.ok.pulse { color: rgba(12, 163, 12, .5); }
.dot.firing.pulse, .dot.bad.pulse { color: rgba(208, 59, 59, .55); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.pill svg.i { width: 13px; height: 13px; }
.pill.ok, .pill.good { background: var(--good-soft); color: var(--good-ink); }
.pill.warn, .pill.pending, .pill.degraded, .pill.warning { background: var(--warn-soft); color: var(--text); }
.pill.warn svg, .pill.pending svg, .pill.degraded svg, .pill.warning svg { color: var(--warn); }
.pill.serious { background: var(--serious-soft); color: var(--text); }
.pill.bad, .pill.down, .pill.firing, .pill.failing, .pill.critical, .pill.crit { background: var(--crit-soft); color: var(--crit-ink); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; font-weight: 500; }
.badge.mono { font-family: var(--mono); }
.badge.accent { background: var(--accent-soft); color: var(--accent); }
.banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.banner.ok { border-color: color-mix(in srgb, var(--good) 35%, var(--line)); background: linear-gradient(90deg, var(--good-soft), var(--surface) 60%); }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: linear-gradient(90deg, var(--warn-soft), var(--surface) 60%); }
.banner.bad { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); background: linear-gradient(90deg, var(--crit-soft), var(--surface) 60%); }
.banner .big { font-size: 16px; font-weight: 650; }
.error { color: var(--crit-ink); background: var(--crit-soft); padding: 8px 12px; border-radius: var(--r-sm); white-space: pre-wrap; font-size: 13px; }
.notice { color: var(--text-2); background: var(--surface-2); padding: 8px 12px; border-radius: var(--r-sm); font-size: 13px; border: 1px dashed var(--line-2); }

/* ---------------------------------------------------------------- cards */
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
@media (max-width: 1280px) { .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .g2, .g3, .g4, .g6 { grid-template-columns: minmax(0, 1fr); } .span2, .span3 { grid-column: auto; } .search-btn { min-width: 0; } .search-btn span { display: none; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); min-width: 0; display: flex; flex-direction: column; }
.card > .hd { display: flex; align-items: center; gap: 8px; padding: 11px 14px 0; min-height: 36px; }
.card > .hd h3 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: .005em; }
.card > .hd .sub { color: var(--muted); font-size: 12px; }
.card > .hd .tools { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card > .bd { padding: 10px 14px 14px; min-width: 0; flex: 1; }
.card > .bd.flush { padding: 8px 0 0; }
.card > .ft { border-top: 1px solid var(--line); padding: 8px 14px; font-size: 12px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.card.hover:hover { border-color: var(--line-2); }
.card.drop-target { outline: 2px dashed var(--accent); outline-offset: 2px; }
.kpi { padding: 12px 14px 10px; position: relative; overflow: hidden; cursor: default; }
.kpi .lbl { font-size: 12px; color: var(--text-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; line-height: 1.15; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi .lbl, .kpi .val, .kpi .delta { position: relative; z-index: 1; }
.kpi .delta { font-size: 12px; color: var(--muted); margin-top: 2px; max-width: 58%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .delta.up-bad, .kpi .delta.down-bad { color: var(--crit-ink); }
.kpi .delta.up-good, .kpi .delta.down-good { color: var(--good-ink); }
.kpi svg.spark { position: absolute; right: 0; bottom: 0; width: 42%; height: 40px; opacity: .9; }
.kpi[data-link] { cursor: pointer; }
.kpi[data-link]:hover { border-color: var(--line-2); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty svg.i { width: 28px; height: 28px; stroke-width: 1.4; opacity: .7; }
.empty b { color: var(--text-2); font-weight: 600; }
.loading { opacity: .55; transition: opacity .2s; }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow: auto; max-width: 100%; }
table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
table.t th { position: sticky; top: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 600; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
table.t th.sort { cursor: pointer; }
table.t th.sort:hover { color: var(--text); }
table.t th .arrow { font-size: 10px; margin-left: 3px; }
table.t td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--surface-2); }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.sel td { background: var(--accent-soft); }
table.t td.sql { font-family: var(--mono); font-size: 12px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.t td .bar { height: 6px; border-radius: 3px; background: var(--s1); min-width: 2px; }
table.t td .barbox { width: 90px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
table.t.compact td { padding: 4px 8px; }
table.t.compact th { padding: 6px 8px; }

/* ---------------------------------------------------------------- code */
pre.code, .code { font-family: var(--mono); font-size: 12.5px; background: var(--code); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin: 0; white-space: pre-wrap; word-break: break-word; overflow: auto; }
.tk-kw { color: var(--kw); font-weight: 600; } .tk-str { color: var(--str); } .tk-num { color: var(--num); } .tk-fn { color: var(--fn); } .tk-cmt { color: var(--cmt); font-style: italic; } .tk-op { color: var(--op); } .tk-p { color: var(--muted); }

/* ---------------------------------------------------------------- overlays */
.scrim { position: fixed; inset: 0; background: rgba(8, 10, 14, .42); z-index: 60; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 96vw); background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--shadow-3); z-index: 61; display: flex; flex-direction: column; animation: slide .2s cubic-bezier(.2, .8, .2, 1); }
.drawer.wide { width: min(920px, 96vw); }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer > .hd { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.drawer > .hd h2 { margin: 0; font-size: 16px; }
.drawer > .bd { padding: 16px; overflow: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
/* A long body scrolls; its parts keep their height rather than shrink to fit. */
.drawer > .bd > * { flex-shrink: 0; }
.drawer > .ft { padding: 12px 16px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.modal { position: fixed; left: 50%; top: 12vh; transform: translateX(-50%); width: min(560px, 94vw); max-height: 76vh; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); z-index: 62; display: flex; flex-direction: column; animation: pop .16s cubic-bezier(.2, .8, .2, 1); }
.modal.wide { width: min(820px, 94vw); }
@keyframes pop { from { transform: translateX(-50%) scale(.97); opacity: 0; } }
.modal > .hd { padding: 16px 18px 6px; } .modal > .hd h2 { margin: 0; font-size: 16px; }
.modal > .bd { padding: 8px 18px 14px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.modal > .ft { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }
.kv { display: grid; grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); gap: 6px 16px; font-size: 13px; }
.kv > dt { color: var(--muted); } .kv > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); border-radius: 10px; padding: 10px 14px; display: flex; gap: 10px; align-items: flex-start; min-width: 280px; max-width: 440px; animation: slide .2s; }
.toast.bad { border-left: 3px solid var(--crit); } .toast.ok { border-left: 3px solid var(--good); } .toast.info { border-left: 3px solid var(--accent); }
.tip { position: fixed; pointer-events: none; z-index: 90; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); border-radius: 8px; padding: 8px 10px; font-size: 12px; min-width: 140px; max-width: 360px; }
.tip .t { color: var(--muted); margin-bottom: 4px; font-size: 11.5px; }
.tip .r { display: flex; align-items: center; gap: 8px; line-height: 1.6; }
.tip .r .k { width: 12px; height: 2px; border-radius: 1px; flex: none; }
.tip .r .k.box { height: 8px; width: 8px; border-radius: 2px; }
.tip .r b { font-variant-numeric: tabular-nums; }
.tip .r .n { color: var(--text-2); margin-left: auto; padding-left: 10px; }
.menu { position: fixed; z-index: 85; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: var(--shadow-2); padding: 4px; min-width: 190px; animation: pop2 .12s; }
@keyframes pop2 { from { opacity: 0; transform: translateY(-4px); } }
.menu button { display: flex; gap: 8px; align-items: center; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 7px; cursor: pointer; text-align: left; }
.menu button:hover, .menu button.on { background: var(--surface-2); }
.menu button.danger { color: var(--crit-ink); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* command palette */
.palette { position: fixed; left: 50%; top: 14vh; transform: translateX(-50%); width: min(640px, 94vw); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-3); z-index: 70; overflow: hidden; animation: pop .14s; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 15px 18px; font-size: 16px; outline: none; }
.palette .list { max-height: 52vh; overflow: auto; padding: 6px; }
.palette .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 12px 4px; font-weight: 600; }
.palette .it { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.palette .it.on { background: var(--accent-soft); }
.palette .it .h { color: var(--muted); font-size: 12px; margin-left: auto; }
.palette .it mark { background: none; color: var(--accent); font-weight: 650; }
.palette .foot { border-top: 1px solid var(--line); padding: 7px 14px; font-size: 11.5px; color: var(--muted); display: flex; gap: 14px; }

/* ---------------------------------------------------------------- charts */
.chart { position: relative; width: 100%; user-select: none; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid line { stroke: var(--grid); stroke-width: 1; }
.chart .axis text, .chart text.axis { fill: var(--muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .base { stroke: var(--axis); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { opacity: .16; }
.chart .band { opacity: .14; }
.chart .xhair { stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.chart .brush { fill: var(--accent); opacity: .12; stroke: var(--accent); stroke-opacity: .5; }
.chart .thr { stroke: var(--crit); stroke-width: 1.5; stroke-dasharray: 5 4; }
.chart .thr-h { fill: var(--crit); cursor: ns-resize; }
.chart .thr-lbl { fill: var(--crit-ink); font-size: 11px; font-weight: 600; }
.chart .ann { stroke: var(--serious); stroke-width: 1; stroke-dasharray: 2 3; }
.chart .ann-dot { fill: var(--serious); }
.chart .dot-hl { stroke: var(--surface); stroke-width: 2; }
.chart.hold { opacity: .6; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--text-2); margin: 0 0 6px; }
.legend button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 1px 2px; cursor: pointer; color: inherit; border-radius: 4px; }
.legend button:hover { color: var(--text); }
.legend button.off { opacity: .4; text-decoration: line-through; }
.legend .k { width: 14px; height: 2.5px; border-radius: 2px; }
.legend .k.box { width: 10px; height: 10px; border-radius: 3px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; position: relative; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--s1); transition: width .4s; }
.meter > i.warn { background: var(--warn); } .meter > i.bad { background: var(--crit); }

/* ---------------------------------------------------------------- diagrams */
.diagram { position: relative; width: 100%; background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 22px 22px, var(--sunken); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; touch-action: none; }
.diagram > div > svg { display: block; width: 100%; height: 100%; cursor: grab; }
.diagram > div > svg.panning { cursor: grabbing; }
.diagram .controls { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 4px; z-index: 2; }
.diagram .controls .btn { background: var(--surface); box-shadow: var(--shadow-1); }
.diagram .legend-box { position: absolute; left: 10px; bottom: 10px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; z-index: 2; }
.node { cursor: pointer; }
.node.dragging { cursor: grabbing; }
.node .box { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.2; filter: drop-shadow(0 2px 4px rgba(0,0,0,.12)); transition: stroke .15s; }
.node:hover .box { stroke: var(--accent); }
.node.sel .box { stroke: var(--accent); stroke-width: 2; }
.node.ok .stripe { fill: var(--good); } .node.degraded .stripe, .node.warn .stripe { fill: var(--warn); } .node.down .stripe, .node.failing .stripe { fill: var(--crit); }
.node.down .box { stroke-dasharray: 4 3; }
.node text { fill: var(--text); font-size: 12px; }
.node text.t { font-weight: 650; font-size: 13px; }
.node text.s { fill: var(--muted); font-size: 11px; }
.node text.v { font-variant-numeric: tabular-nums; fill: var(--text-2); font-size: 11px; }
.edge { fill: none; stroke: var(--line-2); stroke-width: 1.6; }
.edge.flow { stroke: var(--s1); stroke-dasharray: 3 7; animation: flow 1s linear infinite; stroke-opacity: .85; }
.edge.repl { stroke: var(--s3); stroke-dasharray: 6 5; animation: flow 1.6s linear infinite; }
.edge.lag { stroke: var(--warn); }
.edge.down { stroke: var(--crit); stroke-dasharray: 2 5; animation: none; opacity: .7; }
@keyframes flow { to { stroke-dashoffset: -20; } }
.edge-lbl { font-size: 10.5px; fill: var(--text-2); font-variant-numeric: tabular-nums; }
.edge-lbl-bg { fill: var(--sunken); }
@media (prefers-reduced-motion: reduce) { .edge.flow, .edge.repl, .dot.pulse { animation: none; } }

/* waterfall */
.wf { display: grid; grid-template-columns: minmax(150px, 34%) minmax(0, 1fr); font-size: 12px; row-gap: 3px; }
.wf .nm { display: flex; gap: 6px; align-items: center; padding-right: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wf .lane { position: relative; height: 20px; background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), var(--grid) calc(10% - 1px) 10%); border-radius: 3px; }
.wf .seg { position: absolute; top: 3px; height: 14px; border-radius: 4px; min-width: 2px; background: var(--s1); }
.wf .seg.k-admission { background: var(--s4); } .wf .seg.k-execute { background: var(--s1); } .wf .seg.k-wait { background: var(--s7); } .wf .seg.k-plan { background: var(--s5); } .wf .seg.k-rpc { background: var(--s3); } .wf .seg.bad { background: var(--crit); } .wf .seg.again { background-image: repeating-linear-gradient(45deg, transparent 0 4px, rgba(255,255,255,.35) 4px 7px); }
.wf .seg span { position: absolute; left: calc(100% + 6px); top: -1px; white-space: nowrap; color: var(--text-2); font-variant-numeric: tabular-nums; }
.wf .scale { grid-column: 2; display: flex; justify-content: space-between; color: var(--muted); font-size: 10.5px; padding-top: 2px; }

/* logs */
.logs { font-family: var(--mono); font-size: 12px; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; height: calc(100vh - 250px); min-height: 320px; }
.logs .ln { display: grid; grid-template-columns: 96px 52px minmax(120px, 210px) minmax(0, 1fr); gap: 10px; padding: 3px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent); cursor: pointer; }
.logs .ln:hover { background: var(--surface-2); }
.logs .ln.open { background: var(--surface); }
.logs .lv { font-weight: 700; text-transform: uppercase; font-size: 10.5px; padding-top: 1px; }
.logs .lv.ERROR { color: var(--crit-ink); } .logs .lv.WARN { color: var(--num); } .logs .lv.INFO { color: var(--fn); } .logs .lv.DEBUG, .logs .lv.TRACE { color: var(--muted); }
.logs .tg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs .msg { white-space: pre-wrap; word-break: break-word; }
.logs .fld { color: var(--text-2); }
.logs .fld b { color: var(--muted); font-weight: 500; }
.logs .more { grid-column: 1 / -1; padding: 6px 0 4px 106px; }
.logs .rid { color: var(--accent); cursor: pointer; text-decoration: underline dotted; }
.logs.nodes .ln { grid-template-columns: 96px 52px minmax(70px, 120px) minmax(120px, 200px) minmax(0, 1fr); }
.logs.nodes .more { padding-left: 106px; }
.logs .nd { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs .ln.hl { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.logs .day { position: sticky; top: 0; z-index: 1; padding: 3px 12px; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border-bottom: 1px solid var(--line); font-family: var(--sans, inherit); }
.logs .tail { display: flex; gap: 10px; align-items: center; padding: 10px 12px; font-family: var(--sans, inherit); }
.lg-store { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; font-size: 12.5px; color: var(--text-2); margin: -4px 0 12px; }
.lg-store b { color: var(--text); font-weight: 600; }
.lg-main { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 14px; align-items: start; }
.lg-side { display: flex; flex-direction: column; gap: 10px; }
.lg-side .card .bd { padding: 6px; }
@media (max-width: 1000px) { .lg-main { grid-template-columns: minmax(0, 1fr); } }
.facet { display: flex; flex-direction: column; gap: 1px; }
.facet button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 8px; border: 0; background: none; padding: 4px 6px; border-radius: var(--r-sm); cursor: pointer; text-align: left; color: var(--text-2); font-size: 12px; }
.facet button:hover { background: var(--surface-2); color: var(--text); }
.facet button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.facet .meter { grid-column: 1 / -1; height: 3px; }
.facet .meter i { background: var(--s1); }
.hist { user-select: none; touch-action: none; }
.hist .selr { fill: var(--accent); opacity: .18; }
.lg-stmts td.num, .lg-stmts th.num { white-space: nowrap; }

/* drag and drop */
[draggable="true"] { cursor: grab; }
.dragging-src { opacity: .45; }
.dropzone { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 18px; text-align: center; color: var(--muted); transition: background .15s, border-color .15s; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.handle { cursor: grab; color: var(--muted); display: inline-flex; }
.sortable-ghost { opacity: .35; }

/* ring of slots */
.ring-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.ring-legend .r { display: flex; gap: 8px; align-items: center; }
.ring-legend .sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* flow (single node) */
.flow-stage { fill: var(--surface); stroke: var(--line-2); }
.flow-lbl { fill: var(--text); font-weight: 650; font-size: 12.5px; }
.flow-sub { fill: var(--muted); font-size: 11px; }
.flow-val { fill: var(--text); font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.particle { fill: var(--s1); }
.particle.w { fill: var(--s3); }

/* advisor */
.advice { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); align-items: flex-start; }
.advice .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.advice.warn .ic { background: var(--warn-soft); color: var(--num); }
.advice.bad .ic { background: var(--crit-soft); color: var(--crit-ink); }
.advice.ok .ic { background: var(--good-soft); color: var(--good-ink); }
.advice h4 { margin: 0 0 2px; font-size: 13.5px; }
.advice p { margin: 0; color: var(--text-2); font-size: 13px; }
.advice code { background: var(--code); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--line); }

/* timeline */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline .ev { position: relative; padding: 4px 0 10px; }
.timeline .ev::before { content: ""; position: absolute; left: -17px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--muted); }
.timeline .ev.firing::before { border-color: var(--crit); background: var(--crit); }
.timeline .ev.ok::before { border-color: var(--good); }
.timeline .ev.pending::before { border-color: var(--warn); }

.secret { font-family: var(--mono); font-size: 13px; padding: 10px 12px; background: var(--code); border: 1px solid var(--accent); border-radius: var(--r-sm); word-break: break-all; }
.posture { display: flex; flex-direction: column; gap: 8px; }
.posture .it { display: flex; gap: 10px; align-items: flex-start; }
.posture .it svg { margin-top: 2px; }
.posture .it.ok svg { color: var(--good); } .posture .it.warn svg { color: var(--warn); } .posture .it.bad svg { color: var(--crit); }

iframe.classic { width: 100%; height: calc(100vh - 52px); border: 0; display: block; background: var(--bg); }

/* ---------------------------------------------------------------- data views */
.tb { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; font: 650 10.5px/1 var(--mono); color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); flex: none; }
details.more { margin-top: 12px; }
details.more summary { cursor: pointer; color: var(--text-2); font-size: 13px; }

/* the workbench */
.wb { display: grid; grid-template-columns: 252px minmax(0, 1fr); height: calc(100vh - 52px); }
.wb-side { border-right: 1px solid var(--line); background: var(--surface); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.wb-sh { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.wb-sh b { font-weight: 650; }
.tree .tt-h { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 7px; cursor: pointer; font-weight: 600; }
.tree .tt-h:hover { background: var(--surface-2); }
.tree .tt-h .btn { opacity: 0; }
.tree .tt-h:hover .btn, .tree .tt-h .btn:focus-visible { opacity: 1; }
.tree .tt-f { padding: 2px 0 8px 14px; }
.fi { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; font-size: 12.5px; cursor: grab; }
.fi:hover { background: var(--surface-2); }
.snips { display: flex; flex-direction: column; gap: 6px; }
.snip { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface); cursor: grab; font-size: 12.5px; }
.snip:hover { border-color: var(--accent); background: var(--accent-soft); }
.wb-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px 14px 0; }
.qtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.qt { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-bottom: 0; background: none; padding: 6px 12px; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--muted); font-weight: 500; white-space: nowrap; margin-bottom: -1px; }
.qt:hover { color: var(--text); }
.qt[aria-selected="true"] { background: var(--surface); border-color: var(--line); color: var(--text); }
.qt .x { opacity: .5; font-size: 15px; line-height: 1; }
.qt .x:hover { opacity: 1; color: var(--crit-ink); }
.qt.add { padding: 6px 8px; }
.wb-tools { display: flex; align-items: center; gap: 8px; padding: 8px 0; flex-wrap: wrap; flex: none; }
.wb-ed { min-height: 120px; flex: none; }
.params { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); margin-top: 8px; flex: none; }
.splitter { height: 12px; cursor: row-resize; display: grid; place-items: center; flex: none; touch-action: none; }
.splitter::after { content: ""; width: 44px; height: 4px; border-radius: 2px; background: var(--line-2); transition: background .15s; }
.splitter:hover::after { background: var(--accent); }
.wb-out { flex: 1; min-height: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r) var(--r) 0 0; }
.wb-outhd { padding: 0 12px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; flex: none; }
.wb-outhd .tabs { border-bottom: 0; }
.wb-status { display: flex; gap: 10px; align-items: center; white-space: nowrap; overflow: hidden; }
.wb-res { flex: 1; overflow: auto; min-height: 0; }
.wb-error .error { font-size: 13.5px; line-height: 1.5; }
pre.wb-excerpt { white-space: pre; word-break: normal; overflow-x: auto; }
.wb-caret { color: var(--crit-ink); font-weight: 700; }
.lib-it { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.plan-view { padding: 14px; }
@media (max-width: 1100px) { .wb { grid-template-columns: minmax(0, 1fr); } .wb-side { display: none; } .hide-sm { display: none; } }

/* the editor */
.ed { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); height: 100%; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--code); overflow: hidden; }
.ed:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.ed-gut { padding: 10px 0; overflow: hidden; color: var(--muted); font: 12px/20px var(--mono); text-align: right; user-select: none; border-right: 1px solid var(--line); min-width: 40px; background: color-mix(in srgb, var(--code) 60%, var(--surface-2)); }
.ed-gut div { padding: 0 8px 0 10px; }
.ed-gut div.on { color: var(--text); }
.ed-body { position: relative; min-width: 0; overflow: hidden; }
.ed-hl, .ed-ta { position: absolute; inset: 0; margin: 0; padding: 10px 12px; font: 13px/20px var(--mono); tab-size: 2; white-space: pre; border: 0; overflow: auto; background: transparent; }
.ed-hl { pointer-events: none; color: var(--text); overflow: hidden; }
.ed-ta { color: transparent; caret-color: var(--text); resize: none; outline: none; z-index: 1; }
.ed-ta::selection { background: color-mix(in srgb, var(--accent) 32%, transparent); color: transparent; }
.ed-cur { position: absolute; left: 0; right: 0; top: 0; background: color-mix(in srgb, var(--text) 4.5%, transparent); pointer-events: none; }
.ed-err { position: absolute; height: 3px; background: repeating-linear-gradient(135deg, var(--crit) 0 2px, transparent 2px 4px); z-index: 2; pointer-events: none; }
.ed-probe { position: absolute; visibility: hidden; font: 13px var(--mono); white-space: pre; left: 0; top: 0; }
.ed-pop { position: absolute; z-index: 5; width: 340px; max-height: 290px; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 9px; box-shadow: var(--shadow-2); padding: 4px; font-size: 12.5px; }
.ed-pop .it { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; cursor: pointer; }
.ed-pop .it.on { background: var(--accent-soft); }
.ed-pop .k { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 4px; font: 650 10.5px var(--mono); flex: none; background: var(--surface-3); color: var(--text-2); }
.ed-pop .k-field { color: var(--s3); } .ed-pop .k-path { color: var(--s6); } .ed-pop .k-fn { color: var(--fn); } .ed-pop .k-kw { color: var(--kw); } .ed-pop .k-table { color: var(--s1); } .ed-pop .k-param { color: var(--num); }
.ed-pop .l { font-family: var(--mono); white-space: nowrap; }
.ed-pop .l b { color: var(--accent); }
.ed-pop .d { margin-left: auto; color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.ed-pop .doc { border-top: 1px solid var(--line); margin-top: 4px; padding: 6px 8px 4px; color: var(--text-2); font-size: 12px; }
.ed-sig { position: absolute; z-index: 4; background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: var(--shadow-2); padding: 5px 9px; font-size: 12px; max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ed-sig u { text-decoration: none; background: var(--accent-soft); color: var(--accent); border-radius: 3px; padding: 0 2px; }

/* an answer */
.grid-wrap { overflow: auto; max-height: 100%; }
table.t.rgrid td { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; padding: 5px 10px; }
table.t.rgrid th { padding: 7px 10px; }
table.t.rgrid th .rs { position: absolute; right: 0; top: 0; bottom: 0; width: 7px; cursor: col-resize; }
table.t.rgrid th .rs:hover { background: var(--accent-soft); }
table.t.rgrid .rn { color: var(--muted); width: 1%; text-align: right; font-variant-numeric: tabular-nums; }
.rgrid .nul { color: var(--muted); font-style: italic; }
.rgrid .bool.true { color: var(--good-ink); } .rgrid .bool.false { color: var(--crit-ink); }
.rgrid .vec { font-family: var(--mono); color: var(--s5); font-size: 11.5px; }
.rgrid .chips { display: inline-flex; gap: 3px; }
.rgrid .obj { color: var(--text-2); font-size: 11.5px; }
table.t.rgrid td.sc { position: relative; min-width: 96px; }
.scbar { position: absolute; left: 0; top: 5px; bottom: 5px; background: var(--accent-soft); border-radius: 0 3px 3px 0; }
td.sc span { position: relative; }
.rchart { width: 100%; }

/* a plan */
.ptree-wrap { overflow: auto; padding: 2px 0 6px; }
.ptree, .ptree ul { display: flex; justify-content: center; list-style: none; margin: 0; padding: 0; }
.ptree ul { padding-top: 22px; position: relative; }
.ptree ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 1.5px solid var(--line-2); }
.ptree li { display: flex; flex-direction: column; align-items: center; position: relative; padding: 22px 6px 0; }
.ptree > li { padding-top: 0; }
.ptree li::before, .ptree li::after { content: ""; position: absolute; top: 0; right: 50%; width: 50%; height: 22px; border-top: 1.5px solid var(--line-2); }
.ptree li::after { right: auto; left: 50%; border-left: 1.5px solid var(--line-2); }
.ptree li:only-child::before { display: none; }
.ptree li:only-child::after { border-top: 0; }
.ptree li:first-child::before, .ptree li:last-child::after { border-top: 0; }
.ptree li:last-child:not(:only-child)::before { border-right: 1.5px solid var(--line-2); border-radius: 0 7px 0 0; }
.ptree li:first-child:not(:only-child)::after { border-radius: 7px 0 0 0; border-top: 1.5px solid var(--line-2); }
.ptree li:last-child:not(:only-child)::after { border-left: 0; }
.ptree li:first-child:not(:only-child)::before { border-top: 0; }
.ptree > li::before, .ptree > li::after, .ptree ul > li:only-child::after { display: none; }
.pn { border: 1px solid var(--line-2); border-left: 4px solid var(--c); border-radius: 8px; background: var(--surface); padding: 7px 10px; min-width: 150px; max-width: 360px; box-shadow: var(--shadow-1); text-align: left; position: relative; }
.pn .op { font-weight: 650; font-size: 13px; display: flex; gap: 6px; align-items: center; }
.pn .op svg { color: var(--c); width: 14px; height: 14px; }
.pn .dt { font-size: 11.5px; color: var(--text-2); margin-top: 2px; overflow-wrap: anywhere; white-space: normal; }
.pn .pp { font-size: 11.5px; margin-top: 3px; overflow-wrap: anywhere; }
.segs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.sg { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: var(--surface-2); }
.sg .k { font-weight: 650; font-size: 12px; display: flex; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
.sg.skip { opacity: .6; }
.sg .strat { color: var(--accent); font-weight: 600; }

/* ---------------------------------------------------------------- query builder */
.bld { display: grid; grid-template-columns: 250px minmax(0, 1fr) minmax(360px, 34%); height: calc(100vh - 52px); }
.bld-pal { border-right: 1px solid var(--line); background: var(--surface); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.bld-tables { display: flex; flex-direction: column; gap: 2px; }
.bld-tables .tt-h { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 7px; cursor: grab; font-weight: 600; border: 1px solid transparent; background: none; text-align: left; }
.bld-tables .tt-h:hover { background: var(--surface-2); }
.bld-tables .tt-h[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.bld-blocks { display: grid; grid-template-columns: 1fr; gap: 5px; }
.blk { display: flex; align-items: flex-start; gap: 9px; text-align: left; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: grab; line-height: 1.25; }
.blk:hover { border-color: var(--line-2); background: var(--surface-3); }
.blk > svg { flex: none; margin-top: 1px; color: var(--accent); }
.blk > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.blk b { font-size: 12.5px; }
.blk .small { font-size: 11px; }
.bld-fields .fi .drag, .bld .chip .drag { opacity: .35; width: 12px; height: 12px; }
.bld-fields .fi:hover { background: var(--surface-2); }
.bld-canvas { overflow: auto; padding: 18px 22px 40px; background:
  radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--line-2) 70%, transparent) 1px, transparent 0) 0 0 / 18px 18px, var(--bg); }
.bld-flow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; }
.stage { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-1); transition: border-color .12s, box-shadow .12s, opacity .12s; }
.stage.st-empty { background: color-mix(in srgb, var(--surface) 60%, transparent); border-style: dashed; }
.st-hd { display: flex; align-items: center; gap: 9px; padding: 9px 12px; }
.st-hd b { font-size: 13px; }
.st-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.st-ic svg { width: 15px; height: 15px; }
.stage.st-empty .st-ic { background: var(--surface-3); color: var(--muted); }
.st-tools { margin-left: auto; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.st-bd { padding: 0 12px 12px 47px; display: flex; flex-direction: column; gap: 8px; }
.st-hint { padding: 0 12px 11px 47px; }
.stage .item { border: 1px solid var(--line); border-radius: 9px; padding: 7px 8px; background: var(--surface-2); display: flex; flex-direction: column; gap: 5px; }
.stage .item.sig { border-left: 3px solid var(--c); }
.stage .item.src { flex-direction: row; align-items: center; gap: 8px; }
.stage .item .row.nw { gap: 7px; }
/* A crowded row (a JSON path is a long name) gives way down to widths
   that still read: the field menu, the operator, the value, the slider. */
.stage .item .row.nw > select { flex: 0 1 auto; min-width: 56px; }
.stage .item .row.nw > select:first-of-type { min-width: 110px; }
.stage .item .row.nw > input.input { flex: 0 1 auto; min-width: 64px; }
.stage .item .row.nw > input[type=range] { flex: 0 1 120px; min-width: 32px; }
.stage .item .opts { padding-left: 2px; gap: 14px; }
.stage .item .opts label { gap: 5px; cursor: pointer; }
.stage .kind { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; min-width: 84px; }
.stage .kind svg { width: 13px; height: 13px; color: var(--accent); }
.stage .item.sig .kind svg { color: var(--c); }
.stage .x { flex: none; }
.stage .fuse { gap: 8px; padding: 2px 0 0; }
.stage .vals { gap: 5px; }
.stage .vals .chip { font-size: 11.5px; }
.stage .vals .chip .muted { font-size: 10.5px; }
.stage .cols { gap: 6px; }
.stage .chip.on { border-color: var(--line-2); color: var(--text); cursor: grab; }
.stage .chip .x { cursor: pointer; padding-left: 2px; }
.bld-dragging .stage:not(.can) { opacity: .45; }
.stage.can { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.stage.can.st-empty { border-style: dashed; }
.stage.over { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.conn { position: relative; height: 34px; display: flex; align-items: center; padding-left: 47px; }
.conn .rail { position: absolute; left: 24px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.conn .rail::after { content: ""; position: absolute; left: -4px; bottom: -1px; border: 5px solid transparent; border-top-color: var(--line-2); border-bottom: 0; }
.conn.on .rail { background: var(--accent); }
.conn.on .rail::after { border-top-color: var(--accent); }
.conn .cnt { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px 1px 9px; }
.conn .fun { display: inline-block; width: 70px; height: 5px; border-radius: 3px; background: var(--surface-3); margin-left: 6px; overflow: hidden; }
.conn .fun span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.bld-right { border-left: 1px solid var(--line); background: var(--surface-2); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bld-sql pre.code { margin: 0; max-height: 34vh; }
.bld-notes { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.bld-notes .note { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); background: var(--warn-soft); border-radius: 7px; padding: 6px 8px; }
.bld-notes .note svg { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--warn); }
.bld-out .card > .hd .tools { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 1250px) { .bld { grid-template-columns: 220px minmax(0, 1fr); } .bld-right { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); } .bld { height: auto; } }
@media (max-width: 800px) { .bld { grid-template-columns: minmax(0, 1fr); } .bld-pal { border-right: 0; } }

/* ---------------------------------------------------------------- schema */
.sch { display: flex; flex-direction: column; height: calc(100vh - 52px); }
.sch-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.sch-body { flex: 1; min-height: 0; position: relative; }
.sch-diagram { height: 100%; border: 0; border-radius: 0; }
.tbl .box { rx: 11; }
.tbl .stripe { opacity: .9; }
.tbl text.t { font-size: 14px; }
.tbl .sepl { stroke: var(--line); }
.tbl .frow .rbg { fill: transparent; }
.tbl .frow:hover .rbg { fill: var(--surface-2); }
.tbl .frow.match .rbg { fill: var(--accent-soft); }
.tbl .glyph-bg { opacity: .16; }
.tbl text.glyph { font-size: 10.5px; font-weight: 700; font-family: var(--mono); }
.tbl text.fn { font-size: 12.5px; fill: var(--text); }
.tbl text.fn.key { font-weight: 700; }
.tbl text.fl { font-size: 10.5px; fill: var(--muted); font-family: var(--mono); }
.tbl.faded { opacity: .3; }
.sch-links .lk { cursor: default; }
.sch-links .lk .ln { fill: none; stroke: var(--c); stroke-width: 1.8; opacity: .8; }
.sch-links .lk .ln.dash { stroke-dasharray: 7 5; stroke-width: 2.4; }
.sch-links .lk .hit { fill: none; stroke: transparent; stroke-width: 12; }
.sch-links .lk .end { fill: var(--c); stroke: none; }
.sch-links .lk .end.stroke { fill: none; stroke: var(--c); stroke-width: 1.8; }
.sch-links .lk:hover .ln, .sch-links .lk.hot .ln { stroke-width: 2.8; opacity: 1; }
svg.focus .sch-links .lk:not(.hot) { opacity: .15; }
svg.focus .tbl:not(.hot) { opacity: .45; }
.sch-design { display: grid; grid-template-columns: 240px minmax(0, 1fr) minmax(340px, 32%); height: 100%; }
.sch-pal { border-right: 1px solid var(--line); background: var(--surface); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.sch-types { display: flex; flex-direction: column; gap: 5px; }
.sch-types .blk { align-items: center; }
.sch-types .blk .tb { flex: none; }
.sch-canvas { overflow: auto; padding: 22px; background: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--line-2) 70%, transparent) 1px, transparent 0) 0 0 / 18px 18px, var(--bg); }
.sch-card { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); overflow: hidden; }
.sch-hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--accent-soft), var(--surface)); }
.sch-hd .tname { font-weight: 700; font-size: 16px; font-family: var(--mono); background: transparent; border-color: transparent; flex: 1; }
.sch-hd .tname:hover { border-color: var(--line-2); }
.sch-fields { display: flex; flex-direction: column; padding: 6px; gap: 3px; min-height: 40px; }
.sf { border: 1px solid transparent; border-left: 3px solid var(--c); border-radius: 8px; background: var(--surface); }
.sf:hover { background: var(--surface-2); border-color: var(--line); border-left-color: var(--c); }
.sf.open { background: var(--surface-2); border-color: var(--line-2); border-left-color: var(--c); }
.sf-main { padding: 4px 6px; gap: 8px; }
.sf .grip { cursor: grab; color: var(--muted); display: inline-flex; }
.sf .grip svg { width: 14px; height: 14px; }
.sf .fname { width: 170px; font-weight: 600; }
.sf .chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.sf .chk.off { opacity: .4; cursor: default; }
.sf .chk-sp { width: 34px; }
.sf .notes { max-width: 180px; flex-shrink: 1; }
.sf .select { min-width: 118px; flex: none; }
.sf .fname { flex: 0 1 170px; min-width: 90px; }
.sf-opts { padding: 6px 12px 12px 34px; }
.sch-ph { height: 30px; border: 1.5px dashed var(--accent); border-radius: 8px; background: var(--accent-soft); }
.sch-add { margin: 0 6px 6px; padding: 10px; border: 1.5px dashed var(--line-2); border-radius: 8px; color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.sch-topts { margin: 0 12px 12px; }
.sch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 14px; padding-top: 8px; }
.sch-grid label.f > span { display: flex; flex-direction: column; gap: 1px; color: var(--text-2); font-weight: 600; }
.sch-grid .hint { font-weight: 400; font-size: 11px; line-height: 1.3; }
.sch-grid input[type=checkbox] { align-self: flex-start; }
.sch-right { border-left: 1px solid var(--line); background: var(--surface-2); padding: 12px; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.note-warn { display: flex; gap: 6px; align-items: center; background: var(--warn-soft); border-radius: 7px; padding: 6px 8px; }
.note-warn svg { color: var(--warn); }
@media (max-width: 1150px) { .sch-design { grid-template-columns: 200px minmax(0, 1fr); } .sch-right { grid-column: 1 / -1; border-left: 0; } .sch-design { height: auto; } }

/* ---------------------------------------------------------------- relevance lab */
.rl { padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 12px; }
.rl-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rl-qwrap { flex: 1 1 320px; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; }
.rl-qwrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.rl-qwrap svg { color: var(--muted); flex: none; }
.rl-q { border: 0 !important; box-shadow: none !important; flex: 1; font-size: 16px; padding: 9px 0; background: transparent; }
.rl-set { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 30px; }
.rl-set .chip .muted { font-size: 10.5px; }
.rl-cmp { display: grid; grid-template-columns: minmax(0, 1fr) 130px minmax(0, 1fr); align-items: start; }
.rl-card { border-top: 3px solid var(--c); overflow: hidden; }
.rl-hd { display: flex; align-items: center; gap: 8px; padding: 10px 12px 6px; }
.rl-letter { width: 24px; height: 24px; border-radius: 7px; display: inline-grid; place-items: center; background: var(--c); color: #fff; font-weight: 750; font-size: 13px; flex: none; }
.rl-letter.sm { width: 18px; height: 18px; font-size: 11px; border-radius: 5px; }
.rl-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 0 12px 6px; min-height: 30px; }
.rl-expr { margin: 0 12px 8px; padding: 6px 9px; background: var(--code); border: 1px solid var(--line); border-radius: 7px; color: var(--text-2); overflow-x: auto; white-space: nowrap; }
.rl-ms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rl-m { padding: 8px 12px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rl-m + .rl-m { border-left: 1px solid var(--line); }
.rl-m .lbl { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-m b { font-size: 19px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rl-m .d { font-size: 11px; font-weight: 600; }
.rl-m .d.up { color: var(--good-ink); }
.rl-m .d.down { color: var(--crit-ink); }
.rl-list { display: flex; flex-direction: column; }
.rl-row { display: flex; align-items: center; gap: 10px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.rl-row:hover { background: var(--surface-2); }
.rl-n { width: 22px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; flex: none; }
.rl-t { flex: 1; min-width: 0; line-height: 1.3; }
.rl-g { display: inline-flex; gap: 2px; flex: none; }
.rl-g button { width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 11px; font-weight: 650; cursor: pointer; padding: 0; }
.rl-g button:hover { border-color: var(--accent); color: var(--text); }
.rl-llm { flex: none; display: inline-flex; gap: 1px; align-items: baseline; margin-right: 4px; padding: 1px 5px; border: 1px dashed var(--line-2); border-radius: 6px; color: var(--muted); font-size: 10.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.rl-llm.g1 { border-color: var(--seq-3); color: var(--text); }
.rl-llm.g2 { border-color: var(--seq-4); color: var(--seq-4); }
.rl-llm.g3 { border-color: var(--seq-6); color: var(--seq-6); }
.rl-g button[aria-pressed="true"].g0 { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.rl-g button[aria-pressed="true"].g1 { background: var(--seq-2); color: var(--text); border-color: var(--seq-3); }
.rl-g button[aria-pressed="true"].g2 { background: var(--seq-4); color: #fff; border-color: var(--seq-4); }
.rl-g button[aria-pressed="true"].g3 { background: var(--seq-6); color: #fff; border-color: var(--seq-6); }
:root[data-theme="dark"] .rl-g button[aria-pressed="true"].g3 { color: #0d1626; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .rl-g button[aria-pressed="true"].g3 { color: #0d1626; } }
.rl-shift { position: relative; align-self: stretch; }
.rl-shift svg { display: block; overflow: visible; }
.rl-shift-hd { position: absolute; top: 14px; left: 0; right: 0; text-align: center; line-height: 1.3; }
.rl-shift .sh { fill: none; stroke-width: 1.6; stroke: var(--line-2); }
.rl-shift .sh.up { stroke: var(--s3); }
.rl-shift .sh.down { stroke: var(--s2); }
.rl-shift .sh.same { stroke: var(--muted); }
.rl-shift .sh.gone, .rl-shift .sh.new { stroke: var(--muted); stroke-dasharray: 3 3; }
.rl-shift .sh.good { stroke-width: 2.8; }
.rl-shift .sh:hover { stroke-width: 4; }
.rl-shift .sh-end { fill: var(--muted); }
.rl-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.rl-m.big { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.rl-m.big + .rl-m.big { border-left: 1px solid var(--line); }
.rl-m.big b { font-size: 18px; }
.rl-delta { display: flex; flex-direction: column; gap: 3px; max-height: 260px; overflow: auto; }
.rl-dr { display: grid; grid-template-columns: 150px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.rl-dr:hover { background: var(--surface-2); }
.rl-dr .bar { position: relative; height: 12px; }
.rl-dr .mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--axis); }
.rl-dr .b { position: absolute; top: 1px; bottom: 1px; border-radius: 3px; }
.rl-dr .b.pos { background: var(--s1); }
.rl-dr .b.neg { background: var(--s2); }
.rl-dr .v { text-align: right; color: var(--text-2); }
.rl-sweep { width: 100%; max-width: 760px; height: auto; display: block; }
.rl-sweep .gl { stroke: var(--grid); }
.rl-sweep .ax { fill: var(--muted); font-size: 11px; }
.rl-sweep .ax.best { fill: var(--text); font-weight: 650; }
.rl-sweep .ln { fill: none; stroke: var(--s1); stroke-width: 2; }
.rl-sweep .pt { fill: var(--s1); stroke: var(--surface); stroke-width: 2; cursor: default; }
.rl-sweep .pt.best { fill: var(--s1); stroke: var(--text); }
.rl-sweep .cur { stroke: var(--muted); stroke-dasharray: 4 4; }
@media (max-width: 1100px) { .rl-cmp { grid-template-columns: minmax(0, 1fr); } .rl-shift { display: none; } .rl-ms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- import and export */
.imp { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 14px; align-items: start; }
.imp .dropzone { padding: 42px 18px; }
.imp-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.imp-file > svg { color: var(--accent); flex: none; }
.imp-map td { vertical-align: middle; }
.imp-prog { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 200px; }
.imp-prog .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; max-width: 320px; }
.imp-prog .bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 4px; transition: width .2s; }
.imp-log { max-height: 180px; margin-top: 8px; font-size: 12px; }
@media (max-width: 1100px) { .imp { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- recsys eval */
.rx { padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 14px; }
.rx-top { display: flex; flex-direction: column; gap: 8px; }
.rx-ctl { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rx-lbl { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rx-map { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 8px; border: 1px dashed var(--line-2); border-radius: 8px; }
.rx-grades { gap: 6px; }
.rx-grade { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12px; background: var(--surface); }
.rx-grade b { min-width: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.rx-gdot { width: 9px; height: 9px; border-radius: 3px; border: 1px solid var(--line-2); }
.rx-gb { border: 0; background: var(--surface-2); color: var(--text-2); width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; padding: 0; }
.rx-gb:hover { background: var(--accent-soft); color: var(--accent); }
.rx-flow { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 2px; }
.rx-node { flex: 1 1 0; min-width: 170px; text-align: left; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font: inherit; color: inherit; }
button.rx-node { cursor: pointer; }
button.rx-node:hover { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.rx-node.last { background: var(--accent-soft); border-color: var(--accent); }
.rx-nh { display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.rx-nh svg { color: var(--accent); }
.rx-arrow { flex: 0 0 74px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; text-align: center; }
.rx-arrow span { font-size: 10.5px; line-height: 1.2; max-width: 74px; }
.rx-arrow svg { width: 60px; height: 12px; overflow: visible; }
.rx-al { stroke: var(--line-3, var(--muted)); stroke-width: 1.5; fill: none; stroke-dasharray: 4 3; animation: rx-dash 1.2s linear infinite; }
.rx-ah { stroke: var(--muted); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
@keyframes rx-dash { to { stroke-dashoffset: -14; } }
@media (prefers-reduced-motion: reduce) { .rx-al { animation: none; } }
.rx-board { display: flex; flex-direction: column; gap: 10px; }
.rx-verdict { padding: 10px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-2); font-size: 13.5px; }
.rx-verdict svg { vertical-align: -3px; color: var(--accent); }
.rx-vars { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 12px; }
.rx-var { border-top: 3px solid var(--c); overflow: hidden; }
.rx-var.ctl { box-shadow: inset 0 0 0 1px var(--line-2); }
.rx-var .rl-letter { background: var(--c); }
.rx-vfoot { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 12px; }
.rx-il { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 10px; }
.rx-il + .rx-il { border-top: 1px solid var(--line); padding-top: 10px; }
.rx-il-hd { display: flex; gap: 10px; align-items: center; }
.rx-il-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-2); }
.rx-il-bar i { display: block; height: 100%; }
.rx-il-bar .a { background: var(--s1); }
.rx-il-bar .t { background: var(--surface-3); }
.rx-il-bar .b { background: var(--s2); }
.rx-il-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.rx-il-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.rx-vfoot b { color: var(--text); font-variant-numeric: tabular-nums; }
.rx-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 1100px) { .rx-row { grid-template-columns: minmax(0, 1fr); } }
.rx-feats { display: flex; flex-direction: column; gap: 7px; }
.rx-feat { display: grid; grid-template-columns: minmax(0, 1fr) 140px 40px; gap: 10px; align-items: center; font-size: 12px; }
.rx-feat code { font-size: 11.5px; color: var(--text-2); }
.rx-feat.hdr { font-size: 11px; }
.rx-auc { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; }
.rx-auc .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--axis); }
.rx-auc i { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.rx-auc-scale { display: flex; justify-content: space-between; }
.rx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.rx-heat { transition: background .2s; }
.rx-strip { display: inline-flex; gap: 2px; vertical-align: middle; }
.rx-strip i { width: 11px; height: 14px; border-radius: 3px; display: inline-block; }
.rx-legend { display: flex; gap: 12px; align-items: center; }
.rx-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.rx-wait { display: flex; gap: 10px; align-items: center; padding: 30px; color: var(--muted); }
.rx-none { padding: 10px 16px 18px; }
.rx-howto { display: flex; flex-direction: column; gap: 8px; max-width: 760px; margin: 0 auto; }
.rx-served { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rx-srow { display: flex; align-items: center; gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.rx-srow.unshown { opacity: .55; }
.rx-glbl { width: 22px; height: 22px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; color: var(--text); }
.rx-gbtns { display: inline-flex; gap: 2px; }
.rx-fchips { display: inline-flex; gap: 4px; margin-left: 8px; }
.rx-fchip { background: var(--surface-2); border-radius: 5px; padding: 0 5px; font-size: 10.5px; }

/* ---------------------------------------------------------------- autocomplete */
.ac { padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 14px; }
.ac-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ac-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .ac-grid { grid-template-columns: minmax(0, 1fr); } }
.ac-main, .ac-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ac-demo { padding: 28px 28px 18px; background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft), transparent 60%), var(--surface); }
.ac-box { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; padding: 4px 14px; box-shadow: var(--shadow-1, 0 1px 2px rgba(0,0,0,.06)); }
.ac-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--focus); }
.ac-box > svg { color: var(--muted); width: 20px; height: 20px; flex: none; }
.ac-field { position: relative; flex: 1; min-width: 0; }
.ac-input, .ac-ghost { font: 500 20px/1.2 var(--sans, inherit); padding: 12px 0; letter-spacing: 0; }
.ac-input { position: relative; z-index: 1; width: 100%; border: 0; outline: none; background: transparent; color: var(--text); }
.ac-ghost { position: absolute; inset: 0; color: var(--muted); white-space: pre; overflow: hidden; pointer-events: none; opacity: .7; }
.ac-gin { color: transparent; }
.ac-list { margin-top: 8px; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 9px 14px; cursor: pointer; border-radius: 9px; }
.ac-item.on { background: var(--accent-soft); }
.ac-item > svg { color: var(--muted); flex: none; }
.ac-text { flex: 1; min-width: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-typed { color: var(--text-2); }
.ac-text b { font-weight: 650; }
.ac-n { display: inline-flex; align-items: center; gap: 8px; flex: none; width: 120px; justify-content: flex-end; }
.ac-bar { width: 64px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ac-bar i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.ac-status { margin-top: 10px; min-height: 18px; }
.ac-tl { display: flex; flex-direction: column; max-height: 420px; overflow: auto; }
.ac-ks { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 120px 80px 84px; gap: 12px; align-items: center; padding: 6px 14px; border-bottom: 1px solid var(--line); }
.ac-ks.now { background: var(--surface-2); }
.ac-p { font-size: 13px; white-space: nowrap; overflow: hidden; }
.ac-ks.now .ac-caret { display: inline-block; width: 1.5px; height: 14px; background: var(--accent); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ac-lat { position: relative; height: 10px; background: var(--surface-2); border-radius: 5px; }
.ac-lat i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.ac-lat .rtt { background: var(--s1); opacity: .3; }
.ac-lat .srv { background: var(--s1); }
.ac-plan pre { margin: 4px 0 0; max-height: 160px; overflow: auto; }

/* ---------------------------------------------------------------- semantic ids */
.sd { padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 12px; }
.sd-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sd-where { flex: 1 1 320px; }
.sd-crumbs { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.sd-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1100px) { .sd-grid { grid-template-columns: minmax(0, 1fr); } }
.sd-left, .sd-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sd-sunbd { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sd-svg { width: 100%; max-width: 540px; height: auto; display: block; }
.sd-sec { cursor: pointer; outline: none; }
.sd-sec path { stroke: var(--surface); stroke-width: 1.5; transition: opacity .15s; }
.sd-sec:hover > path:first-child, .sd-sec:focus-visible > path:first-child { opacity: 1 !important; stroke: var(--text); }
.sd-out:hover { opacity: 1 !important; stroke: var(--text); }
.sd-lbl { fill: var(--text); font: 600 12px var(--mono); pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; }
.sd-center circle { fill: var(--surface-2); stroke: var(--line-2); }
.sd-center.up { cursor: pointer; }
.sd-center.up:hover circle { fill: var(--accent-soft); stroke: var(--accent); }
.sd-c1 { fill: var(--text); font: 700 17px var(--mono); }
.sd-c2 { fill: var(--muted); font-size: 12px; }
.sd-c3 { fill: var(--accent); font-size: 11px; font-weight: 600; }
.sd-legend { justify-content: center; gap: 4px 14px; }
.sd-colwrap { display: flex; gap: 0; overflow-x: auto; padding: 0 !important; }
.sd-col { flex: 0 0 170px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sd-colh { display: flex; justify-content: space-between; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.sd-colb { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; padding: 4px; }
.sd-code { display: grid; grid-template-columns: 32px minmax(0, 1fr) 40px; gap: 8px; align-items: center; padding: 4px 8px; border: 0; background: none; color: inherit; border-radius: 6px; cursor: pointer; text-align: left; font: inherit; }
.sd-code:hover { background: var(--surface-2); }
.sd-code.on { background: var(--accent-soft); color: var(--accent); }
.sd-cbar { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.sd-cbar i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }
.sd-mix { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; }
.sd-mix i { display: block; min-width: 2px; }
.sd-rows { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sd-row { display: flex; gap: 10px; align-items: center; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.sd-full { color: var(--accent); flex: none; }

/* ---------------------------------------------------------------- media search */
.md { padding: 14px 18px 30px; display: flex; flex-direction: column; gap: 10px; }
.md-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.md-drop { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px dashed var(--line-2); border-radius: 10px; cursor: pointer; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.md-drop:hover, .md-drop.over { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.md-qimg { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 320px; padding: 4px 6px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.md-qimg img { height: 34px; width: 34px; object-fit: cover; border-radius: 6px; }
.md-filters { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.md-facet { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.md-facet > .small { margin-right: 4px; }
.md-sw { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; padding: 0; }
.md-sw.on { box-shadow: 0 0 0 2px var(--accent); transform: scale(1.12); }
.md-info { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.md-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.md-grid::after { content: ""; flex-grow: 999999; }
.md-tile { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: pointer; outline: none; }
.md-tile:focus-visible { box-shadow: 0 0 0 3px var(--focus); }
.md-img { position: relative; width: 100%; }
.md-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s, transform .3s; }
.md-tile.ld .md-img img { opacity: 1; }
.md-tile:hover .md-img img { transform: scale(1.04); }
.md-rank { position: absolute; top: 8px; left: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,.62); color: #fff; font: 600 11.5px/22px var(--sans, inherit); text-align: center; }
.md-score { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 11px; background: rgba(0,0,0,.62); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.md-score i { display: block; height: 4px; width: 30px; border-radius: 2px; background: #7fb2ff; }
.md-tile figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; font-size: 12px; line-height: 1.3; opacity: 0; transition: opacity .2s; }
.md-tile:hover figcaption, .md-tile:focus-visible figcaption { opacity: 1; }
.md-big img { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 10px; background: var(--surface-2); }
.md-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; border: 1px solid var(--line-2); }
.md-map { width: 100%; height: auto; max-height: 68vh; display: block; background: radial-gradient(circle at 50% 50%, var(--surface-2), transparent 70%); border-radius: 10px; }
.md-pt { stroke: var(--surface); stroke-width: 1; opacity: .55; cursor: pointer; transition: r .15s; }
.md-pt.hit { opacity: 1; stroke: var(--text); stroke-width: 1.5; }
.md-pt:hover { opacity: 1; r: 8; }
.md-ray { stroke: var(--accent); stroke-width: 1; opacity: .35; stroke-dasharray: 3 3; }
.md-q circle { fill: var(--accent); stroke: var(--surface); stroke-width: 3; }
.md-q path { stroke: #fff; stroke-width: 2; }
.md-tipimg { display: block; width: 160px; max-height: 120px; object-fit: cover; border-radius: 6px; margin: 4px 0; background: var(--surface-2); }

/* ---------------------------------------------------------------- graph explorer */
.gx { display: flex; flex-direction: column; gap: 10px; padding: 14px 18px; height: calc(100vh - 52px); min-height: 520px; }
.gx-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.gx-top .rl-qwrap { flex: 1 1 260px; }
.gx-top .rl-q { font-size: 14px; padding: 7px 0; }
.gx-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
.gx-canvas { position: relative; overflow: hidden; padding: 0; background: radial-gradient(circle at 50% 45%, var(--surface), var(--surface-2) 85%); }
.gx-stage, .gx-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gx-svg { cursor: grab; touch-action: none; }
.gx-svg.panning { cursor: grabbing; }
.gx-side { display: flex; flex-direction: column; gap: 12px; overflow: auto; min-height: 0; }
.gx-legend { position: absolute; left: 12px; top: 10px; display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); background: color-mix(in srgb, var(--surface) 85%, transparent); padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line); pointer-events: none; }
.gx-legend:empty { display: none; }
.gx-ldot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.gx-counts { position: absolute; left: 12px; bottom: 10px; pointer-events: none; }
.gx-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 4px; }
.gx-edge { stroke: var(--line-2); stroke-opacity: .9; transition: stroke-opacity .15s; }
.gx-arrowhead { fill: var(--line-2); }
.gx-node { cursor: pointer; outline: none; }
.gx-dot { stroke: var(--surface); stroke-width: 2; transition: r .15s; }
.gx-halo { fill: none; stroke: transparent; stroke-width: 3; }
.gx-lbl { font-size: 11px; fill: var(--text-2); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; opacity: 0; transition: opacity .15s; }
.gx-rank { font: 700 9.5px var(--sans, inherit); fill: #fff; pointer-events: none; }
.gx-node.big .gx-lbl, .gx-node.near .gx-lbl, .gx-node:focus-visible .gx-lbl { opacity: 1; }
.gx-node.sel .gx-halo { stroke: var(--accent); }
.gx-node.sel .gx-lbl { fill: var(--text); font-weight: 600; }
.gx-node.ranked .gx-halo { stroke: var(--warn, #d9a400); stroke-dasharray: 2 2; }
.gx-node.onpath .gx-halo { stroke: var(--accent); stroke-width: 4; }
.gx-node.pinned .gx-dot { stroke: var(--text); stroke-dasharray: 2 2; }
.gx-node:focus-visible .gx-halo { stroke: var(--focus); stroke-width: 6; }
.gx-svg.focus .gx-node:not(.near) { opacity: .28; }
.gx-svg.focus .gx-edge:not(.near) { stroke-opacity: .2; }
.gx-edge.near { stroke: var(--text-2); }
.gx-edge.onpath { stroke: var(--accent); stroke-opacity: 1; stroke-width: 3.5px !important; }
.gx-steps { list-style: none; margin: 6px 0 0; padding: 0; }
.gx-steps li { position: relative; display: flex; gap: 8px; align-items: baseline; justify-content: space-between; padding: 4px 6px 4px 22px; border-radius: 6px; font-size: 12.5px; cursor: pointer; outline: none; }
.gx-steps li:hover, .gx-steps li:focus-visible { background: var(--surface-2); }
.gx-steps li::before { content: ""; position: absolute; left: 6px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.gx-steps li + li::after { content: ""; position: absolute; left: 10px; top: -8px; height: 17px; border-left: 2px solid var(--accent); }
.gx-rrow { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-top: 1px solid var(--line); cursor: pointer; font-size: 12.5px; }
.gx-rrow:first-child { border-top: 0; }
.gx-rrow:hover { background: var(--surface-2); }
@media (max-width: 1000px) { .gx-main { grid-template-columns: 1fr; } .gx { height: auto; } .gx-canvas { height: 70vh; } }

/* ---------------------------------------------------------------- profiles */
.prof .kpi .delta { max-width: 100%; }
.flame { overflow: hidden; border-radius: var(--r-sm); }
.flame .fl-bar:hover rect, .flame .fl-bar:focus-visible rect { opacity: 1 !important; stroke: var(--text); }
.flame .fl-bar:focus { outline: none; }
.prof-tree td { white-space: nowrap; }
.prof-tree td:first-child { white-space: normal; }
.prof-tree .prof-tg { width: 22px; height: 22px; padding: 0; }
.prof-tree tr.prof-sum td { background: var(--surface-2); }
.prof-runs { display: flex; align-items: flex-end; gap: 2px; height: 34px; }
.prof-runs i { flex: 1 1 0; min-width: 3px; max-width: 22px; background: var(--s1); border-radius: 2px 2px 0 0; opacity: .75; }
.prof-runs i.sel { opacity: 1; background: var(--s7); }
.prof-set { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prof-set .input { width: 110px; }

/* ---------------------------------------------------------------- fleet */
.fleet-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 14px; align-items: start; }
.fleet-side table.t td, .fleet-side table.t th { white-space: nowrap; font-size: 12px; }
.fleet-left, .fleet-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fleet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--tile, 64px), 1fr)); gap: 6px; }
.fleet-grid.big .fleet-tile { min-height: 84px; padding: 9px 10px; }
.fleet-grid.big .fleet-tile b { font-size: 18px; line-height: 22px; }
.fleet-grid.big .fleet-tile-top { font-size: 12px; line-height: 14px; }
.fleet-grid.big .fleet-dot { width: 12px; height: 12px; }
.fleet-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-height: 64px; padding: 6px 7px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; text-align: left; font: inherit; transition: opacity .12s, transform .08s; }
.fleet-tile b { font-size: 13px; line-height: 16px; font-variant-numeric: tabular-nums; }
.fleet-tile-top { display: flex; justify-content: space-between; width: 100%; font-size: 10.5px; line-height: 12px; opacity: .85; gap: 4px; }
.fleet-delta { font-size: 9.5px; }
.fleet-tile:hover, .fleet-tile.lit { border-color: var(--text); }
.fleet-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--focus); }
.fleet-tile.faded, .fleet-host.faded { opacity: .35; }
.fleet-tile.bad { outline: 2px solid var(--crit); outline-offset: -2px; }
.fleet-tile:focus-visible, .fleet-host:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fleet-tile.fate-dark, .fleet-tile.fate-noWrites { background-image: repeating-linear-gradient(135deg, rgba(208, 59, 59, .55) 0 5px, transparent 5px 10px) !important; border-color: var(--crit); }
.fleet-tile.fate-failover { border-color: var(--warn); border-style: dashed; }
.fleet-tile.fate-serving { border-color: var(--good); border-style: dotted; }
.fleet-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: auto; }
.fleet-dot { width: 9px; height: 9px; border-radius: 2px; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .75); }
.fleet-dot.p { border-radius: 50%; }
.fleet-dot.down { background: transparent !important; box-shadow: inset 0 0 0 2px var(--crit); }
.fleet-hosts { display: flex; flex-wrap: wrap; gap: 6px; }
.fleet-host { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font: inherit; color: var(--text); min-width: 64px; transition: opacity .12s; }
.fleet-host:hover, .fleet-host.lit { border-color: var(--text); }
.fleet-host.failed { background: var(--crit-soft); border-color: var(--crit); background-image: repeating-linear-gradient(135deg, rgba(208, 59, 59, .25) 0 5px, transparent 5px 10px); }
.fleet-host-name { font-size: 10.5px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fleet-cells { display: grid; grid-template-columns: repeat(4, 12px); gap: 3px; }
.fleet-cell { width: 12px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-2); }
.fleet-hosts.big .fleet-host { min-width: 132px; padding: 10px 12px; gap: 6px; }
.fleet-hosts.big .fleet-cells { grid-template-columns: repeat(4, 18px); gap: 4px; }
.fleet-hosts.big .fleet-cell { width: 18px; height: 18px; }
.fleet-hosts.big .fleet-host-name { font-size: 12px; max-width: 150px; }
.fleet-host-sub { font-size: 10.5px; color: var(--muted); }
.fleet-cell.p { border-radius: 50%; }
.fleet-cell.down { background: transparent !important; box-shadow: inset 0 0 0 2px var(--crit); }
.fleet-ramp { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.fleet-blast.bad { border-color: var(--crit); }
.fleet-advice { padding: 8px 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.fleet-advice.crit { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.fleet-sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--accent); }
.fleet-sev.warn { background: var(--warn); }
.fleet-sev.crit { background: var(--crit); }
@media (max-width: 1100px) { .fleet-main { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- query path */
.qp-main { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 14px; align-items: start; }
.qp-runs { display: flex; align-items: flex-end; gap: 2px; height: 58px; border-bottom: 1px solid var(--line); }
.qp-run { flex: 1 1 0; min-width: 4px; max-width: 18px; padding: 0; border: 0; border-radius: 2px 2px 0 0; background: var(--s1); opacity: .55; cursor: pointer; }
.qp-run:hover, .qp-run:focus-visible { opacity: .85; }
.qp-run.sel { opacity: 1; background: var(--s2); }
@media (max-width: 1100px) { .qp-main { grid-template-columns: minmax(0, 1fr); } }

/* Control center */
.ctl-intent { background: var(--surface); border: 1px solid var(--accent); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; box-shadow: 0 0 0 3px var(--accent-soft); }
.ctl-intent > .row > .i { color: var(--accent); flex: none; }
.ctl-say { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: 14.5px; padding: 4px 0; }
.ctl-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); font: inherit; font-size: 12px; cursor: pointer; min-height: 26px; }
.ctl-chip:hover, .ctl-chip:focus-visible { color: var(--text); border-color: var(--accent); }
.ctl-main { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) minmax(320px, 400px); gap: 14px; align-items: start; }
.ctl-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ctl-shape { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; overflow-x: auto; max-width: 100%; padding-bottom: 2px; }
.ctl-grid { display: grid; align-items: start; }
.ctl-shard { display: flex; flex-direction: column; align-items: center; }
.ctl-lbl { font-size: 10px; color: var(--muted); line-height: 14px; font-variant-numeric: tabular-nums; }
.ctl-cell { display: inline-block; border-radius: 3px; box-sizing: border-box; flex: none; }
.ctl-legend .ctl-cell { width: 11px; height: 11px; vertical-align: -1px; margin-right: 5px; }
.ctl-cell.primary { background: var(--accent); }
.ctl-cell.replica { background: var(--seq-2); }
.ctl-cell.new { border: 1.5px dashed var(--good); background: var(--good-soft); }
.ctl-cell.going { background: repeating-linear-gradient(135deg, var(--crit-soft) 0 3px, var(--crit) 3px 4.5px); opacity: .9; }
.ctl-cell.down { outline: 2px solid var(--crit); outline-offset: -2px; }
.ctl-cell.none { background: transparent; }
.ctl-handle { display: flex; align-items: center; justify-content: center; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); border-radius: 6px; cursor: ew-resize; padding: 0; touch-action: none; }
.ctl-handle.shards { width: 16px; align-self: stretch; min-height: 40px; }
.ctl-handle.copies { height: 16px; width: 100%; min-width: 60px; cursor: ns-resize; }
.ctl-handle.copies .i { transform: rotate(90deg); }
.ctl-handle .i { width: 14px; height: 14px; }
.ctl-handle:hover, .ctl-handle:focus-visible { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); outline: none; }
.dragging, .dragging * { cursor: grabbing !important; user-select: none; }
.ctl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-2); }
.ctl-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ctl-stat { display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-sm); padding: 7px 10px; }
.ctl-stat b { font-size: 17px; font-variant-numeric: tabular-nums; }
.ctl-warn { gap: 8px; font-size: 13px; }
.ctl-warn.crit { color: var(--crit-ink); }
.ctl-gtitle { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.ctl-group { display: flex; flex-direction: column; gap: 2px; }
.ctl-set { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; padding: 9px 10px; border-radius: var(--r-sm); border: 1px solid transparent; }
.ctl-set:hover { background: var(--surface-2); }
.ctl-set.changed { border-color: var(--accent); background: var(--accent-soft); }
.ctl-set-l { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ctl-set-l b { font-weight: 600; white-space: nowrap; }
.ctl-path { font-family: var(--mono); font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ctl-set-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ctl-step b { min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctl-text { width: 180px; font-family: var(--mono); }
.ctl-text.wide { width: 240px; }
.ctl-imps { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0; }
.ctl-imp { display: contents; }
.ctl-imp > * { padding: 5px 0 5px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ctl-imp > :first-child { text-align: left; padding-left: 0; white-space: normal; }
.ctl-imp.hd > * { border-bottom: 0; padding-bottom: 0; }
.ctl-imp b.good { color: var(--good-ink); }
.ctl-imp b.bad { color: var(--crit-ink); }
.ctl-surv .ok { color: var(--good-ink); font-weight: 700; width: 14px; flex: none; }
.ctl-surv .no { color: var(--crit-ink); font-weight: 700; width: 14px; flex: none; }
.ctl-diff { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--code); border-radius: var(--r-sm); padding: 8px 0; overflow-x: auto; max-height: 340px; }
.ctl-dl { padding: 0 10px; white-space: pre; }
.ctl-dl.add { background: var(--good-soft); color: var(--good-ink); }
.ctl-dl.del { background: var(--crit-soft); color: var(--crit-ink); }
.ctl-dl.skip { color: var(--muted); }
.ctl-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ctl-steps li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.ctl-steps li.now { font-weight: 600; color: var(--accent); }
.ctl-steps li.ok { color: var(--good-ink); }
.ctl-steps li.bad { color: var(--crit-ink); }
.ctl-steps li.run { font-weight: 600; }
.ctl-steps.done li { color: var(--text-2); }
.ctl-call { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 2px; word-break: break-all; }
.ctl-urls { min-height: 54px; }
@media (max-width: 1400px) { .ctl-main { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); } .ctl-main > .ctl-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); } }
@media (max-width: 900px) { .ctl-main { grid-template-columns: minmax(0, 1fr); } .ctl-set { grid-template-columns: minmax(0, 1fr); } .ctl-set-r { align-items: flex-start; } }
.btn.ctl-sq { min-width: 26px; justify-content: center; }
.ctl-set.stacked { grid-template-columns: minmax(0, 1fr); }
.ctl-set.stacked .ctl-set-r { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ctl-set.stacked .ctl-text.wide { width: min(100%, 420px); }
@media (min-width: 1401px) { .ctl-col.ctl-pin { position: sticky; top: 0; max-height: calc(100vh - 92px); overflow-y: auto; scrollbar-width: thin; } }
.ctl-settings { container-type: inline-size; }
@container (max-width: 560px) {
  .ctl-set { grid-template-columns: minmax(0, 1fr); }
  .ctl-set-r { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
}

/* Rollout */
.ro-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 14px; align-items: start; }
.ro-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .ro-main { grid-template-columns: minmax(0, 1fr); } }
.ro-banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); margin-bottom: 14px; flex-wrap: wrap; }
.ro-banner > .i { width: 20px; height: 20px; flex: none; }
.ro-banner-t { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ro-banner.held { border-color: var(--warn); background: var(--warn-soft); }
.ro-banner.held > .i { color: var(--warn); }
.ro-banner.paused > .i { color: var(--muted); }
.ro-banner.back { border-color: var(--serious); }
.ro-banner.back.over { border-color: var(--good); }
.ro-banner.back.over > .i { color: var(--good); }
.ro-banner.failed { border-color: var(--crit); background: var(--crit-soft); }
.ro-banner.failed > .i { color: var(--crit); }
.ro-tag.bad { background: var(--crit-soft); color: var(--crit-ink); }
.ro-failed { color: var(--crit-ink); overflow-wrap: anywhere; }
.ro-img { font-family: var(--mono); font-size: 12px; overflow-wrap: anywhere; word-break: break-all; }
.ro-up-row { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); min-width: 0; }
.ro-up-run { display: flex; flex-wrap: wrap; gap: 4px; }
.ro-up-mode { flex-wrap: wrap; }
.ro-up-mode > div:first-child { flex: 1 1 160px; }
.ro-step-t .small { overflow-wrap: anywhere; }
.ro-steps { display: flex; flex-direction: column; gap: 4px; }
.ro-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid transparent; }
.ro-step.now { border-color: var(--accent); background: var(--accent-soft); }
.ro-step.held { border-color: var(--warn); background: var(--warn-soft); }
.ro-step-n { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); font-variant-numeric: tabular-nums; }
.ro-step.done .ro-step-n { background: var(--good-soft); color: var(--good-ink); }
.ro-step.now .ro-step-n { background: var(--accent); color: #fff; }
.ro-step.held .ro-step-n { background: var(--warn); color: #1b1b1b; }
.ro-step-n .i { width: 14px; height: 14px; }
.ro-step-t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ro-step.wait { opacity: .7; }
.ro-tag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; flex: none; }
.ro-tag.done { background: var(--good-soft); color: var(--good-ink); }
.ro-tag.now { background: var(--accent-soft); color: var(--accent); }
.ro-tag.held { background: var(--warn-soft); color: var(--text); }
.ro-bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.ro-bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s; }
.ro-step.done .ro-bar i { background: var(--good); }
.ro-step.held .ro-bar i { background: repeating-linear-gradient(135deg, var(--warn) 0 4px, color-mix(in srgb, var(--warn) 55%, transparent) 4px 8px); }
.ro-now { display: flex; gap: 8px; align-items: flex-start; color: var(--text-2); padding: 8px 10px; background: var(--surface-2); border-radius: var(--r-sm); }
.ro-now .i { flex: none; margin-top: 2px; }
.ro-axis { width: 100%; height: 46px; display: block; }
.ro-axis-l { display: flex; justify-content: space-between; margin-top: -6px; font-variant-numeric: tabular-nums; }
.ro-evs { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; scrollbar-width: thin; }
.ro-ev { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ro-ev-t { color: var(--muted); font-variant-numeric: tabular-nums; }
.ro-ev.warn { color: var(--text); background: linear-gradient(90deg, var(--warn-soft), transparent 60%); }
.ro-ev.ok span:last-child { color: var(--good-ink); }
.ro-ev.bad span:last-child { color: var(--crit-ink); }
.ro-gate { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.ro-gate.over { border-color: var(--crit); background: color-mix(in srgb, var(--crit-soft) 45%, transparent); }
.ro-gate.off .ro-chart { opacity: .7; }
.ro-val { font-size: 16px; font-variant-numeric: tabular-nums; }
.ro-over { color: var(--crit-ink); font-weight: 600; }
.ro-under { color: var(--good-ink); }
.ro-chart { width: 100%; height: 56px; display: block; background: var(--surface-2); border-radius: 4px; overflow: visible; }
.ro-grip { cursor: ns-resize; touch-action: none; outline: none; }
.ro-grip:focus-visible { fill: var(--focus); }
.ro-none { font-size: 11px; fill: var(--muted); }
.ro-num { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 4px 2px; }
.ro-vers { display: flex; flex-direction: column; gap: 4px; }
.ro-ver { border: 1px solid var(--line); border-radius: var(--r-sm); }
.ro-ver.cur { border-color: var(--accent); }
.ro-ver-h { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; padding: 8px 10px; border: 0; background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.ro-ver-h:hover, .ro-ver-h:focus-visible { background: var(--surface-2); outline: none; }
.ro-ver-n { font-variant-numeric: tabular-nums; color: var(--accent); }
.ro-ver-t { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ro-ver-b { padding: 0 10px 10px; }
.ro-num .row { flex-wrap: nowrap; flex: none; }
.ro-num > div:first-child { min-width: 0; }
.ro-run { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.ro-run-s { display: flex; flex-wrap: wrap; gap: 4px; }
.ro-srv { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-2); }
.ro-srv.p { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--text); }

/* AWS: credentials, machines by price and memory, and the plan */
/* The machines' filters go under the title when they do not fit beside it. */
.cloud-machines > .hd { flex-wrap: wrap; row-gap: 6px; }
.cloud-machines > .hd .sub { white-space: nowrap; }
.cloud-machines > .hd .tools { flex-wrap: wrap; justify-content: flex-end; }
.cloud-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: start; }
@media (max-width: 900px) { .cloud-top { grid-template-columns: minmax(0, 1fr); } }
.cloud-top + div, .cloud-top + div + div { margin-bottom: 14px; }
.cloud-form { gap: 8px; max-width: 460px; }
.cloud-field { gap: 3px; }
.cloud-field .input, .cloud-field .select { width: 100%; }
.cloud-quota { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.cloud-quota.bad { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); background: var(--crit-soft); }
.cloud-quota .barbox { height: 6px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.cloud-quota .bar { height: 100%; border-radius: 3px; }
.cloud-chart { width: 100%; height: auto; max-height: 340px; display: block; }
.cloud-grid { stroke: var(--line); stroke-width: 1; }
.cloud-ax { font-size: 10.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.cloud-dot { stroke-width: 1.5; cursor: pointer; opacity: .9; transition: r .1s; }
.cloud-dot:hover, .cloud-dot:focus-visible { opacity: 1; stroke-width: 2.5; outline: none; }
.cloud-dot.on { stroke: var(--text) !important; stroke-width: 2.5; opacity: 1; }
.cloud-rec { fill: none; stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 2 2; pointer-events: none; }
.cloud-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.cloud-sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid; box-sizing: border-box; flex: none; }
.cloud-sw.ring { border: 1px dashed var(--text-2); width: 12px; height: 12px; }
.cloud-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.cloud-step { display: flex; flex-direction: column; gap: 3px; }
.cloud-step .row b { min-width: 34px; text-align: center; }
.cloud-plan { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cloud-plan { grid-template-columns: minmax(0, 1fr); } }
.cloud-plan h4, .card h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.cloud-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.cloud-node { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); }
.cloud-node .barbox { height: 5px; background: var(--surface-3); border-radius: 3px; overflow: hidden; }
.cloud-node .bar { height: 100%; background: var(--s3); }
.cloud-copies { display: flex; flex-wrap: wrap; gap: 4px; min-height: 22px; }
.cloud-copy { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, var(--surface)); border: 1px solid var(--c); color: var(--text); }
.cloud-copy small { margin-left: 2px; color: var(--muted); }
.cloud-totals { display: flex; gap: 18px; flex-wrap: wrap; font-size: 18px; }
.cloud-stack { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.cloud-stack > span { display: block; height: 100%; }
.cloud-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cloud-line > span:first-child { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.cloud-line > span:first-child .cloud-sw { transform: translateY(1px); }
.cloud-line > span:last-child { white-space: nowrap; }
.cloud-warn { gap: 6px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-soft, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--warn, var(--s4)) 45%, var(--line)); }
.cloud-warn .i { color: var(--warn-ink, var(--s4)); flex: none; margin-top: 1px; }
.cloud-cmds { display: flex; flex-direction: column; gap: 4px; }
.cloud-cmds code { background: var(--sunken); padding: 3px 8px; border-radius: 4px; overflow-x: auto; white-space: pre; flex: 1; min-width: 0; }
/* Clusters made from the Cloud view */
.cloud-made { margin-bottom: 14px; }
.cloud-made-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.cloud-made-row details summary { cursor: pointer; color: var(--text-2); }
.cloud-track { display: flex; gap: 4px; }
.cloud-stage { flex: 1; text-align: center; font-size: 11px; font-weight: 600; padding: 3px 4px; border-radius: 4px; background: var(--surface-3); color: var(--muted); border-bottom: 3px solid transparent; }
.cloud-stage.done { background: var(--good-soft); color: var(--good-ink); border-bottom-color: var(--good); }
.cloud-stage.now { background: var(--accent-soft); color: var(--accent); border-bottom-color: var(--accent); animation: cloud-now 1.6s ease-in-out infinite; }
@keyframes cloud-now { 50% { border-bottom-color: transparent; } }
@media (prefers-reduced-motion: reduce) { .cloud-stage.now { animation: none; } }
.cloud-steps { max-height: 220px; overflow-y: auto; gap: 3px; margin-top: 6px; }
.cloud-steps .num { flex: none; }

/* A JSON field's paths ([paths.js]): a tree of keys, each with the share
   of rows holding it, the mix of its value types and what they are. */
.pt { display: flex; flex-direction: column; gap: 8px; }
.pt .input[type=search] { width: 220px; }
.pt-list { display: flex; flex-direction: column; max-height: 52vh; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pt-row { display: grid; grid-template-columns: minmax(120px, 1.4fr) minmax(60px, 1fr) 40px 56px minmax(90px, 1.3fr); align-items: center; gap: 8px; padding: 5px 10px 5px 4px; cursor: pointer; border-bottom: 1px solid var(--line); }
.pt-name { display: flex; align-items: center; gap: 2px; min-width: 0; padding-left: calc(var(--d, 0) * 16px); }
.pt-row:last-child { border-bottom: 0; }
.pt-row:hover { background: var(--surface-2); }
.pt-row.on { background: var(--accent-soft); }
.pt-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.pt-tog { flex: none; width: 18px; height: 18px; display: grid; place-items: center; border: 0; padding: 0; background: none; color: var(--muted); border-radius: 4px; cursor: pointer; }
.pt-tog:hover { background: var(--surface-3); color: var(--text); }
.pt-tog svg { width: 12px; height: 12px; }
.pt-key { font-size: 12.5px; color: var(--text); }
.pt-share { height: 7px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.pt-share > i { display: block; height: 100%; border-radius: 4px; background: var(--s6); }
.pt-pct { text-align: right; }
.pt-mix { display: flex; height: 7px; border-radius: 4px; overflow: hidden; gap: 1px; background: var(--surface-3); }
.pt-mix > i { display: block; min-width: 3px; }
.pt-mix > i.obj { flex: 1; background: repeating-linear-gradient(90deg, var(--line-2) 0 3px, transparent 3px 6px); }
.pt-sum { min-width: 0; }
.pt-detail { display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 10px 28px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pt-detail code { background: var(--code); padding: 1px 6px; border-radius: 4px; }
.pt-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 14px; }
.pt-val { display: grid; grid-template-columns: minmax(60px, 1fr) 70px 38px; gap: 8px; align-items: center; color: inherit; text-decoration: none; padding: 2px 4px; border-radius: 4px; font-size: 12px; }
.pt-val:hover { background: var(--surface-3); }
.pt-vbar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.pt-vbar > i { display: block; height: 100%; }
@media (max-width: 720px) { .pt-row { grid-template-columns: 1fr 50px 40px; } .pt-row .pt-mix, .pt-row .pt-sum { display: none; } }
/* The builder's palette: a JSON field's paths under it, each a field. */
.bld-fields .fi-path { padding-left: 18px; }
.bld-fields .fi-path .tb { width: 14px; height: 14px; font-size: 11px; }
.fi-share { width: 34px; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; }
.fi-share > i { display: block; height: 100%; background: var(--s6); }

/* ---------------------------------------------------------------- autoscaling */
.as-main { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 14px; align-items: start; }
.as-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 1100px) { .as-main { grid-template-columns: minmax(0, 1fr); } }
.as-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); margin-bottom: 14px; color: var(--text-2); }
.as-note > .i { flex: none; margin-top: 2px; }
.as-live { display: flex; gap: 14px 22px; padding: 12px 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); margin-bottom: 14px; flex-wrap: wrap; align-items: flex-start; }
.as-live-n { display: flex; flex-direction: column; gap: 1px; min-width: 120px; }
.as-live-n b { font-size: 20px; font-variant-numeric: tabular-nums; }
.as-live-t { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.as-live-log { flex: 1 1 100%; display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 6px; }
.as-sg { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--accent); background: var(--accent-soft); flex-wrap: wrap; }
.as-sg > .i { flex: none; margin-top: 2px; color: var(--accent); }
.as-rules { display: flex; flex-direction: column; gap: 12px; }
.as-rule { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.as-rule.off .as-text { color: var(--muted); }
.as-rule-r { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.as-kind { font-size: 11px; font-weight: 600; text-align: center; padding: 2px 0; border-radius: 999px; margin-top: 2px; background: var(--surface-3); color: var(--text-2); }
.as-kind.grow { background: color-mix(in srgb, var(--s1) 18%, transparent); color: var(--text); }
.as-kind.shrink { background: color-mix(in srgb, var(--s2) 20%, transparent); color: var(--text); }
.as-kind.data { background: var(--warn-soft); color: var(--text); }
.as-kind.guard { background: color-mix(in srgb, var(--s5) 18%, transparent); color: var(--text); }
.as-text { margin: 0; line-height: 1.75; font-size: 14px; }
.as-word { font: inherit; color: var(--accent); background: none; border: 0; padding: 0 1px; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; text-decoration-thickness: 1.5px; border-radius: 4px; }
.as-word:hover, .as-word.open { background: var(--accent-soft); text-decoration-style: solid; }
.as-word:disabled { color: inherit; cursor: default; text-decoration: none; }
.as-choices { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 74px; }
.as-choice { font: inherit; font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; }
.as-choice:hover { color: var(--text); border-color: var(--accent); }
.as-choice[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.as-did { padding-left: 74px; }
.as-replay > .hd { flex-wrap: wrap; row-gap: 6px; }
.as-replay > .hd h3 { white-space: nowrap; }
.as-replay > .hd .tools { flex-wrap: wrap; justify-content: flex-end; }
.as-replay > .hd .tools > .small { white-space: nowrap; }
.as-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 10px; }
.as-kpi { display: flex; flex-direction: column; gap: 2px; padding: 9px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); min-width: 0; }
.as-kpi b { font-size: 18px; font-variant-numeric: tabular-nums; }
.as-kpi b.good { color: var(--good-ink); }
.as-kpi b.bad { color: var(--crit); }
.as-plot { position: relative; height: 220px; }
.as-chart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.as-y { position: absolute; left: 4px; top: 0; font-variant-numeric: tabular-nums; }
.as-y-sat { left: auto; right: 4px; transform: translateY(-110%); color: var(--crit); }
.as-hover { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--text-2); opacity: .45; display: none; pointer-events: none; }
.as-mark { position: absolute; top: -2px; transform: translateX(-50%); font-size: 11px; line-height: 1; cursor: default; color: var(--s1); }
.as-mark.shrink { color: var(--s2); }
.as-mark.volumes { color: var(--warn); }
.as-mark.suggested, .as-mark.applied { color: var(--accent); }
.as-days { display: flex; gap: 2px; }
.as-day { font: inherit; font-size: 12px; min-width: 0; padding: 4px 2px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text-2); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; justify-content: center; white-space: nowrap; overflow: hidden; }
.as-day[aria-pressed="true"] { background: var(--surface); color: var(--text); border-color: var(--accent); }
.as-dot { font-size: 10.5px; font-weight: 700; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; }
.as-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.as-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.as-sw { display: inline-block; width: 14px; height: 2px; }
.as-sw.dash { height: 0; border-top: 2px dashed var(--muted); }
.as-sw.box { width: 12px; height: 10px; }
.as-strip { display: flex; flex-direction: column; gap: 3px; }
.as-strip-p { position: relative; height: 40px; }
.as-strip-p svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.as-strip-v { position: absolute; right: 4px; top: 0; }
.as-evs { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; scrollbar-width: thin; }
.as-ev { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.as-ev.caught-up, .as-ev.freeze { color: var(--text-2); }
.as-live-log .as-ev { grid-template-columns: 78px minmax(0, 1fr); }

/* Index inspector: the scope map (cluster > shards > replicas, each a
   button), tiles, and a 12-column grid of cards that falls to one column. */
.ix-scope { display: flex; flex-direction: column; gap: 10px; }
.ix-cluster { border: 1.5px solid var(--line-2); border-radius: 9px; padding: 8px 12px; cursor: pointer; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; background: var(--surface-2); }
.ix-shards { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.ix-shard { border: 1.5px solid var(--line); border-radius: 9px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ix-shard-hd { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; padding: 2px 4px; border-radius: 6px; }
.ix-reps { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.ix-n { font-variant-numeric: tabular-nums; }
.ix-rep { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; cursor: pointer; background: var(--surface); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ix-rep:hover, .ix-cluster:hover, .ix-shard-hd:hover { border-color: var(--line-2); background: var(--surface-2); }
.ix-u { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-rep > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-scope .sel, .ix-shard.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.ix-scope [role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ix-bad { color: var(--crit-ink); }
.ix-chip { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ix-chip.exact { background: var(--good-soft); color: var(--good-ink); }
.ix-chip.est { background: var(--warn-soft); color: var(--text); }
.ix-chip.prim { background: var(--accent-soft); color: var(--accent); }
.ix-tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 14px; }
.ix-tile .val { font-size: 22px; }
.ix-tsub { margin-top: 2px; line-height: 1.35; }
.ix-grid { display: grid; gap: 14px; grid-template-columns: repeat(12, minmax(0, 1fr)); }
.ix-c12 { grid-column: span 12; } .ix-c7 { grid-column: span 7; } .ix-c6 { grid-column: span 6; } .ix-c5 { grid-column: span 5; } .ix-c4 { grid-column: span 4; }
@media (max-width: 1100px) { .ix-c4 { grid-column: span 6; } }
@media (max-width: 900px) { .ix-c7, .ix-c6, .ix-c5, .ix-c4 { grid-column: span 12; } }
.ix-svg { display: block; overflow: visible; }
.ix-svg text, .ix-ring text { fill: var(--muted); font: 11px var(--sans); }
.ix-svg .ix-lbl, .ix-ring .ix-lbl { fill: var(--text); font-weight: 600; }
.ix-svg text.ix-on { fill: #fff; font-weight: 650; font-size: 12px; pointer-events: none; }
.ix-svg text.ix-on.dim { font-weight: 400; font-size: 11px; opacity: .92; }
.ix-svg text.ix-on.ink { fill: #15181d; }
.ix-marks { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; margin-bottom: 2px; }
.ix-marks span b { color: var(--s2); }
.ix-svg g[tabindex]:focus-visible rect, .ix-svg rect[tabindex]:focus-visible, .ix-svg circle[tabindex]:focus-visible { outline: none; stroke: var(--text); stroke-width: 2; }
.ix-grid-line { stroke: var(--grid); }
.ix-bar { fill: var(--s1); }
.ix-bar2 { fill: var(--s3); }
.ix-mark { stroke: var(--s2); stroke-dasharray: 3 3; }
.ix-lane { stroke: var(--line-2); }
.ix-write { fill: var(--good); }
.ix-behind { fill: var(--warn); }
.ix-file { fill: var(--surface); stroke: var(--s1); stroke-width: 2; }
.ix-empty { fill: var(--surface-3); }
.ix-even { stroke: var(--axis); stroke-dasharray: 4 4; }
.ix-curve { fill: none; stroke: var(--s2); stroke-width: 2.2; }
.ix-dot { fill: var(--s2); }
.ix-ring { display: block; max-width: 220px; margin: 0 auto; }
.ix-ring-bg { fill: none; stroke: var(--surface-3); stroke-width: 18; }
.ix-ring-fg { fill: none; stroke: var(--s3); stroke-width: 18; }
.ix-ring .ix-big { font-size: 24px; }
.ix-dl { display: grid; grid-template-columns: auto auto; gap: 2px 14px; justify-content: center; margin: 6px 0; }
.ix-dl dt { color: var(--muted); } .ix-dl dd { margin: 0; }
.ix-facts { display: flex; gap: 6px 18px; flex-wrap: wrap; margin-top: 6px; }
.ix-key::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; background: var(--c); vertical-align: -1px; }
.ix-spark { display: block; }
.ix-foot { margin: 14px 2px 0; max-width: 980px; line-height: 1.5; }

/* ===== shell ===== */
/* Shared helpers: a panel whose data is old, the fields of a confirm, an action the key cannot take. */
.stale { position: relative; }
.stale > .bd, .stale > .hd .sub, .stale .val, .stale svg:not(.i) { opacity: .45; filter: grayscale(1); }
.stale-age { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-2); background: var(--surface-3); border-radius: 999px; padding: 0 8px; white-space: nowrap; font-weight: 500; }
.confirm-field { display: flex; flex-direction: column; gap: 5px; }
.btn.gated, button.gated { cursor: not-allowed; }
/* The top bar: environment, window, live state, share. */
.top .env { display: inline-flex; align-items: center; font-weight: 700; font-size: 11px; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line-2); white-space: nowrap; }
.top .env.prod { background: color-mix(in srgb, var(--s7) 18%, transparent); color: var(--s7); border-color: color-mix(in srgb, var(--s7) 65%, transparent); }
.top.prod { box-shadow: inset 0 3px 0 var(--s7); }
.top .crumbs { flex: none; max-width: 280px; overflow: hidden; }
.top .env, .top .seg, .top .abs, .top > .btn, .top .bell { flex: none; }
.top .search-btn { flex: 0 1 260px; min-width: 110px; overflow: hidden; }
.top .search-btn span { overflow: hidden; text-overflow: ellipsis; }
.top .abs { font: 12px var(--mono); color: var(--text-2); border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px; padding: 4px 8px; white-space: nowrap; cursor: pointer; }
.top .abs:hover { border-color: var(--line-2); color: var(--text); }
.top .abs.fixed { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.top .seg button { padding: 4px 9px; }
.btn.live .fresh { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.btn.live .dot { width: 7px; height: 7px; }
.btn.live.paused { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.live.down { background: var(--crit-soft); border-color: var(--crit); color: var(--crit-ink); }
.btn.live.stale { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 60%, var(--line-2)); }
.top .bellc { position: absolute; top: -3px; right: -4px; font-size: 10px; min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--crit); color: #fff; text-align: center; font-weight: 700; }
.top .who span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1360px) { .top .search-btn { min-width: 0; } .top .search-btn span, .top .who span, .top .btn .lbl { display: none; } }
@media (max-width: 1100px) { .top .abs { display: none; } }
/* The server does not answer. */
.downbar { grid-column: 2; grid-row: 2; display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--crit-soft); color: var(--text); border-bottom: 1px solid color-mix(in srgb, var(--crit) 50%, var(--line)); font-size: 13px; }
.downbar > svg.i { color: var(--crit); }
.downbar b { color: var(--crit-ink); }
body.not-answering .card .bd, body.not-answering .kpi .val, body.not-answering .banner { filter: grayscale(.85); opacity: .6; }
/* The palette: entities with what to do about them. */
.palette { width: min(760px, 94vw); }
.palette .it .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette .it .nm.mono { font-family: var(--mono); font-size: 12.5px; }
.palette .it .s { color: var(--text-2); font-family: var(--sans); font-size: 13px; }
.palette .it .h { flex: none; }
.palette .it .h.acts { opacity: 0; font-size: 11px; }
.palette .it.on .h.acts { opacity: 1; }
.palette .it .h + .h { margin-left: 10px; }
.palette .foot .sep { flex: 1; }
.palette .grp .btn { margin-right: 8px; }
.palette .pal-in { display: flex; align-items: center; gap: 6px; padding: 0 10px 0 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.palette .pal-in input { border-bottom: 0; padding: 15px 6px; min-width: 0; flex: 1; color: var(--text); }
.palette .pal-close { display: none; }
.palette .it button.h.acts { border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; padding: 2px 4px; border-radius: 5px; }
.palette .it button.h.acts:hover { color: var(--text); background: var(--surface-3); }
.kv.shortcuts { grid-template-columns: minmax(150px, max-content) minmax(0, 1fr) minmax(150px, max-content) minmax(0, 1fr); }
/* Home */
.home-banner { align-items: flex-start; }
.home-banner .bic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.home-banner.ok .bic { background: var(--good-soft); color: var(--good); }
.home-banner.warn .bic { background: var(--warn-soft); color: var(--warn); }
.home-banner.bad .bic { background: var(--crit-soft); color: var(--crit); }
.home-banner.unknown { border-color: var(--line-2); background: var(--surface-2); }
.home-banner .big { line-height: 1.3; }
.home-banner .small { margin-top: 3px; }
.home-bacts { flex: none; gap: 6px; justify-content: flex-end; max-width: 46%; }
.home-chips { gap: 6px; margin-top: 7px; }
.home-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; text-decoration: none; }
a.home-chip:hover { color: var(--text); text-decoration: none; }
.home-chip.ack { background: var(--accent-soft); color: var(--accent); }
.home-chip.warn { background: var(--warn-soft); color: var(--text); }
.home-chip svg.i { width: 13px; height: 13px; color: var(--warn); }
.home-kpis { margin-bottom: 14px; }
.home-kpi { text-decoration: none; color: inherit; }
.home-kpi:hover { text-decoration: none; border-color: var(--line-2); }
.home-kpi .delta { max-width: 100%; white-space: normal; line-height: 1.35; min-height: 2.7em; }
.home-kpi svg.spark { top: 32px; bottom: auto; height: 26px; width: 36%; right: 10px; }
.home-kpi.bad { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.home-kpi.bad .val, .home-kpi.bad .delta { color: var(--crit-ink); }
.home-kpi.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.home-kpi.warn .val { color: color-mix(in srgb, var(--warn) 75%, var(--text)); }
.home-row { margin-bottom: 14px; align-items: start; }
.home-wherecard .tools { flex-wrap: wrap; justify-content: flex-end; }
.home-wherecard > .hd { flex-wrap: wrap; row-gap: 6px; }
.home-heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(27px, 1fr)); gap: 4px; }
.home-heat.big { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.home-heat .hc { position: relative; height: 38px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: 10px; color: var(--muted); padding: 2px 3px; line-height: 12px; overflow: hidden; text-align: left; cursor: pointer; font-family: var(--sans); display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; min-width: 0; }
.home-heat.big .hc { height: 74px; padding: 6px 8px; font-size: 12px; line-height: 15px; }
.home-heat .hc:hover { border-color: var(--line-2); color: var(--text); }
.home-heat .hc .n { font-variant-numeric: tabular-nums; }
.home-heat.big .hc .n::before { content: "shard "; }
.home-heat .hc em { font-style: normal; font-weight: 700; font-size: 8.5px; letter-spacing: -.02em; white-space: nowrap; line-height: 10px; }
.home-heat.big .hc em { font-size: 11px; line-height: 14px; }
.home-heat .hc .names { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; font-size: 11.5px; color: var(--text-2); }
.home-heat .hc .names .crit { color: var(--crit-ink); }
.home-heat .hc .names .down { color: var(--crit-ink); text-decoration: line-through; }
.home-heat .hc .names .warn { color: color-mix(in srgb, var(--warn) 70%, var(--text)); }
.home-heat .hc.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 70%, transparent); color: var(--text); }
.home-heat .hc.warn em { color: color-mix(in srgb, var(--warn) 80%, var(--text)); }
.home-heat .hc.crit { background: var(--crit-soft); border-color: var(--crit); color: var(--text); }
.home-heat .hc.crit em { color: var(--crit-ink); }
.home-heat .pips, .home-legend .pips { position: absolute; left: 4px; bottom: 4px; display: flex; gap: 2px; }
.home-heat.big .pips { left: 8px; bottom: 7px; gap: 3px; }
.home-where .pip, .home-legend .pip { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--line-2); }
.home-where .pip.p, .home-legend .pip.p { border-radius: 50%; }
.home-where .pip.warn { background: var(--warn); } .home-where .pip.crit { background: var(--crit); }
.home-where .pip.down, .home-legend .pip.down { background: transparent; box-shadow: inset 0 0 0 1.5px var(--crit); }
.home-legend { gap: 14px; margin-top: 10px; }
.home-legend span { display: inline-flex; align-items: center; gap: 5px; }
.home-legend i.lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line-2); }
.home-legend i.lg.warn { background: var(--warn-soft); border-color: var(--warn); } .home-legend i.lg.crit { background: var(--crit-soft); border-color: var(--crit); }
.home-zones { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 12px; }
.home-zone { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; text-decoration: none; min-width: 0; }
.home-zone:hover { text-decoration: none; border-color: var(--line-2); }
.home-zone.crit { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.home-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; max-height: 420px; overflow: auto; }
.home-groups.zones { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); max-height: none; }
.home-group { border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--surface-2); min-width: 0; }
.home-group.crit { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); }
.home-group.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.home-copies { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.hcopy { font: 10px var(--mono); padding: 1px 4px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); cursor: pointer; }
.hcopy.p { font-weight: 700; }
.hcopy.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--text); }
.hcopy.crit { background: var(--crit-soft); border-color: var(--crit); color: var(--crit-ink); }
.hcopy.down { text-decoration: line-through; }
.home-probs { gap: 8px; }
.prob { display: flex; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.prob .sv { width: 4px; border-radius: 2px; flex: none; background: var(--warn); }
.prob.crit .sv { background: var(--crit); }
.prob .pt { font-weight: 650; font-size: 13px; line-height: 1.35; }
.prob .small { line-height: 1.4; }
.home-next { display: flex; gap: 4px; align-items: flex-start; margin-top: 3px; color: var(--text); }
.home-next svg.i { width: 14px; height: 14px; margin-top: 1px; color: var(--accent); }
.home-pacts { gap: 5px; margin-top: 6px; }
.home-oklist { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--text-2); }
.home-oklist li { display: flex; gap: 7px; align-items: center; }
.home-oklist svg.i { color: var(--good); width: 14px; height: 14px; }
.home-since { margin-bottom: 14px; }
.home-since > .hd { flex-wrap: wrap; row-gap: 4px; }
.home-since-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; }
@media (max-width: 1280px) { .home-since-grid { grid-template-columns: minmax(0, 1fr); } }
.home-clabel { margin: 2px 0 -6px 46px; }
.home-lane { position: relative; height: 50px; border-top: 1px solid var(--line); margin-top: 2px; overflow: hidden; }
.home-lane .ev { position: absolute; transform: translateX(-1px); font-size: 10.5px; color: var(--text-2); white-space: nowrap; border-left: 2px solid var(--line-2); padding-left: 4px; line-height: 14px; text-decoration: none; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
.home-lane .ev:hover { color: var(--text); z-index: 2; background: var(--surface); }
.home-lane .ev.accent { border-color: var(--accent); } .home-lane .ev.crit { border-color: var(--crit); } .home-lane .ev.warn { border-color: var(--warn); }
.home-lane .ev b { font-family: var(--mono); font-weight: 600; color: var(--text); }
.home-evside { border-left: 1px solid var(--line); padding-left: 16px; min-width: 0; }
@media (max-width: 1280px) { .home-evside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 10px; } }
.home-evhead { gap: 8px; margin-bottom: 6px; }
.home-evlist { display: flex; flex-direction: column; gap: 2px; max-height: 380px; overflow: auto; }
.home-ev { display: grid; grid-template-columns: 62px 64px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 4px 6px; border-radius: 6px; color: inherit; text-decoration: none; }
.home-ev:hover { background: var(--surface-2); text-decoration: none; }
.home-kind { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; text-align: center; font-weight: 600; }
.home-kind.crit { background: var(--crit-soft); color: var(--crit-ink); }
.home-kind.warn { background: var(--warn-soft); color: var(--text); }
.home-kind.accent { background: var(--accent-soft); color: var(--accent); }
.home-kind.note { background: var(--surface-3); color: var(--text); }
.home-cap { gap: 12px; }
.home-caprow .lbl { min-width: 84px; }
.home-meter { display: block; position: relative; height: 6px; border-radius: 3px; background: var(--surface-3); margin-top: 5px; }
.home-meter > i { display: block; height: 100%; border-radius: 3px; background: var(--s1); }
.home-meter.warn > i { background: var(--warn); } .home-meter.crit > i { background: var(--crit); }
.home-meter .med { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-2); }
td.home-bad { color: var(--crit-ink); }
.home-who { display: grid; grid-template-columns: 124px minmax(0, 1fr) 40px; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.home-who:hover { text-decoration: none; }
.home-who .nm { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-who .home-meter { margin-top: 0; }
.home-who.bad .num { color: var(--crit-ink); }
/* Timeline */
.tl-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tl-tile { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: inherit; text-decoration: none; min-width: 0; }
a.tl-tile:hover { text-decoration: none; border-color: var(--line-2); }
.tl-tile .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-tile .small { line-height: 1.35; }
.tl-tile.crit { border-color: color-mix(in srgb, var(--crit) 55%, var(--line)); } .tl-tile.crit .v { color: var(--crit-ink); }
.tl-tile.warn { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.tl-sumcard { margin-bottom: 14px; }
.tl-sumcard + .card { margin-bottom: 14px; }
.tl-chips { gap: 5px; }
.tl-axiscard { --tl-name: 150px; }
.tl-chartrow { display: grid; grid-template-columns: var(--tl-name) minmax(0, 1fr); gap: 0; align-items: start; }
.tl-lname { font-size: 12.5px; color: var(--text-2); display: flex; flex-direction: column; padding-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-lane { display: grid; grid-template-columns: var(--tl-name) minmax(0, 1fr); align-items: center; height: 30px; }
.tl-lane .tl-lname { flex-direction: row; gap: 4px; padding: 0; }
.tl-lane.tall { height: auto; min-height: 30px; padding: 3px 0; }
.tl-lname .tl-short { display: none; }
.tl-track { position: relative; height: 22px; background: linear-gradient(var(--surface-2), var(--surface-2)) 46px 0 / calc(100% - 60px) 100% no-repeat; border-radius: 4px; }
.tl-ev { position: absolute; top: 3px; height: 16px; display: flex; align-items: center; gap: 5px; text-decoration: none; color: var(--text-2); font-size: 11px; white-space: nowrap; min-width: 10px; transform: translateX(-5px); }
.tl-ev:hover { z-index: 3; color: var(--text); text-decoration: none; }
.tl-ev:hover .lbl { background: var(--surface); }
.tl-ev i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; box-shadow: 0 0 0 2px var(--surface); }
.tl-ev.span { transform: none; }
.tl-ev.span i { width: 100%; min-width: 6px; height: 10px; border-radius: 3px; position: absolute; left: 0; box-shadow: none; opacity: .85; }
.tl-ev.span .lbl { position: absolute; left: calc(100% + 6px); }
.tl-ev.crit i { background: var(--crit); } .tl-ev.warn i { background: var(--warn); } .tl-ev.accent i { background: var(--accent); } .tl-ev.note i { background: var(--text-2); } .tl-ev.info i { background: var(--s3); }
.tl-ev.nolbl .lbl { display: none; }
.tl-ev.nolbl:hover .lbl { display: inline; }
.tl-ev.focus i { outline: 2px solid var(--accent); outline-offset: 2px; }
.tl-ev .lbl { overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.tl-tile .small.muted { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tl-ev.left { flex-direction: row-reverse; transform: translateX(calc(-100% + 5px)); }
.tl-ev.span.left { transform: none; }
.tl-ev.span.left .lbl { left: auto; right: calc(100% + 6px); }
.tl-axis { position: relative; height: 18px; margin-left: var(--tl-name); font-size: 11px; color: var(--muted); }
.tl-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.tl-list td { vertical-align: top; }
.tl-strong { font-weight: 650; }
/* Narrow screens. Breakpoints: 900 px (the sidebar is a drawer, the top bar
   folds, drawers, dialogs and the palette are full-screen sheets) and 560 px
   (a phone upright: one column). Same numbers as NARROW and PHONE in core.js. */
.top .hamb, .top .more, .nav-scrim { display: none; }
.more-sheet .more-ranges { display: flex; }
.more-sheet .more-ranges button { flex: 1; }
.more-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 4px; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.more-row small { display: block; color: var(--muted); font-size: 12px; }
.more-row .chev { color: var(--muted); }
.more-sheet hr { border: 0; margin: 4px 0; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); height: 100dvh; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 86vw); z-index: 66; transform: translateX(-104%); transition: transform .2s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-3); }
  .shell.nav-open .side { transform: none; }
  .shell.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(8, 10, 14, .42); }
  .side-foot { display: none; }
  .nav a { min-height: 40px; }
  .nav a .kb { display: none; }
  .nav a.lab .pin { opacity: 1; padding: 8px; }
  .nav .labs-toggle { min-height: 40px; }
  .top, .downbar, .content { grid-column: 1; }
  .top { gap: 4px; padding: 0 8px; }
  .top .hamb, .top .more { display: inline-flex; }
  .top .seg, .top .abs, .top .chip, .top > .btn:has(> .lbl):not(.more), .top .who, .top > .btn[title^="Light"] { display: none; }
  .top .crumbs { flex: 1 1 auto; min-width: 0; max-width: none; }
  .top .crumbs .sub { display: none; }
  .top .sep { display: none; }
  .top .search-btn { flex: none; min-width: 40px; padding: 0; justify-content: center; border: 0; background: none; }
  .top .search-btn kbd { display: none; }
  .top .more.fixed { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
  .top .more .lbl { display: inline; }
  .top.no-range .more .lbl { display: none; }
  .top .btn.live.ok { border-color: transparent; background: none; }
  /* Home and Timeline. */
  .home-row > .home-probcard { order: -1; }
  .home-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .home-since-grid { grid-template-columns: minmax(0, 1fr); }
  .home-evside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .home-wherecard > .hd .tools { justify-content: flex-start; }
  .btn.live .fresh { display: none; }
  .downbar { padding: 8px 12px; flex-wrap: wrap; }
  .content { overflow-x: hidden; }
  .card > .bd:has(> table.t) { overflow-x: auto; }
  /* Tap targets. */
  .btn, .seg button, .tabs > *, .menu button, .chip, select, input.input, .input { min-height: 40px; }
  .btn.icon { min-width: 40px; }
  input.input, select, textarea.input, .palette input { font-size: 16px; } /* smaller zooms the page on focus in iOS */
  /* Sheets: drawers, dialogs, the palette. */
  .drawer, .drawer.wide { width: 100vw; border-left: 0; }
  .modal, .modal.wide { inset: 0; top: 0; left: 0; transform: none; width: 100vw; height: 100dvh; max-height: none; border-radius: 0; border: 0; animation: slideup .2s cubic-bezier(.2, .8, .2, 1); }
  .modal > .bd { flex: 1; }
  .palette { inset: 0; top: 0; left: 0; transform: none; width: 100vw; height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; }
  .palette .list { max-height: none; flex: 1; }
  .palette .foot { display: none; }
  .palette .pal-close { display: inline-flex; }
  .palette .pal-in input { font-size: 17px; }
  .palette .it { min-height: 44px; }
  .palette .it .h.acts { opacity: 1; }
  .palette .it .h.acts .tabk, .palette .it .h:not(.acts) { display: none; }
  .menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; border-radius: 14px 14px 0 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .menu button { min-height: 44px; }
  .kv.shortcuts { grid-template-columns: minmax(120px, max-content) minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .page { padding: 12px 12px 32px; }
  .page-head { margin-bottom: 12px; }
  .page-head h1 { font-size: 18px; }
  .page-head .tools { margin-left: 0; width: 100%; }
  .top .env { padding: 2px 6px; }
  .btn.live .lt { display: none; }
  .btn.live { min-width: 40px; justify-content: center; }
  .modal > .ft, .drawer > .ft { flex-wrap: wrap; }
  .modal > .ft .btn, .drawer > .ft .btn { flex: 1; justify-content: center; }
  [class*="home-"] > .hd, .tl-sumcard > .hd, .tl-axiscard > .hd, .tl-listcard > .hd { flex-wrap: wrap; row-gap: 6px; }
  .home-banner { flex-wrap: wrap; }
  .home-banner > .grow { flex: 1 1 calc(100% - 60px); min-width: 0; }
  .home-bacts { max-width: none; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .home-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home-kpi svg.spark { display: none; }
  .home-kpi .val { font-size: 22px; }
  .home-heat { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
  .home-heat .hc { height: 44px; }
  .home-few { gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
  .home-lane { display: none; }
  .home-legend .sep, .home-legend .sep + span { display: none; }
  .home-who { grid-template-columns: 96px minmax(0, 1fr) 40px; }
  .tl-axiscard { --tl-name: 84px; }
  .tl-lname { font-size: 11.5px; }
  .tl-lname .tl-full { display: none; } .tl-lname .tl-short { display: inline; }
  .tl-axiscard > .hd .tools, .tl-sumcard > .hd .tools, .tl-listcard > .hd .tools { width: 100%; margin-left: 0; justify-content: flex-start; }
  .tl-listcard > .hd .tools input { width: 100%; }
  .tl-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tl-tile .v { font-size: 20px; }
  .tl-listcard .tbl-wrap { max-height: none !important; }
  .tl-list thead { display: none; }
  .tl-list, .tl-list tbody { display: block; }
  .tl-list tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .tl-list td { display: block; padding: 0 !important; border: 0 !important; }
  .tl-list td.tl-t, .tl-list td.tl-k { grid-row: 1; }
  .tl-list td.tl-go { grid-row: 1; grid-column: 3; justify-self: end; }
  .tl-list td.tl-w { grid-row: 2; grid-column: 1 / -1; }
  .tl-list td.tl-who { grid-row: 3; grid-column: 1 / -1; color: var(--muted); }
  .home-copytbl thead { display: none; }
  .home-copytbl, .home-copytbl tbody { display: block; }
  .home-copytbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  .home-copytbl td { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; }
  .home-copytbl td:nth-child(2) { grid-column: 2 / -1; }
  .home-copytbl td:nth-child(3), .home-copytbl td:nth-child(7) { grid-column: 1 / -1; }
  .home-copytbl td[data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: 12px; }
}
@keyframes slideup { from { transform: translateY(16px); opacity: .4; } to { transform: none; opacity: 1; } }
/* ===== end shell ===== */

/* ===== alertsui ===== */
/* Alerts and Logs (views/alerts.js, views/logs.js). Every class starts with al-. */
.al-sev { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.al-sev.critical { background: var(--crit-soft); color: var(--crit-ink); }
.al-sev.warning { background: var(--warn-soft); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.al-sev.info { background: var(--surface-3); color: var(--text-2); }
.pill.al-nodata { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-2); font-weight: 500; }
.pill.al-silent { background: var(--surface-3); color: var(--text-2); font-weight: 500; }
.al-link { border: 0; background: none; padding: 0; color: var(--text); font-weight: 600; cursor: pointer; text-align: left; }
.al-link:hover { color: var(--accent); text-decoration: underline; }
.kpi .al-link { font-weight: 500; color: var(--accent); }
a.al-name { color: var(--text); font-weight: 600; }
.al-quiet { display: flex; gap: 10px; align-items: center; padding: 6px 14px 14px; color: var(--text-2); flex-wrap: wrap; }
.al-quiet svg.i { color: var(--good); }
.al-silenced { display: flex; gap: 8px; align-items: flex-start; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); }
.al-silenced svg.i { margin-top: 2px; flex: none; }
.al-bad { color: var(--crit-ink); }
.al-good { color: var(--good-ink); }
.al-strong { color: var(--text); font-weight: 600; }
.al-switch { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; position: relative; user-select: none; }
.al-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.al-switch .al-track { width: 30px; height: 17px; border-radius: 17px; background: var(--line-2); position: relative; flex: none; transition: background .15s; }
.al-switch .al-track::after { content: ""; position: absolute; left: 2px; top: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.al-switch input:checked + .al-track { background: var(--accent); }
.al-switch input:checked + .al-track::after { transform: translateX(13px); }
.al-switch input:focus-visible + .al-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.al-switch .al-sw-l { font-size: 12px; color: var(--text-2); min-width: 18px; }
.al-switch.off { cursor: default; opacity: .65; }
svg.al-fires rect { fill: var(--s1); }
.al-tl-name { fill: var(--text-2); font-size: 12px; }
.al-tl-bg { fill: var(--surface-2); }
.al-tl-bar.critical { fill: var(--crit); } .al-tl-bar.warning { fill: var(--warn); } .al-tl-bar.info { fill: var(--s1); }
.al-ax { fill: var(--muted); font-size: 10.5px; }
.al-crumbs { gap: 6px; margin-bottom: 6px; }
.al-kpis { margin-bottom: 14px; }
.al-kpi .val { font-size: 16px; margin-top: 6px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-kpi .delta { max-width: 100%; }
.al-row { margin-bottom: 14px; align-items: start; }
.al-row .card > .hd h3 { white-space: nowrap; }
.al-row .card > .hd .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.al-chart .al-ln { fill: none; stroke-width: 2; stroke-linejoin: round; }
.al-chart .al-ln.eval { stroke: var(--s8); }
.al-chart .al-ln.raw { stroke: var(--muted); stroke-width: 1; opacity: .55; }
.al-chart .al-fired { fill: var(--crit-soft); opacity: .8; }
.al-chart .al-resolve { stroke: var(--good); stroke-width: 1; stroke-dasharray: 2 3; }
.al-chart .al-resolve-l { fill: var(--good-ink); font-size: 10.5px; }
.al-chart .al-mk { stroke: var(--s1); stroke-width: 1; stroke-dasharray: 2 3; }
.al-chart .al-mkl rect { fill: var(--surface); stroke: var(--s1); stroke-width: 1; }
.al-chart .al-mkl text { fill: var(--text); font-size: 10.5px; }
.al-chart .al-mk.bad, .al-chart .al-mkl.bad rect { stroke: var(--crit); }
.al-chart .al-mk.good, .al-chart .al-mkl.good rect { stroke: var(--good); }
.al-chart .al-mk.warn, .al-chart .al-mkl.warn rect { stroke: var(--warn); }
.al-chart .al-mk.muted, .al-chart .al-mkl.muted rect { stroke: var(--muted); }
.tip .r .k.al-k { height: 2px; background: var(--s8); }
.tip .r .k.al-k.raw { background: var(--muted); }
.al-blast { grid-template-columns: minmax(96px, max-content) minmax(0, 1fr); }
.al-changes { display: flex; flex-direction: column; gap: 8px; }
.al-chg { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; font-size: 13px; }
.al-time { font-family: var(--mono); font-size: 11px; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 1px 5px; height: fit-content; text-align: center; }
.al-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--s1); margin-right: 6px; vertical-align: 1px; }
.al-dot.bad { background: var(--crit); } .al-dot.good { background: var(--good); } .al-dot.warn { background: var(--warn); } .al-dot.muted { background: var(--muted); }
a.al-sql, a.al-pat { color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; word-break: break-word; }
a.al-sql:hover, a.al-pat:hover { color: var(--accent); }
.al-lv { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.al-lv.al-lv-error { background: var(--crit-soft); color: var(--crit-ink); }
.al-lv.al-lv-warn { background: var(--warn-soft); color: var(--text); }
.al-mitigate { gap: 6px; padding: 10px 14px 12px; border-top: 1px solid var(--line); }
.al-activity { max-height: 260px; overflow: auto; }
.btn.al-acked { background: var(--good-soft); color: var(--good-ink); border-color: color-mix(in srgb, var(--good) 40%, var(--line-2)); opacity: 1; }
.al-ed-top { margin-bottom: 10px; gap: 12px; }
.al-ed-row { gap: 14px; align-items: flex-end; margin: 10px 0; }
.al-ed-row label.f .input { color: var(--text); font-size: 14px; font-weight: 400; }
.al-verdict { margin-top: 8px; font-size: 13px; }
/* Logs */
.al-sqrow { gap: 8px; margin-bottom: 8px; align-items: stretch; }
.al-sq { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface); cursor: text; min-height: 34px; }
.al-sq:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus); }
.al-sq > svg { color: var(--muted); flex: none; }
.al-sq-chips { display: contents; }
.al-sq-in { flex: 1; min-width: 220px; border: 0; outline: 0; background: none; color: var(--text); font: 13px var(--mono); padding: 3px 0; }
.chip.al-tok { font-family: var(--mono); font-size: 11.5px; }
.chip.al-tok .x { margin-left: 2px; }
.al-rangerow { gap: 10px; margin-bottom: 8px; align-items: center; min-height: 26px; }
.chip.al-live[aria-pressed="true"] { background: var(--good-soft); border-color: color-mix(in srgb, var(--good) 50%, transparent); color: var(--good-ink); }
.chip.al-live:disabled { opacity: .55; cursor: default; }
.chip.al-alertchip { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 40%, transparent); color: var(--crit-ink); }
.card.al-hist { margin-bottom: 10px; }
.card.al-hist .bd { padding: 8px 12px 6px; }
.al-lvkey { border: 0; background: none; cursor: pointer; color: var(--text-2); font-size: 12px; gap: 5px; padding: 0 4px; border-radius: 4px; }
.al-lvkey:hover { background: var(--surface-2); color: var(--text); }
.al-hax { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.al-hmk { stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 3 2; }
.al-hmk.bad { stroke: var(--crit); }
.al-hmk.warn { stroke: var(--serious); }
.al-hmk.good { stroke: var(--good); }
.al-marks { display: flex; gap: 4px 14px; flex-wrap: wrap; margin-top: 2px; }
.al-marks:empty { display: none; }
.al-mkey { display: inline-block; width: 0; height: 10px; border-left: 2px dashed var(--muted); }
.al-mkey.bad { border-color: var(--crit); }
.al-mkey.warn { border-color: var(--serious); }
.al-mkey.good { border-color: var(--good); }
.al-missed { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 5px 10px; margin-bottom: 8px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--text); }
.al-missed > svg { color: var(--s4); flex: none; }
.al-missed > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-missed-det { margin: -4px 0 8px; padding: 6px 10px; border: 1px dashed var(--line-2); border-radius: var(--r-sm); max-height: 140px; overflow: auto; }
.al-lmain { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 12px; align-items: start; }
.al-lmain.al-wd { grid-template-columns: 200px minmax(0, 1fr) 380px; }
.al-facets { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.al-facet .hd { padding: 7px 10px 2px; }
.al-facet .hd h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.al-facet .bd { padding: 2px 4px 6px; }
.al-lcol { min-width: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.al-lhead { padding: 0 10px; border-bottom: 1px solid var(--line); gap: 10px; }
.al-lhead .tabs { border-bottom: 0; margin-bottom: 0; }
.al-lhead .tabs button { padding: 7px 10px; }
.al-lines { max-height: max(320px, calc(100vh - 360px)); overflow: auto; font: 12px/1.35 var(--mono); }
.al-l { display: grid; grid-template-columns: 92px 44px 112px minmax(0, 1fr); gap: 8px; padding: 2px 10px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); white-space: nowrap; cursor: pointer; align-items: baseline; }
.al-l > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.al-l:hover { background: var(--surface-2); }
.al-l:focus { outline: 0; box-shadow: inset 2px 0 0 var(--accent); background: var(--surface-2); }
.al-l[aria-selected="true"] { background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
.al-l.al-hl { box-shadow: inset 3px 0 0 var(--s4); }
.al-l.al-new { animation: al-new 1.6s ease-out; }
@keyframes al-new { from { background: color-mix(in srgb, var(--good) 18%, transparent); } }
.al-l.al-lh { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font: 600 11px var(--sans); cursor: default; padding: 4px 10px; }
.al-l-t { color: var(--muted); }
.al-l-s { color: var(--text-2); }
.al-l-lv { font: 600 10.5px var(--sans); text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.al-l-lv.al-lv-error { color: var(--crit-ink); }
.al-l-lv.al-lv-warn { color: var(--text); background: var(--warn-soft); padding: 0 3px; border-radius: 3px; }
.al-l-lv.al-lv-info { color: var(--s1); }
.al-l-msg { color: var(--text); }
.al-l-f { color: var(--muted); }
.al-l-f > span { color: var(--text-2); }
.al-more { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 8px; }
.al-more:empty { display: none; }
.al-detail { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; min-width: 0; }
.al-detail .hd { display: flex; align-items: center; gap: 8px; }
.al-dmsg { font: 12.5px/1.45 var(--mono); white-space: pre-wrap; word-break: break-word; padding: 8px 10px; background: var(--code); border-radius: var(--r-sm); margin-bottom: 10px; }
.al-dkv { width: 100%; border-collapse: collapse; font-size: 12px; }
.al-dkv td { padding: 3px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.al-dkv td:first-child { width: 84px; }
.al-dkv .btn.xs { padding: 0 6px; }
.al-dv { word-break: break-word; }
.al-dh { margin: 14px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.al-gotos { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
a.al-goto { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12.5px; color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
a.al-goto:last-child { border-bottom: 0; }
a.al-goto:hover, a.al-goto:focus-visible { background: var(--surface-2); color: var(--accent); }
a.al-goto > svg { color: var(--muted); flex: none; }
.al-pat2 { white-space: normal; word-break: break-word; }
.btn.al-warnbtn { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
@media (max-width: 1250px) and (min-width: 901px) { .al-lmain.al-wd { grid-template-columns: 170px minmax(0, 1fr) 320px; } }
/* Phones and narrow windows (900 px and 560 px, as the shell) */
.al-narrow-only { display: none; }
.al-scrim { display: none; }
.al-hubspace { display: none; }
.al-rname { min-width: 220px; }
@media (max-width: 900px) {
  .al-narrow-only { display: inline; }
  .chip.al-narrow-only { display: inline-flex; }
  .al-wide-only { display: none; }
  /* the firing list: one block per alert, its actions as large buttons */
  .al-ftbl table, .al-ftbl tbody, .al-ftbl td { display: block; }
  .al-ftbl thead { display: none; }
  .al-ftbl tr { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; grid-template-areas: "dot name state" ". where where" ". since now" ". act act"; gap: 3px 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: start; }
  .al-ftbl td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .al-ftbl td.al-c-dot { grid-area: dot; padding-top: 5px !important; }
  .al-ftbl td.al-c-name { grid-area: name; min-width: 0; }
  .al-ftbl td.al-c-state { grid-area: state; }
  .al-ftbl td.al-c-where { grid-area: where; }
  .al-ftbl td.al-c-since { grid-area: since; }
  .al-ftbl td.al-c-now { grid-area: now; text-align: right !important; }
  .al-ftbl td.al-c-owner { display: none; }
  .al-ftbl td.al-c-act { grid-area: act; margin-top: 6px; }
  .al-ftbl .al-acts { justify-content: stretch !important; gap: 8px !important; }
  .al-ftbl .al-acts .btn { flex: 1 1 0; min-height: 40px; justify-content: center; font-size: 13px; }
  /* the rules: name, state and switch; scope and fires below */
  .al-rtbl table, .al-rtbl tbody, .al-rtbl td { display: block; }
  .al-rtbl thead { display: none; }
  .al-rtbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name on" "scope state" "sev fires"; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
  .al-rtbl td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .al-rtbl td.al-c-name { grid-area: name; min-width: 0; }
  .al-rtbl .al-rname { min-width: 0; }
  .al-rtbl .al-rname .mono { white-space: normal; }
  .al-rtbl td.al-c-on { grid-area: on; justify-self: end; }
  .al-rtbl td.al-c-scope { grid-area: scope; }
  .al-rtbl td.al-c-state { grid-area: state; justify-self: end; }
  .al-rtbl td.al-c-sev { grid-area: sev; }
  .al-rtbl td.al-c-fires { grid-area: fires; justify-self: end; }
  .al-rtbl td.al-c-owner, .al-rtbl td.al-c-runbook, .al-rtbl td.al-c-edit { display: none; }
  .al-switch { min-height: 40px; }
  .al-link { min-height: 32px; text-align: left; }
  /* the alert page: acknowledge, silence and note in a bar at the bottom of the screen */
  .al-hubbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; flex-wrap: nowrap; gap: 6px; margin: 0; padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 24px rgba(0, 0, 0, .28); }
  .al-hubbar .btn { flex: 1 1 0; min-width: 0; min-height: 44px; justify-content: center; white-space: nowrap; overflow: hidden; }
  .al-hubbar .btn.al-ico { flex: 0 0 44px; padding: 0; }
  .al-hubspace { display: block; height: 76px; }
  .al-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px; }
  .al-row .card .hd { flex-wrap: wrap; }
  .al-rhd { flex-wrap: wrap; }
  .al-rhd .tools { width: 100%; flex-wrap: wrap; gap: 8px; }
  .al-rhd .seg { max-width: 100%; flex-wrap: wrap; }
  .al-rhd .tools .input, .al-rhd .tools input { flex: 1 1 100%; min-height: 40px; font-size: 16px; }
  .al-row .card .hd .tools { width: 100%; }
  /* Logs */
  .row.al-sqrow { flex-wrap: wrap; }
  .al-sq { flex: 1 1 100%; }
  .al-marks > :nth-child(n+3) { display: none; }
  .row.al-lhead { flex-wrap: wrap; padding-bottom: 4px; }
  .al-lhead > .sep { display: none; }
  .al-lhead > .muted { flex: 1 1 100%; }
  .al-sq-in { min-width: 120px; font-size: 16px; }
  .al-rangerow .chip { min-height: 36px; }
  .al-lmain, .al-lmain.al-wd { grid-template-columns: minmax(0, 1fr); }
  .al-facets { display: none; }
  .al-lmain.al-ffo .al-facets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); flex-direction: initial; overflow: visible; }
  .al-facet { min-width: 0; }
  .al-facet .facet button { min-height: 36px; }
  .al-lines { max-height: none; overflow: visible; }
  .al-l { grid-template-columns: 60px 12px 56px minmax(0, 1fr); gap: 6px; min-height: 40px; align-items: center; padding: 0 10px; font-size: 11.5px; }
  .al-l.al-lh { min-height: 26px; }
  .al-ms, .al-lv-rest { display: none; }
  .al-l-lv { text-align: center; }
  .al-lhead .tabs button { padding: 10px 12px; }
  .al-ptbl table, .al-ptbl tbody, .al-ptbl td { display: block; }
  .al-ptbl thead { display: none; }
  .al-ptbl tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "n lv last" "p p p" "where where where"; gap: 4px 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); align-items: center; }
  .al-ptbl td { padding: 0 !important; border: 0 !important; text-align: left !important; }
  .al-ptbl td.al-c-n { grid-area: n; } .al-ptbl td.al-c-lv { grid-area: lv; } .al-ptbl td.al-c-last { grid-area: last; justify-self: end; }
  .al-ptbl td.al-c-p { grid-area: p; } .al-ptbl td.al-c-where { grid-area: where; }
  .al-scrim { position: fixed; inset: 0; z-index: 79; background: rgba(0, 0, 0, .45); }
  .al-lmain.al-wd .al-scrim { display: block; }
  .al-lmain.al-wd .al-detail { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 86vh; z-index: 80; margin: 0; border-radius: 14px 14px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .al-detail .hd .btn { min-width: 40px; min-height: 40px; justify-content: center; }
  .al-dkv .btn.xs { min-width: 34px; min-height: 34px; }
  a.al-goto { min-height: 44px; }
  .al-missed { flex-wrap: wrap; }
  .al-missed > span { white-space: normal; }
  .al-ed-row .seg { max-width: 100%; flex-wrap: wrap; }
  .al-ed-row > label.f:has(> .seg) { flex-basis: 100%; }
  .al-rotbl table, .al-rotbl tbody, .al-rotbl td { display: block; }
  .al-rotbl thead { display: none; }
  .al-rotbl tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name test" "url url" "st st" "sev sent"; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: center; }
  .al-rotbl td { padding: 0 !important; border: 0 !important; max-width: none !important; }
  .al-rotbl td.al-ro-name { grid-area: name; } .al-rotbl td.al-ro-test { grid-area: test; justify-self: end; } .al-rotbl td.al-ro-url { grid-area: url; }
  .al-rotbl td.al-ro-st { grid-area: st; } .al-rotbl td.al-ro-sev { grid-area: sev; } .al-rotbl td.al-ro-sent { grid-area: sent; justify-self: end; }
  .al-rotbl tr:not(:has(.al-ro-name)) { display: flex; flex-direction: column; align-items: stretch; }
  .al-ed-row { flex-wrap: wrap; }
  /* Stacked rows: no sticky hover tint after a tap. */
  .al-rotbl table.t tbody tr:hover td, .al-ftbl table.t tbody tr:hover td, .al-rtbl table.t tbody tr:hover td, .al-ptbl table.t tbody tr:hover td { background: transparent; }
  .al-ed-row > * { flex: 1 1 140px; min-width: 0; max-width: 100%; }
}
@media (max-width: 560px) {
  .al-hax .al-hax-odd { display: none; }
  h1.al-htitle { flex-wrap: wrap; row-gap: 4px; }
  .al-edbt > .hd { flex-wrap: wrap; row-gap: 8px; }
  .al-edbt > .hd h3 { flex: 1 1 100%; }
  .al-edbt > .hd .sub { display: none; }
  .al-lsub { display: none; }
  .al-dkv td { vertical-align: middle; }
  .al-sqrow > .btn { flex: 1 1 0; justify-content: center; min-height: 40px; }
}
/* alerts2: copies on an old rule, a storm under its cause, each copy's line, phones */
.al-warn { color: color-mix(in srgb, var(--warn) 55%, var(--text)); }
.badge.al-wbadge { background: var(--warn-soft); color: color-mix(in srgb, var(--warn) 55%, var(--text)); }
.al-fbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.al-heldname { display: flex; gap: 6px; align-items: flex-start; padding-left: 6px; }
.al-under { color: var(--muted); font-family: var(--mono); line-height: 18px; }
.al-heldwhy { color: var(--text-2); }
tr.al-held { box-shadow: inset 3px 0 0 var(--line-2); }
.al-chart .al-ln.cp { stroke-width: 1.6; }
.al-chart .al-ln.cp.c0, .tip .r .k.al-k.cp.c0 { stroke: var(--s8); background: var(--s8); }
.al-chart .al-ln.cp.c1, .tip .r .k.al-k.cp.c1 { stroke: var(--s1); background: var(--s1); }
.al-chart .al-ln.cp.c2, .tip .r .k.al-k.cp.c2 { stroke: var(--s4); background: var(--s4); }
.al-chart .al-ln.cp.c3, .tip .r .k.al-k.cp.c3 { stroke: var(--s7); background: var(--s7); }
.al-chart .al-ln.cp.c4, .tip .r .k.al-k.cp.c4 { stroke: var(--s3); background: var(--s3); }
.al-chart .al-ln.cp.c5, .tip .r .k.al-k.cp.c5 { stroke: var(--s5); background: var(--s5); }
.al-ed-names .select { width: 100%; max-width: 100%; text-overflow: ellipsis; }
.al-mhint { white-space: normal; }
@media (max-width: 900px) {
  a.al-name, .al-link.al-rlink { display: inline-flex; align-items: center; min-height: 40px; font-size: 15px; }
  .al-cpacts .btn.xs { min-width: 40px; min-height: 40px; justify-content: center; }
  .al-fbar .btn { flex: 1 1 100%; min-height: 40px; justify-content: center; }
  .al-heldname { padding-left: 0; }
  .al-under { display: none; }
}
/* ===== end alertsui ===== */
/* ===== rollouts ===== */
/* Rollouts: the status header, the version map, the version picker. */
.ro-main.wide { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.ro-hd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 12px 20px; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--surface); box-shadow: var(--shadow-1); }
.ro-hd.held, .ro-hd.paused, .ro-hd.warn { border-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), var(--surface) 72%); }
.ro-hd.run { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 72%); }
.ro-hd.back { border-color: var(--serious); background: linear-gradient(90deg, var(--serious-soft), var(--surface) 72%); }
.ro-hd.failed { border-color: var(--crit); background: linear-gradient(90deg, var(--crit-soft), var(--surface) 72%); }
.ro-hd.ok { border-color: color-mix(in srgb, var(--good) 45%, var(--line-2)); }
.ro-hd-t { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ro-hd-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 650; letter-spacing: -.01em; flex-wrap: wrap; }
.ro-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; letter-spacing: .05em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ro-hd.held .ro-badge, .ro-hd.paused .ro-badge, .ro-hd.warn .ro-badge { background: var(--warn); color: #1b1b1b; }
.ro-hd.run .ro-badge { background: var(--accent); color: var(--accent-ink); }
.ro-hd.back .ro-badge { background: var(--serious); color: #1b1b1b; }
.ro-hd.failed .ro-badge { background: var(--crit); color: #fff; }
.ro-hd.ok .ro-badge { background: var(--good-soft); color: var(--good-ink); }
.ro-hd-why { font-size: 14px; color: var(--text); line-height: 1.5; }
.ro-hd-safe { font-size: 13px; color: var(--text-2); }
.ro-hd-down { display: flex; gap: 6px; align-items: flex-start; font-size: 13.5px; color: var(--text); }
.ro-hd-down > svg { color: var(--crit); flex: none; margin-top: 2px; }
.ro-srv.down { background: var(--crit-soft); color: var(--crit); }
.ro-hd-acts { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ro-act { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; white-space: normal; padding: 7px 12px; }
.ro-act .ro-act-l { font-weight: 600; }
.ro-act small { font-weight: 400; font-size: 11.5px; color: var(--muted); }
.btn.primary.ro-act small { color: var(--accent-ink); opacity: .8; }
.btn.danger.solid.ro-act small { color: #fff; opacity: .85; }
.btn.danger.ro-act:not(.solid) small { color: var(--crit-ink); opacity: .85; }
.btn.ghost.ro-act { border-color: transparent; padding-top: 3px; padding-bottom: 3px; }
a.btn.ro-act:hover { text-decoration: none; }
.ro-split { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; max-width: 720px; }
.ro-split-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--surface-3); }
.ro-split-bar i { display: block; height: 100%; }
.ro-split-l { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.ro-sw { display: inline-block; width: 14px; height: 8px; border-radius: 2px; flex: none; margin-right: 5px; vertical-align: 0; }
.ro-split-bar i.t, .ro-sw.t, .ro-map i.t { background: var(--good); }
.ro-split-bar i.o0, .ro-split-bar i.o1, .ro-sw.o0, .ro-sw.o1, .ro-map i.o0, .ro-map i.o1 { background: var(--line-2); }
.ro-split-bar i.o2, .ro-sw.o2, .ro-map i.o2 { background: var(--s7); }
.ro-split-bar i.o3, .ro-sw.o3, .ro-map i.o3 { background: var(--s1); }
.ro-sw.now, .ro-map i.now { background: var(--accent); box-shadow: 0 0 0 1.5px var(--accent-2); }
.ro-sw.wait, .ro-map i.wait { background: repeating-linear-gradient(135deg, var(--warn) 0 3px, transparent 3px 6px); box-shadow: inset 0 0 0 1px var(--warn); }
.ro-sw.hot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--crit); }
.ro-sw.down, .ro-map i.down { background: transparent; box-shadow: inset 0 0 0 1px var(--crit); }
.ro-map i.u { background: var(--surface-3); }
.ro-pb { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.ro-hd.compact { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 10px 14px; }
.ro-hd.compact .ro-hd-title { font-size: 15px; flex: 1 1 360px; }
.ro-hd.compact .ro-hd-acts { flex-direction: row; flex-wrap: wrap; }
.ro-hd.compact .ro-act { padding: 4px 10px; }
.ro-hd.compact .ro-act small { display: none; }
.ro-pb-bar { display: flex; gap: 3px; height: 10px; }
.ro-pb-seg { flex-basis: 0; min-width: 18px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.ro-pb-seg i { display: block; height: 100%; border-radius: 5px; transition: width .4s; }
.ro-pb-seg i.done { background: var(--good); }
.ro-pb-seg i.run { background: var(--accent); }
.ro-pb-seg i.back { background: var(--serious); }
.ro-pb-seg i.held { background: repeating-linear-gradient(135deg, var(--warn) 0 4px, color-mix(in srgb, var(--warn) 55%, transparent) 4px 8px); }
.ro-pb-ticks { display: flex; gap: 3px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ro-pb-tick { flex-basis: 0; min-width: 18px; display: flex; gap: 4px; align-items: center; overflow: hidden; white-space: nowrap; }
.ro-pb-tick b { color: var(--text-2); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ro-pb-tick.now b { color: var(--text); }
.ro-pb-tick.done .i { color: var(--good); width: 13px; height: 13px; }
.ro-pb-eta { font-size: 12.5px; text-align: right; }
.ro-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(18px, 1fr)); gap: 4px 3px; }
.ro-map-s { display: flex; flex-direction: column; gap: 1px; padding: 2px; border-radius: 4px; border: 1px solid transparent; min-width: 0; color: inherit; }
.ro-map-s:hover { border-color: var(--line-2); text-decoration: none; }
.ro-map-s.hot { border-color: var(--crit); }
.ro-map-s.here { border-color: var(--warn); }
.ro-map-s i { display: block; height: 6px; border-radius: 1.5px; }
.ro-map-n { font-size: 9px; line-height: 10px; height: 10px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.ro-legend { display: flex; gap: 6px 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.ro-legend span { display: inline-flex; align-items: center; }
.ro-nn { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 7px 10px; margin: 0; font-size: 13px; }
.ro-nn > dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding-top: 2px; }
.ro-nn > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ro-cmp { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.ro-cmp th { font-weight: 600; color: var(--muted); font-size: 11.5px; padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ro-cmp th:first-child, .ro-cmp td:first-child { text-align: left; padding-left: 0; }
.ro-cmp td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.ro-cmp td.bad { color: var(--crit-ink); font-weight: 650; }
.ro-tl { display: flex; flex-direction: column; max-height: 360px; overflow: auto; }
.ro-tl-e { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.ro-tl-e:last-child { border-bottom: 0; }
.ro-tl-t { color: var(--muted); font-variant-numeric: tabular-nums; }
.ro-tl-e.warn { background: linear-gradient(90deg, var(--warn-soft), transparent 70%); }
.ro-tl-e.ok > span:last-child { color: var(--good-ink); }
.ro-tl-e.bad > span:last-child { color: var(--crit-ink); }
.ro-vn { font-weight: 650; }
.ro-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.ro-chip.cur { background: var(--good-soft); color: var(--good-ink); }
.ro-chip.new { background: var(--accent-soft); color: var(--accent); }
.ro-chip.trk { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.ro-chip.bad { background: var(--crit-soft); color: var(--crit-ink); }
.ro-pk tr.cur td { background: color-mix(in srgb, var(--good-soft) 55%, transparent); }
.ro-pk td { vertical-align: middle; }
.ro-ext { color: var(--muted); display: inline-flex; }
.ro-ext .i { width: 13px; height: 13px; }
.ro-find { width: 190px; }
.ro-modes { display: flex; flex-direction: column; gap: 6px; }
.ro-mode { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: var(--r-sm); border: 1px solid transparent; }
.ro-mode.on { border-color: var(--accent); background: var(--accent-soft); }
.ro-gates { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.ro-vers .ro-ver-h { grid-template-columns: 64px minmax(0, 1fr) auto; }
.ro-diff { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--code); border-radius: var(--r-sm); padding: 8px 0; overflow-x: auto; max-height: 340px; }
.ro-diff > div { padding: 0 10px; white-space: pre; }
.ro-diff > .add { background: var(--good-soft); color: var(--good-ink); }
.ro-diff > .del { background: var(--crit-soft); color: var(--crit-ink); }
.ro-cmds { display: flex; flex-direction: column; gap: 4px; background: var(--code); border-radius: var(--r-sm); padding: 8px 10px; }
.ro-cmds code { overflow-wrap: anywhere; }
.ro-ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.ro-dlg p { margin: 0; }
.ro-why { width: 100%; resize: vertical; min-height: 52px; font-family: inherit; }
.ro-facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: 13px; }
.ro-facts > dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; padding-top: 1px; }
.ro-facts > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ro-fromto { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.ro-fromto .ro-vn { font-size: 16px; }
.ro-k { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.ro-arrow { font-size: 18px; color: var(--muted); }
.ro-warnline { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.ro-warnline .i { color: var(--warn); margin-top: 2px; }
.ro-patch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: var(--code); border-radius: var(--r-sm); font-size: 13px; }
.ro-patch-old { color: var(--muted); text-decoration: line-through; }
.ro-patch-new { color: var(--good-ink); }
.ro-main .card > .hd h3 { white-space: nowrap; flex: none; }
.ro-main .card > .hd .sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ro-pb-tick.big { justify-content: center; }
.ro-img1 { font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
@media (max-width: 1100px) { .ro-hd { grid-template-columns: minmax(0, 1fr); } .ro-main.wide { grid-template-columns: minmax(0, 1fr); } }
/* Access and audit */
.ac-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 14px; }
.ac-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px 3px 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font-size: 12.5px; font-weight: 500; font-family: inherit; line-height: 1.5; }
button.ac-chip { cursor: pointer; }
button.ac-chip:hover { border-color: var(--text-2); }
.ac-chip .i { width: 13px; height: 13px; }
.ac-chip.ok .i { color: var(--good); }
.ac-chip.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 45%, var(--line-2)); }
.ac-chip.warn .i { color: var(--warn); }
.ac-chip.bad { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 45%, var(--line-2)); color: var(--crit-ink); }
.ac-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(440px, 540px); gap: 14px; align-items: start; }

.ac-chg > .hd { flex-wrap: wrap; row-gap: 2px; }
.ac-hidden { margin-left: auto; text-align: right; }
.ac-filters { gap: 8px; margin-bottom: 8px; }
.ac-q { flex: 1 1 180px; min-width: 140px; }
.ac-kept { margin-bottom: 10px; }
.ac-banner { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r-sm); background: var(--crit-soft); border: 1px solid color-mix(in srgb, var(--crit) 40%, var(--line-2)); font-size: 13px; }
.ac-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--crit); flex: none; }
.ac-list { margin: 0 -14px -14px; }
.ac-day { padding: 7px 14px; font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ac-e { display: grid; grid-template-columns: 52px 150px minmax(0, 1fr) 76px; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ac-e:hover { background: var(--surface-2); }
.ac-e:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.ac-e.open { background: var(--surface-2); }
.ac-e-t { color: var(--muted); font-variant-numeric: tabular-nums; }
.ac-e-who { min-width: 0; overflow-wrap: anywhere; }
.ac-e.auto .ac-e-who b { color: var(--text-2); }
.ac-e-what { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ac-e-title { font-weight: 600; overflow-wrap: anywhere; }
.ac-list.ref .ac-e-title { font-family: var(--mono); font-weight: 500; font-size: 12.5px; }
.ac-area { margin-left: 2px; vertical-align: 1px; font-weight: 500; }
.ac-area.rollout, .ac-area.topology, .ac-area.autoscale { background: var(--accent-soft); color: var(--accent); }
.ac-mono { font-family: var(--mono); font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.ac-path { color: var(--text); }
.ac-sql { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.ac-moredf > summary { cursor: pointer; }
.ac-e-why { font-style: italic; color: var(--text-2); }
.ac-e-st { text-align: right; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ac-e-st.ok { color: var(--good-ink); }
.ac-e-st.bad { color: var(--crit-ink); }
.ac-raw { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 3px 10px; margin: 6px 0 0; padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); font-size: 12px; cursor: auto; }
.ac-raw > dt { color: var(--muted); }
.ac-raw > dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.ac-more { display: flex; align-items: center; gap: 8px; padding: 10px 14px; }
.ac-what { display: inline-block; max-width: 300px; vertical-align: bottom; }
.ac-allwho { display: block; max-width: 160px; white-space: nowrap; }
.ac-allwho > b { display: block; overflow: hidden; text-overflow: ellipsis; }
.ac-allwhat { display: block; max-width: 260px; }
.ac-alltable td:nth-child(3) .mono { word-break: break-word; }
.ac-allwhat .ac-what { max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; overflow: hidden; }
textarea.input.ro-why { font-family: inherit; }
.badge.ac-bad { background: var(--crit-soft); color: var(--crit-ink); }
.ac-bad-t { color: var(--crit-ink); }
.ac-warn-t { color: color-mix(in srgb, var(--warn) 75%, var(--text)); font-weight: 600; }
.ac-ktable td { vertical-align: top; }
.ac-ktable td.num { white-space: nowrap; }
.ac-kname { min-width: 0; overflow-wrap: anywhere; }
.ac-kname b { font-weight: 600; }
.ac-kact { white-space: nowrap; text-align: right; }
.ac-kact .badge { margin-right: 4px; }
.ac-scope { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.ac-scope.write { background: var(--warn-soft); color: var(--text); }
.ac-scope.admin, .ac-scope.root { background: var(--accent-soft); color: var(--accent); }
.ac-ktable tr.ac-succ td:first-child { padding-left: 22px; }
.ac-ktable tr.ac-revoked td { color: var(--muted); }
.ac-ktable tr.ac-revoked td b { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.ac-ktable tr.ac-revoked .ac-scope { opacity: .6; }
.ac-ktable tr.ac-revoked td .ac-bad-t { color: var(--crit-ink); }
.ac-ktable tr.ac-token td { background: var(--surface-2); }
.ac-ktable tr.ac-flash td { background: var(--accent-soft); transition: background .3s; }
.ac-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ac-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; color: var(--text-2); }
.ac-steps li.now, .ac-steps li.done { color: var(--text); }
.ac-steps li b { color: var(--text); }
.ac-steps .ac-n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.ac-steps li.now .ac-n { background: var(--accent); color: #fff; }
.ac-steps .ac-n.ok { background: var(--good-soft); color: var(--good-ink); }
.ac-steps .ac-n .i { width: 12px; height: 12px; }
.ac-rot > .ft { flex-wrap: wrap; }
.ac-scopes > summary { cursor: pointer; list-style: none; padding-bottom: 11px; }
.ac-scopes > summary::-webkit-details-marker { display: none; }
.ac-scopes > summary::after { content: "show"; margin-left: auto; font-size: 12px; color: var(--muted); }
.ac-scopes[open] > summary::after { content: "hide"; }
.ac-scopecards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ac-scopecard { text-align: left; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); display: flex; flex-direction: column; gap: 3px; }
.ac-scopecard.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--focus); }
.ac-rotating { color: var(--accent); font-weight: 600; }
@media (max-width: 1180px) { .ac-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  .ac-e { grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "t who st" ". what what"; row-gap: 4px; }
  .ac-e-t { grid-area: t; } .ac-e-who { grid-area: who; } .ac-e-what { grid-area: what; } .ac-e-st { grid-area: st; }
  .ac-e-who { display: flex; flex-wrap: wrap; gap: 0 8px; align-items: baseline; }
  .ac-hidden { margin-left: 0; text-align: left; }
}
@media (max-width: 560px) {
  .ac-e { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "t who st" "what what what"; column-gap: 8px; padding: 10px 12px; }
  .ac-list { margin: 0 -14px -14px; }
  .ac-filters > * { flex: 1 1 auto; }
  .ac-q { flex-basis: 100%; }
  .ac-banner { flex-wrap: wrap; }
  .ac-scopecards { grid-template-columns: minmax(0, 1fr); }
  .ac-ktable thead { display: none; }
  .ac-ktable, .ac-ktable tbody { display: block; }
  .ac-ktable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 2px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
  .ac-ktable td { padding: 0 !important; border: 0 !important; text-align: left !important; background: none; }
  .ac-ktable td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .ac-ktable td:nth-child(2) { grid-column: 2; grid-row: 1; }
  .ac-ktable td:nth-child(5) { grid-column: 3; grid-row: 1; }
  .ac-ktable td:nth-child(3) { grid-column: 1; grid-row: 2; font-size: 12px; }
  .ac-ktable td:nth-child(4) { grid-column: 2 / 4; grid-row: 2; font-size: 12px; text-align: right !important; }
  .ac-ktable td:nth-child(3) > div { display: inline; margin-left: 6px; }
  .ac-ktable td:nth-child(3)::before { content: "used "; color: var(--muted); }
  .ac-ktable td:nth-child(4)::before { content: "expires "; color: var(--muted); }
  .ac-ktable tr.ac-succ { padding-left: 26px; }
  .ac-ktable tr.ac-succ td:first-child { padding-left: 0 !important; }
  .ac-ktable tr.ac-token { background: var(--surface-2); }
  .ac-ktable td.ac-said::before { content: none; }
  .ac-ktable tr.ac-revoked td:nth-child(4) { display: none; }
  .ac-kact .btn.xs { min-height: 40px; min-width: 40px; }
  .ac-alltable th:nth-child(4), .ac-alltable td:nth-child(4) { display: none; }
  .ac-allwho { max-width: 120px; }
}
/* Cloud setup */
.ro-cnum { width: 72px; text-align: center; -moz-appearance: textfield; }
.ro-cnum::-webkit-outer-spin-button, .ro-cnum::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ro-casks { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.ro-cstart { padding: 8px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); }
.ro-cmore { justify-content: center; }
@media (max-width: 560px) {
  .cloud-controls { gap: 10px 12px; }
  .cloud-controls > .cloud-step { flex: 1 1 140px; }
  .cloud-controls .btn.xs { min-width: 36px; min-height: 36px; }
  .cloud-machines > .hd { flex-wrap: wrap; }
  .cloud-machines > .hd .tools { margin-left: 0; flex-wrap: wrap; }
  .cloud-made-row > .row.between { flex-direction: column; align-items: flex-start; }
}
/* Rollouts on narrow screens */
@media (max-width: 900px) {
  .ro-main .card > .hd { flex-wrap: wrap; }
  .ro-main .card > .hd .sub { white-space: normal; }
  .ro-hd { padding: 12px; }
  .ro-hd-title { font-size: 16px; }
  .ro-pb-seg { flex: 0 0 28px !important; width: auto !important; min-width: 0; }
  .ro-pb-seg.big { flex: 1 1 0 !important; }
  .ro-pb-ticks { flex-direction: column; gap: 3px; }
  .ro-pb-tick { flex: none !important; width: auto !important; white-space: normal; }
  .ro-pb-tick.big { justify-content: flex-start; order: -1; }
  .ro-pb-eta { text-align: left; }
  .ro-tl-e { grid-template-columns: 84px minmax(0, 1fr); }
  .ro-find { flex: 1 1 160px; width: auto; }
}
@media (max-width: 560px) {
  .ro-hd-acts .ro-act { min-height: 44px; }
  .ro-hd.compact .ro-act { min-height: 40px; }
  .ro-cmp th:nth-child(3), .ro-cmp td:nth-child(3) { display: none; }
  .ro-cmp td:first-child { white-space: normal; }
  .ro-cmp th { white-space: normal; vertical-align: bottom; }
  .ro-cmp th, .ro-cmp td { padding-left: 4px; padding-right: 4px; }
  .ro-gates { grid-template-columns: minmax(0, 1fr); }
  .ro-fromto { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .ro-arrow { transform: rotate(90deg); justify-self: start; }
  .ro-facts { grid-template-columns: 78px minmax(0, 1fr); }
  .ro-pk thead { display: none; }
  .ro-pk, .ro-pk tbody { display: block; }
  .ro-pk tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); align-items: center; }
  .ro-pk td { padding: 0 !important; border: 0 !important; }
  .ro-pk td.ro-pk-v { grid-column: 1; grid-row: 1; }
  .ro-pk td.ro-pk-a { grid-column: 2; grid-row: 1 / 3; }
  .ro-pk td.ro-pk-d { grid-column: 1; grid-row: 2; font-size: 12px; }
  .ro-pk td.ro-pk-b { grid-column: 1 / 3; grid-row: 3; }
  .ro-pk td.ro-pk-b:empty, .ro-pk td.ro-pk-b > .row:empty { display: none; }
  .ro-pk td.ro-pk-g { display: none; }
  .ro-pk tr.cur { background: color-mix(in srgb, var(--good-soft) 55%, transparent); border-radius: var(--r-sm); padding-left: 8px; padding-right: 8px; }
  .ro-pk tr.cur td { background: none !important; }
  .ro-pk .btn.sm { min-height: 40px; padding: 6px 12px; }
}
/* ===== end rollouts ===== */
/* ===== data ===== */
/* The answer's tabs keep their width; its numbers stay on one line and are cut first. */
.wb-outhd > .tabs { flex: none; }
.wb-outhd > .wb-status { min-width: 0; }
.wb-status .row { flex-wrap: nowrap; }
.wb-status > .row:first-child { min-width: 0; overflow: hidden; }
.wb-status > .row.nw { flex: none; }
/* SQL workbench: the mode bar, the statement that runs, the check of a write. */
.dt-mode { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px 8px 6px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 12.5px; flex: none; min-width: 0; }
.dt-mode.ro { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: color-mix(in srgb, var(--accent-soft) 45%, var(--surface)); }
.dt-pill { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px 1px 7px; border-radius: 999px; font-weight: 600; font-size: 12px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; flex: none; }
.dt-pill svg.i { width: 13px; height: 13px; }
.dt-pill.ro { background: var(--accent-soft); color: var(--accent); }
.dt-pill.on { background: var(--warn-soft); color: var(--text); }
.dt-pill.on svg { color: var(--warn); }
.dt-where { min-width: 0; color: var(--text-2); }
.dt-where i { font-style: normal; color: var(--text); }
.btn.dt-write { background: var(--surface); color: var(--text); border-color: var(--line-2); }
.btn.dt-write:hover { background: var(--surface-2); }
.dt-band { position: absolute; left: 0; right: 0; pointer-events: none; background: color-mix(in srgb, var(--accent) 7%, transparent); border-left: 2px solid var(--accent); }
.dt-band[data-kind="write"] { background: color-mix(in srgb, var(--warn) 9%, transparent); border-left-color: var(--warn); }
.dt-lbl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-2); }
.dt-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dt-tile { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; background: var(--surface-2); min-width: 0; }
.dt-tv { font-size: 19px; font-weight: 650; margin: 2px 0; overflow-wrap: anywhere; }
.dt-tv.bad { color: var(--crit-ink); }
.dt-tv.warn { color: var(--serious); }
.dt-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.banner.dt-banner { margin: 0; align-items: flex-start; }
.banner.dt-banner > svg { margin-top: 2px; flex: none; }
.banner.dt-done { margin: 0; border-color: var(--line-2); background: var(--surface-2); }
.banner.dt-done > svg { color: var(--text-2); }
.dt-kind { font-size: 11px; font-weight: 650; padding: 0 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.dt-kind.write { background: var(--warn-soft); color: var(--text); }
.dt-kind.bad { background: var(--crit-soft); color: var(--crit-ink); }
@media (max-width: 900px) { .dt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tables and storage: four answers, every table, the shards and copies of one. */
.dt-answers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dt-ans { padding: 12px 14px; gap: 6px; }
.dt-ans.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.dt-ans.bad { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.dt-q { font-weight: 600; color: var(--text-2); }
.dt-a { font-size: 16px; font-weight: 650; line-height: 1.3; }
.dt-why { line-height: 1.45; flex: 1; }
.dt-foot { margin-top: 4px; }
.dt-stale { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.dt-nw { white-space: nowrap; }
.dt-sc { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.dt-sc.warn { background: var(--warn-soft); color: var(--text); }
.dt-sc.bad { background: var(--crit-soft); color: var(--crit-ink); }
.dt-tbl tr.dt-sel td { background: var(--accent-soft); }
.dt-tbl td { vertical-align: middle; }
.dt-delta { font-variant-numeric: tabular-nums; }
.dt-delta.top { background: var(--warn-soft); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.dt-flag { background: var(--warn-soft); padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.dt-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 14px 0; }
.dt-bars text, .dt-strip text { font-size: 10.5px; fill: var(--muted); }
.dt-band-even { fill: color-mix(in srgb, var(--good) 9%, transparent); }
.dt-mean { stroke: var(--text-2); stroke-dasharray: 4 3; }
.dt-bars .dt-mean-lbl { fill: var(--text-2); }
.dt-bar { fill: var(--s1); fill-opacity: .75; }
.dt-bar.hi { fill: var(--s2); fill-opacity: 1; }
.dt-bar.lo { fill: var(--s1); fill-opacity: .4; }
.dt-bar:hover, .dt-bar:focus { fill-opacity: 1; outline: none; }
.dt-bars .dt-out, .dt-strip .dt-out { fill: var(--text); font-weight: 600; }
.dt-cell.ok { fill: var(--good); fill-opacity: .55; }
.dt-cell.warn { fill: var(--warn); }
.dt-cell.bad { fill: var(--crit); }
.dt-key::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.dt-key.ok::before { background: var(--good); opacity: .55; } .dt-key.warn::before { background: var(--warn); } .dt-key.bad::before { background: var(--crit); }
.dt-ptbl { margin-top: 8px; }
.dt-legacy { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
@media (max-width: 1100px) { .dt-answers { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dt-pair { grid-template-columns: 1fr; } }
/* Table details at scale: the shards as a grid of tiles, problems in color. */
.dt-shardgrid { display: flex; flex-wrap: wrap; gap: 3px; }
.dt-sh { min-width: 34px; padding: 2px 4px; border-radius: 5px; font: 11px/16px var(--mono); text-align: center; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.dt-sh:hover { border-color: var(--line-2); color: var(--text); }
.dt-sh.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 50%, var(--line)); color: var(--text); }
.dt-sh.bad { background: var(--crit-soft); border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); color: var(--crit-ink); }
.ix-scope .dt-sh.sel { outline: 2px solid var(--accent); outline-offset: 0; }
/* Labs: what a view needs before it has anything to show */
.dt-empty { display: flex; flex-direction: column; gap: 14px; max-width: 760px; margin: 24px auto; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.dt-empty-hd { display: flex; gap: 12px; align-items: flex-start; }
.dt-empty-hd h3 { margin: 0 0 4px; font-size: 15px; }
.dt-empty-hd .ic { flex: none; margin-top: 2px; color: var(--muted); }
.dt-needs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dt-need { display: grid; grid-template-columns: 72px 1fr; gap: 10px; align-items: start; }
.dt-need .pill { justify-self: start; }
.dt-partial { padding: 10px 12px; border-color: var(--warn); background: var(--warn-soft); }
.dt-partial .i { color: var(--warn); }
.sch-diagram .legend-box { pointer-events: none; }
.dt-list .banner.dt-downall { margin: 10px 14px 4px; }
.card > .dt-empty { border: 0; box-shadow: none; margin: 0; max-width: none; }
/* Phones (below 560 px): Tables and storage */
.dt-sortsel { display: none; }
@media (max-width: 560px) {
  .dt-answers { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .dt-ans { min-height: 0; }
  .dt-shards .hd .sub, .dt-copies .hd .sub, .dt-list .hd .sub { display: none; }
  .dt-list .hd { flex-wrap: wrap; }
  .dt-sortsel { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
  .dt-sortsel select { flex: 1; min-height: 36px; }
  .dt-tbl thead { display: none; }
  .dt-tbl, .dt-tbl tbody { display: block; }
  .dt-tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
  table.t.dt-tbl td { display: block; padding: 0; border: 0; background: transparent; text-align: left; min-width: 0; white-space: normal; }
  table.t.dt-tbl tbody tr:hover td { background: transparent; }
  table.t.dt-tbl tr.dt-sel { background: var(--accent-soft); }
  .dt-ptbl thead { display: none; }
  .dt-ptbl, .dt-ptbl tbody { display: block; }
  .dt-ptbl tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.t.dt-ptbl td { padding: 0; border: 0; white-space: normal; }
  table.t.dt-ptbl td:nth-child(3) { flex-basis: 100%; order: 3; }
  table.t.dt-ptbl td:nth-child(4) { margin-left: auto; }
  .dt-tbl td::before { content: attr(data-label); display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1px; }
  .dt-tbl td.dt-c-table { grid-column: 1 / 3; order: -2; font-size: 14px; }
  .dt-tbl td.dt-c-docs, .dt-tbl td.dt-c-bytes, .dt-tbl td.dt-c-g7 { font-variant-numeric: tabular-nums; }
  .dt-tbl td.dt-c-table::before, .dt-tbl td.dt-c-g::before { display: none; }
  .dt-tbl td.dt-c-g { grid-column: 3; order: -1; text-align: right; align-self: center; }
  table.t.dt-tbl td.dt-c-segments { display: none; }
  .dt-tbl td.dt-c-lag { grid-column: 1 / -1; }
  .dt-tbl td.dt-c-lag > .row { justify-content: flex-start !important; flex-wrap: wrap; }
  .dt-strip text, .dt-bars text { font-size: 10px; }
}
/* Phones (below 560 px): the SQL workbench */
@media (max-width: 560px) {
  .dt-mode { flex-wrap: wrap; row-gap: 6px; }
  .dt-mode .dt-where { order: 3; flex-basis: 100%; white-space: normal; }
  .dt-mode > .btn { margin-left: auto; }
  .wb-main { padding: 8px 10px 0; }
  .wb-tools .kbd-hint, .wb-tools kbd { display: none; }
  .wb-ed { max-height: 26vh; }
  .wb-outhd { flex-wrap: wrap; padding: 0 10px; }
  .wb-outhd .wb-status { flex-basis: 100%; order: 2; white-space: normal; flex-wrap: wrap; padding: 4px 0 8px; gap: 6px; }
  .wb-outhd .wb-status .row { flex-wrap: wrap; }
  .wb-outhd > .tabs { flex: 1 1 100%; min-width: 0; overflow-x: auto; }
  .dt-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dt-tile { padding: 8px 10px; }
  .dt-fields { grid-template-columns: minmax(0, 1fr); }
  .dt-hint { display: none; }
}
/* ===== end data ===== */
/* ===== workload ===== */
.wl-bad { color: var(--crit-ink); }
.wl-badbadge { background: var(--crit-soft) !important; color: var(--crit-ink) !important; }
.wl-link { color: var(--accent); text-decoration: none; }
.wl-link:hover { text-decoration: underline; }
.wl-obar { display: inline-flex; height: 8px; border-radius: 3px; overflow: hidden; background: var(--surface-3); vertical-align: middle; }
.wl-obar > i { display: block; height: 100%; min-width: 2px; }
.wl-story { line-height: 1.5; }
.wl-trace .wf .nm .badge { flex-shrink: 0; }
.wl-ghead > td { background: var(--surface-2); padding: 9px 10px !important; white-space: normal !important; }
.wl-live td { white-space: nowrap; }
.wl-card { min-height: 0; }
.wl-card.bad { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.wl-card.warn { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.wl-card .bd > div > .mono, .wl-card .bd > .mono { display: block; }
.wl-stmts td { white-space: nowrap; }
/* The SQL gives way first, so failed and share of time fit beside the sidebar at 1440 px. */
.wl-stmts td.sql > .row { max-width: clamp(220px, calc(100vw - 1100px), 560px); }
.wl-stmts td.sql > .row > .ellipsis { min-width: 0; }
.wl-refuse { gap: 6px 8px; flex-wrap: wrap; cursor: pointer; }
.wl-refuse > input { margin: 0; }
.wl-refuse > input + span { flex: 1 1 0; min-width: 0; }
.wl-refuse b { white-space: nowrap; }
.wl-rule { gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.wl-rule:last-child { border-bottom: 0; }
.wl-rule b.mono { white-space: nowrap; }
.wl-contained { padding: 10px 14px; border-left: 3px solid var(--warn); }
.wl-radio input { margin-top: 3px; }
.wl-radio .input { margin: 0 2px; }
.wl-clip { max-height: 90px; overflow: auto; }
.wl-head-scope { max-width: 980px; }
.wl-kpi-bad { border-color: color-mix(in srgb, var(--crit) 45%, var(--line)); }
.wl-find { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); min-width: 0; }
.wl-find.bad { border-color: color-mix(in srgb, var(--crit) 40%, var(--line)); }
.wl-find.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.wl-find-ic { flex-shrink: 0; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; background: var(--surface-3); }
.wl-find-t { font-weight: 600; margin-bottom: 4px; }
.wl-find-b { line-height: 1.5; color: var(--text-2); }
.wl-find-b code, .wl-why code { font-size: 12px; overflow-wrap: anywhere; }
.wl-why-l { gap: 10px; align-items: flex-start; padding: 3px 0; }
.wl-why-l .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 7px; display: inline-block; }
.wl-ev { gap: 10px; padding: 4px 0; }
.wl-ev > .pill:first-child { flex: none; min-width: 58px; justify-content: center; text-align: center; }
.wl-ev > .mono { flex: none; }
.wl-search { width: 270px; }
.wl-clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; }
.wl-two { display: grid; gap: 14px; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.wl-two-b { display: grid; gap: 14px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
@media (max-width: 900px) {
  .wl-search { width: 100%; }
  .wl-two, .wl-two-b { grid-template-columns: minmax(0, 1fr); }
  .grid.wl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wl-kpis .kpi .val { font-size: 22px; }
  .wl-stmts td.sql { max-width: 200px; }
  /* A rule: its pill and Remove on one line, what it holds and why below, at full width. */
  .row.nw.wl-rule { flex-wrap: wrap; row-gap: 4px; }
  .wl-rule > .grow { order: 3; flex-basis: 100%; }
  .wl-rule > .btn { margin-left: auto; }
  .wl-ev, .row.nw.wl-ev { flex-wrap: wrap; }
  .wl-ev { row-gap: 4px; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .wl-ev:last-child { border-bottom: 0; }
  .wl-ev .grow, .wl-ev > .grow { white-space: normal; min-width: 0; flex-basis: 100%; order: 3; }
  .wl-ev > .btn { order: 4; }
  .wl-find { padding: 10px 12px; gap: 8px; }
  .wl-find-ic { width: 22px; height: 22px; }
  .wl-live td, .wl-stmts td { white-space: normal; }
  .wl-live { table-layout: fixed; width: 100%; }
  .wl-live th:nth-child(2) { width: 100px; }
  .wl-live th:nth-child(3) { width: 82px; }
  .wl-live td { padding-left: 8px !important; padding-right: 8px !important; overflow: hidden; }
  .wl-tabs-scroll { overflow-x: auto; flex-wrap: nowrap; }
  .wl-sheet, .wl-kv { grid-template-columns: minmax(80px, max-content) minmax(0, 1fr); gap: 6px 12px; }
  .wl-trace .wf { grid-template-columns: minmax(0, 1fr) !important; row-gap: 2px; }
  .wl-trace .wf > div:empty { display: none; }
  .wl-trace .wf > .nm { margin-top: 6px; }
  .seg.wl-segwrap { flex-wrap: wrap; height: auto; }
  .seg.wl-segwrap > button { flex: 1 1 auto; }
}
/* the profiler's copy picker and guard rails */
.wl-pick { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.wl-pick-cur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.wl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; color: var(--text); text-decoration: none; white-space: nowrap; }
a.wl-chip:hover { border-color: var(--accent); }
.wl-pick-box { position: relative; width: 340px; max-width: 100%; }
.wl-pick-box .input { width: 100%; }
.wl-pick-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); padding: 4px; max-height: 360px; overflow-y: auto; }
.wl-pick-h { padding: 6px 8px; }
.wl-pick-row { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: var(--r-sm); text-align: left; cursor: pointer; color: var(--text); font: inherit; }
.wl-pick-row.hi, .wl-pick-row:hover { background: var(--accent-soft); }
.wl-pick-name { display: flex; gap: 4px; align-items: baseline; }
.wl-cost { line-height: 1.45; }
.wl-warn-t { color: var(--text); font-weight: 600; }
.wl-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.wl-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--r-sm); background: var(--warn-soft); font-size: 12.5px; color: var(--text-2); }
.wl-note .i { flex: none; margin-top: 2px; }
@media (max-width: 900px) {
  .wl-kpis .kpi .val .mono { font-size: 13px !important; white-space: normal; overflow-wrap: anywhere; line-height: 1.3; }
  .wl-pick-box { width: 100%; }
  .wl-pick-row { padding: 10px 8px; }
}
/* round 2 (workdata) */
.wl-linked { margin-bottom: 14px; }
.wl-nums td.num { white-space: nowrap; }
.wl-bands { margin-top: 12px; }
.wl-bands-head { gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
@media (max-width: 900px) {
  .wl-sum { padding: 12px 0; }
  /* A link in a sentence: a taller tap area, the same lines. */
  .content a.wl-link:not(.btn) { padding: 13px 0; }
  /* The SQL editor wraps (no gutter; its line marks would fall elsewhere). */
  .ed { grid-template-columns: minmax(0, 1fr); }
  .ed-gut, .ed-cur, .ed-err, .dt-band { display: none !important; }
  .ed-hl, .ed-ta { white-space: pre-wrap; overflow-wrap: anywhere; }
  .ed-ta { scrollbar-width: none; }
}
/* Logs on a phone: the lines first; the chart and the secondary links behind chips. */
@media (max-width: 900px) {
  .al-logs .card.al-hist { display: none; }
  .al-logs.al-chart-open .card.al-hist { display: block; }
  .al-logs.al-more-open .al-wide-only { display: inline-flex; }
  .al-logs .al-rangerow .chip, .al-logs .al-lvkey { min-height: 40px; }
}
/* The SQL workbench's tables: a sheet under 1,100 px. */
.wb-tables-btn, .wb-side-close { display: none; }
@media (max-width: 1100px) {
  .wb-tables-btn, .wb-side-close { display: inline-flex; }
  .wb.side-open .wb-side { display: flex; position: fixed; inset: 52px 0 0 0; z-index: 40; border-right: 0; }
  .wb.side-open .wb-side .fi, .wb.side-open .wb-side .tt-h { min-height: 40px; }
}
@media (max-width: 900px) { .qtabs button { min-height: 40px; } }
/* ===== end workload ===== */
/* ===== cluster ===== */
/* The Cluster canvas: tiles per shard on an SLO scale (fine is neutral, amber
   and red are not fine), the problems strip, failure domains, the shard
   panel, the draft's popover and plan. */
:root { --cc-warn-ink: #8a5b00; --cc-hatch: rgba(208, 59, 59, .16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --cc-warn-ink: #f2c55c; --cc-hatch: rgba(255, 138, 128, .16); } }
:root[data-theme="dark"] { --cc-warn-ink: #f2c55c; --cc-hatch: rgba(255, 138, 128, .16); }
.cc-warn { color: var(--cc-warn-ink); }
.cc-bad { color: var(--crit-ink); }
.cc-head { margin-bottom: 10px; }

.cc-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cc-chip.more { cursor: pointer; }
.cc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12.5px; color: var(--text); white-space: nowrap; max-width: 100%; text-decoration: none; font-family: inherit; cursor: pointer; }
.cc-chip > .dim { overflow: hidden; text-overflow: ellipsis; }
.cc-chip.crit { border-color: var(--crit); background: var(--crit-soft); }
.cc-chip.crit b { color: var(--crit-ink); }
.cc-chip.warn { border-color: var(--warn); background: var(--warn-soft); }
.cc-chip.info { border-color: var(--accent); background: var(--accent-soft); }
.cc-chip.plain { cursor: default; color: var(--text-2); }
.cc-chip .spin { width: 11px; height: 11px; }

.cc-main { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 16px; align-items: start; }
.cc-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cc-side { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 96px); overflow: auto; min-width: 0; padding-bottom: 4px; }
@media (max-width: 1180px) { .cc-main { grid-template-columns: minmax(0, 1fr); } .cc-side { position: static; max-height: none; } }

.cc-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cc-find { flex: 1 1 160px; min-width: 140px; max-width: 320px; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--muted); margin: 8px 0 8px; min-height: 24px; }
.cc-sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--line-2); background: var(--surface-2); }
.cc-sw.l1 { background: var(--warn-soft); border-color: var(--warn); }
.cc-sw.l2 { background: var(--crit-soft); border-color: var(--crit); }
.cc-sec { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 12px 0 6px; }
.cc-attn .cc-sec:first-child { margin-top: 0; }
.cc-attn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-ac { display: flex; flex-direction: column; gap: 1px; width: 108px; text-align: left; padding: 6px 8px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; cursor: pointer; }
.cc-ac.crit { border-color: var(--crit); background: var(--crit-soft); }
.cc-ac.crit .cc-ac-why { color: var(--crit-ink); }
.cc-ac.warn { border-color: var(--warn); background: var(--warn-soft); }
.cc-ac.sel { box-shadow: 0 0 0 2px var(--accent); }
.cc-ac.more { justify-content: center; align-items: center; border-style: dashed; }
.cc-ac-why { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tiles: one per shard. */
.cc-grid { --tile: 37px; display: grid; grid-template-columns: repeat(auto-fill, var(--tile)); gap: 3px; }
.cc-t { position: relative; width: var(--tile); height: calc(var(--tile) + 2px); display: flex; flex-direction: column; justify-content: space-between; padding: 2px 3px 3px; border-radius: 5px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; text-align: left; cursor: pointer; overflow: hidden; font-variant-numeric: tabular-nums; }
.cc-t:hover { border-color: var(--line-2); }
.cc-t:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.cc-tn { display: flex; justify-content: space-between; font-size: 9.5px; line-height: 1; color: var(--muted); }
.cc-tn .x { color: var(--crit-ink); }
.cc-tv { font-size: 11.5px; font-weight: 650; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: clip; letter-spacing: -.02em; }
.cc-tp { display: flex; gap: 2px; flex-wrap: wrap; line-height: 0; }
.cc-t.busier { background: var(--surface-3); }
.cc-t.lnone .cc-tv { color: var(--muted); font-weight: 500; }
.cc-t.l1 { background: var(--warn-soft); border-color: var(--warn); }
.cc-t.l2 { background: var(--crit-soft); border-color: var(--crit); }
.cc-t.l2 .cc-tv, .cc-t.l2 .cc-tn { color: var(--crit-ink); }
.cc-t.o1 { box-shadow: inset 0 0 0 1.5px var(--warn); }
.cc-t.o2 { box-shadow: inset 0 0 0 1.5px var(--crit); }
.cc-t.sel { box-shadow: 0 0 0 2px var(--accent); border-color: var(--accent); }
.cc-t.dim, .cc-cell.dim { opacity: .28; }
.cc-t.v1, .cc-sw.v1, .cc-cell.v1 { background: color-mix(in srgb, var(--s1) 26%, var(--surface)); border-color: var(--s1); }
.cc-t.v2, .cc-sw.v2, .cc-cell.v2 { background: color-mix(in srgb, var(--s7) 26%, var(--surface)); border-color: var(--s7); }
.cc-t.v3, .cc-sw.v3, .cc-cell.v3 { background: color-mix(in srgb, var(--s3) 26%, var(--surface)); border-color: var(--s3); }
.cc-t.v4, .cc-sw.v4, .cc-cell.v4 { background: color-mix(in srgb, var(--s5) 26%, var(--surface)); border-color: var(--s5); }
.cc-t.f-dark { background: repeating-linear-gradient(135deg, var(--crit-soft) 0 5px, var(--cc-hatch) 5px 10px); border-color: var(--crit); }
.cc-t.f-noquorum { background: var(--crit-soft); border-color: var(--crit); }
.cc-t.f-noquorum .cc-tv, .cc-t.f-dark .cc-tv { color: var(--crit-ink); }
.cc-t.f-failover { background: var(--warn-soft); border-color: var(--warn); }
.cc-t.f-fewer { border-style: dashed; border-color: var(--muted); }
.cc-t.new { background: var(--good-soft); border: 1px dashed var(--good); cursor: pointer; }
.cc-t.new .cc-tv { color: var(--good-ink); font-weight: 600; }
.cc-t.going { opacity: .6; background: repeating-linear-gradient(135deg, var(--surface-2) 0 5px, var(--cc-hatch) 5px 10px); border-style: dashed; }
.cc-t.moving { border-color: var(--accent); border-style: dashed; }
.cc-t.handle { align-items: center; justify-content: center; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); cursor: grab; text-align: center; font-size: 10px; }
.cc-t.handle .cc-tv { font-size: 10.5px; }
.cc-grid.big { grid-template-columns: repeat(auto-fill, minmax(var(--tile), 1fr)); gap: 8px; }
.cc-grid.big .cc-t { width: auto; height: auto; padding: 8px 10px; gap: 6px; }
.cc-grid.big .cc-tn { font-size: 12px; color: var(--text); font-weight: 600; }
.cc-grid.big .cc-tv { font-size: 15px; }
.cc-grid.big .cc-tp { display: none; }
.cc-tc { display: flex; flex-direction: column; gap: 3px; font-size: 12px; }
.cc-tcr { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; white-space: nowrap; }
.cc-tcr > .mono { overflow: hidden; text-overflow: ellipsis; }
.cc-tcr.down .muted { color: var(--crit-ink); }

/* Pips: one per copy; round is the primary. */
.cc-pip { display: inline-block; width: 6px; height: 6px; border-radius: 1.5px; background: var(--text-2); opacity: .7; flex: none; }
.cc-pip.p { border-radius: 50%; opacity: 1; }
.cc-pip.down { background: transparent; box-shadow: inset 0 0 0 1.5px var(--crit); opacity: 1; }
.cc-pip.copying { background: transparent; box-shadow: inset 0 0 0 1.5px var(--accent); opacity: 1; }
.cc-pip.l1 { background: var(--warn); opacity: 1; }
.cc-pip.l2 { background: var(--crit); opacity: 1; }
.cc-pip.v1 { background: var(--s1); opacity: 1; } .cc-pip.v2 { background: var(--s7); opacity: 1; } .cc-pip.v3 { background: var(--s3); opacity: 1; } .cc-pip.v4 { background: var(--s5); opacity: 1; }
.cc-pip.new { background: transparent; box-shadow: inset 0 0 0 1.5px var(--good); opacity: 1; }
.cc-pip.going { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); opacity: .8; }
.cc-legend .cc-pip { width: 8px; height: 8px; }
.cc-tp.many { gap: 1.5px !important; flex-wrap: nowrap; }
.cc-tp.many .cc-pip { width: 5px; height: 5px; }
.cc-main.drafting .cc-t[data-i] .cc-pip[data-url] { cursor: grab; }
.cc-main.drafting .cc-t[data-i] .cc-tp { gap: 3px; }
.cc-main.drafting .cc-t[data-i] .cc-pip[data-url]:hover { outline: 1.5px solid var(--accent); outline-offset: 1px; }
body.cc-dragging, body.cc-dragging * { cursor: grabbing !important; user-select: none; }
.cc-over { box-shadow: 0 0 0 2px var(--accent) !important; border-color: var(--accent) !important; }
.cc-ghost { position: fixed; z-index: 95; pointer-events: none; background: var(--text); color: var(--surface); font-size: 12px; padding: 3px 9px; border-radius: 6px; box-shadow: var(--shadow-2); white-space: nowrap; }

/* Nodes and zones. */
.cc-zones { display: grid; grid-template-columns: repeat(var(--zones, 1), minmax(0, 1fr)); gap: 10px; }
.cc-zone { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px; background: var(--surface); min-width: 0; }
.cc-zone.failed, .cc-node.failed { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--cc-hatch) 6px 12px); border-color: var(--crit); }
.cc-zone-h { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 13px; min-width: 0; }
.cc-nodes { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 5px; }
.cc-node { border: 1px solid var(--line); border-radius: 6px; padding: 4px 4px 2px; background: var(--surface-2); min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cc-fail { background: none; border: 0; padding: 1px 2px; font: inherit; font-family: var(--mono); font-size: 10px; color: var(--muted); cursor: pointer; text-align: left; border-radius: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-fail:hover { color: var(--text); background: var(--surface-3); }
.cc-fail.on { color: var(--crit-ink); font-weight: 600; }
.cc-cells { display: grid; grid-template-columns: repeat(5, 9px); gap: 2px; }
.cc-cell { width: 9px; height: 9px; padding: 0; border-radius: 2px; border: 0; background: var(--text-2); opacity: .5; cursor: pointer; }
.cc-cell.p { border-radius: 50%; opacity: .8; }
.cc-cell.down { background: transparent; box-shadow: inset 0 0 0 1.5px var(--crit); opacity: 1; }
.cc-cell.l1 { background: var(--warn); opacity: 1; }
.cc-cell.l2 { background: var(--crit); opacity: 1; }
.cc-cell.sel { outline: 2px solid var(--accent); outline-offset: 1px; opacity: 1; }
.cc-cell.going { opacity: .3; }
.cc-cell:focus-visible { outline: 2px solid var(--accent); }

/* What if. */
.cc-wi.bad { border-color: var(--crit); }
.cc-wi-l { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.cc-wi-l > b { min-width: 34px; text-align: right; font-variant-numeric: tabular-nums; font-size: 15px; }
.cc-wi-l.crit > b { color: var(--crit-ink); }
.cc-wi-l.warn > b { color: var(--cc-warn-ink); }

/* The side: problems, a shard, the plan, a run. */
.cc-prob { padding: 2px 0 2px 2px; }
.cc-prob + .cc-prob { border-top: 1px solid var(--line); padding-top: 10px; }
.cc-why { border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; }
.cc-why.crit { background: var(--crit-soft); color: var(--crit-ink); border: 1px solid var(--crit); }
.cc-why.warn { background: var(--warn-soft); border: 1px solid var(--warn); }
.cc-dia-box { display: flex; flex-direction: column; gap: 4px; }
.cc-dia { width: 100%; height: auto; overflow: visible; }
.cc-dn { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }
.cc-dn.shard { fill: var(--surface); stroke: var(--text-2); }
.cc-dn.primary { stroke: var(--text-2); stroke-width: 1.5; }
.cc-dn.warn { stroke: var(--warn); fill: var(--warn-soft); }
.cc-dn.crit { stroke: var(--crit); fill: var(--crit-soft); }
.cc-dn.sel { stroke: var(--accent); stroke-width: 2; }
.cc-dt { font-size: 11px; fill: var(--text); font-family: var(--sans); }
.cc-dt.b { font-weight: 650; }
.cc-dt.s { font-size: 9.5px; fill: var(--muted); }
.cc-dt.crit { fill: var(--crit-ink); }
.cc-dt.warn { fill: var(--cc-warn-ink); }
.cc-de { fill: none; stroke: var(--line-2); stroke-width: 1.2; }
.cc-de.down { stroke: var(--crit); stroke-dasharray: 3 3; }
.cc-de.repl { stroke: var(--text-2); stroke-dasharray: 4 3; opacity: .7; }
.cc-de.repl.lag { stroke: var(--warn); opacity: 1; }
.cc-dg { cursor: pointer; }
.cc-dg:focus-visible rect { stroke: var(--accent); stroke-width: 2; }
.cc-copies td { white-space: nowrap; }
/* R2-cluster-admin-1: the server's name under the copy's, and the ⋯ menu
   held in view at the panel's right edge however wide the table gets. */
.cc-copies .cc2-sname { display: block; }
.cc-copies tr:not(.cc-note) > td:last-child, .cc-copies thead th:last-child { position: sticky; right: 0; background: var(--surface); }
.cc-copies tr.sel > td:last-child { background: linear-gradient(var(--accent-soft), var(--accent-soft)), var(--surface); }
.cc-copies tr.cc-note td { padding-top: 0; border-top: 0; white-space: normal; }
.cc-copies tr:has(+ tr.cc-note) td { border-bottom: 0; }
.cc-menu { position: fixed; z-index: 85; width: 280px; padding: 4px; }
.cc-mi { display: flex; gap: 8px; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-radius: 6px; padding: 6px 8px; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; text-decoration: none; }
.cc-mi:hover:not(:disabled), .cc-mi:focus-visible { background: var(--surface-2); }
.cc-mi:disabled { color: var(--muted); cursor: not-allowed; }
.cc-mi.danger:not(:disabled) { color: var(--crit-ink); }
.cc-mi .i { margin-top: 2px; flex: none; }
.cc-mi-no { display: block; font-size: 11.5px; }
.cc-menu-hd { padding: 6px 8px 8px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: 4px; }

.cc-pop-scrim { position: fixed; inset: 0; z-index: 84; }
.cc-pop { position: fixed; z-index: 85; width: 360px; max-width: calc(100vw - 16px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.cc-pop-t { width: 100%; border-collapse: collapse; }
.cc-pop-t td { padding: 3px 4px; border-bottom: 1px solid var(--line); }
.cc-pop-t tr:last-child td { border-bottom: 0; }
.cc-pop-t tr.cc-going td:first-child { text-decoration: line-through; color: var(--muted); }
.cc-newname { color: var(--good-ink); font-weight: 600; }

.cc-plan { border-color: var(--accent); }
.cc-plan > .bd > .cc-sec:first-child { margin-top: 0; }
.cc-how { margin: 0; padding-left: 18px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; color: var(--text-2); }
.cc-changes { display: flex; flex-direction: column; gap: 6px; }
.cc-ch { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 8px; font-size: 13px; }
.cc-ch .k, .cc-steps .k { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 650; }
.cc-ba { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.cc-ba td { padding: 3px 0; border-bottom: 1px solid var(--line); }
.cc-ba td.num { text-align: right; padding-left: 10px; white-space: nowrap; }
.cc-ba td.to { color: var(--muted); }
.cc-ba td.to.moved { color: var(--accent); font-weight: 650; }
.cc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.cc-steps li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.cc-steps .t { color: var(--muted); font-size: 12px; white-space: nowrap; }
.cc-steps.plain { list-style: decimal; padding-left: 20px; gap: 3px; }
.cc-steps.plain li { display: list-item; }
.cc-steps.run li.ok .k { background: var(--good-soft); color: var(--good-ink); }
.cc-steps.run li.bad .k { background: var(--crit-soft); color: var(--crit-ink); }
.cc-steps.run li.run { font-weight: 600; }
.cc-steps.run li.run .k { background: none; }
.cc-steps.run li.wait { color: var(--text-2); }
.cc-blast { margin-top: 10px; background: var(--warn-soft); border: 1px solid var(--warn); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.cc-chk { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.cc-chk > div { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 4px; }
.cc-chk .m { font-weight: 700; }
.cc-chk .ok .m { color: var(--good-ink); }
.cc-chk .no { color: var(--crit-ink); }
.cc-chk .wn .m { color: var(--cc-warn-ink); }
.cc-run { border-color: var(--accent); }
.cc-run.bad { border-color: var(--crit); }

.cc-cap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.cc-cap > :last-child { grid-column: 1 / -1; }
@media (max-width: 1000px) { .cc-cap { grid-template-columns: minmax(0, 1fr); } }
.cc-sg { display: flex; gap: 10px; align-items: flex-start; background: var(--accent-soft); border-radius: var(--r-sm); padding: 10px 12px; font-size: 13.5px; }
.cc-sg .i { color: var(--accent); margin-top: 2px; flex: none; }
.cc-step { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 4px 2px 10px; background: var(--surface); }
.cc-step b { min-width: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.cc-log td { vertical-align: top; }
.cc-t.handle .cc-tv { font-size: 16px; line-height: 1; }
.cc-hl { font-size: 9.5px; }
.cc-pop-row { flex-wrap: wrap; }
.cc-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
/* Sheets on a phone: a shard or the plan full screen; the what-if and the plan's summary at the bottom. */
.cc-sheet { position: fixed; inset: 0; z-index: 55; background: var(--bg); display: flex; flex-direction: column; animation: fade .12s; }
.cc-sheet-hd { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-height: 52px; border-bottom: 1px solid var(--line); background: var(--surface); flex: none; }
.cc-sheet-hd .btn { min-height: 40px; }
.cc-sheet-bd { flex: 1; overflow: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.cc-sheet-bd > .card { border-radius: var(--r); }
.cc-bsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; max-height: 46vh; overflow: auto; background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 24px rgba(16, 24, 40, .14); border-radius: 14px 14px 0 0; padding: 4px 4px env(safe-area-inset-bottom); }
.cc-bsheet > .card { border: 0; box-shadow: none; }
.cc-planbar { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.cc-planbar .btn { min-height: 40px; }
@media (max-width: 900px) {
  .cc-main { grid-template-columns: minmax(0, 1fr); }
  .cc-side { position: static; max-height: none; overflow: visible; }
  .cc-main.drafting { padding-bottom: 84px; }
  .cc-strip { gap: 5px; }
  .cc-chip { white-space: normal; text-align: left; align-items: flex-start; padding: 6px 11px; }
  .cc-chip .dot { margin-top: 5px; }
  .cc-toolbar { gap: 8px 12px; }
  .cc-find { flex: 1 1 100%; max-width: none; min-height: 40px; }
  .cc-pick select { min-height: 36px; }
  .cc-attn-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .cc-ac { flex: none; scroll-snap-align: start; }
  .cc-grid { gap: 4px; }
  .cc-zones { grid-template-columns: minmax(0, 1fr); }
  .cc-nodes { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .cc-cell { width: 10px; height: 10px; }
  .cc-cells { grid-template-columns: repeat(5, 10px); }
  .cc-fail { min-height: 28px; }
  .cc-pop, .cc-menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; max-width: none; max-height: 82vh; overflow: auto; border-radius: 14px 14px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .cc-pop-scrim { background: rgba(8, 10, 14, .32); }
  .cc-pop .btn, .cc-menu .cc-mi, .cc-sheet .btn.sm, .cc-sheet .btn.xs, .cc-bsheet .btn.sm { min-height: 40px; }
  .cc-pop .select, .cc-pop .input { min-height: 40px; }
  .cc-copies .btn.icon { min-width: 40px; min-height: 40px; }
  .cc-cap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .cc-head .tools { margin-left: 0; width: 100%; }
  .cc-head .tools .seg { flex: 1; }
  .cc-head .tools .seg button { flex: 1; }
  .cc-legend { font-size: 11.5px; gap: 3px 10px; }
  .cc-ac { width: 116px; }
  .cc-log thead { display: none; }
  .cc-log tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cc-log td { border: 0 !important; padding: 0 !important; }
  .cc-log td:nth-child(3) { grid-column: 1 / -1; }
  .cc-log td:nth-child(4) { grid-column: 1 / -1; }
  .cc-head-room td:nth-child(4) { display: none; }
  .cc-copies th:nth-child(3), .cc-copies tr:not(.cc-note) td:nth-child(3) { display: none; }
  .cc-copies td, .cc-copies th { padding-left: 6px !important; padding-right: 6px !important; }
}
/* Settings (views/system.js) and Autoscaling's cluster hooks. */
.cc-set-page { min-width: 0; }
.cc-set-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.cc-set-main.own { grid-template-columns: minmax(0, 1fr) 360px; }
.cc-set-rev { position: sticky; top: 0; max-height: calc(100vh - 120px); overflow: auto; }
.cc-set-list .card > .hd { flex-wrap: wrap; row-gap: 6px; }
.cc-set-list .card > .hd .tools { flex-wrap: nowrap; }
.cc-set-list .card > .hd .tools .input { width: 200px; }
.cc-set-g { display: flex; flex-direction: column; }
.cc-set-gt { font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 2px 0 6px; }
.cc-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, auto); gap: 6px 18px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.cc-set.stacked { grid-template-columns: minmax(0, 1fr); }
.cc-set.stacked .cc-set-r { align-items: flex-start; }
.cc-set.changed { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; margin-left: -10px; border-radius: 0 6px 6px 0; }
.cc-set-l { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-set-l > b { font-size: 13.5px; }
.cc-set-r { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; min-width: 0; }
.cc-set-r > .seg { flex-wrap: wrap; }
.cc-set-step { gap: 6px; align-items: center; }
.cc-set-step > b { min-width: 92px; text-align: center; font-variant-numeric: tabular-nums; }
.cc-set-step .btn.icon { width: 30px; justify-content: center; font-size: 15px; }
.cc-set-text { width: 220px; max-width: 100%; }
.cc-set-text.wide { width: 100%; font-family: var(--mono); font-size: 12px; }
.cc-set.stacked .cc-set-r { width: 100%; }
.cc-set-prov { gap: 4px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.cc-set-was { color: var(--accent); }
.cc-set-flag { font-size: 11.5px; color: var(--text-2); background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.cc-set-chg { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cc-set-chg li { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; }
.cc-set-chg li > span { color: var(--text-2); font-variant-numeric: tabular-nums; }
.cc-set-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cc-set-steps.done li { color: var(--text-2); }
.cc-set-steps li.now { color: var(--text); font-weight: 600; }
.cc-set-diff > summary { cursor: pointer; color: var(--text-2); }
.cc-diff { margin: 6px 0 0; padding: 8px; border-radius: 6px; background: var(--surface-2); font: 12px/1.5 var(--mono); overflow-x: auto; }
.cc-dl { white-space: pre; }
.cc-dl.add { color: var(--good-ink); background: var(--good-soft); }
.cc-dl.del { color: var(--crit-ink); background: var(--crit-soft); }
.cc-dl.skip { color: var(--muted); }
.cc-info { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text-2); }
.cc-info > .i { flex: none; margin-top: 2px; }
.cc-flags .cc-set-r > b { font-variant-numeric: tabular-nums; }
.cc-set-bar { position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 40; background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: 0 -6px 18px rgba(16, 24, 40, .14); }
.cc-set-page.has-bar { padding-bottom: 84px; }
.cc-up { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.cc-up-c { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cc-up:has(> .cc-up-c.wide) { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.cc-cmp { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cc-cmp a { white-space: nowrap; }
.cc-run-v { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: var(--r-sm); background: var(--surface-2); }
.cc-meter-w { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cc-meter { position: relative; height: 8px; border-radius: 999px; background: var(--surface-3); overflow: visible; }
.cc-meter-f { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: var(--s1); }
.cc-meter-f.l1 { background: var(--warn); }
.cc-meter-f.l2 { background: var(--crit); }
.cc-meter-t { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--warn); opacity: .8; border-radius: 1px; }
.cc-meter-t.bad { background: var(--crit); }
.cc-trend { gap: 8px; align-items: center; }
.cc-trend svg { width: 96px; height: 22px; flex: none; }
.cc-disks { display: flex; flex-direction: column; gap: 10px; }
.cc-disk { color: inherit; text-decoration: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.cc-disk:hover, .cc-disk:focus-visible { background: var(--surface-2); }
.cc-ops { display: flex; flex-direction: column; }
.cc-op { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.cc-op:first-child { border-top: 0; padding-top: 2px; }
.cc-op.off .cc-op-t > b, .cc-op.off .cc-op-ic { opacity: .6; }
.cc-op-ic { color: var(--text-2); padding-top: 1px; }
.cc-op-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cc-op-t pre.code { max-height: 220px; }
.cc-op-res { display: flex; gap: 6px; align-items: flex-start; margin-top: 4px; padding: 6px 8px; border-radius: 6px; background: var(--surface-2); overflow-wrap: anywhere; }
.cc-op-res > .i { flex: none; margin-top: 1px; }
.cc-op-res .btn { margin: -4px -4px -4px auto; }
.cc-as .as-kind.guard { background: var(--surface-3); color: var(--text-2); }
.cc-as-own { display: flex; flex-direction: column; gap: 6px; }
.cc-as-own ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.cc-as-sw { display: inline-block; width: 12px; height: 10px; background: repeating-linear-gradient(135deg, transparent 0 2px, color-mix(in srgb, var(--muted) 55%, transparent) 2px 3.5px); border: 1px solid color-mix(in srgb, var(--muted) 50%, transparent); }
@media (max-width: 1100px) {
  .cc-set-main, .cc-set-main.own { grid-template-columns: minmax(0, 1fr) 320px; }
  .cc-up, .cc-up:has(> .cc-up-c.wide) { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .cc-set-main, .cc-set-main.own { grid-template-columns: minmax(0, 1fr); }
  .cc-set-rev { position: static; max-height: none; }
  .cc-set-main.own > :last-child { order: -1; }
  .cc-set { grid-template-columns: minmax(0, 1fr); }
  .cc-set-r { align-items: flex-start; }
  .cc-set-prov { justify-content: flex-start; }
  .cc-set-step .btn.icon { width: 40px; min-height: 40px; }
  .cc-set-list .card > .hd .tools { width: 100%; }
  .cc-set-list .card > .hd .tools .input { flex: 1; width: auto; min-height: 40px; }
  .cc-set .seg button, .cc-set-list .btn.sm, .cc-op .btn.sm, .cc-up .btn.sm { min-height: 40px; }
  .cc-set-text { width: 100%; min-height: 40px; }
  .cc-grid:not(.big) { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
  .cc-grid:not(.big) .cc-t { width: auto; }
  .cc-as .as-rule-r { grid-template-columns: minmax(0, 1fr) auto; }
  .cc-as .as-kind { grid-column: 1 / -1; justify-self: start; padding: 2px 10px; }
  .cc-as .as-choices, .cc-as .as-did { padding-left: 0; }
  .cc-as .as-choice { min-height: 36px; }
  .cc-as .as-word { padding: 2px 2px; }
  .cc-as .page-head .tools { width: 100%; flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .page-head .tools .seg { max-width: 100%; }
  .cc-op { grid-template-columns: minmax(0, 1fr) auto; }
  .cc-op-ic { display: none; }
  .cc-as .as-days { overflow-x: auto; }
  .cc-as .as-live-n { flex: 1 1 40%; min-width: 0; }
  .cc-as .as-day { flex: none !important; padding: 6px 8px; }
}
/* A big tile beside a taller one keeps its words at the top. */
.cc-grid.big .cc-t { justify-content: flex-start; }
/* The Changes tab's head: its kinds go under the title when there is no room. */
.cc-changes > .hd { flex-wrap: wrap; row-gap: 6px; }
.cc-changes > .hd .sub { flex: 1 1 220px; min-width: 0; }
@media (max-width: 900px) {
  .cc-changes > .hd .tools { margin-left: 0; flex: 1 1 100%; min-width: 0; overflow-x: auto; }
  .cc-changes > .hd .tools .seg { flex: 0 0 auto; }
  /* Capacity's cards: the link goes under the title and its words. */
  .cc-cap > .hd { flex-wrap: wrap; row-gap: 6px; }
  .cc-cap > .hd .sub { flex: 1 1 160px; min-width: 0; }
  .cc-cap > .hd .tools { margin-left: 0; }
}
/* ===== end cluster ===== */

/* ===== integration ===== */
/* Views without a time axis (range: false) show no range, window or zoom; they
   still poll, so Live / Paused / Not answering stays (R2-shell-monitor-1). */
.top.no-range > .seg, .top.no-range > .abs, .top.no-range > .chip { display: none; }
/* Number headers sit over their numbers ("table.t th" would set them left). */
table.t th.num { text-align: right; }
/* ===== end integration ===== */
/* ===== cluster2 ===== */
/* A plan the coordinator stopped at a restart, or that was stopped: amber; one that failed: red. */
.cc-run.warn { border-color: var(--warn); }
.cc-run-hd { align-items: flex-start; }
.cc-run-hd .tools { flex-wrap: wrap; justify-content: flex-end; }
/* A dead primary's other issues, after its way out. */
.cc2-why-also { margin-top: 8px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent); color: var(--text-2); }
.cc2-why-rest { margin: 2px 0 0; padding-left: 18px; }
.cc2-why-rest li.crit { color: var(--crit); }
/* A plan's steps in the Changes list. */
.cc2-plan-steps { margin: 4px 0 0; padding-left: 18px; }
.cc2-plan-steps li { margin: 1px 0; }
/* A phone: each chip of the strip is a tap target 40 px tall at least (NEW-cluster-admin-14). */
@media (max-width: 900px) {
  .cc-chip { min-height: 40px; padding-top: 9px; padding-bottom: 9px; }
}
/* On a phone the page's title takes two lines rather than being cut
   (NEW-cluster-admin-14); fleet's block hides it where the heading names the view. */
@media (max-width: 560px) {
  .top .crumbs > svg { display: none; }
  .top .crumbs .ctitle { white-space: normal; line-height: 1.15; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
/* A phone: Rollouts' and Autoscaling's targets are 40 px at least, labels
   included (NEW-cluster-admin-14). Inline links keep their line: the extra
   is padding a negative margin takes back. */
@media (max-width: 560px) {
  .ro-ext { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; margin: -13px -10px; }
  .ro-only { min-height: 40px; }
  .ro-in { padding: 12px 0; margin: -12px 0; }
  .ro-only input { width: 18px; height: 18px; }
  .ro-tool, .ro-cmds .btn.xs, .ro-img1 + .btn.xs { min-width: 40px; min-height: 40px; justify-content: center; }
  .ro-map { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
  .ro-map-s { min-height: 40px; }
  .cc-as .as-text { line-height: 2; }
  .cc-as .as-word { display: inline-block; line-height: 20px; padding: 10px 2px; margin: -10px 0; min-width: 40px; text-align: center; }
  .cc-as .as-day { min-height: 40px; }
  .cc-as .as-note a, .cc-as .cc-as-own a { display: inline-block; padding: 12px 0; margin: -12px 0; }
}
/* The strip greys with the map while the coordinator does not answer (NEW-shell-monitor-15). */
.cc-strip.cc2-stale .cc-chip { opacity: .5; filter: grayscale(1); }
.cc-strip .cc2-now { border-style: dashed; }
/* Each copy's last hour in the shard panel (FL-6). */
.cc2-hist { display: grid; grid-template-columns: max-content 120px minmax(0, 1fr); gap: 4px 10px; align-items: center; margin-bottom: 4px; }
.cc2-hist-row { display: contents; }
.cc2-spark polyline { fill: none; stroke: var(--s1); stroke-width: 1.5; }
@media (max-width: 560px) { .cc2-hist { grid-template-columns: max-content 120px; } .cc2-hist-row > .muted { grid-column: 1 / -1; margin-top: -2px; } .cc2-hist-note a { display: inline-block; padding: 12px 0; margin: -12px 0; } }
/* ===== end cluster2 ===== */
/* ===== fleet ===== */
/* Charts: a pile of event markers shows its count; midnight on an axis of hours reads as a date. */
.chart .ann-n { fill: #fff; font-size: 8.5px; font-weight: 700; pointer-events: none; }
.chart .axis text.day { fill: var(--text); font-weight: 600; }
/* Shell: the crumb names the cluster when the view's heading names the view (SH-12); a phone's search is a 40 px target. */
.crumbs .ctitle, .crumbs .cname { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.crumbs .csep { color: var(--muted); font-weight: 400; }
.crumbs .cname { color: var(--text-2); font-weight: 500; }
.crumbs.titled .ctitle, .crumbs.titled .csep { display: none; }
.crumbs.titled .cname { color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
  .crumbs:not(.titled) .csep, .crumbs:not(.titled) .cname { display: none; }
  .top .search-btn { min-height: 40px; }
  a.home-chip { min-height: 40px; padding: 4px 10px; }
  .crumbs.titled > svg { display: none; }
  .home-evhead a, .home-who { min-height: 40px; }
  .home-evhead a { display: inline-flex; align-items: center; }
  .tl-ev::after { content: ""; position: absolute; left: -15px; top: -12px; width: 40px; height: 40px; }
  .tl-chips .chip, .page-head .seg button { min-width: 40px; }
  .tl-more { min-height: 40px; }
  .palette .it .h.acts { min-height: 40px; min-width: 64px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
}
/* Timeline: grouped repeats, raw fields behind "details". */
.tl-more { margin-left: 6px; font-weight: 500; }
.tl-list tr.tl-sub td { background: var(--surface-2); }
.tl-details summary { cursor: pointer; display: inline-block; }
.tl-raw { white-space: pre-wrap; word-break: break-all; margin: 4px 0 0; max-height: 220px; overflow: auto; background: var(--surface-2); border-radius: 6px; padding: 6px 8px; }
/* Query path: each run a full-height button; the strip scrolls in its card; KPI lines wrap. */
.qp-strip { gap: 4px; align-items: flex-end; }
.qp-strip .qp-runs { flex: 1 1 auto; min-width: 0; overflow-x: auto; overflow-y: hidden; height: 60px; gap: 1px; scrollbar-width: thin; }
.qp-strip .qp-run { flex: 1 0 6px; min-width: 6px; max-width: 18px; height: 56px; background: none; opacity: 1; display: flex; align-items: flex-end; border-radius: 0; }
.qp-run i { display: block; width: 100%; background: var(--s1); opacity: .55; border-radius: 2px 2px 0 0; }
.qp-run:hover i, .qp-run:focus-visible i { opacity: .85; }
.qp-strip .qp-run.sel { background: none; }
.qp-run.sel i { opacity: 1; background: var(--s2); }
.qp-kpis .delta { white-space: normal; overflow: visible; text-overflow: clip; }
@media (max-width: 900px) { .qp-strip .qp-run { flex: 0 0 16px; max-width: none; } }
.home-lane .ev .ev-n { font-weight: 600; color: var(--text); }
.home-lane .ev.left { border-left: 0; border-right: 2px solid var(--line-2); padding: 0 4px 0 0; text-align: right; transform: translateX(1px); }
.home-lane .ev.left.accent { border-color: var(--accent); } .home-lane .ev.left.crit { border-color: var(--crit); } .home-lane .ev.left.warn { border-color: var(--warn); }
/* ===== end fleet ===== */

/* Round 2: chart legend buttons are tap targets on a phone. */
@media (max-width: 900px) { .legend button { min-height: 40px; padding: 0 6px; } }

/* The hub (views/connections.js): a connection's color, and on its page
   (/c/<name>) a stripe of it along the top edge. */
.conn-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; vertical-align: middle; }
.conn-dot.lg { width: 22px; height: 22px; border-radius: 6px; border: 0; cursor: pointer; padding: 0; }
.conn-dot.lg.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.menu button .conn-dot { margin-right: 2px; }
html.via-hub::before { content: ""; position: fixed; left: 0; right: 0; top: 0; height: 3px; background: var(--conn, var(--s1)); z-index: 200; pointer-events: none; }
.conn-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(280px, 2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .conn-grid { grid-template-columns: minmax(0, 1fr); } }
.cloud-expiry { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.cloud-expiry .i { vertical-align: -2px; }
.cloud-bring { position: relative; }
.cloud-bring > summary { list-style: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-bring > summary::-webkit-details-marker { display: none; }
.cloud-bring-list { position: absolute; z-index: 20; margin-top: 4px; padding: 8px 10px; gap: 6px; min-width: 200px; max-height: 260px; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: var(--shadow-2, 0 6px 24px rgba(0,0,0,.15)); }
.fleet-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fleet-tile { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-top: 3px solid var(--c, var(--line)); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.fleet-nums { display: flex; gap: 16px; flex-wrap: wrap; align-items: baseline; }

/* ---------------------------------------------------------------- following another cluster */
.fleet-card > .hd { flex-wrap: wrap; } .fleet-card > .hd .tools { flex-wrap: wrap; justify-content: flex-end; }
.follow-links { gap: 10px; }
.follow-link { display: flex; align-items: center; gap: 10px; min-width: 0; --fc: var(--good); }
.follow-link.warn { --fc: var(--warn); } .follow-link.bad { --fc: var(--crit); } .follow-link.info { --fc: var(--accent); }
.follow-chip { gap: 6px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); min-width: 0; max-width: 34%; overflow: hidden; text-overflow: ellipsis; }
.follow-arrow { flex: 1 1 120px; min-width: 70px; height: 2px; background: var(--fc); position: relative; margin: 14px 8px 0 0; }
.follow-link.warn .follow-arrow, .follow-link.bad .follow-arrow { background: repeating-linear-gradient(90deg, var(--fc) 0 8px, transparent 8px 13px); }
.follow-arrow::after { content: ""; position: absolute; right: -8px; top: -5px; border-left: 9px solid var(--fc); border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.follow-lag { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; color: var(--text-2); }
.follow-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.follow-step.done { color: var(--good-ink); } .follow-step.doing { font-weight: 600; } .follow-step.bad { color: var(--crit-ink); }
.follow-note { margin-bottom: 10px; }
.wb-follow:empty { display: none; } .wb-follow .follow-note { margin: 6px 0 4px; padding: 8px 12px; }
.follow-note .btn { flex: none; }
@media (max-width: 560px) { .follow-link { flex-wrap: wrap; } .follow-chip { max-width: 100%; } .follow-arrow { flex-basis: 100%; order: 1; margin: 18px 8px 4px 0; } .follow-link > .btn { order: 2; } }

/* ---------------------------------------------------------------- simulator */
.sim { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .sim { grid-template-columns: minmax(0, 1fr); } }
.sim-side { position: sticky; top: 12px; }
@media (max-width: 1100px) { .sim-side { position: static; } }
.sim-form { gap: 12px; }
.sim-form .seg { flex-wrap: wrap; }
.sim-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sim-two .input, .sim-two .select { width: 100%; }
.sim-mix { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px 6px; background: var(--surface-2); }
.sim-mixtoggle { width: 100%; justify-content: flex-start; }
.sim-mixrow { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.sim-mixrow .grow { min-width: 0; font-size: 12.5px; }
.sim-mixrow.off .grow { opacity: .55; }
.sim-note, .sim-warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); background: var(--accent-soft); color: var(--text-2); }
.sim-warn { background: var(--warn-soft); color: var(--text); font-size: 13px; }
.sim-warn svg.i { color: var(--warn); flex: none; margin-top: 1px; }
.sim-runs { display: flex; flex-direction: column; }
.sim-run { text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 9px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; color: var(--text); }
.sim-run:hover { background: var(--surface-2); }
.sim-run.on { background: var(--accent-soft); }
.sim-intro { max-width: 640px; margin: 10px auto; text-align: left; color: var(--text-2); }
.sim-intro svg.i { width: 34px; height: 34px; color: var(--accent); }
.sim-intro h2 { margin: 6px 0; font-size: 17px; color: var(--text); }
.sim-intro ol { padding-left: 18px; }
.sim-prog { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.sim-phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 0 1 300px; min-width: 240px; }
.sim-phase { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); }
.sim-phase.running, .sim-phase.done { color: var(--text); }
.sim-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; margin-top: 1px; }
.sim-phase.done .sim-dot { background: var(--good); border-color: var(--good); color: #fff; }
.sim-phase.done .sim-dot svg.i { width: 12px; height: 12px; stroke-width: 3; }
.sim-phase.running .sim-dot { border-color: var(--accent); }
.sim-phase.stopped .sim-dot { border-color: var(--warn); }
.sim-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: sim-spin 0.9s linear infinite; }
@keyframes sim-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sim-spin { animation: none; } }
.sim-kv { display: flex; flex-direction: column; }
.sim-kv b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sim-kv.bad b, .sim-bad { color: var(--crit-ink); }
.sim-verdict { gap: 16px; margin-bottom: 0; }
.sim-score { width: 64px; height: 64px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; border: 3px solid var(--line-2); background: var(--surface); }
.sim-score b { font-size: 22px; line-height: 1; }
.sim-score span { font-size: 10px; color: var(--muted); }
.sim-score.ok { border-color: var(--good); }
.sim-score.warn { border-color: var(--warn); }
.sim-score.bad { border-color: var(--crit); }
.sim-score.info { border-color: var(--accent); }
.sim-kpis .kpi .val { font-size: 22px; }
.sim-kpis .kpi .delta { white-space: normal; max-width: 100%; }
.sim-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.sim-advice { display: flex; flex-direction: column; }
.sim-adv { display: flex; gap: 12px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.sim-adv .grow { min-width: 240px; flex: 1 1 320px; }
.sim-badges { gap: 6px; flex-wrap: wrap; }
.sim-delta { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sim-delta.good { background: var(--good-soft); color: var(--good-ink); }
.sim-delta.bad { background: var(--crit-soft); color: var(--crit-ink); }
.sim-wi-controls { gap: 16px; align-items: flex-end; }
.sim-step { display: flex; flex-direction: column; gap: 3px; }
.sim-cmps { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: 10px; }
.sim-cmp { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); align-items: flex-start; }
.sim-cmp b { font-size: 17px; font-variant-numeric: tabular-nums; }
.sim-grid { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.sim-grid th { font-weight: 600; color: var(--text-2); padding: 2px 6px; text-align: center; }
.sim-grid td { padding: 0; }
.sim-cell { width: 100%; min-width: 58px; height: 30px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 12px; color: var(--text); background: var(--surface-3); }
.sim-cell.l1 { background: var(--seq-1); } .sim-cell.l2 { background: var(--seq-2); } .sim-cell.l3 { background: var(--seq-3); }
.sim-cell.l4 { background: var(--seq-4); color: #fff; } .sim-cell.l5 { background: var(--seq-5); color: #fff; } .sim-cell.l6 { background: var(--seq-6); color: #fff; } .sim-cell.l7 { background: var(--seq-7); color: #fff; }
.sim-cell.no { background-image: repeating-linear-gradient(135deg, transparent 0 5px, color-mix(in srgb, var(--surface) 55%, transparent) 5px 8px); }
.sim-cell.now { border-color: var(--text); }
.sim-cell.best { border-color: var(--good); box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 35%, transparent); }
.sim-cell.sel { outline: 2px solid var(--s2); outline-offset: 1px; }
.sim-key { width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--text); display: inline-block; }
.sim-key.best { border-color: var(--good); }
.sim-key.no { border-color: var(--line-2); background-image: repeating-linear-gradient(135deg, var(--seq-3) 0 3px, var(--surface) 3px 5px); }

/* ---------------------------------------------------------------- on-call agent */
.oc { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .oc { grid-template-columns: minmax(0, 1fr); } }
.oc-side { position: sticky; top: 12px; }
@media (max-width: 1100px) { .oc-side { position: static; } }
.oc-back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.oc-back:hover { color: var(--accent); }
.oc-find { padding: 0 14px 10px; }
.oc-runs { display: flex; flex-direction: column; }
.oc-run { display: flex; flex-direction: column; gap: 3px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.oc-run:hover { background: var(--surface-2); }
.oc-run.on { background: var(--accent-soft); }
.oc-run .tiny { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oc-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.oc-wait, .oc-run .oc-wait { background: var(--warn-soft); color: var(--text); }
.oc-inbox { border-color: color-mix(in srgb, var(--warn) 55%, var(--line)); }
.oc-pend { display: flex; flex-direction: column; gap: 6px; padding: 9px 14px; border-top: 1px solid var(--line); }
.oc-pend-what { display: flex; gap: 8px; align-items: flex-start; border: 0; background: none; padding: 0; text-align: left; color: var(--text); cursor: pointer; font: inherit; }
.oc-pend-what svg.i { flex: none; margin-top: 2px; color: var(--warn); }
.oc-firing { display: flex; flex-direction: column; }
.oc-alerts { display: flex; flex-direction: column; }
.oc-alert { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); }
.oc-alert:first-child { border-top: 0; }
.oc-aname { font-weight: 600; color: var(--text); text-decoration: none; }
.oc-aname:hover { color: var(--accent); }
textarea.input.oc-ask { font-family: inherit; font-size: 14px; line-height: 1.45; }
.oc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.oc-chips .chip { white-space: normal; text-align: left; }
.oc-opts { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); padding: 6px 10px; }
.oc-opts > summary { cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); list-style: none; }
.oc-opts > summary::-webkit-details-marker { display: none; }
.oc-opts[open] > summary { margin-bottom: 10px; }
.oc-optgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oc-optgrid .f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; }
.oc-optgrid .input { width: 100%; }
.oc-span2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .oc-optgrid { grid-template-columns: minmax(0, 1fr); } }
.oc-how { margin: 0; padding-left: 18px; color: var(--text-2); display: flex; flex-direction: column; gap: 8px; }
.oc-turn > .hd { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
.oc-q .small svg.i { width: 13px; height: 13px; vertical-align: -2px; }
.oc-qtext { font-size: 15px; font-weight: 600; margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.oc-turn > .hd .tools { flex-wrap: wrap; }
.oc-work { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.oc-worksum { display: flex; gap: 6px; align-items: center; width: 100%; border: 0; background: none; padding: 8px 10px; color: var(--text-2); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.oc-worksum:hover { color: var(--text); }
.oc-steps { list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; }
.oc-worksum + .oc-steps { border-top: 1px solid var(--line); }
.oc-step, .oc-said { position: relative; }
.oc-steprow { display: flex; gap: 10px; align-items: flex-start; width: 100%; border: 0; background: none; padding: 6px 10px; text-align: left; color: var(--text); cursor: pointer; font: inherit; font-size: 13px; }
.oc-steprow:hover { background: var(--surface-3); }
.oc-ico { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); }
.oc-ico svg.i { width: 13px; height: 13px; }
.oc-step.bad .oc-ico { color: var(--crit); border-color: color-mix(in srgb, var(--crit) 50%, var(--line-2)); }
.oc-stepl { line-height: 22px; word-break: break-word; }
.oc-args { word-break: break-all; }
.oc-err { color: var(--crit-ink); line-height: 1.4; }
.oc-said { display: flex; gap: 10px; align-items: flex-start; padding: 6px 10px; font-size: 13px; color: var(--text-2); font-style: italic; white-space: pre-wrap; }
.oc-said .oc-ico { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, var(--line-2)); font-style: normal; }
.oc-said .grow { line-height: 22px; }
.oc-now { display: flex; gap: 10px; align-items: center; padding: 6px 10px; font-size: 13px; color: var(--text-2); }
.oc-now .oc-ico { border-color: var(--accent); }
.oc-preview { padding: 0 10px 10px 42px; }
.oc-pre { max-height: 320px; font-size: 12px; }
.oc-report { display: flex; flex-direction: column; gap: 10px; line-height: 1.5; }
.oc-report p { margin: 0 0 6px; }
.oc-report p:last-child { margin-bottom: 0; }
.oc-report ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.oc-report code { background: var(--surface-3); padding: 0 4px; border-radius: 4px; word-break: break-all; }
.oc-sec { border-left: 3px solid var(--line-2); padding: 2px 0 2px 12px; }
.oc-sech { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 3px; }
.oc-sec.sum { border-left-color: var(--accent); }
.oc-sec.sum .oc-secb { font-size: 15px; font-weight: 500; }
.oc-sec.cause { border-left-color: var(--serious); }
.oc-sec.acts { border-left-color: var(--warn); }
.oc-sec.watch { border-left-color: var(--good); }
.oc-pid { font-family: var(--mono); font-size: 12.5px; font-weight: 600; }
.oc-props { display: flex; flex-direction: column; gap: 10px; }
.oc-prop { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; background: var(--surface); transition: box-shadow .3s; }
.oc-prop.pending { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); background: color-mix(in srgb, var(--warn-soft) 45%, var(--surface)); }
.oc-prop.applied { border-color: color-mix(in srgb, var(--good) 50%, var(--line)); }
.oc-prop.failed { border-color: color-mix(in srgb, var(--crit) 50%, var(--line)); }
.oc-prop.rejected, .oc-prop.expired { opacity: .75; }
.oc-flash { box-shadow: 0 0 0 3px var(--focus); }
.oc-pico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.oc-prop.pending .oc-pico { background: var(--warn-soft); color: var(--text); }
.oc-req > summary { cursor: pointer; color: var(--text-2); }
.oc-req[open] > summary { margin-bottom: 6px; }
.oc-follow .bd { padding: 10px 12px; }
.oc-follow-row { display: flex; gap: 10px; align-items: flex-end; }
.oc-follow-row .btn { flex: none; }
@media (max-width: 560px) {
  .oc-follow-row { flex-direction: column; align-items: stretch; }
  .oc-wide { display: none; }
  .oc-preview { padding-left: 10px; }
}

/* ---------------------------------------------------------------- slices */
.sl-map { display: flex; flex-direction: column; gap: 8px; min-width: 0; overflow-x: auto; }
.sl-map canvas { display: block; border-radius: var(--r-sm); cursor: crosshair; max-width: 100%; }
.sl-legend { gap: 10px; }
.sl-ramp { display: inline-block; width: 90px; height: 10px; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--s1) 12%, transparent), var(--s1)); }
.sl-none { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--line-2); border-radius: 2px; vertical-align: -1px; }
.sl-code { margin: 0; white-space: pre; overflow-x: auto; font-size: 12.5px; }
