:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --sidebar-width: 220px;
  --motion-smooth: cubic-bezier(.22, 1, .36, 1);
  --app-bg: #202326;
  --sidebar-bg: #272a2e;
  --surface: #2d3033;
  --surface-raised: #373a3e;
  --surface-soft: #25282b;
  --border: #41464b;
  --border-soft: rgba(189, 194, 200, .13);
  --accent: #c079d2;
  --accent-strong: #963fa5;
  --accent-rgb: 192, 121, 210;
  --blue: var(--accent);
  --blue-soft: rgba(var(--accent-rgb), .14);
  --link: #d2a0de;
  --link-hover: #e3c2eb;
  --steel: #b7bbc0;
  --text: #f1f2f3;
  --text-muted: #c1c4c7;
  --text-dim: #969ba1;
  --text-quiet: #858b91;
  --text-strong: #f4f4f5;
  --icon-muted: #a1a6ab;
  --neutral-rgb: 189, 194, 200;
  --foreground-rgb: 244, 244, 245;
  --page-rgb: 32, 35, 38;
  --shadow-rgb: 0, 0, 0;
  --accent-text: #fff8ff;
  --accent-border: rgba(var(--accent-rgb), .28);
  --surface-hover: #383b3f;
  --surface-empty: rgba(var(--page-rgb), .28);
  --surface-overlay: rgba(var(--page-rgb), .72);
  --code-bg: #1c1f22;
  --chart-track: #484c50;
  --header-bg: rgba(var(--page-rgb), .96);
  --critical-rgb: 255, 123, 119;
  --success-rgb: 52, 199, 138;
  --error-rgb: 218, 116, 128;
  --critical: #ff7b77;
  --high: #f59e0b;
  --medium: #eabf52;
  --low: #60a5fa;
  --success: #34c78a;
  --unknown: #b9c2cc;
  --error: #da7480;
  --status-pass: #73d6ae;
  --status-fail: #ff8b88;
  --status-error: #f0a1aa;
  --status-not-configured: #b1c0d2;
  --radius: 10px;
  --shadow: 0 16px 36px rgba(var(--shadow-rgb), .28);
  font-family: "Avenir Next", "SF Pro Display", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

:root[data-theme="light"] {
  color-scheme: light;
  --app-bg: #f2f2f4;
  --sidebar-bg: #e9e9ec;
  --surface: #ffffff;
  --surface-raised: #f8f7f9;
  --surface-soft: #f2f0f3;
  --border: #d7d3da;
  --border-soft: rgba(49, 43, 53, .13);
  --accent: #874795;
  --accent-strong: #713a80;
  --accent-rgb: 135, 71, 149;
  --blue: var(--accent);
  --blue-soft: rgba(var(--accent-rgb), .11);
  --link: #70417b;
  --link-hover: #502c5b;
  --steel: #69636d;
  --text: #302c33;
  --text-muted: #5d5861;
  --text-dim: #6d6872;
  --text-quiet: #85808a;
  --text-strong: #28242b;
  --icon-muted: #77717b;
  --neutral-rgb: 67, 61, 72;
  --foreground-rgb: 40, 36, 43;
  --page-rgb: 242, 242, 244;
  --shadow-rgb: 50, 42, 55;
  --accent-text: #fffaff;
  --accent-border: rgba(var(--accent-rgb), .28);
  --surface-hover: #f0edf2;
  --surface-empty: rgba(135, 71, 149, .035);
  --surface-overlay: rgba(242, 242, 244, .88);
  --code-bg: #f7f5f8;
  --chart-track: #e5e1e7;
  --header-bg: rgba(248, 247, 249, .96);
  --critical-rgb: 193, 57, 54;
  --success-rgb: 31, 126, 89;
  --error-rgb: 177, 71, 86;
  --critical: #bd3533;
  --high: #a76109;
  --medium: #8a6800;
  --low: #2867ae;
  --success: #217a58;
  --unknown: #5f6873;
  --error: #b14756;
  --status-pass: #207452;
  --status-fail: #a83036;
  --status-error: #a83e51;
  --status-not-configured: #645e68;
  --radius: 10px;
  --shadow: 0 12px 30px rgba(var(--shadow-rgb), .09);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--app-bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--app-bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

button, input, select { font: inherit; }
button { color: inherit; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
::selection { background: rgba(var(--accent-rgb), .35); color: var(--text); }

.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: var(--accent-text); border: 1px solid var(--accent); border-radius: 8px; background: var(--surface-raised); box-shadow: var(--shadow); transform: translateY(-150%); }
.skip-link:focus-visible { transform: translateY(0); }

.app-frame { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .24s var(--motion-smooth); }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  min-height: 640px;
  overflow-y: auto;
  padding: 22px 14px 16px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-soft);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 42px; padding: 0 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--link); background: rgba(var(--accent-rgb), .13); border: 1px solid rgba(var(--accent-rgb), .24); border-radius: 10px; }
