:root {
  --report-bg: #050605;
  --report-surface: #0a0d0a;
  --report-surface-2: #101510;
  --report-surface-3: #172017;
  --report-line: rgba(234, 240, 235, .14);
  --report-line-strong: rgba(155, 234, 52, .28);
  --report-text: #f4f6f4;
  --report-muted: #929b93;
  --report-accent: #9bea34;
  --report-accent-soft: rgba(155, 234, 52, .07);
  --report-success: #b9f67a;
  --report-warning: #f1d486;
  --report-danger: #ff927d;
  --report-code: #070907;
  --report-max: 1040px;
  --report-body-size: 15px;
  --report-title-size: clamp(34px, 4.2vw, 52px);
  --report-h2-size: clamp(22px, 2.5vw, 28px);
  --report-h3-size: 19px;
  --report-banner: linear-gradient(125deg, rgba(22,31,17,.96), rgba(10,13,10,.88));

  /* Map every legacy report token onto the shared site palette. */
  --bg: var(--report-bg); --paper: var(--report-bg); --void: var(--report-bg); --scnet-bg: var(--report-bg);
  --surface: var(--report-surface); --card: var(--report-surface); --scnet-white: var(--report-surface);
  --surface-strong: var(--report-surface-2); --card-strong: var(--report-surface-2); --surface-2: var(--report-surface-2);
  --surface-3: var(--report-surface-3); --scnet-accent: var(--report-surface-3);
  --line: var(--report-line); --hair: var(--report-line); --scnet-border: var(--report-line);
  --hair-2: var(--report-line-strong);
  --text: var(--report-text); --ink: var(--report-text); --scnet-text: var(--report-text);
  --ink-2: #c5cec6; --muted: var(--report-muted); --scnet-text-secondary: var(--report-muted);
  --accent: var(--report-accent); --amber: var(--report-accent); --amber-deep: var(--report-accent);
  --red: var(--report-accent); --red-light: var(--report-accent); --red-dark: #315016;
  --scnet-red: var(--report-accent); --scnet-red-light: var(--report-accent);
  --accent-soft: var(--report-accent-soft); --amber-wash: var(--report-accent-soft);
  --success: var(--report-success); --green: var(--report-success); --verified: var(--report-success);
  --warning: var(--report-warning); --orange: var(--report-warning); --boundary: var(--report-warning);
  --danger: var(--report-danger); --blue: #a9d4ff; --scnet-blue: #a9d4ff;
  --code: var(--report-code); --scnet-code-bg: var(--report-code);
  --white: var(--report-surface); --gray-50: var(--report-bg); --gray-100: var(--report-bg);
  --gray-200: var(--report-line); --gray-600: var(--report-muted); --gray-700: var(--report-muted); --gray-800: var(--report-text);
}

html { scroll-behavior: smooth; background: var(--report-bg); }
body {
  color: var(--report-text) !important;
  background: radial-gradient(circle at 72% 1%, rgba(155,234,52,.075), transparent 28rem), var(--report-bg) !important;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif !important;
}

/* Shared editorial baseline: report-specific markup may arrange content, but
   every report inherits the homepage palette, type, borders, and rhythm. */
body { font-size: 15px !important; line-height: 1.72 !important; }
main, .wrap, .page, .content, .layout, .container, .reader-stage {
  color: var(--report-text) !important;
}
section, .section { scroll-margin-top: 28px; }
h1, h2, h3, h4, h5, h6 { line-height: 1.25 !important; scroll-margin-top: 26px; }
h1 { font-size: clamp(30px, 5vw, 54px) !important; }
h2 { font-size: clamp(23px, 3vw, 32px) !important; }
h3 { font-size: clamp(18px, 2.2vw, 23px) !important; }
img, video, svg { max-width: 100%; }
blockquote { color: var(--report-muted) !important; background: var(--report-accent-soft) !important; border-left: 3px solid var(--report-accent) !important; }
hr { border: 0 !important; border-top: 1px solid var(--report-line) !important; }
::selection { color: var(--report-bg); background: var(--report-accent); }

