/*
 * CloudControl system layer. Loaded last; it owns the shell, the device
 * workspace rail and the shared component vocabulary (page headers, panels,
 * stat tiles, status text, badges). Older per-feature rules in style.css and
 * ui.css still provide geometry for components that are not restyled here.
 */
:root {
  --cc-page: #fff;
  --cc-surface-subtle: #f8f9fb;
  --cc-sidebar: #f7f8fa;
  --cc-text: #1f2630;
  --cc-text-soft: #4b5563;
  --cc-muted: #6b7380;
  --cc-border: #e4e7ec;
  --cc-border-strong: #cfd5dd;
  --cc-mono: "DejaVu Sans Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --cc-topbar-height: 55px;
}

/* ---------- Shell ---------- */
.nav-section-label--spaced { margin-top: 18px; }
.nav a { font-size: 13px; }

.workspace-topbar { position: sticky; top: 0; z-index: 20; }
.workspace-location { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--cc-muted); white-space: nowrap; }
.workspace-location a { color: var(--cc-muted); }
.workspace-location a:hover { color: var(--cc-accent); }
.workspace-location > span:last-child { overflow: hidden; text-overflow: ellipsis; color: var(--cc-text); font-weight: 500; }
.workspace-location-sep { color: var(--cc-border-strong); }

.notification-button { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: var(--cc-radius); background: transparent; color: var(--cc-text-soft); cursor: pointer; }
.notification-button:hover { border-color: var(--cc-border); background: var(--cc-surface-subtle); color: var(--cc-text); }
.notification-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.notification-button #alert-count { position: absolute; top: 1px; right: -4px; min-width: 18px; height: 16px; padding: 0 4px; border: 2px solid var(--cc-surface); border-radius: 999px; background: var(--cc-danger); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 12px; text-align: center; box-shadow: none; }
.notification-button #alert-count[hidden] { display: none; }

/* ---------- Device workspace: rail + pages ---------- */
.app-shell.device-focus-mode .view { max-width: none; padding: 0; }
.app-shell.device-focus-mode .workspace-topbar { background: var(--cc-surface); border-bottom-color: var(--cc-border); }
.device-focus-mode .device-workspace-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 0; align-items: start; min-height: calc(100dvh - var(--cc-topbar-height)); }
.device-focus-mode .device-workspace-pages { min-width: 0; max-width: 1280px; padding: 28px 36px 56px; }

