@font-face {
  font-family: Inter;
  src: url("/static/fonts/Inter-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url("/static/fonts/Inter-Italic-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy: #1b3658;
  --navy-deep: #12243b;
  --navy-soft: #e8eef6;
  --ink: #1c2530;
  --muted: #5d6b7a;
  --line: #e2e8f0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --accent: #1f6feb;
  --accent-hover: #1558c7;
  --pass: #067647;
  --pass-bg: #e4f7ed;
  --partial: #b54708;
  --partial-bg: #fef0c7;
  --fail: #b42318;
  --fail-bg: #fee4e2;
  --manual: #1849a9;
  --manual-bg: #dbe7fe;
  --na: #475467;
  --na-bg: #eaecf0;
  --high: #b42318;
  --high-bg: #fee4e2;
  --medium: #b54708;
  --medium-bg: #fef0c7;
  --low: #175cd3;
  --low-bg: #dbe7fe;
  --banner-bg: #fde9b8;
  --banner-ink: #5c3b00;
  --banner-line: #e8c36a;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 8px 24px rgba(16, 24, 40, 0.05);
  --radius: 12px;
  --banner-h: 44px;
  --nav-h: 64px;
  --sidebar-w: 228px;
  --font: Inter, "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Banner + top nav */
.demo-banner {
  background: var(--banner-bg);
  color: var(--banner-ink);
  border-bottom: 1px solid var(--banner-line);
  padding: 10px 24px;
  font-size: 13.5px;
  text-align: center;
  font-weight: 650;
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: var(--banner-h);
}
.topnav {
  position: sticky;
  top: var(--banner-h);
  z-index: 35;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-name { font-size: 17px; font-weight: 720; color: var(--navy); letter-spacing: -0.02em; white-space: nowrap; }
.brand-by { font-size: 12.5px; font-weight: 550; color: var(--muted); white-space: nowrap; margin-left: 2px; }
.topnav-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary, .btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover, .btn-accent:hover { background: var(--accent-hover); }
.btn-outline { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-outline:hover { background: var(--navy-soft); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--navy-soft); }

/* Simple pages (home, request) */
.page-simple main.simple-main {
  padding: 32px 24px 56px;
  max-width: 1080px;
  margin: 0 auto;
}
.hero {
  background: linear-gradient(160deg, var(--navy-deep), var(--navy) 62%);
  color: #fff;
  border-radius: 16px;
  padding: 40px 44px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.hero h2 { margin: 0 0 10px; font-size: 30px; letter-spacing: -0.03em; font-weight: 700; }
.hero p { margin: 0 0 20px; max-width: 680px; opacity: .92; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn-primary { background: #fff; color: var(--navy); border-color: #fff; }
.hero .btn-primary:hover { background: #eef3fb; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

/* App shell */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - var(--banner-h) - var(--nav-h));
}
.sidenav {
  position: sticky;
  top: calc(var(--banner-h) + var(--nav-h));
  align-self: start;
  height: calc(100vh - var(--banner-h) - var(--nav-h));
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 16px 12px 24px;
}
.sidenav-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px 10px;
}
.sidenav a, .mob-tabs a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: #344054;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
  border: 1px solid transparent;
}
.sidenav a:hover { background: var(--navy-soft); text-decoration: none; }
.sidenav a.is-active {
  background: var(--navy);
  color: #fff;
}
.sidenav a .nav-ico { width: 16px; height: 16px; flex: none; opacity: .9; }
.mob-tabs {
  display: none;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: calc(var(--banner-h) + var(--nav-h));
  z-index: 30;
}
.mob-tabs a {
  flex: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
}
.mob-tabs a.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }

.app-main { min-width: 0; }
.app-content {
  padding: 24px 28px 48px;
  min-width: 0;
  overflow-x: hidden;
}
.panel { display: none; }
.panel.is-active { display: block; }

.page-kicker { font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.page-title { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.03em; color: var(--navy); font-weight: 720; }
.page-lead { margin: 0 0 20px; color: var(--muted); max-width: 720px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card h3, .section-h {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}
.meta-line { color: var(--muted); font-size: 13px; margin: 0 0 8px; }
.verdict { margin: 0; font-size: 15.5px; color: var(--ink); }

.overview-hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  margin-bottom: 18px;
}
.gauge-card { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.gauge-card svg { width: 168px; height: 168px; }
.gauge-caption { margin-top: 4px; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); font-weight: 650; }
.assess-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 22px; line-height: 1.15; letter-spacing: -0.03em; }
.stat span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 650; }
.HIGH, .sev-HIGH { color: var(--high); }
.MEDIUM, .sev-MEDIUM { color: var(--medium); }
.LOW, .sev-LOW { color: var(--low); }

.overview-grid {
  display: grid;
  grid-template-columns: 1.4fr .9fr;
  gap: 16px;
  margin-bottom: 16px;
  min-width: 0;
}
.overview-grid .card, .card { min-width: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
#domain-chart { width: 100%; max-width: 100%; overflow-x: auto; min-width: 0; }
#domain-chart svg { width: 100%; max-width: 100%; height: auto; display: block; }

.inv-list { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; font-size: 13.5px; }
.inv-list span { color: var(--muted); }
.inv-list b { text-align: right; font-weight: 650; color: var(--ink); }

.finding-mini { display: flex; flex-direction: column; gap: 8px; }
.finding-mini button {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  align-items: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.finding-mini .pill { align-self: start; margin-top: 2px; }
.finding-mini button:hover { background: #f8fafc; border-color: #cdd6e1; }
.finding-mini .fm-title { font-weight: 650; font-size: 13.5px; }
.finding-mini .fm-meta { font-size: 12px; color: var(--muted); }

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .01em;
}
.s-Pass { background: var(--pass-bg); color: var(--pass); }
.s-Partial { background: var(--partial-bg); color: var(--partial); }
.s-Fail { background: var(--fail-bg); color: var(--fail); }
.s-Manual { background: var(--manual-bg); color: var(--manual); }
.s-Not, .s-NA { background: var(--na-bg); color: var(--na); }
.v-HIGH, .p-High { background: var(--high-bg); color: var(--high); }
.v-MEDIUM, .p-Medium { background: var(--medium-bg); color: var(--medium); }
.v-LOW, .p-Low { background: var(--low-bg); color: var(--low); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  align-items: end;
}
.filter label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 700;
}
.filter select, .filter input[type="search"] {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font: inherit;
  font-size: 13.5px;
  background: #fff;
  min-width: 150px;
  color: var(--ink);
}
.filter:has(input[type="search"]) { flex: 1 1 260px; }
.filter input[type="search"] { min-width: 180px; width: 100%; }
.filter-count { margin-left: auto; color: var(--muted); font-size: 13px; padding-bottom: 8px; }

.control-list { display: flex; flex-direction: column; gap: 8px; }
.control {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.control[hidden] { display: none; }
.control-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 118px 1fr auto auto auto 22px;
  gap: 10px;
  align-items: center;
  text-align: left;
  background: #fff;
  border: 0;
  padding: 13px 14px;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.control-toggle:hover { background: #f8fafc; }
.control.is-open .control-toggle { background: #f4f7fb; border-bottom: 1px solid var(--line); }
.ctl-id { font-weight: 720; color: var(--navy); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.ctl-name { font-weight: 650; }
.ctl-domain { color: var(--muted); font-size: 12.5px; }
.ctl-findings { font-size: 12.5px; color: var(--muted); font-weight: 650; min-width: 1.5em; text-align: center; }
.chevron { color: var(--muted); transition: transform .15s ease; }
.control.is-open .chevron { transform: rotate(90deg); }
.control-body { display: none; padding: 16px 18px 18px; background: #fbfcfe; }
.control.is-open .control-body { display: block; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; }
.detail h3 {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
}
.detail p, .detail li { margin: 0; font-size: 14px; }
.expected { color: #3f4c5a; font-size: 13.5px; }
.findings { display: flex; flex-direction: column; gap: 10px; }
.finding {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}
.finding.HIGH { border-left-color: #d92d20; }
.finding.MEDIUM { border-left-color: #dc6803; }
.finding.LOW { border-left-color: #175cd3; }
.finding header { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.finding .obj { font-size: 13px; color: var(--muted); }
.steps { margin: 0; padding-left: 20px; }
.steps li { margin: 0 0 6px; }
.empty { color: var(--muted); font-size: 14px; padding: 18px 8px; }

.table-wrap { overflow: auto; max-height: calc(100vh - 280px); border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; }
.table-wrap.matrix-wrap { max-height: min(70vh, 640px); }
table.data {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13.5px;
}
table.data.matrix-table {
  width: max-content;
  min-width: 100%;
}
table.data th, table.data td {
  border-bottom: 1px solid var(--line);
  padding: 9px 11px;
  text-align: left;
  vertical-align: top;
}
table.data th {
  background: #f7f9fc;
  font-weight: 700;
  color: #344054;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
table.data th:hover { background: #eef2f7; }
table.data th .sort { color: #98a2b3; font-weight: 500; margin-left: 4px; }
table.data tbody tr:hover td { background: #f8fafc; }
table.data tbody tr.is-hl td { background: #eef4ff; }
table.data td { background: #fff; }
table.data td, table.data th { overflow-wrap: anywhere; }
#findings-table th:nth-child(1), #findings-table td:nth-child(1) { width: 7.5%; white-space: nowrap; overflow-wrap: normal; }
#findings-table th:nth-child(2), #findings-table td:nth-child(2) { width: 16%; }
#findings-table th:nth-child(3), #findings-table td:nth-child(3) { width: 12%; }
#findings-table th:nth-child(4), #findings-table td:nth-child(4),
#findings-table th:nth-child(5), #findings-table td:nth-child(5),
#findings-table th:nth-child(6), #findings-table td:nth-child(6) { width: 21.5%; }

table.data.matrix-table th, table.data.matrix-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  vertical-align: middle;
  padding: 8px 12px;
}
.scroll-hint { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.cell-muted { color: var(--muted); }
.callout {
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #344054;
  margin: 0 0 16px;
}
.subhead { margin: 22px 0 10px; font-size: 16px; color: var(--navy); font-weight: 700; }

.pivot-yes { display: inline-block; background: var(--pass-bg); color: var(--pass); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pivot-device { display: inline-block; background: var(--manual-bg); color: var(--manual); font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.pivot-empty { color: #d0d5dd; }

.gap-list { display: flex; flex-direction: column; gap: 12px; }
.gap-card h3 { margin: 0 0 6px; font-size: 15px; }
.gap-card p { margin: 0 0 8px; font-size: 14px; }
.gap-affected { display: flex; flex-wrap: wrap; gap: 8px; }
.gap-note { color: var(--muted); font-size: 13.5px; margin-top: 16px; }

.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.method-grid .card p, .method-grid .card li { font-size: 14px; color: #344054; }
.method-grid .card ul { margin: 0; padding-left: 18px; }
.method-wide { grid-column: 1 / -1; }
.formula { font-family: ui-monospace, "Cascadia Code", "Liberation Mono", monospace; font-size: 13px; background: #f7f9fc; border-radius: 8px; padding: 10px 12px; }

.cta-band {
  margin-top: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0 0 4px; font-size: 18px; }
.cta-band p { margin: 0; opacity: .85; font-size: 14px; }
.cta-band .btn-primary { background: #fff; color: var(--navy); }

.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.82);
  padding: 22px 28px 28px;
  font-size: 12.5px;
}
.site-footer a { color: #fff; }
.footer-brand { font-weight: 700; color: #fff; margin: 0 0 6px; font-size: 13.5px; }
.page-app .site-footer { margin: 0; }

.form { max-width: 560px; }
.form .field { margin-bottom: 14px; }
.form label { display: block; font-weight: 650; font-size: 13px; margin-bottom: 4px; }
.form input, .form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 11px;
  font: inherit;
  font-size: 14px;
}
.form textarea { min-height: 120px; resize: vertical; }
.notice {
  background: var(--pass-bg);
  color: var(--pass);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-weight: 650;
}
.note { color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .overview-hero, .overview-grid, .method-grid, .stat-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidenav { display: none; }
  .mob-tabs { display: flex; top: var(--banner-h); }
  .app-content { padding: 16px 16px 40px; }
  .topnav {
    position: static;
    height: auto;
    padding: 10px 14px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .topnav-actions { width: 100%; }
  .topnav-actions .btn { flex: 1 1 auto; }
  .brand-name { font-size: 15.5px; }
  .control-toggle { grid-template-columns: 1fr auto auto 22px; }
  .ctl-id { grid-column: 1 / -2; }
  .ctl-priority { display: none; }
  .filter input[type="search"] { min-width: 160px; width: 100%; }
  .filters { align-items: stretch; }
  .hero { padding: 28px 22px; }
  .hero h2 { font-size: 24px; }
  .page-simple main.simple-main { padding: 20px 16px 40px; }
}

@media (max-width: 640px) {
  .topnav-actions .btn { padding: 8px 10px; font-size: 12.5px; }
  .demo-banner { font-size: 12.5px; padding: 8px 12px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .page-title { font-size: 22px; }
}

/* ===== Findings cards, grouping, and remediation plan ===== */
.find-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 0 0 16px;
}
.seg-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.seg-toggle button {
  border: 0;
  border-right: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  padding: 8px 14px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
}
.seg-toggle button:last-child { border-right: 0; }
.seg-toggle button:hover { background: var(--navy-soft); }
.seg-toggle button.is-on { background: var(--navy); color: #fff; }
.seg-toggle button.is-on:hover { background: var(--navy-deep); color: #fff; }
#table-view-btn.is-on { background: var(--navy); color: #fff; border-color: var(--navy); }

.find-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.find-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  font-weight: 720;
  font-size: 16px;
  color: var(--navy);
  background: #f8fafc;
  user-select: none;
}
.find-group > summary::-webkit-details-marker { display: none; }
.find-group > summary .chev { color: var(--muted); transition: transform .15s ease; display: inline-block; }
.find-group[open] > summary .chev { transform: rotate(90deg); }
.find-group > summary .count {
  margin-left: auto;
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}
.find-group-body { padding: 16px 16px 8px; display: flex; flex-direction: column; gap: 14px; }

.find-card {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  border-left: 4px solid var(--line);
}
.find-card.edge-HIGH { border-left-color: #d92d20; }
.find-card.edge-MEDIUM { border-left-color: #dc6803; }
.find-card.edge-LOW { border-left-color: #175cd3; }
.find-card.is-hl { box-shadow: 0 0 0 2px var(--accent); }
.find-what, .find-fix { padding: 22px 24px 24px; min-width: 0; }
.find-what { background: #fff; }
.find-fix { background: #f6f8fb; border-left: 1px solid var(--line); }
.find-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 8px; }
.find-head .find-kicker { margin: 0; }
.find-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.find-title {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  color: var(--navy);
  max-width: 38rem;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.obj-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--navy-soft);
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 650;
}
.obj-chip small { font-weight: 550; color: var(--muted); }
.find-control { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.find-control strong { color: var(--navy); font-weight: 700; }
.why-label, .obs-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.why-text {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  max-width: 38rem;
  color: var(--ink);
}
.obs-list { margin: 10px 0 0; padding-left: 18px; color: #3f4c5a; font-size: 14px; line-height: 1.5; }
.obs-list li { margin: 0 0 4px; }
.find-fix .steps { margin: 0; padding-left: 1.2em; }
.find-fix .steps li { margin: 0 0 10px; font-size: 15px; line-height: 1.55; max-width: 34rem; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
}
.tag-impact-high { background: var(--high-bg); color: var(--high); }
.tag-impact-medium { background: var(--medium-bg); color: var(--medium); }
.tag-impact-low { background: var(--low-bg); color: var(--low); }
.tag-effort { background: #eaecf0; color: #344054; }

.plan-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--muted);
}
.plan-bar { flex: 1; min-width: 140px; height: 8px; background: #e8edf3; border-radius: 99px; overflow: hidden; }
.plan-bar > span { display: block; height: 100%; background: var(--pass); border-radius: 99px; }
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.plan-item.is-done { background: #f8fafc; }
.plan-item.is-done .plan-title { text-decoration: line-through; color: var(--muted); }
.plan-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--navy);
  cursor: pointer;
}
.plan-title { margin: 4px 0 6px; font-size: 16px; font-weight: 700; color: var(--navy); line-height: 1.35; }
.plan-meta { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.plan-item .steps { margin: 0; padding-left: 1.15em; font-size: 14.5px; line-height: 1.5; color: #344054; }
.plan-item .steps li { margin: 0 0 4px; }

.top-findings { display: flex; flex-direction: column; gap: 8px; }
.top-find-btn {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: start;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.top-find-btn:hover { background: #f8fafc; border-color: #cdd6e1; }
.top-find-btn .fm-title { font-weight: 700; font-size: 15px; color: var(--navy); line-height: 1.35; }
.top-find-btn .fm-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.top-find-btn .chip-row { margin: 6px 0 0; }
.top-find-btn .pill { margin-top: 2px; }

@media (max-width: 980px) {
  .find-card { grid-template-columns: 1fr; }
  .find-fix { border-left: 0; border-top: 1px solid var(--line); }
  .find-what, .find-fix { padding: 18px 16px 20px; }
  .seg-toggle button { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 640px) {
  .find-toolbar { flex-direction: column; align-items: stretch; }
  .seg-toggle { display: flex; flex-direction: column; width: 100%; }
  .seg-toggle button { border-right: 0; border-bottom: 1px solid var(--line); width: 100%; text-align: left; }
  .seg-toggle button:last-child { border-bottom: 0; }
  #table-view-btn { width: 100%; }
  #find-filters { flex-direction: column; align-items: stretch; }
  #find-filters .filter { width: 100%; flex: 1 1 auto; }
  #find-filters .filter input, #find-filters .filter select { width: 100%; }
  #find-filters .filter-count { margin-left: 0; padding-bottom: 0; }
}

/* CSP: replace former inline style= attributes with classes. */
.meta-line.scoring-note { margin-top: 10px; }
.meta-line.top-findings-lead { margin-top: -6px; margin-bottom: 12px; }
.expected.spaced { margin-top: 8px; }
.detail.span-all { grid-column: 1 / -1; }
.chart-legend i.swatch-pass { background: #12b76a; }
.chart-legend i.swatch-partial { background: #f79009; }
.chart-legend i.swatch-fail { background: #f04438; }
.chart-legend i.swatch-manual { background: #2e90fa; }
.chart-legend i.swatch-not_assessed { background: #98a2b3; }