.brand-mark .icon { width: 20px; height: 20px; }
.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 15px; font-weight: 650; letter-spacing: -.015em; }
.brand-copy small { margin-top: 3px; color: var(--text-muted); font-size: 13px; letter-spacing: .025em; }
.workspace-label { margin: 31px 10px 10px; color: var(--text-dim); font-size: 12px; font-weight: 700; letter-spacing: .12em; }
.nav-group { display: grid; gap: 3px; }
.nav-section-label { margin-top: 22px; }
.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 11px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: left;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: color .18s var(--motion-smooth), background .18s var(--motion-smooth), border-color .18s var(--motion-smooth), transform .18s var(--motion-smooth);
}
.nav-item .icon { width: 17px; height: 17px; color: var(--text-dim); }
.nav-item > span:first-of-type { flex: 1; }
.nav-item:hover { color: var(--text); background: rgba(var(--foreground-rgb), .045); }
.nav-item:hover .icon { color: var(--text-muted); }
.nav-item.is-active { color: var(--text-strong); background: rgba(var(--accent-rgb), .12); border-color: rgba(var(--accent-rgb), .17); }
.nav-item.is-active .icon { color: var(--accent); }
.nav-count, .nav-beta { flex: 0 0 auto; padding: 2px 6px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .2); border-radius: 99px; background: rgba(var(--neutral-rgb), .08); font-size: 12px; line-height: 1.35; }
.nav-beta { color: var(--link); border-color: rgba(var(--accent-rgb), .2); background: rgba(var(--accent-rgb), .08); }
/* Badge text is generated, so a nav button's accessible name stays its label (WCAG 2.5.3). */
.nav-count::after { content: attr(data-count); }
.nav-beta::after { content: attr(data-text); }
.sidebar-spacer { min-height: 16px; flex: 1; }
.sidebar-status { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-top: 18px; padding: 8px 10px; border: 1px solid rgba(var(--neutral-rgb), .13); border-radius: 9px; background: rgba(var(--foreground-rgb), .025); }
.status-mark { display: grid; place-items: center; width: 29px; height: 29px; color: var(--accent); border: 1px solid rgba(var(--neutral-rgb), .15); border-radius: 8px; background: rgba(var(--neutral-rgb), .07); }
.status-mark .icon { width: 15px; height: 15px; }
.sidebar-status strong, .sidebar-status small { display: block; }
.sidebar-status strong { color: var(--text-muted); font-size: 13px; font-weight: 600; }
.sidebar-status small { margin-top: 2px; color: var(--text-dim); font-size: 12px; }
.status-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: var(--text-dim); box-shadow: 0 0 0 3px rgba(var(--neutral-rgb), .12); }

