/* Account Console — layout on top of Carbon g100 tokens.
   Shell + token idioms cloned from performance/static/app.css (the house
   reference); cyan accent (#82cfff family) for signal, matching the favicon.

   System:  spacing 4/8/12/16/24/32 (--sp-*), fields 40px, actions 32/40/48,
   body text 14px, hints 13px, metadata 12px (never below), monospace only
   for technical values. Sticky stack: header 47px (fixed) → sweep / conn
   bars → context bar; their measured heights (--sweep-h, --conn-h, --ctx-h)
   come from shared.js so anchors and the rail never hide under them.
   Stacking order: header 8000 · drawer 7999 · ctx bar 7500 · stickies
   7400 · combobox menu 9000 · health tip 9100 · health panel 9200 ·
   modal 9500. */

@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 300;
  src: url('/static/vendor/plex/IBMPlexSans-Light.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400;
  src: url('/static/vendor/plex/IBMPlexSans-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500;
  src: url('/static/vendor/plex/IBMPlexSans-Medium.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600;
  src: url('/static/vendor/plex/IBMPlexSans-SemiBold.woff2') format('woff2');
}

:root {
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-6: 24px; --sp-8: 32px;
  --hdr-h: 47px; --sweep-h: 0px; --conn-h: 0px; --ctx-h: 0px;
  --stack-top: calc(var(--hdr-h) + var(--sweep-h) + var(--conn-h) + var(--ctx-h));
  --accent: #82cfff;
  --shell-w: 1280px;
  --rail-w: 200px;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ok: #42be65; --warn: #f1c21b; --err: #fa4d56; --err-text: #ff8389;
  --text-helper: #a8a8a8;          /* 4.9:1 on #262626 — the g100 helper token (#8d8d8d) is 3.6:1 */
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100%;
  background: var(--cds-background, #161616);
  color: var(--cds-text-primary, #f4f4f4);
  font: 14px/1.5 'IBM Plex Sans', system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
a { color: var(--cds-link-primary, #78a9ff); text-decoration: none; }
a:hover { text-decoration: underline; }
/* links inside running text are underlined (not colour-only) */
p a, .hint a, .how a, li.alert-error a, .acct-meta a { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.muted { color: var(--cds-text-secondary, #c6c6c6); font-weight: 400; }
code { font-family: var(--mono); font-size: .92em; }
h1, h2, h3 { overflow-wrap: anywhere; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: var(--sp-4); top: -48px; z-index: 9999;
  padding: 10px 16px; background: var(--accent); color: #161616; font-weight: 600;
  transition: top .1s;
}
.skip-link:focus { top: 8px; outline: 2px solid #fff; }

main { max-width: var(--shell-w); margin: 0 auto; padding: calc(var(--hdr-h) + var(--sp-4)) var(--sp-4) 96px; }
main:focus { outline: none; }
cds-header { position: fixed; top: 0; left: 0; right: 0; z-index: 8000; }
cds-header-nav-item, cds-header-name { white-space: nowrap; }

.hdr-right { margin-left: auto; display: flex; align-items: stretch; gap: 4px;
  padding-right: 8px; height: var(--hdr-h); }
.hdr-logout { margin: 0; display: flex; align-items: stretch; }
.hdr-ghost {
  border: none; background: none; cursor: pointer; font: inherit;
  font-size: 13px; letter-spacing: .16px; padding: 0 16px; min-height: 44px;
  color: var(--cds-text-secondary, #c6c6c6);
  transition: color .11s, background-color .11s;
}
.hdr-ghost:hover { background: var(--cds-layer-hover-01, #333333); color: var(--cds-text-primary); }
.hdr-ghost:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }

/* responsive nav drawer — Carbon hides the header nav below 1056px and
   shows the hamburger; this light-DOM drawer takes over */
.side-drawer {
  position: fixed; top: var(--hdr-h); left: 0; bottom: 0; z-index: 7999;
  width: 256px; padding: 8px 0; overflow-y: auto;
  background: var(--cds-layer-01, #262626);
  box-shadow: 2px 0 6px rgba(0, 0, 0, .5);
}
.sd-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 16px;
  border-left: 3px solid transparent;
  color: var(--cds-text-secondary, #c6c6c6); font-size: 14px; text-decoration: none;
}
.sd-link:hover { background: var(--cds-layer-hover-01, #333333); color: var(--cds-text-primary); text-decoration: none; }
.sd-link.on {
  background: var(--cds-layer-selected-01, #393939);
  border-left-color: var(--accent); color: var(--cds-text-primary); font-weight: 600;
}
.sd-link:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
@media (min-width: 1056px) { .side-drawer, #nav-burger { display: none !important; } }

.page-head { margin: var(--sp-6) 0 var(--sp-4); }
.page-head h1 { font-size: 20px; font-weight: 500; margin: 0; }
.page-head p { color: var(--cds-text-secondary); margin: 4px 0 0; font-size: 14px; max-width: 760px; }

/* ── Carbon contextual tokens ──────────────────────────────────────
   The vendored theme emits only the SUFFIXED tokens (--cds-layer-01 …).
   Carbon web components style their shadow DOM with the CONTEXTUAL ones
   (--cds-layer, --cds-field, …) and several have no baked-in fallback. */
:root {
  --cds-layer: var(--cds-layer-01);
  --cds-layer-hover: var(--cds-layer-hover-01);
  --cds-layer-active: var(--cds-layer-active-01);
  --cds-layer-selected: var(--cds-layer-selected-01);
  --cds-layer-selected-hover: var(--cds-layer-selected-hover-01);
  --cds-layer-accent: var(--cds-layer-accent-01);
  --cds-layer-accent-hover: var(--cds-layer-accent-hover-01);
  --cds-layer-accent-active: var(--cds-layer-accent-active-01);
  --cds-layer-background: var(--cds-layer-background-01);
  --cds-field: var(--cds-field-01);
  --cds-field-hover: var(--cds-field-hover-01);
  --cds-border-subtle: var(--cds-border-subtle-01);
  --cds-border-subtle-selected: var(--cds-border-subtle-selected-01);
  --cds-border-strong: var(--cds-border-strong-01);
  --cds-border-tile: var(--cds-border-tile-01);
  --cds-layout-size-height-xs: 1.5rem;
  --cds-layout-size-height-sm: 2rem;
  --cds-layout-size-height-md: 2.5rem;
  --cds-layout-size-height-lg: 3rem;
  --cds-layout-size-height-xl: 4rem;
  --cds-layout-size-height-2xl: 5rem;
  --cds-layout-size-height-min: 1.5rem;
  --cds-layout-size-height-max: 5rem;
  --cds-layout-density-padding-inline-min: 0.5rem;
  --cds-layout-density-padding-inline-normal: 1rem;
  --cds-layout-density-padding-inline-max: 1rem;
  /* button tokens — the vendored theme emits none, and the component's
     fallbacks are the LIGHT theme (blue tertiary text at 2.9:1 on g100) */
  --cds-button-primary: #0f62fe; --cds-button-primary-hover: #0353e9; --cds-button-primary-active: #002d9c;
  --cds-button-secondary: #6f6f6f; --cds-button-secondary-hover: #606060; --cds-button-secondary-active: #393939;
  --cds-button-tertiary: #ffffff; --cds-button-tertiary-hover: #f4f4f4; --cds-button-tertiary-active: #c6c6c6;
  --cds-button-danger-primary: #da1e28; --cds-button-danger-secondary: #ff8389;
  --cds-button-danger-hover: #ba1b23; --cds-button-danger-active: #750e13;
  --cds-button-disabled: #6f6f6f; --cds-text-on-color: #ffffff; --cds-text-on-color-disabled: #8d8d8d;
  --cds-text-inverse: #161616; --cds-icon-on-color: #ffffff;
  /* placeholder / disabled text: the g100 defaults (#6f6f6f on #393939)
     are 2.3:1 — lift them to a readable, still-secondary level */
  --cds-text-placeholder: #a8a8a8;
  --cds-text-disabled: #8d8d8d;
  --cds-text-helper: var(--text-helper);
}
.picker, .card, .secret-box {
  --cds-layer: var(--cds-layer-02);
  --cds-layer-hover: var(--cds-layer-hover-02);
  --cds-layer-active: var(--cds-layer-active-02);
  --cds-layer-selected: var(--cds-layer-selected-02);
  --cds-layer-selected-hover: var(--cds-layer-selected-hover-02);
  --cds-layer-accent: var(--cds-layer-accent-02);
  --cds-layer-accent-hover: var(--cds-layer-accent-hover-02);
  --cds-layer-accent-active: var(--cds-layer-accent-active-02);
  --cds-field: var(--cds-field-02);
  --cds-field-hover: var(--cds-field-hover-02);
  --cds-border-subtle: var(--cds-border-subtle-02);
  --cds-border-subtle-selected: var(--cds-border-subtle-selected-02);
  --cds-border-strong: var(--cds-border-strong-02);
}

/* ── sticky stack under the fixed header ── */
.stickies {
  position: sticky; top: var(--hdr-h); z-index: 7400;
  margin: calc(-1 * var(--sp-4)) calc(-1 * var(--sp-4)) 0;
}
.sweep {
  background: var(--cds-layer-01, #262626);
  border-bottom: 1px solid var(--cds-border-subtle-01, #393939);
}
.sweep-track { height: 3px; background: var(--cds-layer-02, #393939); }
.sweep-fill { height: 100%; width: 0; background: var(--accent); transition: width .6s ease; }
.sweep.done .sweep-fill { background: var(--ok); }
.sweep.aborted .sweep-fill { background: var(--warn); }
.sweep-label {
  padding: 6px 16px; font-size: 13px; color: var(--cds-text-secondary, #c6c6c6);
  display: flex; gap: 12px; align-items: center;
}
.sweep-label strong { color: var(--cds-text-primary, #f4f4f4); font-weight: 500; }
.conn-bar {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: 8px 16px; font-size: 13px;
  background: #2e2a12; border-bottom: 1px solid #f1c21b55; color: var(--cds-text-primary);
}
.link-btn {
  border: none; background: none; cursor: pointer; font: inherit; font-size: 13px;
  color: var(--cds-link-primary, #78a9ff); padding: 4px 0; min-height: 32px; text-align: left;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.link-btn:disabled { color: var(--cds-text-disabled); cursor: not-allowed; text-decoration: none; }

/* sticky account context bar (visible once the picker scrolls away) */
.ctx-bar {
  position: fixed; top: calc(var(--hdr-h) + var(--sweep-h) + var(--conn-h)); left: 0; right: 0; z-index: 7500;
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: 8px 16px;
  padding-left: max(16px, calc((100vw - var(--shell-w)) / 2 + 16px));
  font-size: 13px;
  background: var(--cds-layer-01, #262626);
  border-bottom: 1px solid var(--cds-border-subtle-01, #393939);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.ctx-bar strong { color: var(--accent); font-weight: 600; min-width: 0; }
.ctx-clear {
  margin-left: auto; border: none; background: none; cursor: pointer; font: inherit;
  font-size: 13px; color: var(--cds-text-secondary, #c6c6c6); padding: 4px 8px; min-height: 32px;
}
.ctx-clear:hover { color: var(--cds-text-primary); background: var(--cds-layer-hover-01, #333); }
.ctx-clear:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }

/* page-level error / notice banners */
.page-error {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  flex-wrap: wrap; padding: 12px 16px; margin-bottom: var(--sp-4);
  background: #2d1214; border-left: 3px solid var(--err); font-size: 14px;
}
.page-error .icon-btn { height: 32px; flex: none; }
.notice {
  padding: 12px 16px; margin-bottom: var(--sp-4); font-size: 14px;
  background: var(--cds-layer-01, #262626); border-left: 3px solid var(--warn);
}

/* ── account picker ── */
.picker { padding: var(--sp-4); margin-bottom: var(--sp-6); background: var(--cds-layer-01, #262626); }
.picker-grid {
  display: grid; grid-template-columns: minmax(0, 480px) max-content;
  gap: var(--sp-3); align-items: start;
}
.picker-actions { display: flex; flex-direction: column; gap: 6px; padding-top: 24px; }
.field-label { display: block; font-size: 12px; line-height: 1.33; margin-bottom: 6px;
  color: var(--cds-text-secondary, #c6c6c6); }
.field-hint { display: block; font-size: 12px; line-height: 1.4; margin-top: 6px; }
.field-error { margin: 0; font-size: 13px; color: var(--err-text); }
.acct-combo { position: relative; min-width: 0; }
.combo-field { position: relative; }
.combo-input {
  width: 100%; height: 40px; padding: 0 40px 0 16px; min-width: 0;
  background: var(--cds-field-02, #393939);
  border: none; border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f);
  color: var(--cds-text-primary, #f4f4f4); font: inherit;
}
.combo-input::placeholder { color: var(--cds-text-placeholder); }
.combo-input:focus { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.combo-input:disabled { color: var(--cds-text-disabled); border-bottom-color: transparent; cursor: not-allowed; }
.combo-chevron {
  position: absolute; right: 13px; top: 50%; transform: translateY(-50%);
  color: var(--cds-icon-primary, #f4f4f4); pointer-events: none;
}
.combo-clear {
  position: absolute; right: 36px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  border: none; background: none; cursor: pointer; color: var(--cds-icon-secondary, #c6c6c6);
}
.combo-clear:hover { color: var(--cds-text-primary); background: var(--cds-layer-hover-02, #474747); }
.combo-clear:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.combo-field:has(.combo-clear:not([hidden])) .combo-input { padding-right: 72px; }
.combo-menu {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 9000;
  margin: 0; padding: 0; list-style: none; max-height: 320px; overflow-y: auto;
  background: var(--cds-layer-02, #393939); box-shadow: 0 2px 6px rgba(0, 0, 0, .5);
}
.combo-menu li {
  min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 6px 16px;
  font-size: 14px; cursor: pointer; color: var(--cds-text-secondary, #c6c6c6);
  border-bottom: 1px solid var(--cds-border-subtle-02, #525252);
}
.combo-menu li:last-child { border-bottom: none; }
.combo-menu li:hover, .combo-menu li.hi {
  background: var(--cds-layer-hover-02, #474747); color: var(--cds-text-primary, #f4f4f4);
}
.combo-menu li.hi { box-shadow: inset 3px 0 0 var(--accent); }
.combo-menu li.combo-empty { cursor: default; color: var(--text-helper); }
.combo-text { min-width: 0; overflow-wrap: anywhere; }
.combo-new {
  flex: none; font-size: 12px; line-height: 1; padding: 3px 8px; border-radius: 9px;
  background: #82cfff22; color: var(--accent); border: 1px solid #82cfff55; white-space: nowrap;
}
.recent-inactive { color: var(--warn); background: #f1c21b14; border-color: #f1c21b55; }

/* buttons: 40px field-height ghost (icon-btn), 32px compact variants */
.icon-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 14px; cursor: pointer;
  border: 1px solid var(--cds-border-strong-01, #6f6f6f); background: none;
  color: var(--cds-text-secondary, #c6c6c6); font: inherit; font-size: 14px;
  transition: background-color .11s, color .11s; text-decoration: none;
}
.icon-btn:hover:not(:disabled) { background: var(--cds-layer-hover-01, #333); color: var(--cds-text-primary, #f4f4f4); text-decoration: none; }
.icon-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.icon-btn:disabled { color: var(--cds-text-disabled); border-color: #525252; cursor: not-allowed; }
.icon-btn svg { flex: none; }
.info-btn {
  flex: none; width: 32px; height: 32px; display: inline-grid; place-items: center;
  border: none; background: none; cursor: pointer; color: var(--cds-icon-secondary, #c6c6c6);
  border-radius: 2px;
}
.info-btn:hover { background: var(--cds-layer-hover-02, #474747); color: var(--cds-text-primary); }
.info-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }

/* ── selected-account header ── */
.acct-head { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--cds-border-subtle-01, #393939); }
.acct-title-row { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.acct-title { font-size: 20px; font-weight: 600; margin: 0; min-width: 0; color: var(--cds-text-primary); }
.acct-badge {
  font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 9px; white-space: nowrap;
  border: 1px solid var(--cds-border-subtle-02, #525252); color: var(--cds-text-secondary);
}
.acct-badge.live { color: var(--accent); border-color: #82cfff55; background: #82cfff14; }
.acct-badge.ok { color: var(--ok); border-color: #42be6555; }
.acct-badge.warn { color: var(--warn); border-color: #f1c21b55; }
.acct-badge.stale { color: var(--err-text); border-color: #fa4d5655; background: #fa4d5614; }
.acct-meta { margin: 6px 0 0; font-size: 13px; color: var(--cds-text-secondary); }
.acct-ready { margin: 6px 0 0; font-size: 14px; }
.acct-alerts { margin: var(--sp-2) 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.acct-alerts li { padding: 6px 12px; font-size: 13px; border-left: 3px solid; background: var(--cds-layer-02, #393939); }
.acct-alerts li.alert-error { border-color: var(--err); }
.acct-alerts li.alert-warn { border-color: var(--warn); }
.acct-facts { margin-top: var(--sp-3); }
.acct-facts > summary { cursor: pointer; font-size: 13px; color: var(--cds-link-primary); padding: 4px 0; min-height: 32px; display: flex; align-items: center; }
.acct-facts > summary:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.status-strip { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-2); }
.fact-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fact-label { font-size: 12px; color: var(--text-helper); min-width: 120px; }
.status-strip cds-tag, .pci-lines cds-tag, .dba-lines cds-tag, .gw-lines cds-tag { max-width: 100%; margin: 0; }
.pci-lines, .dba-lines, .gw-lines { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.acct-runs-link { display: inline-block; margin-top: var(--sp-3); font-size: 13px; }

/* account-level entity row — the hint and the result sit OUTSIDE the
   field/action grid: a spanning item would hand its max-content width to
   the action track and starve the field (the 2026-10-18 mobile overflow) */
.entity-row {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin-top: var(--sp-4); padding-top: var(--sp-3);
  border-top: 1px solid var(--cds-border-subtle-01, #393939);
}
.entity-grid { display: grid; grid-template-columns: minmax(0, 520px) auto; gap: var(--sp-4); align-items: end; }
.entity-field { min-width: 0; }
.entity-row .hint { font-size: 13px; margin: 0; }
.entity-row .result-slot { margin-top: 0; }
#entity-input { padding-right: 16px; }

/* ── landing grid ── */
.recent h2 { font-size: 16px; font-weight: 600; margin: 0; }
.recent p { margin: 4px 0 12px; font-size: 13px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.recent-head .icon-btn { height: 32px; font-size: 13px; }
.recent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-2); }
.recent-item {
  display: flex; align-items: stretch; min-width: 0;
  background: var(--cds-layer-02, #393939); border-left: 3px solid transparent;
  transition: background-color .11s, border-color .11s;
}
.recent-item:hover { border-left-color: var(--accent); background: var(--cds-layer-hover-02, #474747); }
.recent-item.has-flag { border-left-color: var(--warn); }
.recent-open {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 10px 4px 10px 12px;
  background: none; border: none; cursor: pointer; color: var(--cds-text-primary, #f4f4f4);
  font: inherit; font-size: 14px; text-align: left; min-height: 48px;
}
.recent-open:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.recent-item .info-btn { align-self: center; margin-right: 6px; }
.recent-mark { flex: none; display: inline-flex; }
.recent-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.recent-badges { display: flex; gap: 4px; flex: none; }
.recent-id { font-weight: 500; overflow-wrap: anywhere; }
.recent-name { font-size: 12px; overflow-wrap: anywhere; }
.recent-cats { font-size: 12px; color: var(--warn); overflow-wrap: anywhere; }
.recent-flag, .recent-ok, .recent-unknown {
  position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  font-size: 12px; font-weight: 600; line-height: 1;
}
.recent-flag { color: #161616; background: var(--warn); font-weight: 500; max-width: 100%; }
.recent-flag-bang { font-weight: 700; flex: none; }
.recent-flag-txt { overflow-wrap: anywhere; white-space: normal; text-align: left; }
.recent-ok { color: var(--ok); border: 1px solid #42be6555; }
.recent-unknown { color: var(--text-helper); border: 1px dashed #8d8d8d88; }
.verdict-txt { font-weight: 500; }
.recent-flag-legend .recent-flag { vertical-align: middle; margin: 0 2px; }
.recent-flag-legend-i {
  display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid currentColor; font-size: 11px; font-weight: 600; vertical-align: middle;
}

/* ── loading state for a selected account ── */
.steps-loading { display: flex; flex-direction: column; gap: var(--sp-3); }
.skeleton-rows { display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; background: var(--cds-layer-02, #393939); border-radius: 2px; }
.skeleton-line.w60 { width: 60%; } .skeleton-line.w40 { width: 40%; }
.skeleton-line.w80 { width: 80%; } .skeleton-line.w50 { width: 50%; }

/* ── layout: step rail + cards ── */
.layout { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); gap: var(--sp-6); align-items: start; }
.rail { position: sticky; top: calc(var(--stack-top) + var(--sp-4)); }
.rail ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--cds-border-subtle-01, #393939); }
.rail li { position: relative; }
.rail a {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 13px; line-height: 1.3; overflow-wrap: normal;
  color: var(--cds-text-secondary, #c6c6c6);
}
.rail a:hover { background: var(--cds-layer-hover-01, #333); text-decoration: none; color: var(--cds-text-primary); }
.rail a:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.rail li.current a { color: var(--cds-text-primary); background: var(--cds-layer-01, #262626); font-weight: 600; }
.rail-no { flex: none; width: 18px; font-size: 12px; color: var(--text-helper); }
.rail-state { margin-left: auto; font-size: 12px; flex: none; }
.rail li::before { content: ''; position: absolute; left: -1px; top: 0; bottom: 0; width: 3px; background: transparent; }
.rail li[data-state="done"]::before { background: var(--ok); }
.rail li[data-state="warn"]::before { background: var(--warn); }
.rail li[data-state="todo"]::before { background: var(--err); }
.rail li[data-state="partial"]::before { background: var(--accent); }
.rail li[data-state="done"] .rail-state { color: var(--ok); }
.rail li[data-state="warn"] .rail-state { color: var(--warn); }
.rail li[data-state="todo"] .rail-state { color: var(--err-text); }
.rail li[data-state="partial"] .rail-state { color: var(--accent); }

.steps { min-width: 0; }
.card { background: var(--cds-layer-01, #262626); padding: var(--sp-4); margin-bottom: var(--sp-4); }
.step { scroll-margin-top: calc(var(--stack-top) + var(--sp-3)); }
.step-head { display: flex; gap: var(--sp-3); align-items: flex-start; }
.step-title { flex: 1; min-width: 0; }
.step-title h2 { margin: 0; font-size: 16px; font-weight: 600; }
.step-toggle {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  background: none; border: none; padding: 4px 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 600; color: var(--cds-text-primary); text-align: left;
  min-height: 32px;
}
.step-toggle:hover .step-name { text-decoration: underline; text-decoration-color: var(--cds-border-strong-01, #6f6f6f); }
.step-toggle:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.step-chev { flex: none; color: var(--cds-icon-secondary, #c6c6c6); transition: transform .15s; }
.step-toggle[aria-expanded="false"] .step-chev { transform: rotate(-90deg); }
.step-summary { margin: 2px 0 0; font-size: 13px; color: var(--cds-text-secondary); }
.step-summary:empty { display: none; }
.step-state {
  flex: none; align-self: flex-start; margin-top: 6px;
  font-size: 12px; letter-spacing: .16px; padding: 3px 10px; border-radius: 9px;
  border: 1px solid transparent; white-space: nowrap;
}
.step-state[data-state="done"] { color: var(--ok); border-color: #42be6555; background: #42be6514; }
.step-state[data-state="warn"] { color: var(--warn); border-color: #f1c21b55; background: #f1c21b14; }
.step-state[data-state="todo"] { color: var(--err-text); border-color: #fa4d5655; background: #fa4d5614; }
.step-state[data-state="partial"] { color: var(--accent); border-color: #82cfff55; background: #82cfff14; }
.step-no {
  flex: none; width: 28px; height: 28px; border-radius: 50%; margin-top: 4px;
  display: grid; place-items: center; font-size: 13px; font-weight: 600;
  background: var(--cds-layer-02, #393939); color: var(--cds-text-secondary, #c6c6c6);
  border: 1px solid var(--cds-border-subtle-02, #525252);
}
.step-body { margin-top: var(--sp-2); }
.step.collapsed { padding-bottom: var(--sp-3); }
.step-desc { margin: 0 0 var(--sp-2); font-size: 14px; max-width: 760px; }
.how { margin: 0 0 var(--sp-3); font-size: 13px; max-width: 760px; }
.how > summary { cursor: pointer; color: var(--cds-link-primary); padding: 4px 0; min-height: 32px; display: flex; align-items: center; }
.how > summary:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.how p { margin: 4px 0 0; color: var(--cds-text-secondary); }
.other-method { max-width: none; }
.other-method .frm-3col { margin-top: var(--sp-3); }
.sub-h { font-size: 14px; font-weight: 600; margin: 0; }
.hint { font-size: 13px; }

/* form grids */
.frm { display: flex; flex-direction: column; gap: var(--sp-4); margin-top: var(--sp-3); }
.frm-2col { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-4); align-items: end; }
.frm-3col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: var(--sp-4); align-items: end; }
.frm-actions { display: flex; align-items: flex-end; }
.btn-row { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; }
.btn-row .hint { margin-left: 4px; }
.task-row { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.task-text { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.task-name { font-weight: 500; }
cds-text-input { width: 100%; min-width: 0; }
.fix-row { margin-top: 4px; }
.draft-state.stale { color: var(--warn); }

/* result area: inline-notification + collapsible payload */
.result-slot { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.result-slot:empty { display: none; }
.result-slot cds-inline-notification { max-width: none; }
cds-inline-notification {
  --cds-notification-background-success: #12261a;
  --cds-notification-background-error: #2d1214;
  --cds-notification-background-info: #12232e;
  --cds-notification-background-warning: #2e2a12;
  --cds-support-success: #42be65;
  --cds-support-error: #fa4d56;
  --cds-support-info: #4589ff;
  --cds-support-warning: #f1c21b;
  --cds-text-primary: #f4f4f4;
  --cds-text-secondary: #c6c6c6;
}
.result-slot details { background: var(--cds-field-02, #393939); border-left: 3px solid var(--cds-border-subtle-02, #525252); }
.result-slot summary { cursor: pointer; padding: 6px 12px; font-size: 13px; color: var(--cds-text-secondary, #c6c6c6); user-select: none; min-height: 32px; display: flex; align-items: center; }
.result-slot summary:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.result-slot pre { margin: 0; padding: 4px 12px 10px; overflow-x: auto; font: 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-all; }
.unknown-actions { padding: 0 0 4px; }

/* one-time secrets: masked by default */
.secret-box { margin-top: var(--sp-3); padding: 12px 16px; background: var(--cds-layer-01, #262626); border-left: 3px solid var(--accent); }
.secret-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }
.secret-label { font-size: 13px; color: var(--accent); letter-spacing: .16px; }
.secret-meta { font-size: 12px; }
.secret-value { display: block; margin: 8px 0; word-break: break-all; font: 13px/1.5 var(--mono); color: var(--cds-text-primary); letter-spacing: .5px; }
.secret-value.revealed { letter-spacing: 0; }
.key-load { font-size: 13px; }

.alert-textarea {
  width: 100%; resize: vertical; padding: 12px 16px;
  background: var(--cds-field-02, #393939);
  border: none; border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f);
  color: var(--cds-text-primary, #f4f4f4); font: 13px/1.55 var(--mono);
}
.alert-textarea:focus { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }

/* ── step 6: audit findings table ── */
.audit-info { margin: 0 0 var(--sp-2); font-size: 13px; color: var(--cds-text-secondary); }
.audit-empty { margin-top: 4px; }
.tbl-wrap { overflow-x: auto; position: relative; }   /* contains absolutely positioned sr-only text */
.tbl-wrap:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.audit-wrap { margin-top: var(--sp-2); position: relative; }
.audit-tbl { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; min-width: 720px; }
.audit-tbl th { text-align: left; padding: 8px; font-weight: 600; color: var(--cds-text-secondary); border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f); }
.audit-tbl td { padding: 10px 8px; vertical-align: top; border-bottom: 1px solid var(--cds-border-subtle-01, #393939); }
.audit-tbl .c-sev { width: 84px; }
.audit-tbl .c-gw { width: 150px; color: var(--accent); }
.audit-tbl .c-gw .muted { color: var(--text-helper); display: block; font-size: 12px; }
.audit-tbl .c-field { width: 150px; }
.audit-tbl .c-field code { font-size: 12px; }
.audit-tbl .c-diff { width: 26%; }
.audit-tbl .c-why { color: var(--cds-text-secondary, #c6c6c6); }
.audit-tbl .c-act { width: 128px; text-align: right; }
.audit-tbl .gw-group th { padding: 12px 8px 6px; font-size: 13px; color: var(--cds-text-primary); background: var(--cds-layer-02, #393939); border-bottom: none; }
.sev { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .2px; padding: 2px 8px; border-radius: 9px; border: 1px solid; }
.sev-critical { color: var(--err-text); border-color: #fa4d5666; background: #fa4d5614; }
.sev-fix { color: var(--warn); border-color: #f1c21b66; background: #f1c21b14; }
.sev-review { color: var(--accent); border-color: #82cfff55; background: #82cfff14; }
.sev-minor { color: var(--cds-text-secondary); border-color: #52525288; }
.diff-line { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 6px; font-family: var(--mono); font-size: 12px; }
.diff-line + .diff-line { margin-top: 4px; }
.diff-k { font-family: 'IBM Plex Sans', system-ui, sans-serif; color: var(--text-helper); }
.diff-v { overflow-wrap: anywhere; color: var(--cds-text-secondary); }
.diff-v.new { color: var(--cds-text-primary); }
.manual { font-size: 12px; }

/* ── runs page ── */
.runs-filter { display: flex; align-items: end; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.runs-field { display: flex; flex-direction: column; min-width: 0; }
.runs-select {
  height: 40px; padding: 0 32px 0 12px; font: inherit; font-size: 14px; max-width: 100%;
  background: var(--cds-field-01, #262626); border: none;
  border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f); color: var(--cds-text-primary, #f4f4f4);
}
.runs-select:focus { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.runs-clear { font-size: 13px; align-self: center; padding: 8px 0; }
.runs-count { font-size: 13px; align-self: center; margin-left: auto; }
.copy-secret {
  display: inline-block; margin: 0 6px 6px 0; padding: 6px 10px; cursor: pointer; min-height: 32px;
  border: 1px solid var(--cds-border-strong-01, #6f6f6f); background: none; color: var(--accent); font: inherit; font-size: 13px;
}
.copy-secret:hover { background: var(--cds-layer-hover-01, #333); }
.copy-secret:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.runs-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.runs-tbl th { text-align: left; padding: 8px 12px; font-weight: 600; color: var(--cds-text-secondary); border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f); white-space: nowrap; }
.runs-tbl td { text-align: left; padding: 8px 12px; vertical-align: top; border-bottom: 1px solid var(--cds-border-subtle-01, #393939); }
.runs-tbl details pre { max-width: 640px; overflow-x: auto; font-size: 12px; font-family: var(--mono); white-space: pre-wrap; word-break: break-all; }
.runs-tbl details summary { cursor: pointer; color: var(--cds-link-primary); min-height: 32px; display: flex; align-items: center; }
.runs-tbl details summary:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.runs-summary { max-width: 420px; color: var(--cds-text-secondary, #c6c6c6); overflow-wrap: anywhere; }
.runs-summary-err { color: var(--err-text); }
.runs-step-code { display: block; font-size: 12px; font-family: var(--mono); }
.runs-filter-link { display: block; font-size: 12px; }
.runs-acct a:first-child { overflow-wrap: anywhere; }
.runs-older { margin: 12px 0 0; font-size: 14px; }
.runs-none { padding: var(--sp-6) var(--sp-3); }
.nowrap { white-space: nowrap; }

/* ── fleet page ── */
.fleet-bar { display: flex; flex-direction: column; gap: var(--sp-3); margin: 0 0 var(--sp-3); }
.fleet-search { max-width: 480px; }
.fleet-q { padding-right: 16px; }
.fleet-filters { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-6); align-items: end; }
.fleet-group { display: flex; flex-direction: column; min-width: 0; }
.fleet-group .runs-select { min-width: 200px; }
.fleet-summary .btn-row { min-height: 40px; }
.fleet-shown { font-size: 13px; }
.fleet-cats { display: flex; flex-wrap: wrap; gap: 4px; min-height: 40px; align-items: center; }
.fleet-cat {
  font: inherit; font-size: 13px; padding: 6px 12px; border-radius: 16px; cursor: pointer; min-height: 32px;
  background: var(--cds-layer-02, #393939); color: var(--cds-text-secondary, #c6c6c6); border: 1px solid transparent;
}
.fleet-cat:hover { color: var(--cds-text-primary); }
.fleet-cat.on { background: #82cfff22; color: var(--accent); border-color: #82cfff55; }
.fleet-cat:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: 2px; }
.fleet-actions { justify-content: flex-start; }
.fleet-wrap { padding: 0; }
.fleet-tbl { min-width: 720px; }
.fleet-tbl th { padding: 0; }
.sort-btn {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 40px; padding: 8px 12px;
  background: none; border: none; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600;
  color: var(--cds-text-secondary); text-align: left;
}
.sort-btn:hover { color: var(--cds-text-primary); background: var(--cds-layer-hover-01, #333); }
.sort-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
th[aria-sort] .sort-btn { color: var(--cds-text-primary); }
th[aria-sort="ascending"] .sort-btn::after { content: '▲'; font-size: 10px; }
th[aria-sort="descending"] .sort-btn::after { content: '▼'; font-size: 10px; }
.fleet-tbl tr[hidden] { display: none; }
.fleet-acct { min-width: 180px; max-width: 320px; }
.fleet-id { overflow-wrap: anywhere; }
.fleet-name { display: block; font-size: 12px; overflow-wrap: anywhere; }
.fleet-entity { min-width: 120px; }
.fleet-flags { min-width: 180px; }
.fleet-flags .recent-flag { max-width: none; margin-right: 4px; }
.fleet-flags .info-btn { vertical-align: middle; }
.fleet-notes { min-width: 120px; }
.scroll-hint { display: none; margin: 0 0 var(--sp-2); font-size: 13px; }
.fleet-empty { padding: var(--sp-6) var(--sp-4); font-size: 14px; color: var(--cds-text-secondary); }

/* ── Apple Pay domain editor ── */
.ap-editor { display: flex; flex-direction: column; gap: var(--sp-2); }
.ap-list { display: flex; flex-direction: column; gap: 6px; max-width: 560px; }
.ap-row { display: flex; gap: 6px; align-items: center; }
.ap-row .ap-input { padding-right: 16px; }
.ap-remove {
  flex: none; width: 40px; height: 40px; display: grid; place-items: center;
  border: none; background: var(--cds-field-02, #393939); cursor: pointer; color: var(--cds-icon-secondary, #c6c6c6);
}
.ap-remove:hover { background: var(--cds-layer-hover-02, #474747); color: var(--cds-text-primary); }
.ap-remove:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.ap-add { height: 40px; }

/* ── health breakdown: hover tip (supplemental) + details panel (primary) ── */
.health-tip {
  position: fixed; z-index: 9100; width: 460px; max-width: calc(100vw - 16px);
  max-height: 50vh; overflow: hidden; pointer-events: none;
  background: var(--cds-layer-02, #393939); color: var(--cds-text-primary, #f4f4f4);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .55); border-top: 2px solid var(--accent);
  font-size: 13px; line-height: 1.45; padding: 10px 12px 8px;
}
.health-more { margin-top: 6px; font-size: 12px; }
.health-panel {
  position: fixed; top: var(--hdr-h); right: 0; bottom: 0; z-index: 9200;
  width: min(480px, 100vw); display: flex; flex-direction: column;
  background: var(--cds-layer-02, #393939); color: var(--cds-text-primary);
  box-shadow: -4px 0 16px rgba(0, 0, 0, .55); border-left: 2px solid var(--accent);
  font-size: 13px; line-height: 1.45;
}
.health-panel-top { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--cds-border-subtle-02, #525252); }
.health-panel-title { font-weight: 600; font-size: 14px; }
.health-panel-body { flex: 1; overflow: auto; padding: 12px 16px; }
.health-panel-foot { padding: 8px 16px 12px; border-top: 1px solid var(--cds-border-subtle-02, #525252); }
.health-head { margin-bottom: 8px; color: var(--cds-text-secondary, #c6c6c6); }
.health-head strong { color: var(--cds-text-primary, #f4f4f4); overflow-wrap: anywhere; }
.health-when { display: block; font-size: 12px; }
.health-sec + .health-sec { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--cds-border-subtle-02, #525252); }
.health-h { font-size: 12px; letter-spacing: .3px; text-transform: uppercase; color: var(--text-helper); margin-bottom: 4px; }
.health-sec.flag .health-h { color: var(--warn); }
.health-cat { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px; margin: 3px 0; }
.health-tag { align-self: start; justify-self: start; font-size: 12px; font-weight: 600; padding: 1px 7px; border-radius: 8px; white-space: nowrap; background: #f1c21b22; color: var(--warn); border: 1px solid #f1c21b55; }
.health-sec.note .health-tag { background: #8d8d8d22; color: var(--cds-text-secondary, #c6c6c6); border-color: #52525288; }
.health-panel ul, .health-tip ul { margin: 0; padding: 0; list-style: none; }
.health-panel li, .health-tip li { margin: 0 0 4px; overflow-wrap: anywhere; }
.health-gw { color: var(--accent); }
.health-sev { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 0 4px; border-radius: 3px; background: #52525266; color: var(--cds-text-secondary, #c6c6c6); }
.health-sev.critical { background: #fa4d5633; color: var(--err-text); }
.health-sev.fix { background: #f1c21b33; color: var(--warn); }
.health-diff { display: block; color: var(--text-helper); font-family: var(--mono); font-size: 12px; word-break: break-all; }
.health-ok { color: var(--ok); }
.health-fix { display: inline-block; margin-left: 6px; font-size: 12px; padding: 0 5px; border-radius: 3px; background: #82cfff22; color: var(--accent); }

/* ── confirm modal ── */
.modal-overlay { position: fixed; inset: 0; z-index: 9500; background: rgba(22, 22, 22, .7); display: grid; place-items: center; padding: var(--sp-4); overflow: auto; }
.modal {
  width: min(480px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--cds-layer-01, #262626); border-top: 3px solid var(--accent); box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
}
.modal h3 { font-size: 16px; font-weight: 600; margin: 0; padding: 16px 16px 8px; }
.modal-body { overflow: auto; flex: 1; min-height: 0; }
.modal p { margin: 0; padding: 0 16px 24px; font-size: 14px; line-height: 1.5; color: var(--cds-text-secondary, #c6c6c6); white-space: pre-line; overflow-wrap: anywhere; }
.modal .manual-copy { margin: 0 16px 16px; width: calc(100% - 32px); }
.modal-btns { display: grid; grid-template-columns: 1fr 1fr; flex: none; }
.modal-btns.one { grid-template-columns: 1fr; }
.modal-btn { height: 48px; border: none; cursor: pointer; font: inherit; font-size: 14px; text-align: left; padding: 0 16px; transition: background-color .11s; }
.modal-cancel { background: var(--cds-layer-02, #393939); color: var(--cds-text-primary, #f4f4f4); }
.modal-cancel:hover { background: var(--cds-layer-hover-02, #474747); }
.modal-ok { background: var(--cds-button-primary, #0f62fe); color: #fff; }
.modal-ok:hover { background: var(--cds-button-primary-hover, #0353e9); }
.modal-ok.modal-danger { background: var(--cds-button-danger-primary, #da1e28); }
.modal-ok.modal-danger:hover { background: #ba1b23; }
.modal-btn:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }

/* ── login ── */
.login-body { margin: 0; min-height: 100vh; display: grid; place-items: center; background: var(--cds-background, #161616); color: var(--cds-text-primary, #f4f4f4); font: 14px/1.45 'IBM Plex Sans', system-ui, sans-serif; }
.login-card { width: min(368px, calc(100vw - 32px)); background: var(--cds-layer-01, #262626); border-top: 3px solid var(--accent); padding: 32px; display: flex; flex-direction: column; gap: var(--sp-4); }
.login-card h1 { font-size: 18px; font-weight: 600; margin: 0; }
.login-sub { margin: -8px 0 0; font-size: 13px; color: var(--cds-text-secondary); }
.login-err { color: var(--err-text); margin: 0; font-size: 14px; }
.login-label { font-size: 12px; color: var(--cds-text-secondary, #c6c6c6); display: block; margin-bottom: -8px; }
.login-input { width: 100%; height: 40px; background: var(--cds-field-02, #393939); border: none; border-bottom: 1px solid var(--cds-border-strong-01, #6f6f6f); color: var(--cds-text-primary, #f4f4f4); font: inherit; padding: 0 16px; }
.login-input:focus { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.login-input[aria-invalid="true"] { border-bottom-color: var(--err); }
.btn-primary { height: 48px; border: none; cursor: pointer; font: inherit; font-size: 14px; background: var(--cds-button-primary, #0f62fe); color: #fff; text-align: left; padding: 0 16px; transition: background-color .11s; }
.btn-primary:hover { background: var(--cds-button-primary-hover, #0353e9); }
.btn-primary:focus-visible { outline: 2px solid var(--cds-focus, #fff); outline-offset: -2px; }
.btn-primary.pending, .btn-primary[aria-disabled="true"] { background: #4589ff; cursor: progress; }

/* ── responsive ── */
@media (max-width: 1279px) {
  /* audit findings stack into labelled blocks (label / value pairs); the
     six-column table only gives the explanation room on wide desktops */
  .audit-tbl { min-width: 0; table-layout: auto; }
  .audit-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .audit-tbl, .audit-tbl tbody, .audit-tbl tr, .audit-tbl td { display: block; width: auto !important; }
  .audit-tbl tr.gw-group th { display: block; }
  .audit-tbl tr:not(.gw-group) { padding: 6px 0 10px; border-bottom: 1px solid var(--cds-border-subtle-01, #393939); }
  .audit-tbl td { border: none; padding: 4px 8px; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; align-items: start; }
  .audit-tbl td::before { content: attr(data-label); font-size: 12px; color: var(--text-helper); padding-top: 2px; }
  .audit-tbl .c-act { text-align: left; }
  .audit-tbl .c-gw .muted { display: inline; }
}
@media (max-width: 860px) {
  :root { --rail-w: 0px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; margin-bottom: var(--sp-2); }
  .rail ol { display: flex; flex-wrap: wrap; border-left: none; gap: 2px; }
  .rail li::before { left: 0; right: 0; top: auto; bottom: -1px; height: 3px; width: auto; }
  .rail a { padding: 8px 10px; }
  .frm-2col, .frm-3col { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .picker-grid, .entity-grid { grid-template-columns: minmax(0, 1fr); }
  .picker-actions { padding-top: 0; }
  .fact-label { min-width: 100%; }
  .fleet-tbl { min-width: 0; }
  .runs-count { margin-left: 0; }
  .scroll-hint { display: block; }
  /* visible affordance: the region fades at its right edge while more columns are off-screen */
  .fleet-wrap { mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .35)); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), rgba(0, 0, 0, .35)); }
}
@media (max-width: 600px) {
  .audit-tbl td { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
@media (max-width: 480px) {
  .hdr-ghost { padding: 0 10px; }
  .hdr-right { gap: 0; padding-right: 4px; }
  .recent-grid { grid-template-columns: minmax(0, 1fr); }
  .task-row cds-button, .btn-row > cds-button { max-width: 100%; }
  .health-cat { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation-duration: .01ms !important; }
}
