:root {
  color-scheme: light;
  --ink: #172126;
  --muted: #5d6970;
  --line: #dce3e5;
  --paper: #fbfcfb;
  --page: #d6dedb;
  --band: #eef4f1;
  --green: #2f7d5c;
  --teal: #1e6d7a;
  --gold: #b88023;
  --amber: #8f6a2a;
  --blue: #365f91;
  --red: #a4463f;
  --slate: #3e4a52;
  --soft-green: #d9eadf;
  --soft-gold: #f5e7ca;
  --soft-blue: #dce8f4;
  --soft-red: #f1ddda;
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: var(--teal);
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 252, 251, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  min-height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 20px;
}

.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
}

.nav-links a {
  color: var(--slate);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--ink);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 680;
  text-decoration: none;
  white-space: nowrap;
}

.button.secondary {
  background: transparent;
  color: var(--ink);
}

.hero {
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(217, 234, 223, 0.76), rgba(220, 232, 244, 0.58) 48%, rgba(245, 231, 202, 0.7));
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  max-width: var(--max);
  min-height: 620px;
  margin: 0 auto;
  padding: 70px 24px 62px;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 850px;
  font-size: 64px;
}

h2 {
  font-size: 34px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0;
}

code {
  overflow-wrap: anywhere;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.lede {
  max-width: 680px;
  margin-top: 22px;
  color: #334148;
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hero-visual {
  position: relative;
  min-height: 420px;
  border: 1px solid rgba(23, 33, 38, 0.18);
  border-radius: 8px;
  background: rgba(251, 252, 251, 0.72);
  box-shadow: 0 20px 50px rgba(23, 33, 38, 0.08);
  overflow: hidden;
}

.hero-graph {
  background:
    radial-gradient(circle at 56% 42%, rgba(255, 255, 255, 0.98) 0%, rgba(238, 244, 241, 0.9) 45%, rgba(220, 232, 244, 0.88) 100%);
}

.hero-graph canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
}

.hero-graph-label {
  position: absolute;
  left: 18px;
  top: 16px;
  color: rgba(30, 109, 122, 0.82);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-graph-hud {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid rgba(23, 33, 38, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(251, 252, 251, 0.82);
  box-shadow: 0 14px 34px rgba(23, 33, 38, 0.08);
  backdrop-filter: blur(14px);
}

.hero-graph-hud div {
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.56);
}

.hero-graph-hud strong {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.hero-graph-hud span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hero-graph-legend {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: #34444b;
  font-size: 12px;
  font-weight: 640;
}

.hero-graph-legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hero-graph-legend .gold { background: var(--gold); }
.hero-graph-legend .green { background: var(--green); }
.hero-graph-legend .blue { background: var(--blue); }

.hero-graph-tooltip {
  position: absolute;
  min-width: 190px;
  max-width: 260px;
  padding: 10px 12px;
  border: 1px solid rgba(23, 33, 38, 0.14);
  border-radius: 8px;
  background: rgba(251, 252, 251, 0.9);
  color: #2b3b42;
  font-size: 13px;
  box-shadow: 0 14px 34px rgba(23, 33, 38, 0.09);
  pointer-events: none;
  transform: translate(14px, 14px);
  backdrop-filter: blur(14px);
}

.hero-graph-tooltip strong {
  display: block;
  color: var(--ink);
}

.hero-graph-tooltip span {
  color: var(--muted);
}

.section {
  max-width: var(--max);
  margin: 24px auto;
  padding: 56px 32px;
  background: var(--paper);
  border: 2px solid rgba(23, 33, 38, 0.18);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(23, 33, 38, 0.06),
    0 8px 24px rgba(23, 33, 38, 0.08);
}

.section.band {
  max-width: none;
  margin: 18px 0;
  padding: 56px 24px;
  background: var(--band);
  border-left: 0;
  border-right: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.section.band > .section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.65fr) minmax(260px, 0.35fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}

.section-head p {
  color: var(--muted);
  font-size: 17px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.metric {
  min-height: 142px;
  padding: 22px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.metric strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.finding-grid,
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.finding,
.resource {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.finding p,
.resource p {
  margin-top: 12px;
  color: var(--muted);
}

.graph-feature {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(23, 33, 38, 0.08);
}

.graph-feature iframe {
  display: block;
  width: 100%;
  height: min(460px, 60vh);
  border: 0;
}

.graph-feature.compact iframe {
  height: 400px;
}

.field-briefs-hero {
  background:
    linear-gradient(110deg, rgba(220, 232, 244, 0.72), rgba(251, 252, 251, 0.62) 48%, rgba(217, 234, 223, 0.82)),
    radial-gradient(circle at 82% 14%, rgba(184, 128, 35, 0.18), transparent 32%);
}

.field-brief-visual {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(238, 244, 241, 0.94)),
    repeating-linear-gradient(135deg, rgba(54, 95, 145, 0.08) 0 1px, transparent 1px 14px);
}

.field-brief-visual p:not(.eyebrow) {
  margin-top: 18px;
  color: #334148;
  font-size: 17px;
}

.brief-stat-stack {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.brief-stat-stack span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--slate);
  font-weight: 680;
}

.brief-stat-stack strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}

.field-brief-layout {
  grid-template-columns: 230px minmax(0, 1fr);
}

.field-brief-article {
  max-width: 860px;
}

.brief-lead-panel,
.brief-action-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(240px, 0.9fr);
  gap: 24px;
  align-items: start;
  margin-top: 30px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.brief-lead-panel h2,
.brief-action-panel h2 {
  margin-top: 0;
}

.brief-stat-grid {
  display: grid;
  gap: 10px;
}

.brief-stat-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}

.brief-stat-grid strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.brief-stat-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.brief-action-panel {
  background: #eef7f5;
}

.brief-action-panel .hero-actions {
  align-self: center;
  margin-top: 0;
}

.graph-hint-chip {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(23, 33, 38, 0.16);
  border-radius: 999px;
  background: rgba(251, 252, 251, 0.88);
  color: #34444b;
  font: 640 12px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 10px 24px rgba(23, 33, 38, 0.10);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 600ms ease, transform 600ms ease;
  animation: graph-hint-pulse 2.2s ease-in-out infinite;
}

.graph-hint-chip span + span::before {
  content: "·";
  margin-right: 8px;
  color: rgba(23, 33, 38, 0.32);
}

.graph-hint-chip--quiet {
  opacity: 0.55;
  animation: none;
}

.graph-hint-chip--quiet:hover {
  opacity: 1;
}

@keyframes graph-hint-pulse {
  0%, 100% { transform: translateY(0); box-shadow: 0 10px 24px rgba(23, 33, 38, 0.10); }
  50% { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(23, 33, 38, 0.14); }
}

@media (prefers-reduced-motion: reduce) {
  .graph-hint-chip { animation: none; }
}

.bars {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}

.bar-track {
  height: 16px;
  border-radius: 999px;
  background: #e5ecef;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.bar-fill.gold { background: var(--gold); }
.bar-fill.amber { background: var(--amber); }
.bar-fill.blue { background: var(--blue); }
.bar-fill.slate { background: var(--slate); }
.bar-fill.red { background: var(--red); }

.audit-hero .hero-inner {
  min-height: 560px;
}

.audit-brief {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(238, 247, 245, 0.92)),
    radial-gradient(circle at 22% 20%, rgba(184, 128, 35, 0.18), transparent 34%);
}

.audit-brief p:not(.eyebrow) {
  margin-top: 18px;
  color: #334148;
  font-size: 17px;
}

.audit-brief p.source-chip {
  display: inline-flex;
  align-self: flex-start;
  gap: 6px;
  margin-top: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--slate);
  font-size: 14px;
  font-weight: 620;
}

.audit-brief-lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}