.workspace { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 0 34px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(16px);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 210px; color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.breadcrumb strong { overflow: hidden; color: var(--text-strong); font-weight: 550; text-overflow: ellipsis; }
.breadcrumb-divider { color: var(--text-dim); }
.search-box { display: flex; align-items: center; gap: 9px; width: min(340px, 29vw); height: 44px; min-height: 44px; margin-left: auto; padding: 0 10px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); }
.search-box .icon { width: 15px; height: 15px; }
.search-box input { width: 100%; min-width: 0; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 14px; }
.search-box input::placeholder { color: var(--text-dim); }
.search-box kbd { flex: 0 0 auto; padding: 2px 5px; color: var(--text-dim); border: 1px solid var(--border); border-radius: 4px; font-size: 12px; line-height: 1.3; }
.topbar-divider { height: 24px; border-left: 1px solid var(--border); }
.scope-select-wrap { position: relative; }
.scope-select-wrap::after { position: absolute; top: 50%; right: 11px; width: 6px; height: 6px; border-right: 1.5px solid var(--steel); border-bottom: 1.5px solid var(--steel); content: ""; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.scope-select-wrap select { max-width: 205px; height: 44px; min-height: 44px; padding: 0 28px 0 11px; color: var(--text-muted); appearance: none; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); font-size: 13px; }
.readonly-chip { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 9px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .19); border-radius: 99px; background: rgba(var(--neutral-rgb), .06); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.readonly-chip .icon { width: 13px; height: 13px; color: var(--steel); }
.icon-button { display: inline-grid; place-items: center; width: 44px; min-height: 44px; padding: 0; color: var(--text-muted); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); cursor: pointer; }
.icon-button:hover { color: var(--text); background: var(--surface-raised); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 7px; flex: 0 0 auto; min-width: 76px; min-height: 44px; padding: 0 10px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); font-size: 12px; font-weight: 650; cursor: pointer; }
.theme-toggle:hover { color: var(--text-strong); border-color: var(--accent-border); background: var(--surface-raised); }
.theme-toggle .icon { width: 15px; height: 15px; color: var(--accent); }
.menu-toggle { position: fixed; top: 12px; left: calc(var(--sidebar-width) - 56px); z-index: 31; display: inline-grid; flex: 0 0 auto; width: 44px; min-width: 44px; min-height: 44px; transition: left .24s var(--motion-smooth), color .18s var(--motion-smooth), border-color .18s var(--motion-smooth), background .18s var(--motion-smooth); }
.menu-glyph { display: grid; width: 17px; gap: 4px; }
.menu-glyph span { display: block; width: 17px; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .2s var(--motion-smooth), opacity .14s ease; }
.menu-toggle[aria-expanded="true"] .menu-glyph span:first-child { transform: translateY(5.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-glyph span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-glyph span:last-child { transform: translateY(-5.5px) rotate(-45deg); }
.menu-toggle:hover { color: var(--accent); border-color: var(--accent-border); }
.app-frame.is-mobile-open .menu-toggle { left: 186px; }

.app-frame.is-collapsed { --sidebar-width: 72px; }
.app-frame.is-collapsed .sidebar { align-items: center; padding: 18px 8px 13px; }
.app-frame.is-collapsed .brand { justify-content: center; margin-top: 42px; padding: 0; }
.app-frame.is-collapsed .brand-copy,
.app-frame.is-collapsed .workspace-label,
.app-frame.is-collapsed .sidebar-status > span:not(.status-dot),
.app-frame.is-collapsed .nav-item > span:first-of-type,
.app-frame.is-collapsed .nav-count,
.app-frame.is-collapsed .nav-beta { display: none; }
.app-frame.is-collapsed .nav-group { width: 100%; margin-top: 16px; }
.app-frame.is-collapsed .nav-section-label { margin-top: 13px; }
.app-frame.is-collapsed .nav-item { justify-content: center; min-height: 44px; padding: 0; }
.app-frame.is-collapsed .sidebar-status { justify-content: center; width: 43px; min-height: 39px; padding: 5px; }
.app-frame.is-collapsed .status-dot { margin: 0; }

.main-content { width: 100%; max-width: 1560px; flex: 1; align-self: center; padding: 26px 28px 50px; }
.source-banner { display: flex; align-items: center; gap: 10px; min-height: 39px; margin-bottom: 15px; padding: 0 12px; color: var(--text-muted); border: 1px solid rgba(var(--accent-rgb), .17); border-radius: 8px; background: rgba(var(--accent-rgb), .055); font-size: 13px; }
.source-banner strong { color: var(--text-strong); font-weight: 650; }
.source-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }
.source-divider { margin: 0 7px; color: var(--text-dim); }
.source-banner a { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--link); white-space: nowrap; }
.source-banner a .icon { width: 13px; height: 13px; }
.state-explainer { margin: 0 0 26px; padding: 10px 12px; color: var(--text-muted); border-left: 2px solid var(--steel); background: rgba(var(--neutral-rgb), .055); font-size: 13px; }
.state-explainer strong { margin-left: 4px; color: var(--text-strong); font-size: 12px; letter-spacing: .06em; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 4px 0 22px; }
.page-header-copy { min-width: 0; }
.eyebrow { display: block; margin-bottom: 6px; color: var(--steel); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.page-header h1 { margin: 0; color: var(--text); font-size: clamp(24px, 2.1vw, 29px); font-weight: 600; letter-spacing: -.04em; line-height: 1.2; }
.page-header p { margin: 8px 0 0; color: var(--text-muted); font-size: 14px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.button:hover { border-color: var(--accent-border); background: var(--surface-raised); }
.button-primary { color: var(--accent-text); border-color: var(--accent-strong); background: var(--accent-strong); }
.button-primary:hover { border-color: var(--accent-strong); background: var(--accent-strong); }
.button .icon { width: 14px; height: 14px; }
.button[disabled] { color: var(--text-dim); border-color: var(--border); background: var(--surface); cursor: not-allowed; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.metric-card, .panel, .module-card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 22px rgba(var(--shadow-rgb), .09); }
.metric-card { position: relative; min-height: 118px; padding: 16px 17px; overflow: hidden; }
.metric-card::after { position: absolute; top: 0; right: 16px; left: 16px; height: 1px; background: linear-gradient(90deg, transparent, rgba(var(--neutral-rgb), .18), transparent); content: ""; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-muted); font-size: 13px; }
.metric-icon { display: grid; place-items: center; width: 28px; height: 28px; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .18); border-radius: 8px; background: rgba(var(--accent-rgb), .09); }
.metric-icon .icon { width: 15px; height: 15px; }
.metric-value { display: block; margin-top: 10px; color: var(--text-strong); font-size: 28px; font-weight: 620; letter-spacing: -.04em; line-height: 1; }
.metric-value.is-text { font-size: 18px; letter-spacing: -.02em; }
.metric-note { display: block; margin-top: 7px; color: var(--text-dim); font-size: 12px; }
.metric-value.tone-critical { color: var(--critical); }
.metric-value.tone-success { color: var(--success); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(320px, .82fr); gap: 15px; margin-bottom: 16px; }
.panel { padding: 17px 18px; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 16px; }
.panel-header h2, .section-title { margin: 0; color: var(--text-strong); font-size: 15px; font-weight: 620; letter-spacing: -.01em; }
.panel-header p { margin: 5px 0 0; color: var(--text-dim); font-size: 12px; }
.panel-kicker { color: var(--text-dim); font-size: 12px; }
.severity-list { display: grid; gap: 13px; }
.severity-row { display: grid; grid-template-columns: 83px minmax(40px, 1fr) 30px; align-items: center; gap: 11px; }
.severity-label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.severity-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.severity-critical { color: var(--critical); }
.severity-high { color: var(--high); }
.severity-medium { color: var(--medium); }
.severity-low { color: var(--low); }
.severity-info { color: var(--steel); }
.severity-bar-track { display: block; width: 100%; height: 8px; overflow: hidden; }
.severity-track-bg { fill: var(--chart-track); }
.severity-bar.severity-critical { fill: var(--critical); }
.severity-bar.severity-high { fill: var(--high); }
.severity-bar.severity-medium { fill: var(--medium); }
.severity-bar.severity-low { fill: var(--low); }
.severity-bar.severity-info { fill: var(--steel); }
.severity-value { color: var(--text-muted); text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.chart-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 12px; color: var(--text-dim); border-top: 1px solid var(--border-soft); font-size: 12px; }
.scan-list { display: grid; gap: 0; }
.scan-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.scan-row:first-child { padding-top: 0; }
.scan-row:last-child { padding-bottom: 0; border-bottom: 0; }
.scan-name { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.scan-source-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; color: var(--accent); border: 1px solid rgba(var(--accent-rgb), .15); border-radius: 8px; background: rgba(var(--accent-rgb), .08); }
.scan-source-icon .icon { width: 15px; height: 15px; }
.scan-name strong, .scan-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-name strong { color: var(--text-strong); font-size: 12px; font-weight: 600; }
.scan-name small { margin-top: 3px; color: var(--text-dim); font-size: 12px; }
.scan-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--text-dim); font-size: 12px; white-space: nowrap; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 4px 7px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .2); border-radius: 99px; background: rgba(var(--neutral-rgb), .07); font-size: 12px; font-weight: 700; letter-spacing: .045em; line-height: 1.2; text-transform: uppercase; }
.status-marker { display: inline-grid; min-width: 10px; place-items: center; font-size: 12px; font-weight: 800; line-height: 1; }
.status-label { white-space: nowrap; }
.status-pass .status-marker { color: var(--success); }
.status-fail .status-marker { color: var(--critical); }
.status-unknown .status-marker { color: var(--unknown); }
.status-error .status-marker { color: var(--error); }
.status-not-configured .status-marker { color: var(--steel); }
.status-pass { color: var(--status-pass); border-color: rgba(var(--success-rgb), .2); background: rgba(var(--success-rgb), .075); }
.status-fail { color: var(--status-fail); border-color: rgba(var(--critical-rgb), .24); background: rgba(var(--critical-rgb), .08); }
.status-unknown { color: var(--unknown); border-color: rgba(var(--neutral-rgb), .22); background: rgba(var(--neutral-rgb), .08); }
.status-error { color: var(--status-error); border-color: rgba(var(--error-rgb), .25); background: rgba(var(--error-rgb), .085); }
.status-not-configured { color: var(--status-not-configured); border-color: rgba(var(--neutral-rgb), .18); background: rgba(var(--neutral-rgb), .055); }

