/* Signalhouse — website & internet infrastructure inspector. Root rules are scoped to .uwapp-root.uwapp-signalhouse
   (the platform also puts .uwapp-signalhouse on <body>), everything else lives under .sh-app. Signal blue + navy,
   beacon amber for highlights. No inline styles (CSP); widths set through CSSOM only. */
.uwapp-root.uwapp-signalhouse {
  --sh-accent: #1d4ed8;
  --sh-accent-2: #0b3a53;
  --sh-accent-soft: #e8efff;
  --sh-on-accent: #ffffff;
  --sh-beacon: #b45309;
  --sh-bg: #f3f5f9;
  --sh-panel: #ffffff;
  --sh-panel-2: #f8fafc;
  --sh-ink: #0f172a;
  --sh-ink-2: #334155;
  --sh-muted: #526072;
  --sh-line: #e2e8f0;
  --sh-line-2: #c7d0dc;
  --sh-control: #7b8698;
  --sh-focus: #b45309;
  --sh-good: #166534;
  --sh-good-bg: #e7f6ec;
  --sh-warn: #a14a07;
  --sh-warn-bg: #fdf1e2;
  --sh-bad: #b91c1c;
  --sh-bad-bg: #fdeaea;
  --sh-info: #475569;
  --sh-info-bg: #eef2f7;
  --sh-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
  --sh-side-w: 288px;
  flex: 1 1 auto;
  min-height: 0;
}
.sh-app {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--sh-bg);
  color: var(--sh-ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  overflow: clip;
}
.sh-app[data-theme='dark'] {
  --sh-accent: #7aa7ff;
  --sh-accent-2: #9cc4dc;
  --sh-accent-soft: #172446;
  --sh-on-accent: #07142f;
  --sh-beacon: #fbbf24;
  --sh-bg: #0b1120;
  --sh-panel: #111a2c;
  --sh-panel-2: #0e1626;
  --sh-ink: #e5eaf2;
  --sh-ink-2: #c3ccda;
  --sh-muted: #9aa8bb;
  --sh-line: #1f2a40;
  --sh-line-2: #33415a;
  --sh-control: #7d8aa0;
  --sh-focus: #fbbf24;
  --sh-good: #4ade80;
  --sh-good-bg: #0c2a19;
  --sh-warn: #fbbf24;
  --sh-warn-bg: #2f220a;
  --sh-bad: #fb7185;
  --sh-bad-bg: #351219;
  --sh-info: #a7b4c8;
  --sh-info-bg: #18233a;
  --sh-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* ---------------------------------------------------------------- resets (beat the platform's :where(.uwapp-html) button) */
.sh-app :where(button) { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; width: auto; min-height: 0; cursor: pointer; text-align: start; }
.sh-app :where(button):hover { background: none; color: inherit; }
.sh-app :where(button):disabled { cursor: not-allowed; }
.sh-app :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.sh-app :where(ul, ol) { padding: 0; }
.sh-app :where(a) { color: var(--sh-accent); }
.sh-app :where(code, kbd, pre) { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--sh-panel-2); color: var(--sh-ink); }
.sh-app :where(code) { padding: 0 3px; border-radius: 4px; font-size: 0.92em; }
.sh-app :where(:focus-visible) { outline: 3px solid var(--sh-focus); outline-offset: 2px; }
.sh-app [hidden] { display: none !important; }
.sh-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.sh-ico { flex: none; display: block; }
.sh-muted { color: var(--sh-muted); }
.sh-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
.sh-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sh-row-between { justify-content: space-between; }

/* ---------------------------------------------------------------- buttons */
.sh-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border: 1px solid var(--sh-line-2); border-radius: 9px; background: var(--sh-panel); color: var(--sh-ink); font-weight: 600; font-size: 13.5px; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.sh-btn:hover { background: var(--sh-accent-soft); border-color: var(--sh-accent); color: var(--sh-ink); }
.sh-btn:disabled, .sh-btn[aria-disabled='true'] { opacity: 0.55; }
.sh-btn-primary { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-on-accent); }
.sh-btn-primary:hover { background: var(--sh-accent-2); border-color: var(--sh-accent-2); color: var(--sh-on-accent); }
.sh-app[data-theme='dark'] .sh-btn-primary:hover { background: #a9c6ff; border-color: #a9c6ff; }
.sh-btn-ghost { background: transparent; border-color: transparent; color: var(--sh-accent); }
.sh-btn-ghost:hover { background: var(--sh-accent-soft); border-color: transparent; color: var(--sh-ink); }
.sh-btn-danger { background: var(--sh-bad); border-color: var(--sh-bad); color: #fff; }
.sh-app[data-theme='dark'] .sh-btn-danger { color: #2a0710; }
.sh-btn-danger:hover { background: #8f1414; border-color: #8f1414; color: #fff; }
.sh-btn-small { min-height: 30px; padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.sh-btn[aria-pressed='true'] { background: var(--sh-accent-soft); border-color: var(--sh-accent); color: var(--sh-ink); }
.sh-ibtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: var(--sh-ink-2); border: 1px solid transparent; }
.sh-ibtn:hover { background: var(--sh-accent-soft); color: var(--sh-ink); }
.sh-ibtn:disabled { opacity: 0.4; }
.sh-linkbtn { color: var(--sh-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.sh-linkbtn:hover { color: var(--sh-ink); }

/* ---------------------------------------------------------------- inputs */
.sh-input { font: inherit; width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid var(--sh-control); border-radius: 8px; background: var(--sh-panel); color: var(--sh-ink); box-sizing: border-box; }
.sh-input::placeholder { color: var(--sh-muted); opacity: 1; }
textarea.sh-input { resize: vertical; line-height: 1.4; }
.sh-input-sm { min-height: 30px; padding: 4px 8px; font-size: 13px; }
.sh-input-num { max-width: 9rem; }
.sh-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sh-label { font-weight: 600; font-size: 13px; color: var(--sh-ink-2); }
.sh-field > label { font-weight: 600; font-size: 13px; color: var(--sh-ink-2); }
.sh-help { font-size: 12.5px; color: var(--sh-muted); }
.sh-check { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; align-items: start; }
.sh-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--sh-accent); }
.sh-check .sh-help { grid-column: 2; }
.sh-fieldset { border: 1px solid var(--sh-line); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sh-fieldset legend { font-weight: 700; padding: 0 4px; }
.sh-formgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 14px; }
.sh-checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 12px; }
.sh-filters { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin-block-end: 10px; }
.sh-filters .sh-field { flex: 1 1 150px; max-width: 260px; }
.sh-field-end { justify-content: flex-end; flex: 0 0 auto !important; }

/* ---------------------------------------------------------------- top bar */
.sh-top { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--sh-panel); border-bottom: 1px solid var(--sh-line); flex: none; min-width: 0; overflow: clip; }
.sh-menus { display: flex; gap: 2px; flex: none; }
.sh-menuwrap { position: relative; }
.sh-menubtn { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 4px 10px; border-radius: 8px; font-weight: 600; color: var(--sh-ink-2); white-space: nowrap; }
.sh-menubtn:hover, .sh-menubtn[aria-expanded='true'] { background: var(--sh-accent-soft); color: var(--sh-ink); }
.sh-projhead { margin: 0; font: inherit; min-width: 0; display: flex; }
.sh-titlebox { display: flex; align-items: baseline; gap: 10px; min-width: 0; flex: 1 1 auto; padding-inline-start: 6px; }
.sh-projname { font-weight: 700; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 6px; padding: 3px 6px; max-width: 32ch; }
.sh-projname:hover { background: var(--sh-accent-soft); }
.sh-savestate { font-size: 12px; color: var(--sh-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.sh-topactions { display: flex; align-items: center; gap: 4px; flex: none; }
.sh-drawerbtn { display: none; }
.sh-top.sh-compact .sh-savestate { display: none; }
.sh-top.sh-compact .sh-runbtn .sh-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* menus */
.sh-menu { position: fixed; z-index: 60; min-width: 220px; max-width: min(360px, calc(100vw - 12px)); overflow-y: auto; padding: 5px; background: var(--sh-panel); color: var(--sh-ink); border: 1px solid var(--sh-line-2); border-radius: 11px; box-shadow: var(--sh-shadow); }
.sh-menu-item { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 5px 9px; border-radius: 7px; text-align: start; }
.sh-menu-item:hover, .sh-menu-item:focus { background: var(--sh-accent-soft); outline: none; }
.sh-menu-item:focus-visible { outline: 2px solid var(--sh-focus); outline-offset: -2px; }
.sh-menu-item[aria-disabled='true'] { opacity: 0.5; cursor: default; }
.sh-menu-key { font-size: 12px; color: var(--sh-muted); white-space: nowrap; }
.sh-menu-sep { height: 1px; margin: 5px 4px; background: var(--sh-line); }
.sh-menu-heading { padding: 6px 9px 2px; font-size: 12px; font-weight: 700; color: var(--sh-muted); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------------------------------------------------------------- body: side + main */
.sh-body { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.sh-side { flex: 0 0 var(--sh-side-w); width: var(--sh-side-w); display: flex; flex-direction: column; gap: 8px; padding: 12px; background: var(--sh-panel); border-inline-end: 1px solid var(--sh-line); overflow-y: auto; min-height: 0; box-sizing: border-box; }
.sh-side-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sh-side-title { font-size: 15px; font-weight: 700; }
.sh-addrow { display: flex; gap: 6px; align-items: center; }
.sh-addrow .sh-input { flex: 1 1 auto; min-width: 0; }
.sh-side-tools { display: flex; gap: 6px; }
.sh-side-tools > * { flex: 1 1 0; min-width: 0; }
.sh-side-empty { font-size: 13px; padding: 8px 2px; }
.sh-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; background: var(--sh-accent-soft); border-radius: 9px; }
.sh-bulk-n { font-weight: 700; font-size: 13px; margin-inline-end: auto; }
.sh-tlist { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.sh-titem { display: flex; align-items: center; gap: 6px; border-radius: 9px; padding-inline-start: 6px; }
.sh-titem-cur { background: var(--sh-accent-soft); }
.sh-tcheck { width: 17px; height: 17px; flex: none; accent-color: var(--sh-accent); }
.sh-trow { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 5px 8px; border-radius: 8px; }
.sh-trow:hover { background: var(--sh-panel-2); }
.sh-titem-cur .sh-trow:hover { background: transparent; }
.sh-trow[aria-current='true'] .sh-trow-domain { color: var(--sh-ink); }
.sh-trow-main { display: flex; flex-direction: column; min-width: 0; }
.sh-trow-domain { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-trow-label { font-size: 12px; color: var(--sh-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sh-line-2); }
.sh-dot.sh-st-good { background: var(--sh-good); }
.sh-dot.sh-st-warn { background: var(--sh-warn); }
.sh-dot.sh-st-bad, .sh-dot.sh-st-error { background: var(--sh-bad); }
.sh-dot.sh-st-info { background: var(--sh-info); }
.sh-scrim { display: none; }

.sh-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.sh-tabs { flex: none; background: var(--sh-panel); border-bottom: 1px solid var(--sh-line); padding: 0 8px; }
.sh-tablist { display: flex; gap: 2px; overflow: clip; }
.sh-tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 3px solid transparent; color: var(--sh-muted); font-weight: 600; white-space: nowrap; flex: none; }
.sh-tab:hover { color: var(--sh-ink); background: var(--sh-panel-2); }
.sh-tab[aria-selected='true'] { color: var(--sh-ink); border-bottom-color: var(--sh-accent); }
.sh-tab:focus-visible { outline-offset: -3px; }
.sh-tablist.sh-tabs-icons .sh-tab { padding: 9px 10px; }
.sh-tablist.sh-tabs-icons .sh-tab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sh-view { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px 28px; display: flex; flex-direction: column; gap: 14px; }
.sh-view:focus { outline: none; }
.sh-viewhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.sh-viewtitle { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sh-viewtools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sh-tpick { width: auto; max-width: 280px; }

/* progress strip */
.sh-progress { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 8px 16px; background: var(--sh-accent-soft); border-bottom: 1px solid var(--sh-line); }
.sh-progress-row { display: flex; flex-direction: column; gap: 5px; flex: 1 1 280px; min-width: 0; }
.sh-progress-text { font-weight: 600; font-size: 13px; }
.sh-progress-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sh-bar { height: 7px; border-radius: 99px; background: var(--sh-panel); border: 1px solid var(--sh-line-2); overflow: hidden; }
.sh-bar-fill { display: block; height: 100%; width: 0; background: var(--sh-accent); transition: width 0.3s ease; }

/* status bar */
.sh-status { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; padding: 3px 12px; font-size: 12.5px; background: var(--sh-panel); border-top: 1px solid var(--sh-line); color: var(--sh-ink-2); min-width: 0; }
.sh-status-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-status-msg[data-tone='error'] { color: var(--sh-bad); font-weight: 600; }
.sh-status-msg[data-tone='good'] { color: var(--sh-good); }
.sh-status-right { flex: none; color: var(--sh-muted); }
.sh-status-net[data-offline='true'] { color: var(--sh-bad); font-weight: 700; }

/* ---------------------------------------------------------------- cards, KPIs, chips */
.sh-card { background: var(--sh-panel); border: 1px solid var(--sh-line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sh-card-title { font-size: 15px; font-weight: 700; }
details.sh-card > summary { cursor: pointer; }
.sh-subhead { font-size: 14px; font-weight: 700; margin-top: 4px; }
.sh-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.sh-kpi { background: var(--sh-panel); border: 1px solid var(--sh-line); border-radius: 12px; padding: 10px 12px; border-inline-start: 4px solid var(--sh-accent); }
.sh-kpi-bad { border-inline-start-color: var(--sh-bad); }
.sh-kpi-warn { border-inline-start-color: var(--sh-warn); }
.sh-kpi-label { font-size: 12px; color: var(--sh-muted); font-weight: 600; }
.sh-kpi-small .sh-kpi-value { font-size: 15px; line-height: 1.3; padding-top: 4px; }
.sh-kpi-value { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sh-kpi-sub { font-size: 12px; color: var(--sh-muted); }
.sh-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 12.5px; font-weight: 650; background: var(--sh-info-bg); color: var(--sh-info); white-space: nowrap; }
.sh-chip.sh-st-good { background: var(--sh-good-bg); color: var(--sh-good); }
.sh-chip.sh-st-warn { background: var(--sh-warn-bg); color: var(--sh-warn); }
.sh-chip.sh-st-bad, .sh-chip.sh-st-error { background: var(--sh-bad-bg); color: var(--sh-bad); }
.sh-chip.sh-js-done { background: var(--sh-good-bg); color: var(--sh-good); }
.sh-chip.sh-js-error { background: var(--sh-bad-bg); color: var(--sh-bad); }
.sh-chip.sh-js-running { background: var(--sh-accent-soft); color: var(--sh-ink); }
.sh-sev { display: inline-block; flex: none; min-width: 58px; text-align: center; padding: 1px 7px; border-radius: 6px; font-size: 12px; font-weight: 700; background: var(--sh-info-bg); color: var(--sh-info); }
.sh-sev-high { background: var(--sh-bad-bg); color: var(--sh-bad); }
.sh-sev-medium { background: var(--sh-warn-bg); color: var(--sh-warn); }
.sh-callout { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; background: var(--sh-info-bg); }
.sh-callout-error { background: var(--sh-bad-bg); color: var(--sh-ink); }
.sh-callout-error .sh-ico { color: var(--sh-bad); }
.sh-note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--sh-accent-soft); }
.sh-note p { white-space: pre-line; }
.sh-good { color: var(--sh-good); display: flex; align-items: center; gap: 4px; }
.sh-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border: 1px dashed var(--sh-line-2); border-radius: 14px; background: var(--sh-panel); }
.sh-ready { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--sh-accent-soft); border: 1px solid var(--sh-line-2); }
.sh-ready p { flex: 1 1 260px; font-weight: 600; }

/* start hint */
.sh-hint { background: linear-gradient(135deg, var(--sh-panel), var(--sh-accent-soft)); border: 1px solid var(--sh-line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.sh-hint h3 { font-size: 18px; }
.sh-steps { padding-inline-start: 22px !important; display: flex; flex-direction: column; gap: 3px; }
.sh-tplgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.sh-tpl { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--sh-line-2); border-radius: 12px; background: var(--sh-panel); text-align: start; }
.sh-tpl:hover { border-color: var(--sh-accent); background: var(--sh-panel); box-shadow: 0 4px 14px rgba(29, 78, 216, 0.12); }
.sh-tpl .sh-muted { font-size: 12.5px; }
.sh-tpl-meta { font-size: 12px; color: var(--sh-muted); border-top: 1px solid var(--sh-line); padding-top: 4px; margin-top: 2px; }

/* scorecard */
.sh-scroll { overflow: auto; max-width: 100%; border-radius: 10px; }
.sh-scroll > .sh-table { width: calc(100% - 1px); }
.sh-score { border-collapse: separate; border-spacing: 0; width: auto; font-size: 13px; }
.sh-score td { min-width: 88px; }
@media (max-width: 560px) { .sh-score td { min-width: 0; } .sh-score td:last-child { width: 40px; } .sh-score tbody th[scope='row'] { min-width: 108px; max-width: 132px; } }
.sh-score th, .sh-score td { padding: 4px 5px; border-bottom: 1px solid var(--sh-line); text-align: center; background: transparent; color: var(--sh-ink); }
.sh-score thead th { font-size: 12px; color: var(--sh-muted); font-weight: 700; position: sticky; top: 0; background: var(--sh-panel); }
.sh-score tbody th { text-align: start; min-width: 170px; max-width: 280px; }
.sh-score thead th:first-child { text-align: start; }
.sh-score-label { display: block; font-size: 12px; color: var(--sh-muted); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.sh-cell { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 76px; min-height: 30px; padding: 3px 8px; border-radius: 8px; font-weight: 700; font-size: 12.5px; background: var(--sh-panel-2); color: var(--sh-muted); border: 1px solid var(--sh-line); white-space: nowrap; }
.sh-cell.sh-st-good { background: var(--sh-good-bg); color: var(--sh-good); border-color: transparent; }
.sh-cell.sh-st-warn { background: var(--sh-warn-bg); color: var(--sh-warn); border-color: transparent; }
.sh-cell.sh-st-bad, .sh-cell.sh-st-error { background: var(--sh-bad-bg); color: var(--sh-bad); border-color: transparent; }
.sh-cell.sh-st-info { background: var(--sh-info-bg); color: var(--sh-info); border-color: transparent; }
.sh-cell:hover { outline: 2px solid var(--sh-accent); outline-offset: -2px; }
.sh-cell-off { color: var(--sh-line-2); }
.sh-score-act { width: 1%; }
.sh-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--sh-muted); }
.sh-legend li { display: inline-flex; align-items: center; gap: 5px; }
.sh-toplist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sh-toplist li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; padding: 6px 0; border-bottom: 1px solid var(--sh-line); }
.sh-top-check { font-weight: 700; font-size: 13px; }
.sh-top-text { flex: 1 1 280px; min-width: 0; overflow-wrap: anywhere; }

/* tables */
.sh-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.sh-table th, .sh-table td { padding: 7px 8px; border-bottom: 1px solid var(--sh-line); text-align: start; vertical-align: top; background: transparent; color: var(--sh-ink); overflow-wrap: break-word; }
.sh-table td { overflow-wrap: anywhere; }
.sh-cmp tbody th[scope='row'] { width: 24%; min-width: 150px; }
.sh-cmp td { width: 38%; }
.sh-table thead th { font-size: 12px; color: var(--sh-muted); font-weight: 700; background: var(--sh-panel-2); }
.sh-table tbody th { font-weight: 600; }
.sh-row-bad td, .sh-row-bad th { background: var(--sh-bad-bg); }
.sh-row-warn td, .sh-row-warn th { background: var(--sh-warn-bg); }
.sh-actions { white-space: nowrap; }
.sh-cmp-head th { background: var(--sh-accent-soft) !important; font-size: 13.5px; color: var(--sh-ink) !important; }
.sh-diff td, .sh-diff th { background: var(--sh-warn-bg); }
.sh-inline-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }

/* target view */
.sh-details > summary { font-size: 15px; font-weight: 700; }
.sh-details[open] > summary { margin-bottom: 4px; }
.sh-sub > summary { cursor: pointer; font-weight: 650; color: var(--sh-ink-2); padding: 3px 0; }
.sh-sub[open] { display: flex; flex-direction: column; gap: 10px; }
.sh-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px; align-items: start; }
.sh-checkcard { border-inline-start: 4px solid var(--sh-line-2); }
.sh-border-good { border-inline-start-color: var(--sh-good); }
.sh-border-warn { border-inline-start-color: var(--sh-warn); }
.sh-border-bad, .sh-border-error { border-inline-start-color: var(--sh-bad); }
.sh-border-info { border-inline-start-color: var(--sh-info); }
.sh-checkhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.sh-checktitle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.sh-checkhead h3 { font-size: 15.5px; }
.sh-checkhead h3:focus { outline: none; }
.sh-meta { font-size: 12px; color: var(--sh-muted); overflow-wrap: anywhere; }
.sh-summary { overflow-wrap: anywhere; }
.sh-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.sh-metric { background: var(--sh-panel-2); border: 1px solid var(--sh-line); border-radius: 9px; padding: 6px 8px; min-width: 0; }
.sh-metric dt { font-size: 11.5px; color: var(--sh-muted); font-weight: 600; }
.sh-metric dd { font-weight: 700; overflow-wrap: anywhere; }
.sh-facts { display: grid; grid-template-columns: minmax(130px, 38%) 1fr; gap: 0; font-size: 13px; }
.sh-facts > div { display: contents; }
.sh-facts dt, .sh-facts dd { padding: 4px 0; border-bottom: 1px solid var(--sh-line); overflow-wrap: anywhere; }
.sh-facts dt { color: var(--sh-muted); padding-inline-end: 10px; }
.sh-findings { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.sh-findings li { display: flex; gap: 8px; align-items: flex-start; }
.sh-findings li > div, .sh-findings li > p { min-width: 0; overflow-wrap: anywhere; }
.sh-fix { font-size: 13px; color: var(--sh-ink-2); margin-top: 2px; }
.sh-notes { padding-inline-start: 20px !important; display: flex; flex-direction: column; gap: 3px; font-size: 13px; overflow-wrap: anywhere; }
.sh-hist { display: flex; align-items: center; gap: 10px; color: var(--sh-accent); font-size: 12.5px; }
.sh-hist .sh-muted { color: var(--sh-muted); }
.sh-chain { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.sh-chain li { display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; background: var(--sh-panel-2); border: 1px solid var(--sh-line); min-width: 0; }
.sh-chain li:not(:last-child)::after { content: '→'; color: var(--sh-muted); margin-inline-start: 6px; }
[dir='rtl'] .sh-chain li:not(:last-child)::after { content: '←'; }
.sh-chain-k { font-size: 12px; color: var(--sh-muted); font-weight: 600; }
.sh-chain-v { font-weight: 650; overflow-wrap: anywhere; }

/* findings view */
.sh-seg { display: inline-flex; border: 1px solid var(--sh-line-2); border-radius: 10px; padding: 2px; background: var(--sh-panel); }
.sh-segbtn { padding: 5px 12px; border-radius: 8px; font-weight: 650; color: var(--sh-muted); }
.sh-segbtn[aria-checked='true'] { background: var(--sh-accent); color: var(--sh-on-accent); }
.sh-segbtn[aria-checked='true']:hover { background: var(--sh-accent); color: var(--sh-on-accent); }
.sh-fgroups { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sh-fgroup { gap: 6px; padding: 10px 14px; }
.sh-fg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sh-fg-check { font-weight: 700; font-size: 13px; }
.sh-fg-bulk { width: auto; margin-inline-start: auto; }
.sh-fg-text { overflow-wrap: anywhere; }
.sh-triages { display: flex; flex-direction: column; gap: 4px; }
.sh-triage { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(130px, 160px) minmax(120px, 2fr); gap: 6px; align-items: center; }
.sh-triage-dom { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sh-triage-check { font-weight: 400; margin-inline-start: 6px; }
.sh-fixplan { padding-inline-start: 22px !important; display: flex; flex-direction: column; gap: 8px; }
.sh-fixplan li > div { display: inline-block; vertical-align: top; max-width: calc(100% - 80px); margin-inline-start: 6px; }

/* changes */
.sh-changes { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sh-change { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; font-size: 13.5px; }
.sh-change .sh-ico { align-self: center; }
.sh-change-bad .sh-ico { color: var(--sh-bad); }
.sh-change-good .sh-ico { color: var(--sh-good); }
.sh-change-info .sh-ico { color: var(--sh-accent); }
.sh-change-text { overflow-wrap: anywhere; min-width: 0; }
.sh-changeblock { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; border-top: 1px solid var(--sh-line); }

/* charts */
.sh-chartwrap { overflow-x: auto; background: #ffffff; border: 1px solid var(--sh-line); border-radius: 10px; padding: 4px; }
.sh-chartwrap svg { display: block; max-width: 100%; height: auto; }
.sh-app[data-theme='dark'] .sh-chartwrap { filter: brightness(0.92); }
.sh-spark { color: var(--sh-accent); }

/* lab */
.sh-labsec { gap: 10px; }
.sh-msglist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.sh-msg { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border: 1px solid var(--sh-line); border-radius: 12px; background: var(--sh-panel-2); }
.sh-msg-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.sh-quote { padding: 6px 10px; border-inline-start: 3px solid var(--sh-line-2); color: var(--sh-ink-2); font-size: 13px; white-space: pre-line; overflow-wrap: anywhere; }
.sh-lookup { display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- dialogs */
.sh-dlg { padding: 0; border: 1px solid var(--sh-line-2); border-radius: 16px; background: var(--sh-panel); color: var(--sh-ink); box-shadow: var(--sh-shadow); width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14px; line-height: 1.45; }
.sh-dlg[open] { display: flex; flex-direction: column; }
.sh-dlg-wide { width: min(860px, calc(100vw - 24px)); }
.sh-dlg::backdrop { background: rgba(15, 23, 42, 0.5); }
.sh-dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 8px 18px; border-bottom: 1px solid var(--sh-line); }
.sh-dlg-head h2 { font-size: 17px; font-weight: 750; }
.sh-dlg-body { padding: 14px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.sh-dlg-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--sh-line); }
.sh-preview { padding: 8px 10px; border-radius: 10px; background: var(--sh-panel-2); border: 1px solid var(--sh-line); display: flex; flex-direction: column; gap: 4px; }
.sh-preview-list { font-size: 12.5px; color: var(--sh-ink-2); overflow-wrap: anywhere; }
.sh-note-inline { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.sh-suitegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 14px; }
.sh-suiteitem { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: start; padding: 6px 8px; border-radius: 9px; border: 1px solid var(--sh-line); }
.sh-suiteitem input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--sh-accent); }
.sh-suiteitem label { font-weight: 650; }
.sh-suiteitem .sh-help { grid-column: 2; }
.sh-recent { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.sh-recent li { display: flex; align-items: center; gap: 6px; }
.sh-recent-open { flex: 1 1 auto; display: flex; flex-direction: column; padding: 7px 10px; border-radius: 9px; border: 1px solid var(--sh-line); min-width: 0; }
.sh-recent-open:hover { border-color: var(--sh-accent); background: var(--sh-accent-soft); }
.sh-keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.sh-keys h3 { font-size: 14px; margin-bottom: 4px; }
.sh-keys dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: baseline; }
.sh-keys kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--sh-line-2); border-bottom-width: 2px; border-radius: 5px; font-size: 12px; white-space: nowrap; }
.sh-code { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--sh-line); overflow: auto; font-size: 12px; white-space: pre; max-height: 260px; }
.sh-codelist { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.sh-about-logo { width: 56px; height: 56px; }

/* ---------------------------------------------------------------- phone / narrow */
@media (max-width: 760px) {
  .sh-drawerbtn { display: inline-flex; }
  .sh-side { position: absolute; z-index: 40; inset-block: 0; inset-inline-start: 0; width: min(88vw, 340px); transform: translateX(-102%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; box-shadow: var(--sh-shadow); }
  [dir='rtl'] .sh-side { transform: translateX(102%); }
  .sh-drawer-open .sh-side { transform: none; visibility: visible; }
  .sh-scrim { display: block; position: absolute; inset: 0; z-index: 35; background: rgba(15, 23, 42, 0.4); }
  .sh-scrim[hidden] { display: none; }
  .sh-view { padding: 12px 12px 24px; }
  .sh-titlebox { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .sh-top { gap: 4px; padding: 5px 6px; }
  .sh-drawerbtn .sh-btn-label { font-size: 13px; }
  .sh-triage { grid-template-columns: 1fr 1fr; }
  .sh-triage .sh-triage-dom { grid-column: 1 / -1; }
  .sh-status-right { display: none; }
  .sh-viewtitle { font-size: 18px; }
  .sh-tpick { max-width: 100%; flex: 1 1 100%; }
  .sh-facts { grid-template-columns: minmax(110px, 42%) 1fr; }
}
@media (max-width: 760px) and (max-height: 520px) {
  .sh-status { display: none; }
}

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

/* ---------------------------------------------------------------- print report */
.sh-print { display: none; }
@media print {
  body.sh-printing > *:not(.uwapp-root) { display: none !important; }
  body.sh-printing .uwapp-root > *:not(.sh-print) { display: none !important; }
  body.sh-printing .sh-print { display: block; color: #000; background: #fff; font: 11pt/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
  .sh-print h1 { font-size: 20pt; margin: 0 0 4pt; }
  .sh-print h2 { font-size: 14pt; margin: 14pt 0 6pt; border-bottom: 1pt solid #94a3b8; }
  .sh-print h3 { font-size: 12pt; margin: 10pt 0 4pt; }
  .sh-print h4 { font-size: 10.5pt; margin: 6pt 0 2pt; }
  .sh-print table { border-collapse: collapse; width: 100%; font-size: 9pt; }
  .sh-print th, .sh-print td { border: 0.5pt solid #94a3b8; padding: 2pt 4pt; text-align: start; vertical-align: top; }
  .sh-print .pr-bad, .sh-print .pr-error { background: #fde2e2; }
  .sh-print .pr-warn { background: #fdf0dc; }
  .sh-print .pr-good { background: #e3f4e8; }
  .sh-print .sh-pr-meta, .sh-print .sh-pr-dom, .sh-print .sh-pr-facts { color: #334155; font-size: 9pt; }
  .sh-print .sh-pr-target { break-inside: avoid-page; }
  .sh-print li { margin-bottom: 3pt; }
}

/* Windows high contrast / forced colours: keep borders, focus and the status meaning visible */
@media (forced-colors: active) {
  .sh-app .sh-chip, .sh-app .sh-cell, .sh-app .sh-sev, .sh-app .sh-card, .sh-app .sh-btn, .sh-app .sh-tab[aria-selected='true'] { border: 1px solid CanvasText; forced-color-adjust: auto; }
  .sh-app .sh-dot { forced-color-adjust: none; border: 1px solid CanvasText; }
  .sh-app :where(:focus-visible) { outline: 3px solid Highlight; }
  .sh-app .sh-bar > span { background: Highlight; }
}
