/* Mabel Console component styles. No colour literals here: every colour is a token from theme.css.
   Type: IBM Plex Sans (UI) and IBM Plex Mono (ids, offsets, configs, numbers in tables), bundled under assets/
   (SIL Open Font License 1.1; see NOTICE). 13 px base, 4 px grid, 4 px radius on controls, 6 px on frames.
   Layout rules: sections are separated by a heading and a hairline, not by boxes; frames are kept for
   tables, stat strips, code and dialogs. Icons only where they carry meaning (collapsed sidebar, icon buttons, warnings). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/plex-sans-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/plex-sans-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/plex-sans-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/plex-sans-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/plex-sans-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("assets/plex-sans-latin-ext-600.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/plex-mono-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/plex-mono-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/plex-mono-latin-ext-400.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/plex-mono-latin-ext-500.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --font: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --r: 4px; --r-card: 6px; --r-lg: 8px;
  --side-w: 212px; --side-w-min: 52px; --top-h: 48px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body { font-family: var(--font); font-size: 13px; line-height: 1.45; min-height: 100dvh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
code, pre, kbd, .mono, input.mono, textarea.mono { font-family: var(--mono); }
.mono { font-size: .95em; }
code { font-size: .92em; background: var(--raised); padding: 0 3px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }
a { color: var(--accent-text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3, h4 { line-height: 1.3; margin: 0; font-weight: 600; }
h1 { font-size: 18px; letter-spacing: -0.005em; }
h2 { font-size: 13px; }
h3 { font-size: 13px; }
p { margin: 0 0 8px; }
strong { font-weight: 600; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 6px 10px; border-radius: var(--r); z-index: 1000; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
button, [role="button"], select, summary, label.check { cursor: pointer; touch-action: manipulation; }
button:disabled, select:disabled, input:disabled { cursor: not-allowed; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
svg.mark { flex: 0 0 auto; color: var(--accent-text); display: block; }

/* ---------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
.app.collapsed { grid-template-columns: var(--side-w-min) minmax(0, 1fr); }
.side { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--side); border-right: 1px solid var(--border-soft); z-index: 40; min-width: 0; }
.brand { display: flex; align-items: center; gap: 8px; height: var(--top-h); padding: 0 14px; flex: 0 0 auto; min-width: 0; }
.brand .name { display: flex; align-items: baseline; gap: 5px; min-width: 0; white-space: nowrap; }
.brand .name b { font-size: 14px; font-weight: 600; }
.brand .name small { font-size: 13px; color: var(--fg-muted); font-weight: 400; }
.nav { display: flex; flex-direction: column; padding: 4px 8px 12px; overflow-y: auto; flex: 1 1 auto; }
.nav .group { color: var(--fg-subtle); font-size: 11.5px; font-weight: 500; padding: 14px 8px 3px; white-space: nowrap; }
.nav button { position: relative; display: flex; align-items: center; gap: 9px; width: 100%; min-height: 27px; padding: 3px 8px; border: 0; background: transparent; color: var(--fg-muted);
  border-radius: var(--r); font: inherit; font-size: 13px; text-align: left; white-space: nowrap; }
.nav button svg { display: none; flex: 0 0 auto; }
.nav button:hover { background: var(--raised-2); color: var(--fg); }
.nav button[aria-current="page"] { background: var(--raised-2); color: var(--fg); font-weight: 600; }
.nav button[aria-current="page"]::before { content: ""; position: absolute; left: -8px; top: 5px; bottom: 5px; width: 2px; background: var(--accent); }
.nav .lbl { overflow: hidden; text-overflow: ellipsis; }
.nav .count { margin-left: auto; font-size: 11px; line-height: 16px; padding: 0 5px; border-radius: 3px; background: var(--danger-fill); color: var(--on-danger); font-weight: 600; font-variant-numeric: tabular-nums; }
.side-foot { flex: 0 0 auto; border-top: 1px solid var(--border-soft); padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; }
.side-foot button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 27px; padding: 3px 8px; border: 0; background: transparent; color: var(--fg-subtle); border-radius: var(--r);
  font: inherit; font-size: 12px; white-space: nowrap; }
.side-foot button svg { display: none; }
.side-foot button:hover { background: var(--raised-2); color: var(--fg); }
.app.collapsed .brand { padding: 0; justify-content: center; }
.app.collapsed .brand .name, .app.collapsed .nav .lbl, .app.collapsed .side-foot .lbl { display: none; }
.app.collapsed .nav button svg, .app.collapsed .side-foot button svg { display: block; }
.app.collapsed .nav .group { font-size: 0; padding: 6px 0 4px; margin: 6px 6px 0; border-top: 1px solid var(--border-soft); }
.app.collapsed .nav button, .app.collapsed .side-foot button { justify-content: center; padding: 4px 0; min-height: 30px; }
.app.collapsed .nav button[aria-current="page"]::before { left: -8px; }
.app.collapsed .nav .count { position: absolute; top: 1px; right: 2px; padding: 0 3px; font-size: 10px; line-height: 13px; }
.main { min-width: 0; display: flex; flex-direction: column; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 0 24px; height: var(--top-h); background: var(--card-glass); border-bottom: 1px solid var(--border-soft); }
.top .title { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1 1 auto; }
.top .controls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.crumbs { display: flex; align-items: center; min-width: 0; font-size: 13px; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.crumbs li + li::before { content: "/"; color: var(--fg-subtle); padding: 0 7px; }
.crumbs a, .crumbs button { color: var(--fg-muted); background: none; border: 0; padding: 0; font: inherit; text-decoration: none; }
.crumbs a:hover, .crumbs button:hover { color: var(--fg); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--fg); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.crumbs .mono { font-size: 12.5px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 5px 0 9px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--card);
  color: var(--fg-subtle); font: inherit; font-size: 12.5px; width: 220px; white-space: nowrap; }
.search-btn:hover { border-color: var(--border); color: var(--fg-muted); }
.search-btn svg { width: 14px; height: 14px; }
kbd { font-family: var(--mono); font-size: 10.5px; line-height: 17px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 3px; padding: 0 4px; color: var(--fg-muted); background: var(--card); white-space: nowrap; }
.search-btn kbd { margin-left: auto; }
.hchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border-radius: var(--r); border: 0; background: transparent; color: var(--fg-muted);
  font: inherit; font-size: 12.5px; white-space: nowrap; }
.hchip:hover { background: var(--raised); color: var(--fg); }
.hchip.green .dot { background: var(--ok-fill); } .hchip.amber .dot { background: var(--warn-fill); } .hchip.red .dot { background: var(--danger-fill); }
.hchip.amber { color: var(--warn); } .hchip.red { color: var(--danger); font-weight: 600; }
.env { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 3px; font-family: var(--mono); font-size: 11px; font-weight: 500; white-space: nowrap;
  color: var(--info); border: 1px solid currentColor; }
.env.prod { color: var(--danger); }
.env.stage { color: var(--warn); }
.env.dev { color: var(--ok); }
.vsep { width: 1px; height: 18px; background: var(--border-soft); margin: 0 4px; flex: 0 0 auto; }
.rate { display: inline-flex; align-items: center; height: 28px; }
.rate select { border: 0; min-height: 0; height: 28px; padding: 0 2px 0 4px; font-size: 12.5px; color: var(--fg-muted); background: transparent; border-radius: var(--r); }
.rate select:hover { color: var(--fg); }
.rate select:focus { box-shadow: none; }
.rate .btn.icon { border: 0; height: 28px; min-height: 28px; min-width: 28px; background: transparent; color: var(--fg-muted); }
.umenu { position: relative; display: inline-flex; }
.ubtn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 6px 0 3px; border: 0; border-radius: var(--r); background: transparent; color: var(--fg); font: inherit; font-size: 12.5px; }
.ubtn .badge { border: 0; background: transparent; padding: 0; color: var(--fg-subtle); font-size: 12px; }
.ubtn:hover, .ubtn[aria-expanded="true"] { background: var(--raised); }
.avatar { width: 22px; height: 22px; border-radius: 3px; display: inline-grid; place-items: center; background: var(--fg); color: var(--bg); font-size: 10.5px; font-weight: 600; flex: 0 0 auto; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 220px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-card); box-shadow: var(--shadow-lg); padding: 4px; z-index: 70; }
.menu .who { padding: 6px 8px 8px; border-bottom: 1px solid var(--border-soft); margin-bottom: 4px; }
.menu .who b { display: block; font-size: 13px; font-weight: 600; }
.menu .who span { font-size: 12px; color: var(--fg-muted); overflow-wrap: anywhere; }
.menu [role="menuitem"] { display: flex; align-items: center; gap: 10px; width: 100%; height: 28px; padding: 0 8px; border: 0; background: transparent; color: var(--fg); border-radius: 3px; font: inherit; font-size: 13px; text-align: left; }
.menu [role="menuitem"] svg { display: none; }
.menu [role="menuitem"]:hover, .menu [role="menuitem"]:focus-visible { background: var(--raised); outline: none; }
.menu [role="menuitem"] kbd { margin-left: auto; }
.menu hr { border: 0; border-top: 1px solid var(--border-soft); margin: 4px 0; }
.btn.menu-btn { display: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; text-align: left; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; }
.content { padding: 20px 28px 40px; max-width: 1440px; width: 100%; flex: 1 0 auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 18px; min-height: 30px; }
.ph-title { display: flex; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; min-width: 0; flex: 1 1 320px; }
.ph-title h1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-width: 0; }
.ph-meta { color: var(--fg-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; display: inline-flex; flex-wrap: wrap; gap: 0 4px; align-items: baseline; }
.ph-meta .mono { font-size: 12px; }
.page-head > .row { flex: 0 1 auto; justify-content: flex-end; gap: 6px; }
.about { position: relative; display: inline-flex; }
.about-btn { border: 0; background: none; padding: 0; color: var(--fg-subtle); font: inherit; font-size: 12px; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.about-btn:hover, .about-btn[aria-expanded="true"] { color: var(--fg); }
.about-pop { position: absolute; left: 0; top: calc(100% + 6px); width: min(460px, 80vw); z-index: 60; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-card);
  box-shadow: var(--shadow-lg); padding: 12px 14px 6px; font-size: 12.5px; color: var(--fg-muted); line-height: 1.5; font-weight: 400; }
.about-pop p { margin: 0 0 8px; }
.kterm { font-size: 11.5px; font-weight: 400; color: var(--fg-subtle); margin-left: 5px; }
.grid { display: grid; gap: 16px 24px; }
.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)); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1 1 auto; }
/* a section: heading and a hairline, no box */
.card { min-width: 0; padding: 10px 0 0; border-top: 1px solid var(--border-soft); }
.card > h2, .card > .card-head { margin-bottom: 10px; }
.card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; min-height: 26px; }
.card-head h2 { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 600; }
.card-head .h-meta, .h-meta { font-weight: 400; color: var(--fg-subtle); font-size: 12px; font-variant-numeric: tabular-nums; }
.card-head .row { gap: 6px; }
.muted { color: var(--fg-muted); }
.small { font-size: 12.5px; }
.xs { font-size: 12px; }
/* stat strip: numbers sharing one frame, separated by hairlines */
.strip, .grid:has(> .stat) { display: grid; gap: 0; background: var(--card); border: 1px solid var(--border-soft); border-radius: var(--r-card); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.grid:has(> .stat) { grid-template-columns: none; }
.stat { display: flex; flex-direction: column; gap: 1px; padding: 10px 14px 11px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--border-soft); }
.stat .l { color: var(--fg-muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v { font-size: 20px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .v small { font-size: 12.5px; font-weight: 400; color: var(--fg-muted); margin-left: 3px; }
.stat .sub { color: var(--fg-subtle); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat .spark { height: 22px; margin-top: 4px; }
.asof { font-size: 12px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; white-space: nowrap; }
.asof.warn { color: var(--warn); }
.asof.bad { color: var(--danger); }

/* ---------------------------------------------------------------- controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 28px; padding: 0 10px; border-radius: var(--r); border: 1px solid var(--border-strong);
  background: var(--card); color: var(--fg); font: inherit; font-size: 12.5px; font-weight: 500; line-height: 1; text-decoration: none;
  transition: background-color .1s ease, border-color .1s ease; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; flex: 0 0 auto; }
.btn:hover:not(:disabled) { background: var(--raised); border-color: var(--border); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--card); border-color: var(--border-strong); color: var(--danger); }
.btn.danger:hover:not(:disabled) { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-danger); }
.modal .btn.danger { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-danger); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--fg-muted); }
.btn.ghost:hover:not(:disabled) { background: var(--raised); color: var(--fg); border-color: transparent; }
.btn.sm { min-height: 24px; padding: 0 7px; font-size: 12px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn:disabled { opacity: .45; }
.btn.icon { padding: 0; min-width: 28px; }
.btn.sm.icon { min-width: 24px; }
.top .btn.icon { border-color: transparent; background: transparent; color: var(--fg-muted); }
.top .btn.icon:hover:not(:disabled) { background: var(--raised); color: var(--fg); }
.top .btn.icon svg { width: 16px; height: 16px; }
input, select, textarea { font: inherit; font-size: 13px; color: var(--fg); background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 4px 8px; min-height: 28px; max-width: 100%; }
select { padding-right: 4px; }
input::placeholder, textarea::placeholder { color: var(--fg-subtle); }
textarea { min-height: 88px; width: 100%; resize: vertical; line-height: 1.5; padding: 6px 8px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--ring-soft); outline: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
input[type="checkbox"], input[type="radio"] { min-height: 0; width: 14px; height: 14px; accent-color: var(--accent); margin: 0; }
input[type="checkbox"]:focus, input[type="radio"]:focus { box-shadow: none; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > span { font-size: 12px; color: var(--fg-muted); font-weight: 500; display: flex; align-items: center; flex-wrap: wrap; }
.field .help { font-size: 11.5px; color: var(--fg-subtle); }
.field .err { font-size: 12px; color: var(--danger); font-weight: 500; }
.form { display: grid; gap: 10px 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); align-items: end; }
.form .wide { grid-column: 1 / -1; }
label.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-muted); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--card); max-width: 100%; overflow-x: auto; }
.seg button { border: 0; border-right: 1px solid var(--border-strong); background: transparent; color: var(--fg-muted); padding: 0 9px; font: inherit; font-size: 12px; min-height: 26px; white-space: nowrap; }
.seg button:last-child { border-right: 0; }
.seg button:hover { color: var(--fg); background: var(--raised); }
.seg button[aria-pressed="true"] { background: var(--raised-2); color: var(--fg); font-weight: 600; }
.tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--border-soft); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; color: var(--fg-muted); padding: 7px 0; margin-bottom: -1px; font: inherit; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--fg); font-weight: 600; border-bottom-color: var(--fg); }
.tabs button:hover { color: var(--fg); }

/* ---------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 5px; border-radius: 3px; font-size: 11.5px; border: 1px solid var(--border-soft);
  background: transparent; color: var(--fg-muted); white-space: nowrap; line-height: 1; font-variant-numeric: tabular-nums; }
.badge.mono { font-size: 11px; }
.badge.ok { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.badge.bad { color: var(--danger); border-color: transparent; background: var(--danger-soft); font-weight: 500; }
.badge.warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.badge.info { color: var(--info); border-color: var(--border-soft); }
.badge.accent { color: var(--accent-text); border-color: var(--border-soft); }
.badge:has(> .dot) { border: 0; background: transparent; padding: 0; gap: 6px; font-size: 12.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--fg-subtle); flex: 0 0 auto; }
.dot.ok { background: var(--ok-fill); }
.dot.bad { background: var(--danger-fill); }
.dot.warn { background: var(--warn-fill); }

/* ---------------------------------------------------------------- tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: var(--r-card); background: var(--card); }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { white-space: nowrap; padding: 5px 12px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
td { height: 32px; }
th { color: var(--fg-subtle); font-weight: 500; font-size: 11.5px; background: var(--card); position: sticky; top: 0; z-index: 1; height: 30px; border-bottom-color: var(--border-strong); }
th .sort { display: inline-flex; align-items: center; gap: 3px; border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; white-space: nowrap; }
th .sort:hover { color: var(--fg); }
th .sort svg { opacity: 0; }
th .sort:hover svg, th .sort:focus-visible svg { opacity: .5; }
th[aria-sort] .sort { color: var(--fg); }
th[aria-sort] .sort svg { opacity: 1; }
th.num .sort { flex-direction: row-reverse; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--raised); }
tr.clickable { cursor: pointer; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-family: var(--mono); font-size: 12px; }
td.mono, td .mono, td.mono .mono { font-size: 12px; }
td.empty-cell { padding: 16px 12px; text-align: left; color: var(--fg-muted); white-space: normal; }
td.empty-cell .row { margin-top: 8px; }
.wrap, td.wrap { overflow-wrap: anywhere; white-space: normal; min-width: 160px; }
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 4px 8px; border-top: 1px solid var(--border-soft); font-size: 12px; color: var(--fg-muted); background: var(--card); flex-wrap: wrap; }
.pager .num { font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 1px; background: var(--raised-2); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--fg-subtle); }
.bar.warn > i { background: var(--warn-fill); }
.bar.bad > i { background: var(--danger-fill); }
pre.code { background: var(--raised); border: 1px solid var(--border-soft); border-radius: var(--r); padding: 10px 12px; overflow: auto; max-height: 420px; font-size: 12px;
  line-height: 1.6; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 20px; font-size: 13px; }
.kv dt { color: var(--fg-muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- alerts, empty states, health */
.alert { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--r); border: 1px solid var(--border-soft); border-left: 2px solid var(--border); font-size: 12.5px; background: var(--card); color: var(--fg-muted); }
.alert strong { font-weight: 600; color: var(--fg); }
.alert .small { font-size: 12.5px; }
.alert.critical { background: var(--danger-soft); border-color: transparent; border-left-color: var(--danger-fill); color: var(--fg); }
.alert.warning { background: var(--warn-soft); border-color: transparent; border-left-color: var(--warn-fill); color: var(--fg); }
.alert.info { border-left-color: var(--info); }
.alert.ok { border-left-color: var(--ok-fill); }
.alert svg { flex: 0 0 auto; margin-top: 2px; }
.alert.critical svg { color: var(--danger); } .alert.warning svg { color: var(--warn); }
.empty { padding: 14px 16px; border: 1px solid var(--border-soft); border-radius: var(--r-card); color: var(--fg-muted); background: var(--card); font-size: 12.5px; }
.empty h3 { color: var(--fg); margin-bottom: 2px; font-size: 13px; }
.empty p { margin: 0; max-width: 72ch; }
.empty .row { margin-top: 10px; }
.health { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 0 0 14px; margin-bottom: 16px; border-bottom: 1px solid var(--border-soft); }
.lights { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--fg-subtle); }
.lights.green { background: var(--ok-fill); }
.lights.amber { background: var(--warn-fill); }
.lights.red { background: var(--danger-fill); }
.health h2 { font-size: 13px; display: flex; align-items: center; gap: 8px; }
.health .say { min-width: 0; color: var(--fg-muted); font-size: 12.5px; }

/* ---------------------------------------------------------------- modal, toasts, tooltips, palette */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s ease-out; }
.modal { background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--r-lg); width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 18px 20px; box-shadow: var(--shadow-lg); }
.modal.wide { width: min(920px, 100%); }
.modal h2 { margin-bottom: 12px; font-size: 15px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin: 18px -20px -18px; padding: 10px 20px; border-top: 1px solid var(--border-soft); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 200; max-width: min(400px, calc(100vw - 32px)); }
.toast { background: var(--tip-bg); color: var(--tip-fg); padding: 8px 8px 8px 12px; border-radius: var(--r-card); box-shadow: var(--shadow-lg); font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; }
.toast > svg { margin-top: 1px; flex: 0 0 auto; }
.toast.error { background: var(--danger-fill); color: var(--on-danger); }
.toast .x { margin-left: auto; color: inherit; opacity: .75; }
.toast .x:hover:not(:disabled) { background: transparent; color: inherit; opacity: 1; }
.toast .fix { display: block; opacity: .85; font-size: 12px; margin-top: 2px; }
.help-tip { position: relative; display: inline-flex; vertical-align: middle; }
.help-tip > button { width: 15px; height: 15px; min-height: 15px; border-radius: 50%; border: 1px solid var(--border-strong); background: transparent; color: var(--fg-subtle); font: inherit; font-size: 9.5px; font-weight: 600;
  display: inline-grid; place-items: center; padding: 0; margin-left: 5px; line-height: 1; }