.section-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 11px; }
.section-row h2 { margin: 0; color: var(--text-strong); font-size: 15px; font-weight: 620; }
.text-button { display: inline-flex; align-items: center; gap: 6px; padding: 3px 0; color: var(--link); border: 0; background: transparent; font-size: 12px; font-weight: 600; cursor: pointer; }
.text-button:hover { color: var(--link-hover); }
.text-button .icon { width: 13px; height: 13px; }
.recent-findings { overflow: hidden; padding: 0; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.data-table th { height: 38px; padding: 0 13px; color: var(--text-dim); border-bottom: 1px solid var(--border); background: rgba(var(--page-rgb), .2); font-size: 12px; font-weight: 650; letter-spacing: .07em; text-transform: uppercase; }
.data-table td { height: 51px; padding: 7px 13px; color: var(--text-muted); border-bottom: 1px solid rgba(var(--neutral-rgb), .1); font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(var(--foreground-rgb), .018); }
.finding-title-button { display: block; max-width: 420px; padding: 0; overflow: hidden; color: var(--text-strong); text-align: left; text-overflow: ellipsis; white-space: nowrap; border: 0; background: transparent; font-size: 12px; font-weight: 560; cursor: pointer; }
.finding-title-button:hover { color: var(--link); }
.cell-secondary { display: block; max-width: 210px; margin-top: 3px; overflow: hidden; color: var(--text-dim); text-overflow: ellipsis; font-size: 12px; }
.resource-cell { display: block; max-width: 220px; overflow: hidden; color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-overflow: ellipsis; font-size: 12px; }
.severity-badge { display: inline-flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .025em; }
.severity-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.lifecycle-badge { display: inline-flex; align-items: center; padding: 3px 6px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .19); border-radius: 5px; background: rgba(var(--neutral-rgb), .06); font-size: 12px; font-weight: 600; }
.overview-foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 15px; }
.mini-panel { min-height: 114px; padding: 14px 15px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-soft); }
.mini-panel-head { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 12px; font-weight: 620; }
.mini-panel-head .icon { width: 15px; height: 15px; color: var(--steel); }
.mini-panel p { margin: 9px 0 0; color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.mini-state { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--text-muted); font-size: 12px; }
.mini-state::before { width: 5px; height: 5px; border-radius: 50%; background: var(--text-dim); content: ""; }