.dw-rail { position: sticky; top: var(--cc-topbar-height); display: flex; flex-direction: column; gap: 0; width: auto; height: calc(100dvh - var(--cc-topbar-height)); max-height: none; overflow-y: auto; padding: 0; border: 0; border-right: 1px solid var(--cc-border); border-radius: 0; background: var(--cc-sidebar); box-shadow: none; color: var(--cc-sidebar-text); }
.dw-rail-head { display: grid; gap: 14px; padding: 16px 16px 16px; border-bottom: 1px solid var(--cc-border); }
.dw-rail-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dw-back { display: inline-flex; align-items: center; gap: 4px; margin-left: -4px; padding: 2px 4px; border-radius: var(--cc-radius-sm); color: var(--cc-muted); font-size: 12px; }
.dw-back svg { width: 14px; height: 14px; transform: rotate(90deg); fill: none; stroke: currentColor; stroke-width: 1.8; }
.dw-back:hover { color: var(--cc-text); background: #eceff2; }
.dw-mobile-toggle { display: none; }
.dw-identity { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px; }
.dw-identity .device-live-activity-wrap { padding-top: 6px; }
.dw-identity-copy { display: grid; gap: 2px; min-width: 0; }
.dw-identity-copy h1 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 650; letter-spacing: -.2px; overflow-wrap: anywhere; }
.dw-identity-copy .device-tree-head-state { display: block; overflow: hidden; color: var(--cc-muted); font-size: 11.5px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.dw-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dw-action { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; height: 28px; padding: 0 6px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background: var(--cc-surface); color: var(--cc-text-soft); font: inherit; font-size: 12px; font-weight: 500; cursor: pointer; box-shadow: none; }
.dw-action svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.dw-action:hover:not(:disabled) { border-color: var(--cc-text-soft); color: var(--cc-text); }
.dw-action--danger:hover:not(:disabled) { border-color: var(--cc-danger); color: var(--cc-danger); }
.dw-action:disabled { opacity: .5; cursor: not-allowed; }

.dw-rail-body { display: grid; align-content: start; gap: 18px; padding: 14px 10px 24px; }
.dw-nav-section { display: grid; gap: 1px; }
.dw-nav-label { padding: 0 10px 6px; color: #8a929d; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
.dw-rail .dw-nav-link, .dw-rail .dw-nav-link span { font-weight: 450; letter-spacing: 0; }
.dw-nav-link { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 6px 10px; border-radius: var(--cc-radius-sm); color: var(--cc-sidebar-text); font-size: 13px; font-weight: 450; line-height: 1.3; }
.dw-nav-link svg { flex: 0 0 15px; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; opacity: .75; }
.dw-nav-link:hover { background: #eceff2; color: var(--cc-text); }
.dw-rail .dw-nav-link.active, .dw-rail .dw-nav-link.active span { background: #e6f0eb; color: var(--cc-accent-hover); font-weight: 600; }
.dw-rail .dw-nav-link.active span { background: transparent; }
.dw-nav-link.active svg { opacity: 1; }

@media (max-width: 900px) {
  .device-focus-mode .device-workspace-shell { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .device-focus-mode .device-workspace-pages { padding: 20px 16px 40px; }
  .dw-rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--cc-border); }
  .dw-rail-head { border-bottom: 0; }
  .dw-mobile-toggle { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background: var(--cc-surface); color: var(--cc-text-soft); font: inherit; font-size: 12px; cursor: pointer; }
  .dw-mobile-toggle svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
  .dw-rail:not(.mobile-tree-open) .dw-rail-body { display: none; }
  .dw-rail.mobile-tree-open .dw-rail-body { border-top: 1px solid var(--cc-border); }
}

/* ---------- Stat tiles (speed test, iperf3, summary numbers) ---------- */
#view .stat-tile-row, #view .speedometer-stage.stat-tile-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0; padding: 0; background: none; border: 0; }
#view .stat-tile, #view .speedometer-card.stat-tile { position: relative; display: grid; align-content: start; gap: 8px; min-width: 0; min-height: 0; padding: 14px 16px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface); box-shadow: none; text-align: left; overflow: visible; }
#view .stat-tile::before, #view .stat-tile::after { content: none; display: none; }
#view .stat-tile .speedometer-core { position: static; display: grid; gap: 4px; inset: auto; transform: none; text-align: left; }
#view .stat-tile-label, #view .stat-tile .speedometer-label, #view .stat-tile .iperf-dual-path-label { position: static; color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .stat-tile-value { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
#view .stat-tile-value strong, #view .stat-tile .iperf-dual-metric strong { color: var(--cc-text); font-size: 26px; font-weight: 600; line-height: 1.1; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
#view .stat-tile-value small, #view .stat-tile .iperf-dual-metric small { color: var(--cc-muted); font-size: 12px; font-weight: 500; }
#view .stat-tile .speedometer-pending { position: static; color: var(--cc-muted); font-size: 11px; font-weight: 500; background: none; border: 0; width: auto; height: auto; }
#view .stat-tile-bar { display: block; width: 100%; height: 4px; overflow: visible; }
#view .stat-tile-bar .speedometer-track { stroke: #e8ebef; stroke-width: 4; stroke-linecap: butt; }
#view .stat-tile-bar .speedometer-progress { stroke: var(--cc-accent); stroke-width: 4; stroke-linecap: butt; transition: stroke-dasharray .4s ease; filter: none; }
#view .stat-tile-bar .speedometer-average { stroke: var(--cc-text-soft); stroke-width: 1.2; }
#view .stat-tile.warn .stat-tile-bar .speedometer-progress { stroke: #c99a3c; }
#view .stat-tile.bad .stat-tile-bar .speedometer-progress { stroke: var(--cc-danger); }
#view .stat-tile-caption, #view .stat-tile .speedometer-caption { position: static; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; color: var(--cc-muted); font-size: 11.5px; line-height: 1.4; text-transform: none; letter-spacing: 0; }
#view .stat-tile-range { color: #9aa1ab; }
#view .stat-tile .speedometer-scale-value { all: unset; }
#view .iperf-dual-card.stat-tile { gap: 12px; }
#view .iperf-direction { display: grid; gap: 6px; }
#view .stat-tile .iperf-dual-metric { display: flex; align-items: baseline; gap: 6px; color: inherit; }
#view .iperf-direction-name { min-width: 84px; color: var(--cc-text-soft); font-size: 12px; font-weight: 500; }

/* ---------- Live diagnostic surfaces (speed test / MTR / ports / iperf3) ---------- */
#view .live-diagnostic-surface { display: grid; gap: 16px; padding: 20px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; }
#view .live-diagnostic-surface::before, #view .live-diagnostic-surface::after { content: none; display: none; }
#view .live-diagnostic-surface > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0; border: 0; background: none; }
#view .live-diagnostic-surface > header h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
#view .live-diagnostic-surface > header p { margin: 2px 0 0; color: var(--cc-muted); font-size: 12.5px; }
#view .live-diagnostic-surface > header > div:last-child { display: flex; align-items: center; gap: 10px; }

#view .speedtest-live-row { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); gap: 12px; align-items: stretch; }
#view .speedtest-live-phase { display: grid; align-content: start; gap: 4px; padding: 12px 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface-subtle); box-shadow: none; }
#view .speedtest-live-phase .eyebrow { color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .speedtest-live-phase strong { font-size: 13.5px; font-weight: 600; }
#view .speedtest-tick-feed { max-height: 168px; overflow: auto; padding: 6px 0; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface-subtle); box-shadow: none; color: var(--cc-text-soft); }
#view .speedtest-tick-feed::before, #view .speedtest-tick-feed::after { content: none; display: none; }
#view .speedtest-tick-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
#view .speedtest-tick { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 10px; padding: 3px 14px; border: 0; background: none; color: var(--cc-text-soft); font-family: var(--cc-mono); font-size: 11.5px; line-height: 1.6; }
#view .speedtest-tick:nth-child(odd), #view .speedtest-tick:nth-child(even) { background: none; }
#view .speedtest-tick time { color: #9aa1ab; }
#view .speedtest-tick.good span { color: var(--cc-success); }
#view .speedtest-tick.bad span { color: var(--cc-danger); }
#view .speedtest-tick-empty { margin: 0; padding: 8px 14px; color: var(--cc-muted); font-size: 12px; }
@media (max-width: 760px) { #view .speedtest-live-row { grid-template-columns: minmax(0, 1fr); } }
#view .stat-tile, #view .stat-tile .speedometer-core { justify-items: start; justify-content: start; }
#view .stat-tile-value { justify-content: flex-start; }
#view .stat-tile-caption, #view .stat-tile .speedometer-caption { font-weight: 400; }
#view .iperf-dual-card.stat-tile { grid-template-columns: minmax(0, 1fr); grid-template-areas: none; width: auto; max-width: none; }
#view .iperf-dual-card.stat-tile > * { grid-area: auto; }

/* iperf3 panel: header, tiles row, run form, history */
#view .iperf-compact-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0; border: 0; background: none; }
#view .iperf-compact-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
#view .iperf-compact-head p { margin: 2px 0 0; color: var(--cc-muted); font-size: 12.5px; }
#view .iperf-probe-instrument { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#view .iperf-probe-instrument::before, #view .iperf-probe-instrument::after { content: none; display: none; }
#view .iperf-probe-instrument .iperf-speedometer-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; width: auto; max-width: none; margin: 0; padding: 0; background: none; border: 0; }
#view .iperf-history-panel { display: grid; gap: 10px; padding: 0; border: 0; background: none; }
#view .iperf-history-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#view .iperf-history-head h4 { margin: 0; font-size: 14px; font-weight: 600; }
#view .iperf-history-head > span, #view .iperf-history-summary { margin: 0; color: var(--cc-muted); font-size: 12px; }

/* ---------- Form controls inside pages ---------- */
#view input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), #view select { min-height: 34px; padding: 0 10px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background-color: var(--cc-surface); color: var(--cc-text); font: inherit; font-size: 13px; font-weight: 400; box-shadow: none; }
#view select { padding-right: 28px; }
#view textarea { padding: 8px 10px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); font-size: 13px; font-weight: 400; }
#view :is(input, select, textarea):focus { border-color: var(--cc-accent); outline: none; box-shadow: 0 0 0 3px #147d7322; }
#view label > span:first-child { font-weight: 500; }

/* ---------- Diagnostic panel structure ---------- */
#view .diagnostic-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#view .diagnostic-head h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.2px; }
#view .diagnostic-head p { margin: 2px 0 0; color: var(--cc-muted); font-size: 12.5px; }
#view .diagnostic-form { display: grid; grid-template-columns: minmax(110px, 160px) minmax(110px, 160px) minmax(140px, 200px) auto; align-items: end; justify-content: start; gap: 10px 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface-subtle); }
#view .diagnostic-field { display: grid; gap: 5px; margin: 0; }
#view .diagnostic-field > span { color: var(--cc-text-soft); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
#view .diagnostic-field--action .button { min-height: 34px; }
#view .diagnostic-form-note { grid-column: 1 / -1; color: var(--cc-muted); font-size: 12px; }
#view .diagnostic-result { display: grid; gap: 12px; }
#view .diagnostic-result-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
#view .diagnostic-result-head h4 { margin: 0; font-size: 14px; font-weight: 600; }
#view .diagnostic-result-head span { color: var(--cc-muted); font-size: 12px; }
#view .diagnostic-empty-state { display: grid; gap: 4px; padding: 18px; border: 1px dashed var(--cc-border-strong); border-radius: var(--cc-radius); background: none; color: var(--cc-muted); font-size: 12.5px; }
#view .diagnostic-empty-state strong { color: var(--cc-text); font-size: 13px; font-weight: 600; }
@media (max-width: 760px) { #view .diagnostic-form { grid-template-columns: 1fr 1fr; } }

/* Small metric tiles used across device pages */
#view .realtime-metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0; }
#view .realtime-metric { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface); box-shadow: none; }
#view .realtime-metric > span { color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .realtime-metric > strong { color: var(--cc-text); font-size: 20px; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
#view .realtime-metric > small { color: var(--cc-muted); font-size: 11.5px; }
#view .realtime-metric.good > strong { color: var(--cc-success); }
#view .realtime-metric.bad > strong { color: var(--cc-danger); }

/* Plain status text: coloured dot + word, never a filled pill */
#view .status-text { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
#view .status-text::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cc-muted); }
#view .status-text.good { color: var(--cc-success); }
#view .status-text.good::before { background: var(--cc-success); }
#view .status-text.warn { color: var(--cc-warning); }
#view .status-text.warn::before { background: #d39b2a; }
#view .status-text.bad { color: var(--cc-danger); }
#view .status-text.bad::before { background: var(--cc-danger); }
#view .iperf-dual-card.stat-tile { justify-items: stretch; }
#view .iperf-dual-card.stat-tile .iperf-dial-scale { font-size: inherit; font-weight: inherit; vertical-align: baseline; }

/* ---------- Shared page vocabulary ---------- */
#view .page-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0; }
#view .page-section-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
#view .page-section-head p { margin: 3px 0 0; color: var(--cc-muted); font-size: 13px; }
#view .panel { display: grid; gap: 14px; padding: 18px 20px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; }
#view .panel::before, #view .panel::after { content: none; display: none; }
#view .panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 0; border: 0; background: none; }
#view .panel-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
#view .panel-head p { margin: 2px 0 0; color: var(--cc-muted); font-size: 12.5px; }

/* Facts: label over value, laid out as an even grid */
#view .fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0; margin: 0; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); overflow: hidden; }
#view .fact { display: grid; align-content: start; gap: 2px; min-width: 0; padding: 14px 16px; border-right: 1px solid var(--cc-border); border-bottom: 1px solid var(--cc-border); margin: 0 -1px -1px 0; }
#view .fact dt { color: var(--cc-muted); font-size: 11.5px; font-weight: 500; }
#view .fact dd { margin: 0; overflow: hidden; color: var(--cc-text); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#view .fact dd.mono { font-family: var(--cc-mono); font-size: 12.5px; }
#view .fact dd.fact-note { color: var(--cc-muted); font-size: 12px; font-weight: 400; }
#view .fact-empty { color: #a0a7b1; font-weight: 400; }

/* Device overview layout */
#view .device-overview-board.dov { display: grid; gap: 18px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#view .device-overview-board.dov::before, #view .device-overview-board.dov::after { content: none; display: none; }
#view .device-workspace-page { display: grid; gap: 18px; }

/* Lifecycle status pill -> quiet status text with a dot */
#view .lifecycle-pill { display: inline-flex; align-items: center; gap: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
#view .lifecycle-pill .lifecycle-disclosure-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; padding: 0 10px; border: 1px solid var(--cc-border); border-radius: 999px; background: var(--cc-surface); color: var(--cc-text); font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer; box-shadow: none; }
#view .lifecycle-pill .lifecycle-disclosure-trigger::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc-muted); }
#view .lifecycle-pill.good .lifecycle-disclosure-trigger::before { background: #20a36b; }
#view .lifecycle-pill.warn .lifecycle-disclosure-trigger::before { background: #d39b2a; }
#view .lifecycle-pill.bad .lifecycle-disclosure-trigger::before { background: var(--cc-danger); }
#view .lifecycle-pill .lifecycle-disclosure-trigger small { color: var(--cc-muted); font-size: 12px; font-weight: 400; }

/* Connection path: light, evenly spaced hops joined by a thin line */
#view .device-flow { overflow: visible; }
#view .device-flow-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: stretch; gap: 0; margin: 0; padding: 0; background: none; border: 0; overflow-x: auto; }
#view .device-flow-link { display: none; }
#view .device-flow-hop { position: relative; display: grid; align-content: start; gap: 2px; min-width: 112px; padding: 22px 10px 0 0; border: 0; background: none; box-shadow: none; text-align: left; }
#view .device-flow-hop::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--cc-border); }
#view .device-flow-hop::after { content: ""; position: absolute; top: 2px; left: 0; width: 10px; height: 10px; border: 2px solid var(--cc-surface); border-radius: 50%; background: var(--cc-accent); box-shadow: 0 0 0 1px var(--cc-accent); }
#view .device-flow-hop:last-child::before { right: auto; width: 0; }
#view .device-flow-hop.is-empty::after { background: var(--cc-surface); box-shadow: 0 0 0 1px var(--cc-border-strong); }
#view .device-flow-hop-icon { display: none; }
#view .device-flow-hop-label { color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .device-flow-hop-value { overflow: hidden; color: var(--cc-text); font-family: var(--cc-mono); font-size: 12.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#view .device-flow-hop.is-empty .device-flow-hop-value { color: #a0a7b1; font-family: inherit; }
#view .device-flow-hop-note { color: var(--cc-muted); font-size: 11.5px; }
#view .device-flow-route { display: block; padding: 8px 10px; border-radius: var(--cc-radius-sm); background: var(--cc-surface-subtle); color: var(--cc-text-soft); font-family: var(--cc-mono); font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
#view .device-flow-hop > * { justify-self: start; text-align: left; }
#view .device-flow-hop-label, #view .device-flow-hop-note { font-weight: 500; }
#view .device-flow-hop-note { font-weight: 400; letter-spacing: 0; text-transform: none; }
#view .device-flow-hop.is-focus { background: none; box-shadow: none; }
#view .device-wan-ip-history { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; color: var(--cc-muted); font-size: 12px; }
#view .device-wan-ip-history-label { color: var(--cc-muted); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
#view .device-wan-ip-hops { display: flex; flex-wrap: wrap; gap: 6px; }
#view .device-wan-ip-hop b { color: var(--cc-text-soft); font-family: var(--cc-mono); font-size: 12px; font-weight: 400; }
#view .device-wan-ip-hop.is-current b { color: var(--cc-text); }
#view .device-wan-ip-sep { color: #b3b9c1; }

/* Status pill colour follows the reachability state, not a tone class */
#view .lifecycle-pill:is([data-connection-state="live"], [data-connection-state="healthy"], [data-connection-state="heartbeat"], [data-connection-state="online"]) .lifecycle-disclosure-trigger::before { background: #20a36b; }
#view .lifecycle-pill:is([data-connection-state="degraded"], [data-connection-state="reconnecting"], [data-connection-state="recovering"], [data-connection-state="stale"]) .lifecycle-disclosure-trigger::before { background: #d39b2a; }
#view .lifecycle-pill[data-connection-state="offline"] .lifecycle-disclosure-trigger::before { background: var(--cc-danger); }

/* Underlay trace banner: same light path as the overview */
#view .connection-trace-banner { margin: 0; padding: 16px 18px 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; color: var(--cc-text); overflow-x: auto; }
#view .connection-trace-banner::before, #view .connection-trace-banner::after { content: none; display: none; }
#view .trace-route { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(110px, 1fr); gap: 0; margin: 0; padding: 0; background: none; }
#view .trace-route::before, #view .trace-route::after { content: none; display: none; }
#view .trace-hop { position: relative; display: grid; align-content: start; justify-items: start; gap: 2px; min-width: 0; padding: 20px 10px 0 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--cc-text); text-align: left; }
#view .trace-hop::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--cc-border); border: 0; transform: none; }
#view .trace-hop::after { content: ""; position: absolute; top: 2px; left: 0; width: 10px; height: 10px; border: 2px solid var(--cc-surface); border-radius: 50%; background: var(--cc-accent); box-shadow: 0 0 0 1px var(--cc-accent); transform: none; }
#view .trace-hop:last-child::before { width: 0; right: auto; }
#view .trace-hop small { color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .trace-hop strong { max-width: 100%; overflow: hidden; color: var(--cc-text); font-family: var(--cc-mono); font-size: 12.5px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#view .trace-hop strong svg { display: none; }
#view .trace-hop em { color: var(--cc-muted); font-size: 11.5px; font-style: normal; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view .trace-hop .tooltip-bubble { display: none; }

/* Data tabs (inventory, interfaces, storage, ...) */
#view .device-overview-data { margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#view .device-data-tabs { display: grid; gap: 0; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; overflow: hidden; }
#view .device-data-tablist { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--cc-border); background: var(--cc-surface); overflow-x: auto; }
#view .device-data-tab { display: inline-flex; align-items: baseline; gap: 6px; min-height: 42px; padding: 0 10px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; color: var(--cc-text-soft); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer; box-shadow: none; margin-bottom: -1px; align-items: center; }
#view .device-data-tab:hover { color: var(--cc-text); }
#view .device-data-tab.is-active { border-bottom-color: var(--cc-accent); color: var(--cc-text); }
#view .device-data-tab-label { font-size: 13px; font-weight: inherit; letter-spacing: 0; text-transform: none; }
#view .device-data-tab-summary { color: var(--cc-muted); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
#view .device-data-panel { display: grid; gap: 12px; padding: 16px 20px 18px; }
#view .device-data-panel[hidden] { display: none; }
#view .device-data-panel-head { display: none; }

/* ---------- Generic device-page components ---------- */
#view .device-page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0; padding: 0; border: 0; background: none; }
#view .device-page-title h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
#view .device-page-title p, #view .device-page-subtitle { margin: 3px 0 0; color: var(--cc-muted); font-size: 13px; font-weight: 400; }
#view .device-page-title .connection-stack-note, #view .device-page-title p + p { color: var(--cc-text-soft); }

#view :is(.goodcloud-info-card, .console-panel) { display: grid; align-content: start; gap: 12px; margin: 0; padding: 16px 18px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; }
#view :is(.goodcloud-info-card, .console-panel)::before, #view :is(.goodcloud-info-card, .console-panel)::after { content: none; display: none; }
#view :is(.goodcloud-card-title, .panel-title) { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 0; border: 0; background: none; }
#view :is(.goodcloud-card-title, .panel-title) :is(h2, h3) { margin: 0; color: var(--cc-text); font-size: 15px; font-weight: 600; letter-spacing: -.1px; text-transform: none; }
#view .goodcloud-card-title-actions { display: flex; align-items: center; gap: 10px; color: var(--cc-muted); font-size: 12px; }
#view .goodcloud-card-title-actions > span:not([class]) { color: var(--cc-muted); font-size: 12px; font-weight: 400; }
#view .connection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; align-items: start; }
#view .connection-cards > .connection-facts-card { grid-column: 1 / -1; }

/* Label / value / note rows */
#view .goodcloud-mini-rows { display: grid; gap: 0; margin: 0; padding: 0; border: 0; background: none; }
#view .goodcloud-mini-rows > div { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 9px 0; border: 0; border-top: 1px solid var(--cc-border); background: none; }
#view .goodcloud-mini-rows > div:first-child { border-top: 0; }
#view .goodcloud-mini-rows strong { color: var(--cc-muted); font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#view .goodcloud-mini-rows span { overflow: hidden; color: var(--cc-text); font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#view .goodcloud-mini-rows small { overflow: hidden; color: var(--cc-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
#view .connection-endpoints, #view .connection-endpoint-list { border: 0; background: none; }

/* Key / value tables */
#view .device-kv-table-wrap { margin: 0; border: 0; background: none; }
#view .device-kv-table { width: 100%; border-collapse: collapse; }
#view .device-kv-table thead { display: none; }
#view .device-kv-table :is(th, td) { padding: 9px 12px 9px 0; border: 0; border-top: 1px solid var(--cc-border); background: none; text-align: left; vertical-align: baseline; font-size: 13px; }
#view .device-kv-table tbody tr:first-child :is(th, td) { border-top: 0; }
#view .device-kv-table .device-kv-field { width: 180px; color: var(--cc-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
#view .device-kv-table .device-kv-value { color: var(--cc-text); font-weight: 500; }
#view .device-kv-table td:last-child { color: var(--cc-muted); font-size: 12px; }

/* Status badges: quiet outline with a toned dot */
#view :is(.status-badge, .live-state) { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border: 1px solid var(--cc-border); border-radius: 999px; background: var(--cc-surface); color: var(--cc-text-soft); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: none; }
#view :is(.status-badge, .live-state)::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b3b9c1; }
#view :is(.status-badge, .live-state).good::before { background: #20a36b; }
#view :is(.status-badge, .live-state).warn::before { background: #d39b2a; }
#view :is(.status-badge, .live-state).bad::before { background: var(--cc-danger); }
#view :is(.status-badge, .live-state).bad { color: var(--cc-danger); }

/* Health checks as a plain checklist */
#view .connection-check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
#view .connection-check-list li { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--cc-text); font-size: 13px; font-weight: 400; }
#view .connection-check-list li b { display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #e3f4ec; }
#view .connection-check-list li b::after { content: "✓"; color: var(--cc-success); font-size: 10px; font-weight: 700; line-height: 1; }
#view .connection-check-list li.bad b { background: #fbe9eb; }
#view .connection-check-list li.bad b::after { content: "✕"; color: var(--cc-danger); }

/* Collapsible fact sections */
#view .connection-fact-sections { display: grid; gap: 0; }
#view .connection-fact-section { margin: 0; border: 0; border-top: 1px solid var(--cc-border); border-radius: 0; background: none; }
#view .connection-fact-section:first-child { border-top: 0; }
#view .connection-fact-section > summary { display: flex; align-items: center; gap: 8px; padding: 10px 0; cursor: pointer; list-style: none; }
#view .connection-fact-section > summary::-webkit-details-marker { display: none; }
#view .connection-fact-section > summary::before { content: "›"; display: inline-block; width: 10px; color: var(--cc-muted); transition: transform .15s ease; }
#view .connection-fact-section[open] > summary::before { transform: rotate(90deg); }
#view .connection-fact-section > summary h3 { margin: 0; font-size: 13px; font-weight: 500; }
#view .connection-fact-section > summary small { color: var(--cc-muted); font-size: 12px; }
#view .connection-fact-section > .goodcloud-mini-rows { padding: 0 0 10px 18px; }

/* Underlay trace: start-aligned, readable internet hop */
#view .trace-route { justify-content: start; width: 100%; }
#view .trace-hop.internet strong { display: block; width: auto; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--cc-text); }

/* ---------- VPN test pages (WireGuard / IPsec) ---------- */
#view .vpn-test-page { display: grid; gap: 16px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
#view .vpn-test-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#view .vpn-test-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.3px; }
#view .vpn-test-head p { margin: 3px 0 0; color: var(--cc-muted); font-size: 13px; }
#view .vpn-test-head-meta { display: flex; align-items: center; gap: 8px; }
#view .vpn-test-pair.is-empty { display: none; }
#view .vpn-test-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border: 1px solid var(--cc-border); border-radius: 999px; background: var(--cc-surface); color: var(--cc-text-soft); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#view .vpn-test-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #b3b9c1; }
#view .vpn-test-chip.good::before { background: #20a36b; }
#view .vpn-test-chip.warn::before { background: #d39b2a; }
#view .vpn-test-chip.bad::before { background: var(--cc-danger); }
#view .vpn-test-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 14px 16px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface-subtle); }
#view .vpn-test-fields { display: flex; flex-wrap: wrap; gap: 12px; }
#view .vpn-test-field { display: block; margin: 0; padding: 0; border: 0; background: none; }
#view .vpn-test-field.is-empty { display: none; }
#view .vpn-test-field label { display: grid; gap: 5px; }
#view .vpn-test-field label > span { color: var(--cc-text-soft); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; }
#view .vpn-test-field input { width: 150px; }
#view .vpn-test-field input[data-connection-test-psk] { width: 260px; }
#view .vpn-test-actions { display: flex; gap: 8px; }
#view .vpn-test-actions .button { min-height: 34px; }
#view .vpn-test-live { display: grid; gap: 14px; margin: 0; padding: 0; border: 0; background: none; }
#view .vpn-test-status { margin: 0; color: var(--cc-text-soft); font-size: 13px; }
#view .vpn-test-status.bad { color: var(--cc-danger); }
#view .vpn-test-empty { margin: 0; color: var(--cc-muted); font-size: 12.5px; }
#view .fact.is-good dd { color: var(--cc-success); }
#view .fact.is-bad dd { color: var(--cc-danger); }
#view .panel-title-note { margin: 3px 0 0; color: var(--cc-muted); font-size: 12.5px; font-weight: 400; }
#view .panel-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--cc-border); color: var(--cc-muted); font-size: 12.5px; }
#view .device-capability-survey .fact-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Agent upgrade summary: values are long version strings, keep them readable */
#view #agent-upgrade .summary-cell strong { font-family: var(--cc-mono); font-size: 14px; font-weight: 500; line-height: 1.4; letter-spacing: 0; overflow-wrap: anywhere; }
#view #agent-upgrade .summary-cell > span:first-child, #view #agent-upgrade .summary-cell > small:first-child { color: var(--cc-muted); font-size: 11.5px; }

/* ---------- Page headers and list pages ---------- */
#view :is(.page-head, .devices-header) { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 20px; }
#view :is(.page-head, .devices-header) h1 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.4px; }
#view :is(.page-head-title-row, .devices-header-left) { display: grid; gap: 4px; }
#view :is(.page-head-meta, .devices-header-count) { color: var(--cc-muted); font-size: 13px; font-weight: 400; }
#view :is(.page-head .button-row, .devices-header-actions) { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }

#view .list-toolbar { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin: 0 0 12px; }
#view .list-toolbar .search-box { position: relative; flex: 0 1 340px; min-width: 220px; margin: 0; }
#view .list-toolbar .search-box input { width: 100%; padding-left: 32px; }
#view .list-toolbar .toolbar-select select { min-width: 140px; }
#view .list-toolbar .fleet-filter-disclosure { flex: 1 1 auto; margin: 0; border: 0; background: none; }
#view .list-toolbar .fleet-filter-disclosure > summary { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background: var(--cc-surface); color: var(--cc-text-soft); font-size: 13px; cursor: pointer; list-style: none; }
#view .list-toolbar .fleet-filter-disclosure > summary::-webkit-details-marker { display: none; }
#view .list-toolbar .fleet-filter-disclosure[open] > summary { border-color: var(--cc-accent); color: var(--cc-accent-hover); }
#view .list-toolbar .fleet-filter-disclosure[open] > :not(summary) { margin-top: 10px; }

/* Fleet table */
#view .device-fleet-table { width: 100%; table-layout: auto; }
#view .device-fleet-table :is(th, td) { padding: 11px 12px; vertical-align: middle; }
#view .device-fleet-table th { color: var(--cc-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; }
#view .device-fleet-table td small { display: block; margin-top: 2px; color: var(--cc-muted); font-size: 12px; font-weight: 400; }
#view .device-fleet-table .table-link { color: var(--cc-text); font-size: 13.5px; font-weight: 600; }
#view .device-fleet-table .table-link:hover { color: var(--cc-accent); }
#view .device-fleet-table .device-seen { white-space: nowrap; }
#view .device-path-chip { display: grid; gap: 1px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--cc-text); }
#view .device-path-chip b { font-size: 13px; font-weight: 500; }
#view .device-path-chip small { margin: 0; color: var(--cc-muted); font-family: var(--cc-mono); font-size: 11.5px; }
#view .device-ip-primary, #view .capability-version { padding: 0; border: 0; background: none; color: var(--cc-text); font-family: var(--cc-mono); font-size: 12.5px; font-weight: 400; }
#view .capability-trigger { display: grid; gap: 2px; padding: 0; border: 0; background: none; }
#view .capability-trigger > small { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#view .row-action-trigger { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background: var(--cc-surface); color: var(--cc-text-soft); font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; }
#view .row-action-trigger svg { width: 12px; height: 12px; margin: 0; }

/* Search boxes: one border, on the input */
#view .search-box { border: 0; background: none; box-shadow: none; padding: 0; }
#view .search-box > span { position: absolute; top: 50%; left: 11px; z-index: 1; width: 13px; height: 13px; transform: translateY(-50%); pointer-events: none; }

/* Hubs list */
#view .edge-list-surface { border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); overflow: hidden; }
#view .edge-list-surface .table-wrap { margin: 0; border: 0; border-radius: 0; }
#view .edge-fleet-table { width: 100%; }
#view .edge-fleet-table :is(th, td) { padding: 11px 12px; vertical-align: middle; }
#view .edge-fleet-table th { color: var(--cc-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; background: var(--cc-surface-subtle); }
#view .edge-fleet-table td small { display: block; margin-top: 2px; color: var(--cc-muted); font-size: 12px; }
#view .edge-fleet-table .table-link { color: var(--cc-text); font-size: 13.5px; font-weight: 600; }
#view .edge-list-footer { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--cc-border); background: var(--cc-surface-subtle); color: var(--cc-muted); font-size: 12px; }
#view .edge-service-summary { display: grid; gap: 2px; font-size: 12.5px; color: var(--cc-text-soft); }
#view .edge-service-line b { display: inline-block; min-width: 64px; color: var(--cc-muted); font-weight: 500; }
#view .edge-service-line.is-on { color: var(--cc-text); }
#view .edge-attachment-pill { display: inline-grid; gap: 1px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; list-style: none; }
#view .edge-attachment-pill::-webkit-details-marker { display: none; }
#view .edge-attachment-meter { display: grid; gap: 1px; padding: 0; border: 0; background: none; }
#view .edge-attachment-meter b { color: var(--cc-text); font-size: 13px; font-weight: 500; text-decoration: underline dotted var(--cc-border-strong); text-underline-offset: 3px; }
#view .edge-attachment-meter small { color: var(--cc-muted); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
#view .search-box input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]) { padding-left: 32px; }

/* ---------- Tables across list pages ---------- */
#view :is(.priority-table, .recent-alerts-table, .network-test-table, .command-table, .jobs-table) { width: 100%; border-collapse: collapse; }
#view :is(.priority-table, .recent-alerts-table, .network-test-table) :is(th, td) { padding: 10px 12px; border: 0; border-top: 1px solid var(--cc-border); text-align: left; vertical-align: middle; font-size: 13px; }
#view :is(.priority-table, .recent-alerts-table, .network-test-table) thead th { border-top: 0; background: var(--cc-surface-subtle); color: var(--cc-muted); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; }
#view :is(.priority-table, .recent-alerts-table, .network-test-table) tbody tr:hover { background: #fafbfc; }
#view :is(.priority-table, .recent-alerts-table, .network-test-table, .device-table) td code { padding: 0; border: 0; border-radius: 0; background: none; color: var(--cc-text-soft); font-family: var(--cc-mono); font-size: 12px; font-weight: 400; }
#view .recent-alerts-table td small { display: block; margin-top: 2px; color: var(--cc-muted); font-size: 12px; }
#view .recent-alerts-table .alert-col-message strong { font-weight: 500; }
#view .recent-alerts-table .alert-col-count { width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
#view .network-test-table .col-result { color: var(--cc-text); font-variant-numeric: tabular-nums; white-space: nowrap; }
#view .row-payload > summary { display: inline-flex; color: var(--cc-muted); font-size: 12px; font-weight: 500; cursor: pointer; list-style: none; white-space: nowrap; }
#view .row-payload > summary::-webkit-details-marker { display: none; }
#view .row-payload > summary:hover { color: var(--cc-accent); }
#view .row-payload[open] > pre { max-width: 560px; max-height: 320px; margin-top: 6px; padding: 10px; overflow: auto; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-sm); background: var(--cc-surface-subtle); font-family: var(--cc-mono); font-size: 11.5px; white-space: pre-wrap; }
#view .table-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--cc-border); background: var(--cc-surface-subtle); color: var(--cc-muted); font-size: 12px; }

/* Panels that wrap list tables */
#view .table-panel { padding: 0; overflow: hidden; }
#view .table-panel > .panel-title { padding: 14px 18px; border-bottom: 1px solid var(--cc-border); }
#view .table-panel > .panel-title > span { color: var(--cc-muted); font-size: 12px; }
#view .table-panel .table-wrap { margin: 0; border: 0; border-radius: 0; }
#view :is(.page-head, .devices-header) { min-height: 0; }
#view .alert-row:is(.is-warn, .is-bad, .is-good) { background: none; }

/* Overview dashboard */
#view .overview-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
#view .overview-side { display: grid; gap: 20px; align-content: start; }
#view .overview-hubs .overview-edge-list { display: grid; }
#view .overview-edge-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--cc-border); color: inherit; }
#view .overview-edge-row:first-child { border-top: 0; }
#view .overview-edge-row strong { display: block; font-size: 13px; font-weight: 600; }
#view .overview-edge-row small { color: var(--cc-muted); font-size: 12px; }
@media (max-width: 1000px) { #view .overview-layout { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Hub detail ---------- */
#view .edge-detail-utilitybar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 0 0 12px; padding: 0; border: 0; background: none; box-shadow: none; }
#view .edge-detail-utilitybar .breadcrumb { display: none; }
#view .edge-detail-summary { display: grid; gap: 16px; margin: 0 0 20px; padding: 0; border: 0; background: none; box-shadow: none; }
#view .edge-detail-identity { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#view .edge-detail-mark { display: none; }
#view .edge-detail-title h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.4px; }
#view .edge-detail-title p { margin: 3px 0 0; color: var(--cc-muted); font-family: var(--cc-mono); font-size: 12.5px; }
#view .edge-detail-status { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border: 1px solid var(--cc-border); border-radius: 999px; background: var(--cc-surface); color: var(--cc-text); font-size: 12.5px; font-weight: 500; box-shadow: none; }
#view .edge-detail-status i { width: 8px; height: 8px; border-radius: 50%; background: #b3b9c1; }
#view .edge-detail-status:is(.online, .good, .is-online) i { background: #20a36b; }
#view .edge-detail-status:is(.degraded, .warn, .is-degraded) i { background: #d39b2a; }
#view .edge-detail-status:is(.offline, .bad, .is-offline) i { background: var(--cc-danger); }
#view .edge-detail-facts.fact-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; padding: 0; }
#view .edge-detail-facts.fact-grid .fact { display: grid; padding: 12px 14px; border-left: 0; }
#view .edge-detail-facts.fact-grid .fact dt { color: var(--cc-muted); font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#view .edge-detail-facts.fact-grid .fact dd { margin: 0; font-size: 13.5px; font-weight: 500; }
#view .edge-detail-facts .fact.is-warning dd { color: var(--cc-warning); }
#view .edge-detail-alerts { display: grid; gap: 6px; }
#view .edge-detail-alert { display: block; padding: 8px 12px; border: 1px solid #f0dfbd; border-radius: var(--cc-radius-sm); background: #fdf8ee; color: var(--cc-text-soft); font-size: 12.5px; }
#view .edge-detail-alert b { margin-right: 6px; color: var(--cc-warning); font-weight: 600; }

#view .edge-service-console { border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); box-shadow: none; overflow: hidden; }
#view .edge-console-rail { padding: 12px 10px; border-right: 1px solid var(--cc-border); background: var(--cc-surface-subtle); }
#view .edge-console-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 6px 8px; }
#view .edge-console-rail-title { color: #8a929d; font-size: 10.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; }
#view .edge-console-nav { display: grid; gap: 1px; }
#view .edge-console-nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 0; padding: 8px 10px; border: 0; border-radius: var(--cc-radius-sm); background: none; box-shadow: none; color: var(--cc-text-soft); text-align: left; cursor: pointer; }
#view .edge-console-nav-item:hover { background: #eceff2; }
#view .edge-console-nav-item.is-selected { background: #e6f0eb; box-shadow: none; border: 0; }
#view .edge-console-nav-item > :first-child:not(.edge-console-nav-copy) { display: grid; place-items: center; flex: 0 0 16px; width: 16px; height: 16px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--cc-muted); }
#view .edge-console-nav-item > :first-child:not(.edge-console-nav-copy) svg { width: 15px; height: 15px; }
#view .edge-console-nav-copy { display: grid; gap: 1px; min-width: 0; }
#view .edge-console-nav-copy b { color: var(--cc-text); font-size: 13px; font-weight: 500; }
#view .edge-console-nav-item.is-selected .edge-console-nav-copy b { color: var(--cc-accent-hover); font-weight: 600; }
#view .edge-console-nav-copy small { overflow: hidden; color: var(--cc-muted); font-size: 11.5px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
/* Hub detail: actions share the title row; status sits beside the name */
#view .edge-detail-identity { justify-content: flex-start; align-items: center; min-height: 36px; }
#view .edge-detail-identity .edge-detail-status { margin-left: 4px; }
#view .edge-detail-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
#view .edge-service-console-shell { padding: 0; border: 0; background: none; }
#view .edge-offering-head, #view [class*="edge-offering"] > header { background: none; }

/* ---------- Flat surfaces: no gradients or dark slabs outside the terminal ---------- */
#view :is(.network-edge-readiness, .network-test-device-preview, .agent-artifact-strip, .mtr-chart-panel, .mtr-hop-table-wrap, .onboarding-edge-choice, .onboarding-claim-tracker) { background-image: none; box-shadow: none; }
#view :is(.network-edge-readiness, .network-test-device-preview, .agent-artifact-strip, .mtr-chart-panel, .onboarding-claim-tracker) { background-color: var(--cc-surface); }
#view .mtr-hop-table-wrap th { background: var(--cc-surface-subtle); }
#view .onboarding-edge-choice { background-color: var(--cc-surface); }
#view .onboarding-edge-choice.is-selected { background-color: #f3f9f7; border-color: var(--cc-accent); }
#view .onboarding-claim-tracker { border: 1px solid var(--cc-border); color: var(--cc-text); }
#view .onboarding-claim-tracker :is(h2, h3, strong) { color: var(--cc-text); }
#view .onboarding-claim-tracker :is(p, small, span) { color: var(--cc-text-soft); }
#view .page-head { background: none; color: var(--cc-text); padding: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
#view .page-head::before, #view .page-head::after { content: none; display: none; }
#view .page-head :is(h1, .page-head-copy) { color: var(--cc-text); }
#view .page-head .page-head-copy { color: var(--cc-text-soft); font-size: 13px; }
#view .page-head .page-head-meta { background: none; padding: 0; color: var(--cc-muted); }
#view pre:not(.terminal-output pre) { background: var(--cc-surface-subtle); color: var(--cc-text); border: 1px solid var(--cc-border); }

/* Agent updates table: keep long reasons inside the card */
#view .table-wrap { overflow-x: auto; }
#view :is(.agent-upgrade-fleet-table, .priority-table) td { overflow-wrap: anywhere; }

/* ---------- Buttons inside pages ---------- */
#view .button:not(.primary):not(.danger) { background: var(--cc-surface); border-color: var(--cc-border-strong); color: var(--cc-text-soft); opacity: 1; }
#view .button:not(.primary):not(.danger):hover:not(:disabled) { background: var(--cc-surface-subtle); border-color: #aeb6c0; color: var(--cc-text); }
#view .button.primary { background: var(--cc-accent); border-color: var(--cc-accent); color: #fff; }
#view .button.primary:hover:not(:disabled) { background: var(--cc-accent-hover); border-color: var(--cc-accent-hover); }
#view .button:disabled, #view .button[aria-disabled="true"] { opacity: .5; }
#view .button { font-size: 12.5px; font-weight: 500; letter-spacing: 0; text-transform: none; box-shadow: none; }

/* ---------- MTR ---------- */
#view .mtr-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
#view .mtr-panel-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
#view .mtr-panel-head p { margin: 2px 0 0; color: var(--cc-muted); font-size: 12.5px; }
#view .mtr-control-bar { padding: 14px 16px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface-subtle); }
#view .mtr-field > span { color: var(--cc-text-soft); font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; }
#view .mtr-live-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
#view .mtr-stat { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface); box-shadow: none; }
#view .mtr-stat > :first-child { color: var(--cc-muted); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
#view .mtr-stat > :last-child { overflow: hidden; color: var(--cc-text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
#view .mtr-hop-path { display: none; }
#view .mtr-chart-panel { border: 1px solid var(--cc-border); border-radius: var(--cc-radius); }

/* ---------- Narrow screens ---------- */
#view .device-fleet-table .device-col-name { min-width: 160px; word-break: normal; overflow-wrap: normal; }
#view .device-fleet-table .device-col-name small { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  #view :is(.page-head, .devices-header) { flex-direction: column; align-items: stretch; gap: 12px; }
  #view :is(.page-head .button-row, .devices-header-actions) { justify-content: flex-start; }
  #view .list-toolbar .search-box { flex: 1 1 100%; }
  #view .device-fleet-table :is(.device-col-path, .device-col-ip, .device-col-capabilities, .device-col-uptime) { display: none; }
  #view .edge-fleet-table :is(.edge-col-host, .edge-col-ip, .edge-col-version, .edge-col-services, .edge-col-seen) { display: none; }
  #view :is(.recent-alerts-table, .network-test-table) :is(.alert-col-payload, .alert-col-sev, .col-profile, .col-phase, .col-type) { display: none; }
  #view .edge-detail-identity { flex-wrap: wrap; }
  #view .edge-detail-actions { margin-left: 0; width: 100%; }
}

/* Automations */
#view .automation-kind { color: var(--cc-muted); font-size: 12px; }
#view .automation-icon-action, #view .automation-arm-toggle { color: var(--cc-muted); }
#view .automation-icon-action:hover { color: var(--cc-text); }
#view .automation-icon-action.is-danger:hover { color: var(--cc-danger); }
#view .automation-arm-toggle.is-armed { color: var(--cc-accent); }
#view .automation-library-inline { display: grid; gap: 10px; padding: 16px 18px; border-top: 1px solid var(--cc-border); }
#view .automation-library-inline > .panel-title { padding: 0; }
#view .automation-arm-toggle.is-armed svg, #view .automation-arm-toggle.is-armed svg * { color: var(--cc-accent); stroke: var(--cc-accent); fill: none; }

/* Device overview: compact borderless fact strip instead of a boxed grid */
#view .fact-strip { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 0; padding: 0 0 2px; }
#view .fact-strip .fact { display: grid; gap: 1px; min-width: 0; max-width: 340px; padding: 0; border: 0; margin: 0; }
#view .fact-strip .fact dt { color: var(--cc-muted); font-size: 11.5px; font-weight: 500; }
#view .fact-strip .fact dd { margin: 0; overflow: hidden; color: var(--cc-text); font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
#view .fact-strip .fact dd.mono { font-family: var(--cc-mono); font-size: 12.5px; line-height: 1.6; }
#view .fact-strip .fact dd.fact-note { color: var(--cc-muted); font-size: 12px; font-weight: 400; }
#view .device-flow-hop.is-focus, #view .device-flow-hop.is-focus * { background: none; box-shadow: none; }

/* Path type shown as an icon, word kept for tooltips and screen readers */
#view .device-flow-hop-type { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; color: var(--cc-text-soft); }
#view .device-flow-hop-type svg, #view .device-path-icon svg { width: 16px; height: 16px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#view .device-path-chip { display: inline-flex; align-items: center; gap: 7px; }
#view .device-path-icon { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--cc-text-soft); }
#view .device-path-chip.is-unknown .device-path-icon { color: #a0a7b1; }
#view .device-path-chip b { font-family: var(--cc-mono); font-size: 12.5px; font-weight: 400; color: var(--cc-text); }
#view .device-fleet-table td.device-col-path { text-align: left; }
#view .device-path-chip { flex-direction: row; justify-content: flex-start; align-items: center; width: auto; min-width: 0; }

/* ---------- Testing workflow ---------- */
.nav .nav-secondary { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--cc-border); }
.nav .nav-secondary > summary { min-height: 36px; color: var(--cc-text-soft); font-size: 12px; font-weight: 500; }
.nav .nav-secondary .nav-tree-panel-inner { gap: 2px; padding: 6px 0 0; }
.nav .nav-secondary .nav-tree-panel-inner a { min-height: 34px; font-size: 12px; }
.nav .nav-secondary:has(a.active) > summary { color: var(--cc-accent-hover); }
.app-shell.sidebar-collapsed .nav .nav-secondary { padding-top: 8px; }
.app-shell.sidebar-collapsed .nav .nav-secondary .nav-tree-panel-inner a { min-height: 36px; }

#view .testing-intro { display: grid; gap: 8px; margin: 0 0 24px; }
#view .testing-intro .eyebrow { color: var(--cc-accent-hover); font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
#view .testing-intro h2 { margin: 0; color: var(--cc-text); font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.4px; }
#view .testing-intro > p { max-width: 720px; color: var(--cc-text-soft); font-size: 13px; line-height: 1.6; }
#view .testing-tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 8px; }
#view .testing-tool-card { display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 18px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius-lg); background: var(--cc-surface); color: var(--cc-text); }
#view .testing-tool-icon { display: grid; flex: 0 0 36px; place-items: center; width: 36px; height: 36px; border: 1px solid #dcebe6; border-radius: var(--cc-radius); background: var(--cc-accent-soft); color: var(--cc-accent-hover); }
#view .testing-tool-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#view .testing-tool-copy { display: grid; gap: 4px; min-width: 0; }
#view .testing-tool-copy strong { color: var(--cc-text); font-size: 14px; font-weight: 600; }
#view .testing-tool-copy small { color: var(--cc-text-soft); font-size: 12px; line-height: 1.5; }
#view .testing-tool-arrow { margin-left: auto; color: var(--cc-muted); font-size: 16px; line-height: 1.4; }
#view .testing-tool-card:hover { border-color: var(--cc-accent); background: #fbfdfc; }
#view .testing-tool-card:hover .testing-tool-arrow { color: var(--cc-accent); }
#view .testing-tool-card:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
#view .overview-metrics { gap: 20px; margin-bottom: 24px; }
#view .overview-metrics .summary-cell { min-width: 0; padding-top: 0; }
#view .overview-metrics .summary-cell > span { color: var(--cc-text-soft); font-size: 12px; }
#view .overview-metrics .summary-cell > strong { font-variant-numeric: tabular-nums; }
#view .overview-metrics .summary-cell > small { font-size: 12px; }
#view .overview-device-table td { padding: 14px 16px; }
#view .overview-device-table .button-row { gap: 6px; }
#view .overview-device-table .button { white-space: nowrap; }

/* Device launch links describe a tool; running it stays an explicit action. */
#view .device-test-launcher { display: grid; gap: 14px; padding: 0 0 24px; border-bottom: 1px solid var(--cc-border); }
#view .device-test-launcher-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 16px; }
#view .device-test-launcher-head > div { display: grid; gap: 4px; }
#view .device-test-launcher-head > a { color: var(--cc-accent-hover); font-size: 12px; white-space: nowrap; }
#view .device-test-launcher-head h2 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.2px; }
#view .device-test-launcher-head p { max-width: 720px; color: var(--cc-text-soft); font-size: 13px; line-height: 1.6; }
#view .device-test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#view .device-test-card { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-content: start; gap: 10px; min-width: 0; padding: 14px; border: 1px solid var(--cc-border); border-radius: var(--cc-radius); background: var(--cc-surface); color: var(--cc-text); }
#view .device-test-card > svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 2px; fill: none; stroke: var(--cc-accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
#view .device-test-card-copy { display: grid; gap: 4px; min-width: 0; }
#view .device-test-card-kind { color: var(--cc-muted); font-size: 10px; font-weight: 500; letter-spacing: .4px; text-transform: uppercase; }
#view .device-test-card-copy strong { color: var(--cc-text); font-size: 13px; font-weight: 600; }
#view .device-test-card-copy small { color: var(--cc-text-soft); font-size: 12px; line-height: 1.5; }
#view .device-test-card-action { grid-column: 2; align-self: end; color: var(--cc-accent-hover); font-size: 11px; }
#view .device-test-launcher-note { color: var(--cc-muted); font-size: 12px; line-height: 1.5; }
#view .device-test-card:hover { border-color: var(--cc-accent); background: #fbfdfc; }
#view .device-test-card:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
#view .device-test-card.is-unavailable { background: var(--cc-surface-subtle); }
#view .device-test-card.is-unavailable > svg { stroke: var(--cc-muted); }
#view .device-test-card.is-unavailable .device-test-card-action { color: var(--cc-text-soft); }
.dw-nav-label { color: #687382; }
.dw-nav-disclosure { min-width: 0; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--cc-border); }
.dw-nav-disclosure > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 30px; padding: 4px 10px; border-radius: var(--cc-radius-sm); list-style: none; cursor: pointer; }
.dw-nav-disclosure > summary .dw-nav-label { padding: 0; }
.dw-nav-disclosure > summary::-webkit-details-marker { display: none; }
.dw-nav-disclosure > summary > svg { width: 12px; height: 12px; fill: none; stroke: var(--cc-muted); stroke-width: 1.7; }
.dw-nav-disclosure[open] > summary > svg { transform: rotate(180deg); }
.dw-nav-disclosure > summary:hover { background: #eceff2; color: var(--cc-text); }
.dw-nav-disclosure > summary:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 2px; }
.dw-nav-disclosure-body { display: grid; gap: 1px; padding-top: 5px; }

/* Keep test setup before history, with ordinary settings visible immediately. */
#view .network-test-workspace, #view .network-test-history-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; min-width: 0; }
#view :is(.network-test-workspace, .network-test-history-layout) > * { min-width: 0; }
#view :is(.network-test-workspace, .network-test-history-layout) .test-runner { position: static; top: auto; max-width: none; overflow: visible; }
#view .test-runner { display: block; padding: 0; }
#view .test-runner > summary { min-height: 54px; padding: 16px 20px; color: var(--cc-text); font-size: 15px; font-weight: 600; list-style: none; }
#view .test-runner > summary::-webkit-details-marker { display: none; }
#view .test-runner[open] > summary { margin-bottom: 0; }
#view .test-runner > .test-runner-description { max-width: 780px; margin: 16px 20px 0; color: var(--cc-text-soft); font-size: 13px; }
#view .test-runner > form { max-width: none; margin: 18px 20px 20px; gap: 18px; }
#view .test-runner .stack-form > label { gap: 6px; }
#view .network-test-basic-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
#view .network-test-field-group { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
#view .network-test-basic-fields label, #view .network-test-field-group label { display: grid; gap: 6px; min-width: 0; }
#view .network-test-field-group > legend { margin-bottom: 8px; color: var(--cc-text); font-size: 12px; font-weight: 600; }
#view .network-test-field-group > .form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#view .network-test-basic-fields :is(input, select) { width: 100%; }
#view .network-test-device-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 14px; border: 1px solid var(--cc-border); border-left-width: 1px; border-radius: var(--cc-radius); background: var(--cc-surface-subtle); }
#view .network-test-device-line { flex-wrap: wrap; gap: 6px 10px; }
#view .network-test-device-line > strong { font-size: 13px; font-weight: 600; }
#view .network-test-device-line > small { flex: 1 1 240px; font-size: 11.5px; white-space: normal; overflow-wrap: anywhere; }
#view .network-test-choice-grid { grid-column: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
#view .network-test-choice { display: grid; gap: 4px; min-height: 62px; padding: 11px 12px; border: 1px solid var(--cc-border-strong); border-radius: var(--cc-radius-sm); background: var(--cc-surface); color: var(--cc-text); cursor: pointer; }
#view .network-test-choice b { color: var(--cc-text); font-size: 13px; font-weight: 600; }
#view .network-test-choice :is(b, small) { min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.45; }
#view .network-test-choice span { color: var(--cc-text-soft); font-size: 11px; }
#view .network-test-choice:hover:not(:disabled) { border-color: var(--cc-accent); background: #fbfdfc; }
#view .network-test-choice:is(.selected, [aria-pressed="true"]) { border-color: var(--cc-accent); background: var(--cc-accent-soft); box-shadow: inset 0 0 0 1px var(--cc-accent); }
#view .network-test-choice:is(.selected, [aria-pressed="true"]) b { color: var(--cc-accent-hover); }
#view .network-test-choice:focus-visible { outline: 2px solid var(--cc-accent); outline-offset: 3px; }
#view .network-test-choice:disabled { border-color: var(--cc-border); background: var(--cc-surface-subtle); cursor: not-allowed; opacity: .65; }
#view .network-target-presets legend { margin-bottom: 8px; color: var(--cc-text-soft); font-size: 12px; font-weight: 500; }
#view .network-target-preset.button { border-color: var(--cc-border-strong); background: var(--cc-surface); font-size: 12px; }
#view .network-test-advanced > summary strong { font-size: 12px; font-weight: 500; }
#view .network-test-advanced > summary small { font-size: 11.5px; font-weight: 400; }
#view .network-test-advanced-body { gap: 14px; padding: 16px; }
#view .network-test-advanced-body textarea { max-width: 100%; font-family: var(--cc-mono); font-size: 11.5px; }
#view #network-test-form > button[type="submit"] { justify-self: start; min-height: 36px; padding-inline: 18px; }
#view #network-test-result:empty { display: none; }

@media (max-width: 1100px) {
  #view .testing-tool-grid, #view .device-test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  #view .testing-intro h2 { font-size: 20px; }
  #view .testing-tool-grid, #view .device-test-grid, #view .network-test-basic-fields { grid-template-columns: minmax(0, 1fr); }
  #view .testing-tool-card { padding: 14px; }
  #view .overview-metrics { gap: 12px; }
  #view .overview-metrics .summary-cell > strong { font-size: 22px; }
  #view .overview-metrics .summary-cell > :is(span, small) { font-size: 11px; overflow-wrap: anywhere; }
  #view .overview-device-table :is(th, td) { padding: 12px 10px; }
  #view .overview-device-table :is(th, td):nth-child(3) { display: none; }
  #view .test-runner > summary { padding: 14px 16px; }
  #view .test-runner > .test-runner-description { margin-inline: 16px; }
  #view .test-runner > form { margin: 16px; }
  #view .network-test-device-preview { padding: 10px; }
  #view .network-test-device-line > small { flex-basis: 100%; text-align: left; }
  #view .network-test-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #view .network-test-choice { min-height: 58px; padding: 10px; }
  #view .network-test-field-group > .form-grid, #view .network-test-advanced-body .form-grid { grid-template-columns: minmax(0, 1fr); }
  #view .network-edge-readiness { flex-wrap: wrap; }
  #view .network-edge-readiness > span:not(.status-badge) { flex-basis: 100%; white-space: normal; overflow-wrap: anywhere; }
  #view .network-edge-readiness .button { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .dw-nav-disclosure > summary > svg, #view .network-test-advanced > summary::after { transition: none; }
}