.help-tip > button:hover { color: var(--fg); border-color: var(--border); }
.help-tip [role="tooltip"] { position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%); width: max-content; max-width: min(300px, 80vw); z-index: 60;
  background: var(--tip-bg); color: var(--tip-fg); font-size: 12px; font-weight: 400; line-height: 1.45; padding: 6px 9px; border-radius: var(--r); white-space: normal; }
.palette { width: min(600px, 100%); align-self: start; margin-top: 12vh; padding: 0; overflow: hidden; }
.palette input { width: 100%; border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; font-size: 14px; padding: 12px 14px; min-height: 46px; background: var(--card); }
.palette input:focus { outline: none; box-shadow: none; }
.palette ul { list-style: none; margin: 0; padding: 4px; max-height: 52vh; overflow-y: auto; }
.palette li button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 13px; padding: 0 10px; border-radius: var(--r); min-height: 30px; }
.palette li button svg { display: none; }
.palette li button[aria-selected="true"] { background: var(--raised-2); }
.palette li .kind { margin-left: auto; font-size: 11.5px; color: var(--fg-subtle); }
.palette .hint { padding: 6px 14px; border-top: 1px solid var(--border-soft); color: var(--fg-subtle); font-size: 11.5px; display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- wizards */
.steps { display: flex; gap: 4px 18px; list-style: none; padding: 0 0 10px; margin: 0 0 14px; flex-wrap: wrap; border-bottom: 1px solid var(--border-soft); counter-reset: none; }
.steps li { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--fg-subtle); }
.steps li .n { font-family: var(--mono); font-size: 11.5px; font-variant-numeric: tabular-nums; color: inherit; }
.steps li .n svg { display: none; }
.steps li .n:empty::before { content: ""; }
.steps li[aria-current="step"] { color: var(--fg); font-weight: 600; }
.steps li.done { color: var(--fg-muted); }
.choices { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.choice { text-align: left; border: 1px solid var(--border-soft); background: var(--card); color: var(--fg); border-radius: var(--r-card); padding: 9px 11px; font: inherit; display: flex; flex-direction: column; gap: 2px; min-height: 44px; }
.choice:hover:not(:disabled) { border-color: var(--border); }
.choice:disabled { opacity: .55; }
.choice[aria-pressed="true"], .choice[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice strong { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.choice strong svg { display: none; }
.choice span { color: var(--fg-muted); font-size: 12px; }
.review { border: 1px solid var(--border-soft); border-radius: var(--r-card); padding: 10px 12px; background: var(--raised); }
.strength { height: 3px; border-radius: 1px; background: var(--raised-2); overflow: hidden; }
.strength > i { display: block; height: 100%; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; font-family: var(--mono); font-size: 13px; padding: 12px; background: var(--raised); border: 1px solid var(--border-soft); border-radius: var(--r); }

/* ---------------------------------------------------------------- records */
.rec { border-bottom: 1px solid var(--border-soft); padding: 7px 4px 8px; }
.rec:hover { background: var(--raised); }
.rec .meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--fg-subtle); margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.rec .meta .badge { border: 0; padding: 0; color: var(--fg-muted); }
.rec .val { font-size: 12px; }
.rec > .mono.small { font-size: 12px; color: var(--fg); line-height: 1.55; }
.hl { background: var(--warn-soft); border-radius: 2px; outline: 1px solid var(--warn-fill); }

/* ---------------------------------------------------------------- sign-in */
.login { min-height: 100dvh; display: grid; place-items: start center; padding: 14vh 16px 24px; background: var(--bg); }
.login .card { width: min(360px, 100%); padding: 0; border: 0; }
.login .lockup { display: flex; align-items: baseline; gap: 6px; margin-bottom: 28px; font-size: 15px; font-weight: 600; }
.login .lockup svg { align-self: center; }
.login .lockup .sub { font-weight: 400; color: var(--fg-muted); }
.login h1 { font-size: 20px; }
.login .tag { color: var(--fg-muted); margin: 4px 0 18px; font-size: 13px; }
.login form { display: flex; flex-direction: column; gap: 12px; }
.login input:not([type="checkbox"]) { width: 100%; min-height: 34px; }
.login .or { display: flex; align-items: center; gap: 10px; color: var(--fg-subtle); font-size: 12px; margin: 14px 0; }
.login .or::before, .login .or::after { content: ""; flex: 1; height: 1px; background: var(--border-soft); }
.login .btn { width: 100%; min-height: 34px; font-size: 13px; }
.login .foot { margin: 18px 0 0; font-size: 12px; color: var(--fg-subtle); }
.login-meta { margin-top: 16px; font-size: 12px; color: var(--fg-subtle); font-family: var(--mono); }

/* ---------------------------------------------------------------- charts */
.spark { width: 100%; height: 64px; display: block; }
.chart { position: relative; }
.chart > svg { display: block; width: 100%; overflow: visible; }
.chart > svg:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.chart .axis { fill: var(--fg-subtle); font-size: 10.5px; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.chart .tip { position: absolute; top: 4px; pointer-events: none; background: var(--card); color: var(--fg); border: 1px solid var(--border-strong); border-radius: var(--r); padding: 5px 8px; font-size: 12px; line-height: 1.55;
  z-index: 5; white-space: nowrap; box-shadow: var(--shadow-lg); font-variant-numeric: tabular-nums; }
.chart .tip i { display: inline-block; width: 10px; height: 2px; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; font-size: 11.5px; color: var(--fg-muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend svg { flex: none; }
.progress-log { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--fg-muted); }
.skeleton { background: var(--raised); border-radius: var(--r); min-height: 16px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 0 7px; border-radius: var(--r); border: 1px solid var(--border-soft); background: transparent; color: var(--fg-muted); font: inherit; font-size: 12px; min-height: 22px; }
.chip:hover { border-color: var(--border-strong); color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- footer */
.foot-bar { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 10px 28px; border-top: 1px solid var(--border-soft); font-size: 11.5px; color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.foot-bar .mono { font-size: 11px; }
.foot-bar button { border: 0; background: none; padding: 0; font: inherit; color: var(--fg-muted); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.foot-bar button:hover { color: var(--fg); }
.foot-bar .spacer { flex: 1 1 auto; }

/* ---------------------------------------------------------------- overview */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px 28px; margin-top: 20px; }
.ov-chart { height: 150px; }
.ov-chart .spark { height: 150px; }
.issues { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border-soft); border-radius: var(--r-card); background: var(--card); }
.issues li { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 2px 10px; padding: 7px 12px; border-bottom: 1px solid var(--border-soft); font-size: 12.5px; }
.issues li:last-child { border-bottom: 0; }
.issues .lvl { font-family: var(--mono); font-size: 11px; text-transform: uppercase; padding-top: 1px; }
.issues .lvl.critical { color: var(--danger); font-weight: 500; }
.issues .lvl.warning { color: var(--warn); }
.issues .d { grid-column: 2; color: var(--fg-subtle); font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; font-size: 12.5px; border: 1px solid var(--border-soft); border-radius: var(--r-card); background: var(--card); }
.checks div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--border-soft); color: var(--fg-muted); }
.checks div:nth-child(odd) { border-right: 1px solid var(--border-soft); }
.checks div:nth-last-child(-n+2) { border-bottom: 0; }
.checks b { font-weight: 500; color: var(--fg); font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.checks b.bad { color: var(--danger); }
.checks b.warn { color: var(--warn); }
td .tspark { display: inline-block; vertical-align: middle; width: 80px; height: 16px; }

/* ---------------------------------------------------------------- connect page */
.snip { border: 1px solid var(--border-soft); border-radius: var(--r-card); background: var(--card); overflow: hidden; min-width: 0; }
.snip-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--border-soft); background: var(--raised); font-size: 12px; color: var(--fg-muted); flex-wrap: wrap; }
.snip-head b { color: var(--fg); font-weight: 600; }
.snip pre.code { border: 0; border-radius: 0; background: var(--card); max-height: 460px; white-space: pre; overflow-wrap: normal; }
.copyline { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 10px; border: 1px solid var(--border-soft); border-radius: var(--r); background: var(--raised); }
.copyline code { background: none; padding: 0; font-size: 12.5px; flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1279px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.g4:has(> .stat) { grid-template-columns: none; }
  .search-btn { width: auto; padding: 0 7px; }
  .search-btn .label, .search-btn kbd, .ubtn .uname { display: none; }
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1023px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-102%); transition: transform .18s ease; box-shadow: var(--shadow-lg); }
  .side.open { transform: none; }
  .app.collapsed .brand { padding: 0 14px; justify-content: flex-start; }
  .app.collapsed .brand .name, .app.collapsed .nav .lbl { display: initial; }
  .app.collapsed .nav button svg { display: none; }
  .app.collapsed .nav .group { font-size: 11.5px; padding: 14px 8px 3px; margin: 0; border-top: 0; }
  .app.collapsed .nav button { justify-content: flex-start; padding: 3px 8px; min-height: 27px; }
  .app.collapsed .nav .count { position: static; }
  .side-foot .collapse-btn { display: none; }
  .btn.menu-btn { display: inline-flex; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 16px 16px 32px; }
  .foot-bar { padding: 10px 16px; }
  .top { padding: 0 10px; }
  .crumbs li:not(:last-child) { display: none; }
  .crumbs li:last-child::before { display: none; }
}
@media (max-width: 767px) {
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .strip, .grid:has(> .stat) { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.g4:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 9px 12px; }
  .stat:nth-child(2n+1) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--border-soft); }
  .stat .v { font-size: 18px; }
  input, select, textarea { font-size: 16px; }
  .top .controls .hide-sm, .hide-sm { display: none; }
  .codes { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: flex-start; }
  .page-head > .row { justify-content: flex-start; }
  .ubtn .uname, .ubtn .badge { display: none; }
  .hchip .htext { display: none; }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .checks div:nth-child(odd) { border-right: 0; }
  .checks div:nth-last-child(2) { border-bottom: 1px solid var(--border-soft); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- alerts: the bell and its popover */
.bell { position: relative; display: inline-flex; }
.bell-count { position: absolute; top: 3px; right: 2px; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 3px; background: var(--danger-fill); color: var(--on-danger);
  font-size: 9.5px; font-weight: 600; display: grid; place-items: center; line-height: 1; pointer-events: none; font-variant-numeric: tabular-nums; }
.popover { position: absolute; right: 0; top: calc(100% + 4px); width: 360px; max-width: calc(100vw - 24px); background: var(--card); border: 1px solid var(--border-strong);
  border-radius: var(--r-card); box-shadow: var(--shadow-lg); padding: 10px; z-index: 60; }
.pop-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.pop-list li { padding: 7px 6px; font-size: 12.5px; }
.pop-list li + li { border-top: 1px solid var(--border-soft); }
.pop-list li.unread { box-shadow: inset 2px 0 0 var(--accent); }
/* ---- cluster map */
table.map th.mc, table.map td.mc { text-align: center; padding: 3px 6px; }
table.map td { vertical-align: middle; height: 28px; }
.cell { display: inline-grid; place-items: center; width: 22px; height: 18px; border-radius: 2px; font-family: var(--mono); font-weight: 500; font-size: 11px; border: 1px solid transparent; }
.cell.lead { background: var(--accent); color: var(--on-accent); }
.cell.foll { background: transparent; color: var(--fg-muted); border-color: var(--border-strong); }
.cell.oos { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-fill); }
.map-legend { margin: 0 0 10px; font-size: 12px; color: var(--fg-muted); }
.map-wrap { contain: paint; }
.map-legend span.cell { display: inline-grid; place-items: center; gap: 0; width: 20px; height: 18px; }
/* ---- diffs and the guided settings editor */
.diff-old { text-decoration: line-through; color: var(--fg-muted); }
.diff-new { color: var(--ok); }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 270px); gap: 12px; padding: 9px 12px; border-bottom: 1px solid var(--border-soft); align-items: center; }
.set-row.changed { box-shadow: inset 2px 0 0 var(--accent); background: var(--raised); }
.set-input { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.set-input > select, .set-input > input { width: 100%; }
/* ---- restart one by one */
.rr-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.rr-list li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--fg-muted); }
.rr-list li.cur { color: var(--fg); font-weight: 600; }
.rr-list li.done { color: var(--fg); }
.rr-list .n { flex: none; min-width: 22px; font-family: var(--mono); font-size: 11.5px; color: var(--fg-subtle); }
.rr-list .n svg { color: var(--ok); }
.rr-list li.cur .n { color: var(--accent-text); }
/* ---- keyboard shortcuts */
table.keys td { border: 0; padding: 4px 8px; white-space: normal; height: auto; }
table.keys td:first-child { white-space: nowrap; }
table.keys tbody tr:hover { background: transparent; }
@media (max-width: 767px) {
  .popover, .menu { position: fixed; left: 12px; right: 12px; top: 54px; width: auto; max-width: none; }
  .set-row { grid-template-columns: minmax(0, 1fr); }
  .about-pop { position: fixed; left: 12px; right: 12px; top: 60px; width: auto; }
}
/* ---- roles: the permission matrix */
.roles-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.role-card { padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--r-card); background: var(--card); }
.role-card.mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
table.matrix th.c, table.matrix td.c { text-align: center; width: 96px; }
table.matrix th.mine, table.matrix td.mine { background: var(--raised); }
table.matrix tr.group-row th { text-align: left; font-size: 11.5px; color: var(--fg-muted); background: var(--raised); padding-top: 8px; position: static; }
table.matrix tbody tr.group-row:hover { background: transparent; }
.grant { display: inline-grid; place-items: center; }
.grant.yes { color: var(--fg); }
.grant.no { color: var(--fg-subtle); }
/* ---- apps and connectors */
.pats { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; }
ul.diff { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-family: var(--mono); }
ul.diff li { display: flex; gap: 8px; align-items: baseline; padding: 3px 8px; border-radius: 2px; font-size: 12px; }
ul.diff li .sign { font-family: var(--mono); font-weight: 600; width: 12px; }
ul.diff li.add { background: var(--ok-soft); color: var(--ok); }
ul.diff li.del { background: var(--danger-soft); color: var(--danger); }
ul.diff li.chg { background: var(--warn-soft); color: var(--warn); }
.span2 { grid-column: 1 / -1; }
.choices.tpl { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.matrix-wrap { contain: paint; }
table.matrix td:first-child { white-space: normal; min-width: 220px; }
.form.tform { align-items: start; }
.btn:not(.icon) > svg { display: none; }
@media (max-width: 767px) { .stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