.module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.module-card { padding: 16px; }
.module-card h2 { margin: 0; color: var(--text-strong); font-size: 14px; font-weight: 620; }
.module-card p { margin: 7px 0 0; color: var(--text-muted); font-size: 12px; }
.module-card .module-value { display: block; margin-top: 14px; color: var(--text-strong); font-size: 19px; font-weight: 620; }
.module-card .module-note { display: block; margin-top: 5px; color: var(--text-dim); font-size: 12px; }
.transparency-note { margin: -3px 0 12px; color: var(--text-dim); font-size: 12px; line-height: 1.5; }
.module-evidence-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 14px; }
.module-evidence-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 8px 2px; color: var(--link); font-size: 12px; font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.module-evidence-link:hover { color: var(--link-hover); }
.module-evidence-link:focus-visible { border-radius: 3px; outline: 2px solid var(--accent); outline-offset: 3px; }
.module-evidence-link .icon { width: 12px; height: 12px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.detail-item { min-width: 0; padding: 10px; border: 1px solid var(--border-soft); border-radius: 8px; background: rgba(var(--page-rgb), .18); }
.detail-item small { display: block; margin-bottom: 4px; color: var(--text-dim); font-size: 12px; }
.detail-item strong { display: block; overflow-wrap: anywhere; color: var(--text-muted); font-size: 12px; font-weight: 560; }
.callout { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; padding: 12px 13px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .16); border-radius: 8px; background: rgba(var(--neutral-rgb), .055); font-size: 12px; }
.callout .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--steel); }
.callout strong { color: var(--text-strong); }
.empty-state { display: grid; justify-items: start; gap: 7px; padding: 23px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-empty); }
.empty-state .empty-mark { display: grid; place-items: center; width: 31px; height: 31px; margin-bottom: 3px; color: var(--steel); border: 1px solid rgba(var(--neutral-rgb), .16); border-radius: 9px; background: rgba(var(--neutral-rgb), .07); }
.empty-mark .icon { width: 16px; height: 16px; }
.empty-state h2 { margin: 0; color: var(--text-muted); font-size: 14px; font-weight: 620; }
.empty-state p { max-width: 630px; margin: 0; color: var(--text-dim); font-size: 12px; line-height: 1.65; }
.empty-state .button { margin-top: 5px; }
.mono { color: var(--text-muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.profile-card { position: relative; overflow: hidden; }
.profile-card::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent 65%); content: ""; opacity: .75; }
.profile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.profile-top h2 { margin: 0; font-size: 14px; }
.profile-top p { margin: 5px 0 0; color: var(--text-dim); font-size: 12px; }
.service-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.service-tag { padding: 4px 7px; color: var(--text-muted); border: 1px solid rgba(var(--neutral-rgb), .17); border-radius: 5px; background: rgba(var(--neutral-rgb), .045); font-size: 12px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-row select { height: 32px; padding: 0 26px 0 9px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 7px; background: var(--surface-soft); font-size: 12px; }
.filter-count { margin-left: auto; color: var(--text-dim); font-size: 12px; }
.findings-panel { padding: 0; overflow: hidden; }
.findings-panel .panel-header { margin: 0; padding: 15px 16px 13px; border-bottom: 1px solid var(--border); }
.table-empty { padding: 30px 16px !important; color: var(--text-muted) !important; text-align: center; }
.scan-detail-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 13px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.scan-detail-banner p { flex: 1 1 330px; margin: 0; color: var(--text-muted); font-size: 12px; }
.scan-detail-banner strong { color: var(--text-strong); }
.scan-table .resource-cell { max-width: 160px; }
.evidence-dialog { width: min(760px, calc(100vw - 28px)); max-height: min(85vh, 900px); padding: 0; overflow: hidden; color: var(--text); border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); box-shadow: var(--shadow); }
.evidence-dialog::backdrop { background: rgba(var(--shadow-rgb), .76); backdrop-filter: blur(3px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 15px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; color: var(--text); font-size: 18px; font-weight: 600; letter-spacing: -.025em; }
.dialog-head .eyebrow { margin-bottom: 5px; }
.dialog-body { max-height: calc(min(85vh, 900px) - 75px); padding: 17px 20px 22px; overflow-y: auto; }
.dialog-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.dialog-section { margin-top: 15px; }
.dialog-section h3 { margin: 0 0 7px; color: var(--text-muted); font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.dialog-section p { margin: 0; color: var(--text-muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.evidence-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 7px 0; }
.evidence-code { max-height: 300px; margin: 0; padding: 12px; overflow: auto; color: var(--text-muted); border: 1px solid var(--border); border-radius: 8px; background: var(--code-bg); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-status { min-height: 15px; color: var(--status-pass); font-size: 12px; }
.sidebar-backdrop { display: none; }
.assistant-launcher {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 18;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  min-height: 64px;
  padding: 7px;
  color: var(--text-strong);
  border: 1px solid rgba(var(--accent-rgb), .42);
  border-radius: 50%;
  background: var(--surface-soft);
  box-shadow: 0 8px 25px rgba(var(--shadow-rgb), .3), 0 0 24px rgba(var(--accent-rgb), .14);
  cursor: pointer;
  transition: border-color .2s var(--motion-smooth), transform .2s var(--motion-smooth), box-shadow .2s var(--motion-smooth);
}
.assistant-launcher:hover { transform: translateY(-3px) scale(1.025); border-color: var(--accent); box-shadow: 0 12px 28px rgba(var(--shadow-rgb), .32), 0 0 27px rgba(var(--accent-rgb), .23); }
.assistant-launcher:focus-visible { outline-offset: 5px; }
.assistant-launcher-orb { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid rgba(255, 238, 255, .3); border-radius: 46% 54% 51% 49%; background: radial-gradient(circle at 28% 22%, #ffe5ff 0 3%, #dc9be9 12%, #ad63c5 33%, #633878 68%, #221b2d 100%); box-shadow: inset -8px -9px 13px rgba(12, 8, 19, .52), inset 4px 4px 10px rgba(255, 232, 255, .62), 0 6px 18px rgba(var(--accent-rgb), .34); transform: rotateY(-12deg) rotateX(6deg); transform-style: preserve-3d; transition: transform .3s var(--motion-smooth); }
.assistant-launcher-orb::before { position: absolute; inset: -5px; border: 1px solid rgba(var(--accent-rgb), .55); border-radius: 50%; content: ""; animation: assistant-ring 17s linear infinite; transform: rotateX(68deg) rotateZ(-20deg); }
.assistant-launcher-orb::after { position: absolute; width: 16px; height: 19px; border: 1px solid rgba(255, 245, 255, .84); background: linear-gradient(145deg, rgba(255,255,255,.34), rgba(255,255,255,.035)); clip-path: polygon(50% 0, 95% 17%, 84% 70%, 50% 100%, 16% 70%, 5% 17%); content: ""; transform: translateZ(7px); }
.assistant-launcher-orb span { width: 11px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .84); filter: blur(2px); transform: translate(-8px, -10px); }
.assistant-launcher:hover .assistant-launcher-orb { transform: rotateY(12deg) rotateX(-5deg) scale(1.04); }
.assistant-dialog { position: fixed; top: auto; right: 22px; bottom: 92px; left: auto; width: min(390px, calc(100vw - 28px)); max-width: none; max-height: min(670px, calc(100dvh - 118px)); margin: 0; padding: 0; overflow: hidden; color: var(--text); border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft); box-shadow: var(--shadow); }
.assistant-dialog[open] { display: block; }
.assistant-dialog::backdrop { background: rgba(var(--shadow-rgb), .35); backdrop-filter: blur(2px); }
.assistant-panel { display: flex; max-height: min(670px, calc(100dvh - 118px)); flex-direction: column; padding: 19px; }
.assistant-header { display: flex; align-items: center; gap: 12px; }
.assistant-avatar-stage { position: relative; display: grid; width: 82px; height: 82px; flex: 0 0 auto; place-items: center; perspective: 150px; }
.assistant-avatar-orbit { position: absolute; width: 72px; height: 29px; border: 1px solid rgba(var(--accent-rgb), .68); border-radius: 50%; box-shadow: 0 0 16px rgba(var(--accent-rgb), .22); animation: assistant-ring 16s linear infinite; transform: rotateX(66deg) rotateZ(-24deg); }
.assistant-avatar-orb { position: relative; display: block; width: 54px; height: 54px; border: 1px solid rgba(255, 238, 255, .24); border-radius: 46% 54% 51% 49%; background: radial-gradient(circle at 28% 22%, #ffe5ff 0 3%, #dc9be9 12%, #ad63c5 33%, #633878 68%, #221b2d 100%); box-shadow: inset -9px -10px 15px rgba(12, 8, 19, .52), inset 4px 4px 11px rgba(255, 232, 255, .62), 0 8px 20px rgba(var(--accent-rgb), .32); animation: assistant-float 4.5s ease-in-out infinite; transform: rotateY(-15deg) rotateX(8deg); transform-style: preserve-3d; }
.assistant-avatar-face { position: absolute; top: 13px; left: 15px; width: 24px; height: 29px; border: 1px solid rgba(255, 245, 255, .79); background: linear-gradient(145deg, rgba(255,255,255,.3), rgba(255,255,255,.035)); clip-path: polygon(50% 0, 95% 17%, 84% 70%, 50% 100%, 16% 70%, 5% 17%); box-shadow: 0 0 10px rgba(255,255,255,.2); transform: translateZ(6px); }
.assistant-avatar-face::after { position: absolute; top: 12px; left: 5px; width: 12px; height: 3px; border-radius: 50%; background: #fff4ff; box-shadow: 0 0 7px #fff; content: ""; }
.assistant-avatar-glint { position: absolute; top: 7px; left: 9px; width: 9px; height: 4px; border-radius: 50%; background: rgba(255, 255, 255, .8); filter: blur(1px); transform: rotate(-35deg); }
.assistant-avatar-shadow { position: absolute; right: 14px; bottom: 2px; left: 14px; height: 8px; border-radius: 50%; background: rgba(var(--accent-rgb), .28); filter: blur(7px); }
.assistant-header-copy { min-width: 0; flex: 1; }
.assistant-header-copy .eyebrow { margin-bottom: 4px; font-size: 12px; }
.assistant-header-copy h2 { margin: 0; color: var(--text-strong); font-size: 17px; font-weight: 620; letter-spacing: -.025em; }
.assistant-header-copy p { margin: 4px 0 0; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
.assistant-close { flex: 0 0 auto; align-self: flex-start; }
.assistant-mode { display: flex; align-items: center; gap: 7px; margin: 10px 0 12px; padding: 7px 9px; color: var(--text-dim); border: 1px solid var(--border-soft); border-radius: 7px; font-size: 12px; }
.assistant-mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--status-pass); box-shadow: 0 0 0 3px rgba(83, 190, 137, .12); }
.assistant-messages { display: grid; min-height: 105px; max-height: min(300px, 34dvh); gap: 9px; padding: 3px 3px 11px; overflow-y: auto; }
.assistant-message { max-width: 92%; justify-self: start; padding: 10px 11px; color: var(--text-muted); border: 1px solid var(--border-soft); border-radius: 4px 12px 12px; background: var(--surface); font-size: 12px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.assistant-message.is-user { justify-self: end; color: var(--text-strong); border-color: rgba(var(--accent-rgb), .23); border-radius: 12px 4px 12px 12px; background: rgba(var(--accent-rgb), .1); }
.assistant-finding-action { display: block; margin-top: 8px; padding: 5px 8px; color: var(--link); border: 1px solid rgba(var(--accent-rgb), .25); border-radius: 6px; background: transparent; font-size: 12px; cursor: pointer; }
.assistant-finding-action:hover { background: rgba(var(--accent-rgb), .1); }
.assistant-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 0 10px; }
.assistant-suggestions button { min-height: 44px; padding: 0 10px; color: var(--link); border: 1px solid rgba(var(--accent-rgb), .24); border-radius: 99px; background: rgba(var(--accent-rgb), .055); font-size: 12px; cursor: pointer; }
.assistant-suggestions button:hover { background: rgba(var(--accent-rgb), .12); }
.assistant-form { display: flex; gap: 7px; padding: 5px; border: 1px solid var(--border); border-radius: 10px; background: var(--page-bg); }
.assistant-form input { min-width: 0; flex: 1; padding: 6px; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 12px; }
.assistant-form input::placeholder { color: var(--text-dim); }
.assistant-send { display: grid; width: 44px; min-height: 44px; flex: 0 0 auto; place-items: center; color: var(--accent-text); border: 0; border-radius: 7px; background: var(--accent-strong); cursor: pointer; }
.assistant-send .icon { width: 14px; height: 14px; }
.assistant-disclosure { margin: 8px 2px 0; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
@keyframes assistant-ring { to { transform: rotateX(66deg) rotateZ(336deg); } }
@keyframes assistant-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
.app-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; min-height: 49px; padding: 10px 34px; color: var(--text-dim); border-top: 1px solid var(--border-soft); font-size: 12px; }
.app-footer a { display: inline-flex; align-items: center; gap: 5px; color: var(--link); }
.app-footer .icon { width: 12px; height: 12px; }
.loading-state { display: flex; align-items: center; gap: 10px; padding: 55px 0; color: var(--text-dim); font-size: 13px; }
.loading-bar { width: 44px; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--accent) 40%, var(--border) 40%); }
.noscript-note { padding: 12px; color: var(--text-muted); border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 13px; }

@media (max-width: 1220px) {
  .topbar { gap: 10px; padding: 0 16px; }
  .breadcrumb { min-width: 0; flex: 0 1 150px; }
  .search-box { width: min(220px, 24vw); flex: 1 1 150px; }
  .scope-select-wrap select { max-width: 160px; }
  .readonly-chip { padding: 6px 7px; font-size: 12px; }
  .main-content { padding-right: 24px; padding-left: 24px; }
  .app-footer { padding-right: 24px; padding-left: 24px; }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .breadcrumb { flex: 0 1 125px; }
  .search-box { flex-basis: 130px; }
  .search-box kbd { display: none; }
  .theme-toggle { min-width: 36px; padding: 0; }
  #theme-label { display: none; }
}

@media (max-width: 900px) {
  :root, :root[data-theme="dark"], :root[data-theme="light"] { --sidebar-width: 0px; }
  .app-frame { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; width: 240px; height: 100dvh; min-height: 0; align-items: stretch; padding: 18px 14px; transform: translateX(-105%); transition: transform .24s var(--motion-smooth), box-shadow .24s var(--motion-smooth); box-shadow: none; }
  .sidebar.is-open { transform: translateX(0); box-shadow: 14px 0 35px rgba(var(--shadow-rgb), .3); }
  .sidebar-backdrop:not([hidden]) { position: fixed; z-index: 19; inset: 0; display: block; background: rgba(var(--shadow-rgb), .42); }
  .sidebar-backdrop[hidden] { display: none; }
  .brand { justify-content: flex-start; padding: 0 10px; }
  .menu-toggle { left: 14px; top: 12px; }
  .app-frame.is-mobile-open .menu-toggle { left: 186px; }
  .brand-copy, .workspace-label, .sidebar-status > span:not(.status-dot), .nav-item > span:first-of-type, .nav-count, .nav-beta { display: revert; }
  .brand-copy { display: grid; }
  .workspace-label { margin: 28px 10px 10px; }
  .nav-group { width: auto; margin-top: 0; }
  .nav-section-label { margin-top: 20px; }
  .nav-item { justify-content: flex-start; min-height: 44px; padding: 0 11px; }
  .nav-item > span:first-of-type { display: block; }
  .nav-item::after { display: none !important; }
  .sidebar-status { justify-content: flex-start; width: auto; min-height: 56px; padding: 8px 10px; }
  .sidebar-status > span:not(.status-dot) { display: block; }
  .sidebar-status .status-mark { display: grid; }
  .status-dot { margin-left: auto; }
  .topbar { flex-wrap: wrap; gap: 8px 10px; min-height: auto; padding: 12px 16px; }
  .breadcrumb { min-width: 0; flex: 1 1 200px; padding-left: 58px; }
  .search-box { width: min(220px, 28vw); flex: 1 1 170px; margin-left: 0; }
  .topbar-divider { display: none; }
  .scope-select-wrap select { max-width: 170px; }
  .readonly-chip { padding: 6px 7px; font-size: 12px; }
  .main-content { padding: 22px 20px 40px; }
  .app-footer { padding-right: 20px; padding-left: 20px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) minmax(290px, .9fr); }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .workspace :is(.workspace-label, .nav-item, .sidebar-status strong, .sidebar-status small, .breadcrumb, .search-box input, .search-box kbd, .scope-select-wrap select, .readonly-chip, .source-banner, .state-explainer, .state-explainer strong, .eyebrow, .page-header p, .button, .metric-top, .metric-note, .panel-header p, .panel-kicker, .severity-label, .severity-value, .scan-name strong, .scan-name small, .scan-meta, .status-badge, .section-row h2, .text-button, .data-table th, .data-table td, .finding-title-button, .cell-secondary, .resource-cell, .severity-badge, .lifecycle-badge, .mini-panel-head, .mini-panel p, .mini-state, .module-card h2, .module-card p, .module-card .module-note, .detail-item small, .detail-item strong, .callout, .empty-state h2, .empty-state p, .mono, .profile-top h2, .profile-top p, .service-tag, .filter-row select, .filter-count, .scan-detail-banner p, .dialog-section h3, .dialog-section p, .evidence-code, .copy-status, .assistant-launcher-copy strong, .assistant-launcher-copy small, .assistant-header-copy .eyebrow, .assistant-header-copy p, .assistant-mode, .assistant-message, .assistant-finding-action, .assistant-suggestions button, .assistant-form input, .assistant-disclosure, .app-footer, .loading-state, .noscript-note) { font-size: max(12px, .75rem); }
  .topbar { flex-wrap: wrap; gap: 9px; min-height: auto; padding: 12px 15px; }
  .breadcrumb { order: 1; flex: 1 1 calc(100% - 50px); padding-left: 58px; }
  .search-box { order: 2; width: auto; flex: 1 1 100%; }
  .topbar-divider { display: none; }
  .scope-select-wrap { order: 3; flex: 1; }
  .scope-select-wrap select { width: 100%; max-width: none; }
  .readonly-chip { order: 4; }
  .theme-toggle { order: 5; }
  .main-content { padding: 17px 14px 30px; }
  .source-banner { align-items: flex-start; flex-wrap: wrap; gap: 7px; padding: 9px 10px; font-size: 12px; }
  .source-banner a { margin-left: 17px; }
  .state-explainer { margin-bottom: 21px; }
  .page-header { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 17px; }
  .page-actions { width: 100%; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .metric-card { min-height: 108px; padding: 12px; }
  .metric-value { font-size: 24px; }
  .content-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .overview-foot-grid, .module-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .panel { padding: 14px; }
  .recent-findings { padding: 0; }
  .filter-count { flex-basis: 100%; margin-left: 0; }
  .filter-row select { flex: 1; }
  .app-footer { align-items: flex-start; flex-direction: column; padding: 12px 14px; }
  .evidence-dialog { max-height: 90dvh; }
  .dialog-body { max-height: calc(90dvh - 75px); padding: 15px; }
  .dialog-head { padding: 15px; }
  .assistant-launcher { right: 16px; bottom: 16px; width: 60px; height: 60px; min-height: 60px; }
  .assistant-launcher-orb { width: 42px; height: 42px; }
  .assistant-dialog { right: 10px; bottom: 86px; max-height: calc(100dvh - 98px); }
  .assistant-panel { max-height: calc(100dvh - 98px); padding: 14px; }
}

@media (max-width: 400px) {
  .metric-grid { grid-template-columns: minmax(0, 1fr); }
  .metric-card { min-height: 97px; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .scope-select-wrap select { font-size: 12px; }
  .readonly-chip { padding: 6px 7px; font-size: 12px; }
  .theme-toggle { min-width: 36px; padding: 0; }
  #theme-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.auth-button[hidden] { display: none; }