.report-site-nav {
  width: min(1280px, calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto 18px !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  border-bottom: 1px solid var(--report-line);
}
.reader-nav.report-site-nav { background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--report-line) !important; border-radius: 0 !important; }
.report-site-nav .report-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--report-text); font-weight: 800; letter-spacing: -.02em; text-decoration: none; }
.report-site-nav .report-brand::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--report-accent); box-shadow: 0 0 20px rgba(155,234,52,.42); }
.report-site-nav nav { display: flex; align-items: center; gap: 22px; }
.report-site-nav nav a { color: var(--report-muted); font-size: 13px; text-decoration: none; }
.report-site-nav nav a:hover, .report-site-nav nav a[aria-current="page"] { color: var(--report-accent); }
.top-nav { display: none !important; }

/* Shared editorial hierarchy. */
.container { max-width: var(--report-max) !important; }
.header, body > header:not(.report-site-nav), .mast {
  color: var(--report-text) !important;
  background: linear-gradient(145deg, rgba(20,28,15,.98), rgba(8,10,8,.98)) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 18px !important;
  box-shadow: none !important;
}
.header { padding: clamp(34px, 5vw, 58px) !important; }
.mast { padding: clamp(36px, 5vw, 62px) 0 !important; background: transparent !important; border-width: 0 0 1px !important; border-radius: 0 !important; }
.header::before, body > header:not(.report-site-nav)::before, .mast::before { color: var(--report-accent) !important; }
h1 { color: var(--report-text) !important; font-weight: 650 !important; letter-spacing: -.045em !important; }
h2, .section h2, .card-header, .sec-head h2 { color: var(--report-text) !important; }
h2, .section h2, .sec-head { border-color: var(--report-line-strong) !important; }
h3 { color: var(--report-text) !important; }
p, li { color: inherit; }
.subtitle, .sub, .meta, .standfirst, .lede, .small, .brand-sub { color: var(--report-muted) !important; }
.tag, .eyebrow, .idx, .sec-head .idx, .num, .label, .cl-label { color: var(--report-accent) !important; }
.hero, .reader-hero, .mast, .header, body > header:not(.report-site-nav):not(.reader-toolbar) {
  color: var(--report-text) !important;
  background: linear-gradient(145deg, rgba(20,28,15,.98), rgba(8,10,8,.98)) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 16px !important;
  box-shadow: none !important;
}
.hero { padding: clamp(30px, 5vw, 54px) !important; }
.hero p, .reader-hero p { color: var(--report-muted) !important; }
.badge, .badges span { color: var(--report-accent) !important; background: var(--report-accent-soft) !important; border-color: var(--report-line-strong) !important; }
.wrap, .page { max-width: 1040px !important; margin-left: auto !important; margin-right: auto !important; }