.audit-brief-lines span {
  min-height: 48px;
  padding: 12px;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--slate);
  font-size: 14px;
  font-weight: 680;
}

.audit-deliverables {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.audit-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 18px;
}

.audit-panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.audit-panel p {
  margin-top: 14px;
  color: var(--muted);
  font-size: 17px;
}

.field-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
}

.field-list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
  color: #334148;
  font-weight: 640;
}

.process-steps {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process-step;
}

.process-steps li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}

.process-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-weight: 720;
  font-size: 14px;
  line-height: 1;
}

.process-steps strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 720;
}

.process-steps p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.audit-callout {
  max-width: var(--max);
  margin: 24px auto 0;
}

.request-fallback {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
  gap: 20px;
  margin-top: 18px;
}

.request-fallback a {
  color: var(--green);
}

.request-template {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(23, 33, 38, 0.12);
  border-radius: 8px;
  background: #102127;
  color: #f8faf9;
  font: 14px/1.6 "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

.report-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  padding: 50px 24px 80px;
  gap: 42px;
}

.toc {
  position: sticky;
  top: 88px;
  align-self: start;
  display: grid;
  gap: 9px;
  font-size: 14px;
}

.toc a {
  color: var(--slate);
  text-decoration: none;
}

.article {
  min-width: 0;
  width: 100%;
  max-width: 820px;
}

