:root {
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --bg-code: #0f172a;
  --bg-code-text: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --accent: #1d4ed8;
  --accent-soft: #eff6ff;

  --p0: #b91c1c;
  --p0-bg: #fee2e2;
  --p0-border: #fca5a5;
  --p1: #c2410c;
  --p1-bg: #ffedd5;
  --p1-border: #fdba74;
  --p2: #a16207;
  --p2-bg: #fef9c3;
  --p2-border: #fde047;
  --p3: #475569;
  --p3-bg: #f1f5f9;
  --p3-border: #cbd5e1;

  --max-width: 1280px;
  --content-width: 760px;
  --sidebar-width: 240px;

  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-feature-settings: 'cv11', 'ss01', 'ss03';
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: rgba(15, 23, 42, 0.06);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

pre {
  background: var(--bg-code);
  color: var(--bg-code-text);
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
}

/* ===== Top bar ===== */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 38px;
  height: 38px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  border-radius: 6px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.brand-title { font-weight: 600; font-size: 0.98rem; }
.brand-sub { font-size: 0.78rem; color: var(--text-soft); }

.topbar-meta { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.meta-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  color: var(--text-soft);
  font-size: 0.7rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

/* ===== Topbar tabs (audience switcher) ===== */
.topbar-tabs {
  border-top: 1px solid var(--border);
  background: rgba(250, 250, 247, 0.92);
}
.topbar-tabs-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  gap: 0;
}
.tab-btn {
  position: relative;
  background: transparent;
  border: none;
  padding: 0.85rem 1.5rem 0.85rem 0;
  margin-right: 2rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: border-color 0.15s;
}
.tab-btn:last-child { margin-right: 0; }
.tab-label {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.005em;
  line-height: 1.3;
  transition: color 0.15s;
}
.tab-sub {
  font-size: 0.74rem;
  color: var(--text-soft);
  font-weight: 400;
  line-height: 1.3;
  opacity: 0.75;
}
.tab-btn:hover .tab-label { color: var(--text); }
.tab-btn.active {
  border-bottom-color: var(--text);
}
.tab-btn.active .tab-label {
  color: var(--text);
  font-weight: 600;
}
.tab-btn.active .tab-sub { opacity: 1; }

/* ===== Layout ===== */
.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 4rem;
  padding: 0 2rem;
}

.sidebar {
  position: sticky;
  top: 78px;
  align-self: start;
  height: calc(100vh - 78px);
  overflow-y: auto;
  padding: 2.5rem 0 3rem;
}

.nav-section {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
}

.nav-list li { margin: 0; }
.nav-list a {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 0.91rem;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}
.nav-list a:hover { color: var(--text); background: rgba(15,23,42,0.04); text-decoration: none; }
.nav-list a.active {
  color: var(--text);
  font-weight: 600;
  border-left-color: var(--accent);
  background: rgba(29, 78, 216, 0.04);
}

.nav-num {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 500;
  flex-shrink: 0;
}

.legend {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.legend li { display: flex; align-items: center; gap: 0.5rem; }

.nav-aside {
  font-size: 0.82rem;
  color: var(--text-soft);
  padding: 0.85rem 0.95rem;
  background: rgba(15,23,42,0.025);
  border-radius: 6px;
  margin: 0;
  line-height: 1.5;
}
.nav-aside a {
  font-weight: 600;
  color: var(--text);
  border-bottom: 1px dotted currentColor;
}
.nav-aside a:hover { text-decoration: none; border-bottom-style: solid; }

/* ===== Track visibility ===== */
.track { display: none; }
.track.active { display: block; }
.nav-group { display: none; }
.nav-group.active { display: block; }

/* ===== Main content ===== */
.content {
  padding: 3rem 0 6rem;
  max-width: var(--content-width);
  min-width: 0;
}

.section { margin-bottom: 6rem; scroll-margin-top: 90px; }
.section:last-of-type { margin-bottom: 4rem; }

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 600;
  margin: 0 0 1rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 600;
  margin: 3rem 0 1rem;
}

h3 {
  font-size: 1.06rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: -0.005em;
}

p { margin: 0 0 1.1rem; }

.lede {
  font-size: 1.13rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  text-wrap: pretty;
}