/* Consistent surfaces and components. */
.section, .card, .summary-card, .metric, .mod-file, .highlight-box, .conclusion-item, .gen-box, .corr, .callout {
  color: var(--report-text) !important;
  background: linear-gradient(145deg, rgba(16,21,16,.96), rgba(8,10,8,.96)) !important;
  border-color: var(--report-line) !important;
  box-shadow: none !important;
}
.section, .card { border: 1px solid var(--report-line) !important; border-radius: 16px !important; }
.wrap > section, .page > section { margin: 16px 0 !important; padding: clamp(22px, 4vw, 34px) !important; border: 1px solid var(--report-line) !important; border-radius: 14px !important; }
.card { border-left: 3px solid var(--report-accent) !important; }
.card-header { background: var(--report-surface-2) !important; border-color: var(--report-line) !important; }
.callout.lesson, .highlight-box, .note { color: var(--report-text) !important; background: var(--report-accent-soft) !important; border-left-color: var(--report-accent) !important; }
.callout.warn { background: rgba(241,212,134,.07) !important; border-left-color: var(--report-warning) !important; }
.callout.note { background: rgba(169,212,255,.06) !important; border-left-color: #a9d4ff !important; }

.table-wrap, .tw { border-color: var(--report-line) !important; border-radius: 10px !important; background: var(--report-surface) !important; box-shadow: none !important; }
table { color: var(--report-text) !important; background: transparent !important; }
@media (max-width: 680px) {
  table { max-width: none !important; }
  .table-wrap, .tw { max-width: 100% !important; overflow-x: auto !important; }
  .page, .wrap, .content, main { overflow-x: clip !important; }
}
th { color: var(--report-text) !important; background: var(--report-surface-3) !important; border-color: var(--report-line) !important; }
td { color: #c5cec6 !important; border-color: var(--report-line) !important; }
tr:nth-child(even) { background: rgba(155,234,52,.025) !important; }
tr:hover { background: rgba(155,234,52,.045) !important; }

pre, .diagram {
  color: #dce5dc !important;
  background: var(--report-code) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 10px !important;
}
code { color: var(--report-accent) !important; background: rgba(155,234,52,.055) !important; }
pre code { color: inherit !important; background: transparent !important; }
a { color: var(--report-accent); }

.badge-ok, .badge.verified, .status-ok, .ok, .speedup-badge { color: var(--report-success) !important; background: rgba(185,246,122,.08) !important; }
.badge-warn, .badge.boundary, .warning { color: var(--report-warning) !important; }
.badge-fail, .badge.dead, .status-fail { color: var(--report-danger) !important; background: rgba(255,146,125,.07) !important; }
.footer, footer, .foot { color: #6f796f !important; background: transparent !important; border-color: var(--report-line) !important; }

/* All reports use the shared generated outline; old side and in-body TOCs are suppressed. */
.shell { background: transparent !important; }
.sidebar { background: #070907 !important; border-color: var(--report-line) !important; }
.sidebar .brand { color: var(--report-text) !important; }
.toc a { color: var(--report-muted) !important; }
.toc a:hover, .toc a.active { color: var(--report-text) !important; background: var(--report-accent-soft) !important; }
.toc a.active { border-left-color: var(--report-accent) !important; }
.menu-btn { color: var(--report-text) !important; background: var(--report-surface) !important; border-color: var(--report-line-strong) !important; }

@media (max-width: 760px) {
  .report-site-nav { min-height: 92px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 12px; }
  .report-site-nav nav { width: 100%; justify-content: space-between; gap: 12px; }
  .report-site-nav nav a { font-size: 12px; }
  .header { padding: 30px 22px !important; }
  .section, .card-body { padding: 20px !important; }
  .report-site-nav { width: min(100% - 28px, 1280px); }
  .wrap, .page { width: min(100% - 28px, 1040px) !important; }
}

/* Canonical report layout contract. These rules intentionally come last so
   legacy per-report CSS cannot change the banner, type scale, or page rhythm. */
body { font-size: var(--report-body-size) !important; line-height: 1.72 !important; }
main, .wrap, .page, .content, .container, .reader-stage {
  max-width: var(--report-max) !important;
}
main, .wrap, .page, .content, .container { font-size: var(--report-body-size) !important; }
.report-banner.report-banner {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: var(--report-max) !important;
  margin: 0 auto 28px !important;
  padding: clamp(26px, 4.5vw, 48px) !important;
  color: var(--report-text) !important;
  background: var(--report-banner) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px rgba(255,255,255,.035) !important;
  text-align: left !important;
}
.report-banner.report-banner h1 {
  max-width: 940px !important;
  margin: 10px 0 16px !important;
  color: var(--report-text) !important;
  font-size: var(--report-title-size) !important;
  font-weight: 650 !important;
  line-height: 1.08 !important;
  letter-spacing: -.045em !important;
  border: 0 !important;
  padding: 0 !important;
  overflow-wrap: anywhere !important;
  hyphens: auto;
  text-wrap: balance;
}
.report-banner::after { content: none !important; display: none !important; }
.report-banner p, .report-banner .subtitle, .report-banner .standfirst,
.report-banner .meta, .report-banner .reader-meta, .report-banner .runline {
  color: var(--report-muted) !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}
.report-banner .eyebrow, .report-banner .tag, .report-banner .reader-kicker,
.report-banner .kicker { color: var(--report-accent) !important; }
body > header.report-banner.report-banner {
  padding: clamp(26px, 4.5vw, 48px) !important;
  background: var(--report-banner) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 16px !important;
}
body main > section, body .container > section, body .content-inner > section,
body .wrap > section, body .page > section, body .report-generated-section {
  margin: 16px 0 !important;
  padding: clamp(22px, 3.5vw, 30px) !important;
  color: var(--report-text) !important;
  background: linear-gradient(145deg, rgba(16,21,16,.96), rgba(8,10,8,.96)) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}
.section {
  width: min(calc(100% - 40px), var(--report-max)) !important;
  margin: 16px auto !important;
  padding: clamp(22px, 3.5vw, 30px) !important;
  border: 1px solid var(--report-line) !important;
  border-radius: 14px !important;
}
main:not(.reader-stage) { padding: 0 0 72px !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
.report-no-sidebar { display: block !important; width: min(calc(100% - 40px), var(--report-max)) !important; max-width: var(--report-max) !important; margin: 20px auto !important; padding: 0 !important; gap: 0 !important; }
.report-no-sidebar > aside, .report-no-sidebar > .sidebar { display: none !important; }
.report-no-sidebar > main, .report-no-sidebar > .content { width: 100% !important; max-width: var(--report-max) !important; min-width: 0 !important; padding: 0 0 72px !important; }
.report-no-sidebar > .content { flex: none !important; }
.legacy-report-toc { display: none !important; }
.report-outline {
  width: min(calc(100% - 40px), var(--report-max));
  margin: 0 auto 26px;
  color: var(--report-text);
  background: linear-gradient(145deg, rgba(16,21,16,.96), rgba(8,10,8,.96));
  border: 1px solid var(--report-line);
  border-radius: 14px;
}
.report-outline > nav { background: transparent !important; }
.report-outline > summary { background: transparent !important; }
.report-banner + .report-outline { width: min(calc(100% - 40px), var(--report-max)); }
.report-outline summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 20px;
  cursor: pointer;
  list-style: none;
}
.report-outline summary::-webkit-details-marker { display: none; }
.report-outline summary > span { color: var(--report-accent); font: 700 10px/1.4 ui-monospace, monospace; letter-spacing: .12em; }
.report-outline summary > strong { margin-left: auto; color: var(--report-text); font-size: 13px; }
.report-outline summary > small { color: var(--report-muted); font: 11px/1.4 ui-monospace, monospace; }
.report-outline summary > b { color: var(--report-accent); font-size: 18px; transition: transform .2s ease; }
.report-outline[open] summary > b { transform: rotate(45deg); }
.report-outline nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; padding: 0 20px 18px; border-top: 1px solid var(--report-line); }
.report-outline-link { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 3px; min-width: 0; overflow: hidden; padding: 10px 4px; color: var(--report-muted) !important; background: transparent !important; border: 0 !important; border-bottom: 1px solid var(--report-line) !important; border-radius: 0 !important; box-shadow: none !important; font-size: 12px; line-height: 1.5; text-decoration: none; }
.report-outline-link:hover { color: var(--report-accent) !important; }
.report-outline-page { grid-template-columns: 30px minmax(0, 1fr); text-align: left; }
.report-outline-number { color: var(--report-accent); font: 700 10px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.report-outline-label { display: -webkit-box; min-width: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.report-outline-h3 { grid-template-columns: 30px minmax(0, 1fr); padding-left: 12px; font-size: 11px; }
.report-heading-number { display: inline-block; margin-right: .34em; color: var(--report-accent); font: 700 .68em/1 ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; letter-spacing: 0; vertical-align: .08em; white-space: nowrap; }
body .content-inner > .report-outline, body main > .report-outline,
body .container > .report-outline, body .wrap > .report-outline,
body .page > .report-outline { width: 100% !important; }
body > .report-outline, body .container > .report-outline { width: min(calc(100% - 40px), var(--report-max)) !important; }
@media (min-width: 1200px) {
  .report-outline {
    position: fixed;
    z-index: 20;
    top: 96px;
    left: 20px;
    width: min(220px, calc((100vw - var(--report-max)) / 2 - 40px));
    max-height: calc(100vh - 116px);
    margin: 0;
    overflow: auto;
    background: rgba(10,13,10,.94);
    backdrop-filter: blur(12px);
  }
  .report-outline summary { min-height: 58px; flex-wrap: wrap; gap: 5px 10px; padding: 12px; }
  .report-outline summary > strong { margin-left: 0; }
  .report-outline summary > small { margin-left: auto; }
  .report-outline nav { display: flex; flex-direction: column; gap: 0; padding: 0 12px 12px; }
  .report-outline-link { padding: 7px 3px; }
  .report-outline-h3 { grid-template-columns: 30px minmax(0, 1fr); padding-left: 10px; font-size: 11px; }
}
main:not(.reader-stage) p, main:not(.reader-stage) li { font-size: var(--report-body-size) !important; }
body .report-banner p, body .report-banner .subtitle, body .report-banner .standfirst,
body .report-banner .meta, body .report-banner .reader-meta, body .report-banner .runline { font-size: 13px !important; }
body h2, body main h2, .section h2, .sec-head h2 {
  color: var(--report-text) !important;
  font-size: var(--report-h2-size) !important;
  font-weight: 620 !important;
  line-height: 1.3 !important;
  letter-spacing: -.025em !important;
}
body h3, body main h3 {
  color: var(--report-text) !important;
  font-size: var(--report-h3-size) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}
body h4, body main h4 { color: var(--report-text) !important; font-size: 16px !important; line-height: 1.45 !important; }
.container, .wrap, .page {
  width: min(calc(100% - 40px), var(--report-max)) !important;
  max-width: var(--report-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding: 0 0 72px !important;
}
.content-inner { width: 100% !important; max-width: var(--report-max) !important; margin-left: auto !important; margin-right: auto !important; }
.layout { max-width: 1380px !important; }
.reader-hero.report-banner { padding: clamp(26px, 4.5vw, 48px) !important; }

@media (max-width: 680px) {
  .report-banner { padding: 25px 22px !important; margin-bottom: 20px !important; }
  body > header.report-banner { padding: 25px 22px !important; }
  .report-banner h1 { font-size: clamp(30px, 8vw, 38px) !important; }
  body h2, body main h2, .section h2, .sec-head h2 { font-size: 22px !important; }
  body h3, body main h3 { font-size: 18px !important; }
  .container, .wrap, .page { width: min(calc(100% - 28px), var(--report-max)) !important; }
  .section { width: min(calc(100% - 28px), var(--report-max)) !important; }
  .report-outline { width: min(calc(100% - 28px), var(--report-max)); margin-bottom: 20px; }
  .report-outline summary { gap: 9px; padding: 14px; }
  .report-outline nav { grid-template-columns: 1fr; padding: 0 14px 14px; }
  .report-no-sidebar { width: min(calc(100% - 28px), var(--report-max)) !important; }
}

body th { color: var(--report-text) !important; background: var(--report-surface-3) !important; border-color: var(--report-line) !important; }
body td { color: #c5cec6 !important; background: transparent !important; border-color: var(--report-line) !important; }
body tr:nth-child(even) td { background: rgba(155,234,52,.025) !important; }
body tr:hover td { background: rgba(155,234,52,.045) !important; }

@media (min-width: 1200px) {
  body .container > .report-outline, body main > .report-outline,
  body .wrap > .report-outline, body .page > .report-outline,
  body .content-inner > .report-outline {
    position: fixed;
    z-index: 20;
    top: 96px;
    left: 20px;
    width: min(220px, calc((100vw - var(--report-max)) / 2 - 40px)) !important;
    max-height: calc(100vh - 116px);
    margin: 0;
    overflow: auto;
    background: rgba(10,13,10,.94);
    backdrop-filter: blur(12px);
  }
}

@media (min-width: 1200px) {
  body.report-has-left-index {
    --report-index-width: min(220px, calc(100vw - var(--report-max) - 60px));
    --report-content-left: max(calc((100vw - var(--report-max)) / 2), calc(20px + var(--report-index-width) + 32px));
  }
  body.report-has-left-index > :is(main, .container, .wrap, .page, .content, .reader-stage, .shell, .layout) {
    width: min(var(--report-max), calc(100vw - var(--report-content-left) - 20px)) !important;
    max-width: var(--report-max) !important;
    margin-left: var(--report-content-left) !important;
    margin-right: 20px !important;
  }
  body.report-has-left-index > header.report-banner {
    width: min(var(--report-max), calc(100vw - var(--report-content-left) - 20px)) !important;
    margin-left: var(--report-content-left) !important;
    margin-right: 20px !important;
  }
  body.report-has-left-index .report-outline { width: var(--report-index-width) !important; }
}

@media print {
  .report-site-nav { display: none; }
  body { color: #172126 !important; background: #fff !important; }
}