.article h1 {
  font-size: 46px;
}

.article h2 {
  margin-top: 48px;
  font-size: 28px;
}

.article h3 {
  margin-top: 28px;
  font-size: 20px;
}

.article p,
.article li {
  color: #334148;
  font-size: 17px;
}

.article p {
  margin-top: 16px;
}

.article ul {
  padding-left: 22px;
}

.table-wrap {
  position: relative;
  margin-top: 20px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f1f5f3;
  color: var(--slate);
  font-size: 13px;
}

.callout {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 4px solid var(--teal);
  background: #eef7f5;
  color: #2d4147;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 30px 24px;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 860px) {
  .nav {
    align-items: center;
    min-height: 56px;
    padding: 10px 14px;
    gap: 14px;
    overflow: hidden;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 16px;
  }

  .nav-links {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    gap: 8px;
    margin-right: -14px;
    padding-right: 14px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    min-height: 32px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 1.25;
  }

  .hero-inner,
  .section-head,
  .report-layout,
  .brief-lead-panel,
  .brief-action-panel {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
    padding: 34px 18px 44px;
  }

  .section {
    padding: 52px 18px;
  }

  h1 {
    font-size: 38px;
  }

  .lede {
    font-size: 18px;
  }

  .report-layout {
    padding: 26px 16px 58px;
    gap: 22px;
  }

  .article h1 {
    max-width: 100%;
    font-size: 34px;
    overflow-wrap: anywhere;
  }

  .article h2 {
    margin-top: 34px;
    font-size: 24px;
  }

  .article h3 {
    margin-top: 22px;
  }

  .hero-visual {
    min-height: 360px;
  }

  .field-brief-visual {
    min-height: 320px;
  }

  .brief-action-panel .hero-actions {
    margin-top: 8px;
  }

  .graph-feature iframe,
  .graph-feature.compact iframe {
    height: 720px;
  }

  .metrics,
  .finding-grid,
  .link-grid,
  .audit-deliverables,
  .audit-grid {
    grid-template-columns: 1fr;
  }

  .audit-brief-lines {
    grid-template-columns: 1fr;
  }

  .request-fallback {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    display: flex;
    gap: 8px;
    margin: -2px -16px 2px;
    padding: 0 16px 14px;
    overflow-x: auto;
    border-bottom: 1px solid var(--line);
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .toc::-webkit-scrollbar {
    display: none;
  }

  .toc a {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(23, 33, 38, 0.12);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
  }

  .table-wrap {
    box-shadow: inset -24px 0 22px -26px rgba(23, 33, 38, 0.55);
  }

  .table-wrap::before {
    content: "More columns to the right";
    position: sticky;
    left: 0;
    z-index: 1;
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 0 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
    color: var(--muted);
    font-size: 12px;
    font-weight: 680;
  }

  table {
    min-width: 640px;
  }

  .bar-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .footer-inner {
    flex-direction: column;
  }
}