.muted { color: var(--text-muted); }
.small { font-size: 0.85rem; }
.cite {
  font-size: 0.83rem;
  color: var(--text-soft);
  margin-top: 0.6rem;
}

ul, ol { padding-left: 1.4rem; }
ul li, ol li { margin-bottom: 0.4rem; }

/* ===== Hero stat grid ===== */
.section-hero h1 { font-size: clamp(2.25rem, 5vw, 3.25rem); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0 3rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
}

.stat-number {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ===== "Big list" — top 3 risks ===== */
.big-list {
  list-style: none;
  padding: 0;
  margin: 0 0 3rem;
  counter-reset: big;
}
.big-list > li {
  counter-increment: big;
  position: relative;
  padding: 1.5rem 0 1.5rem 3.5rem;
  border-top: 1px solid var(--border);
}
.big-list > li:last-child { border-bottom: 1px solid var(--border); }
.big-list > li::before {
  content: counter(big, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.6rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.02em;
}
.big-list h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }

/* ===== Severity bar ===== */
.severity-bar { margin: 2.5rem 0 0; }
.severity-bar-track {
  display: flex;
  height: 38px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border-strong);
}
.seg {
  height: 100%;
  width: var(--w);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: white;
  letter-spacing: 0.02em;
}
.seg-p0 { background: var(--p0); }
.seg-p1 { background: var(--p1); }
.seg-p2 { background: #ca8a04; }
.seg-p3 { background: var(--p3); }
.seg-label { white-space: nowrap; }

/* ===== Severity badges ===== */
.sev {
  display: inline-block;
  padding: 0.16rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  border: 1px solid;
}
.sev-p0 { background: var(--p0-bg); color: var(--p0); border-color: var(--p0-border); }
.sev-p1 { background: var(--p1-bg); color: var(--p1); border-color: var(--p1-border); }
.sev-p2 { background: var(--p2-bg); color: var(--p2); border-color: var(--p2-border); }
.sev-p3 { background: var(--p3-bg); color: var(--p3); border-color: var(--p3-border); }

/* ===== Flow timeline ===== */
.flow {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.flow::before {
  content: '';
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-strong);
}

.flow-step {
  position: relative;
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0;
  align-items: flex-start;
}

.flow-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-shrink: 0;
  z-index: 1;
  font-variant-numeric: tabular-nums;
}

.flow-step.flaw .flow-num {
  background: var(--p1-bg);
  border-color: var(--p1-border);
  color: var(--p1);
}

.flow-step.ok .flow-num {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

.flow-body { flex: 1; padding-top: 0.45rem; }
.flow-body h3 { margin-bottom: 0.25rem; }
.flow-body p { margin-bottom: 0.4rem; font-size: 0.94rem; color: var(--text-muted); }

.flaw-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.4rem 0 0;
  padding: 0.55rem 0.85rem;
  background: #fffbeb;
  border: 1px solid #fde047;
  border-radius: 6px;
  font-size: 0.86rem;
  color: var(--text);
  width: 100%;
  flex-wrap: wrap;
}
.flaw-pill .sev { flex-shrink: 0; }

/* ===== Tables ===== */
.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.91rem;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  background: rgba(15,23,42,0.02);
}

.data-table tbody tr:last-child td { border-bottom: none; }

.data-table.compare td:first-child { font-weight: 500; width: 30%; }
.data-table.compare td:nth-child(2) { color: var(--p0); }
.data-table.compare td:nth-child(3) { color: #166534; }

.data-table.compact th { width: 30%; vertical-align: top; }

/* ===== Findings ===== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 2rem;
}

.filter-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.86rem;
  font-family: inherit;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.15s;
}
.filter-btn:hover { border-color: var(--border-strong); color: var(--text); }
.filter-btn.active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.filter-count {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  background: rgba(15,23,42,0.08);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}
.filter-btn.active .filter-count { background: rgba(255,255,255,0.18); }

.findings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.finding {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  scroll-margin-top: 90px;
  transition: border-color 0.15s, transform 0.15s;
}

.finding:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.finding header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.finding-id {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 600;
}

.finding h3 { margin-bottom: 0.6rem; font-size: 1.04rem; }
.finding p { font-size: 0.92rem; margin-bottom: 0.6rem; color: var(--text-muted); }
.finding p:last-of-type { margin-bottom: 0; }

.finding-detail {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px dashed var(--border);
}
.finding-detail p strong { color: var(--text); }

.finding-cite {
  margin-top: 0.9rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-soft);
}

.finding[data-hidden="true"] { display: none; }

/* ===== Card grid (presentation) ===== */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.4rem 1.5rem;
}
.card h3 { margin-bottom: 0.6rem; font-size: 1.02rem; }
.card p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }

/* ===== Roadmap ===== */
.roadmap {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  counter-reset: rm;
}

.roadmap li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.roadmap li:last-child { border-bottom: none; }

.roadmap-num {
  font-size: 1.6rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-soft);
  letter-spacing: -0.02em;
  line-height: 1;
}

.roadmap h3 { font-size: 1.04rem; margin-bottom: 0.3rem; }
.roadmap p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }

/* ===== Footer ===== */
.page-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  color: var(--text-soft);
}
.page-footer p { margin: 0 0 0.4rem; }

/* ===== Executive brief ===== */
.brief-callout {
  margin: 2rem 0 0;
  padding: 1.6rem 1.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text);
  border-radius: 6px;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
}
.brief-callout em { font-style: italic; color: var(--text-muted); }

.brief-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}
.brief-list li {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.99rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}
.brief-list li:last-child { border-bottom: 1px solid var(--border); }
.brief-list li strong { color: var(--text); font-weight: 600; }

.brief-problem {
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.75rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.brief-problem header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.brief-problem-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.brief-problem h2 {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.brief-problem p {
  margin: 0 0 0.85rem;
  color: var(--text-muted);
  font-size: 0.97rem;
  line-height: 1.65;
}
.brief-problem p:last-child { margin-bottom: 0; }
.brief-impact {
  padding: 0.9rem 1.05rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.93rem !important;
  color: var(--text) !important;
}
.brief-impact strong { font-weight: 600; }

.risk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 0;
}
.risk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.6rem 1.6rem;
  display: flex;
  flex-direction: column;
}
.risk-tag {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-soft);
  margin: 0 0 0.7rem;
}
.risk-card h3 {
  margin: 0 0 0.7rem;
  font-size: 1.04rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.risk-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.6;
}

.brief-actions {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  counter-reset: brief-actions;
}
.brief-actions li {
  counter-increment: brief-actions;
  position: relative;
  padding: 1.3rem 0 1.3rem 3.2rem;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}
.brief-actions li:last-child { border-bottom: 1px solid var(--border); }
.brief-actions li::before {
  content: counter(brief-actions);
  position: absolute;
  left: 0;
  top: 1.45rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.brief-actions h3 {
  margin: 0 0 0.4rem;
  font-size: 1.04rem;
  letter-spacing: -0.005em;
}
.brief-actions p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.brief-handover {
  margin-top: 2.5rem;
  padding: 1.4rem 1.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.99rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.brief-handover a { font-weight: 600; }

/* ===== Reporting examples ===== */
.report-example-head {
  margin: 2rem 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-soft);
}

.report-example {
  margin: 0 0 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.report-example-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.4rem;
  background: rgba(15,23,42,0.03);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.report-example-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text);
}
.report-example-meta {
  font-size: 0.82rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.report-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0;
  padding: 0;
}
.report-stats > div {
  padding: 1.1rem 1.4rem;
  border-right: 1px solid var(--border);
}
.report-stats > div:last-child { border-right: none; }
.report-stat-num {
  font-size: 1.85rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.report-stat-bad { color: var(--p0); }
.report-stat-ok { color: #166534; font-size: 1.1rem; font-weight: 600; letter-spacing: 0; }
.report-stat-label {
  color: var(--text-muted);
  font-size: 0.86rem;
}
.report-stat-label strong { color: var(--text); font-weight: 600; }

.report-callout {
  margin: 0 !important;
  padding: 1.1rem 1.4rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.report-callout strong { color: var(--text); font-weight: 600; }

.report-table { margin: 0; }
.report-table th, .report-table td { padding: 0.7rem 1rem; }
.report-table-more {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.85rem;
  background: rgba(15,23,42,0.015);
}

.risk-pill {
  display: inline-block;
  padding: 0.16rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid;
}
.risk-pill.bad { background: var(--p0-bg); color: var(--p0); border-color: var(--p0-border); }
.risk-pill.ok { background: #dcfce7; color: #166534; border-color: #86efac; }

/* Evidence card — single cookie / integrity */
.evidence-card {
  margin: 0 0 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 0.93rem;
}
.evidence-card-row {
  display: grid;
  grid-template-columns: minmax(140px, 32%) 1fr;
  gap: 1.5rem;
  padding: 0.7rem 1.4rem;
  border-bottom: 1px solid var(--border);
}
.evidence-card-row:last-child { border-bottom: none; }
.evidence-card-row > span:first-child {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  align-self: center;
}
.evidence-card-row > span:nth-child(2) {
  color: var(--text);
  word-break: break-word;
}
.evidence-aside {
  display: inline-block;
  margin-left: 0.4rem;
  color: var(--text-soft);
  font-size: 0.85rem;
}
.evidence-card-flag {
  background: var(--p0-bg);
  border-bottom-color: var(--p0-border);
}
.evidence-card-flag > span:first-child { color: var(--p0); }
.evidence-card-flag > span:nth-child(2) strong { color: var(--p0); font-weight: 700; }
.evidence-card-flag-ok {
  background: #dcfce7;
  border-bottom-color: #86efac;
}
.evidence-card-flag-ok > span:first-child { color: #166534; }
.evidence-card-flag-ok > span:nth-child(2) { color: #166534; font-weight: 500; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 1.25rem;
  }
  .sidebar {
    position: fixed;
    top: 71px;
    left: 0;
    right: 0;
    height: auto;
    max-height: calc(100vh - 71px);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem 2rem;
    transform: translateY(-100%);
    transition: transform 0.25s ease;
    z-index: 90;
    box-shadow: 0 12px 30px -10px rgba(15,23,42,0.15);
  }
  .sidebar.open { transform: translateY(0); }
  .nav-toggle { display: flex; }
  .topbar-meta { display: none; }
  .content { padding: 2rem 0 4rem; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .topbar-tabs-inner { padding: 0 1.25rem; }
  .tab-btn { padding: 0.75rem 0; margin-right: 1.5rem; }
  .tab-sub { display: none; }
}

@media (max-width: 540px) {
  .topbar-inner { padding: 0.85rem 1.25rem; }
  .brand-sub { display: none; }
  h1 { font-size: 1.85rem; }
  .lede { font-size: 1rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .flow-step { flex-direction: row; }
  .flow-step { gap: 1rem; }
  .flow::before { left: 15px; }
  .flow-num { width: 32px; height: 32px; font-size: 0.82rem; }
  .roadmap li { grid-template-columns: 36px 1fr; gap: 0.85rem; }
  .roadmap-num { font-size: 1.2rem; }
  .brief-callout { padding: 1.25rem 1.35rem; font-size: 0.99rem; }
  .brief-problem { padding: 1.3rem 1.4rem; }
  .brief-problem h2 { font-size: 1.08rem; }
  .brief-actions li { padding-left: 2.6rem; }
  .brief-actions li::before { width: 26px; height: 26px; font-size: 0.78rem; top: 1.55rem; }
  .tab-label { font-size: 0.86rem; }
  .report-stats { grid-template-columns: repeat(2, 1fr); }
  .report-stats > div { border-right: none; border-bottom: 1px solid var(--border); }
  .report-stats > div:nth-child(2n) { border-right: none; }
  .report-stats > div:nth-last-child(-n+2) { border-bottom: none; }
  .report-stat-num { font-size: 1.5rem; }
  .report-example-header { padding: 0.75rem 1rem; }
  .report-example-meta { font-size: 0.76rem; }
  .evidence-card-row { grid-template-columns: 1fr; gap: 0.2rem; padding: 0.7rem 1.1rem; }
  .evidence-card-row > span:first-child { font-size: 0.72rem; }
}

/* ===== Print ===== */
@media print {
  .topbar, .sidebar, .filter-bar, .nav-toggle { display: none; }
  .layout { grid-template-columns: 1fr; padding: 0; }
  .content { max-width: none; padding: 0; }
  body { background: white; font-size: 10pt; }
  pre { white-space: pre-wrap; word-break: break-all; font-size: 8pt; }
  .finding { page-break-inside: avoid; }
  .section { page-break-after: avoid; margin-bottom: 2rem; }
  h1 { page-break-after: avoid; }
  h2, h3 { page-break-after: avoid; }
  a { color: var(--text); }
}
