
:root {
  --paper: oklch(0.972 0.012 85);
  --cream: oklch(0.945 0.018 82);
  --forest: oklch(0.36 0.045 155);
  --moss: oklch(0.62 0.055 145);
  --clay: oklch(0.66 0.15 40);
  --amber: oklch(0.85 0.11 82);
  --ink: oklch(0.22 0.01 130);
  --card: oklch(1 0 0);
  color-scheme: light;
}
:root.dark {
  --paper: oklch(0.22 0.012 80);
  --cream: oklch(0.28 0.015 80);
  --forest: oklch(0.72 0.08 150);
  --moss: oklch(0.68 0.06 145);
  --clay: oklch(0.72 0.14 40);
  --amber: oklch(0.85 0.12 82);
  --ink: oklch(0.94 0.01 85);
  --card: oklch(0.27 0.015 80);
  color-scheme: dark;
}
:root {
  --line: color-mix(in oklab, var(--forest) 12%, transparent);
  --line-soft: color-mix(in oklab, var(--forest) 6%, transparent);
  /* Secondary text mixes toward ink, not toward transparent: a forest tint
     faded against the page reads as low-contrast green in dark mode, where
     forest is itself a pale green. Blending ink into paper keeps the same
     hierarchy at a contrast ratio that survives both themes. */
  --muted: color-mix(in oklab, var(--ink) 72%, var(--paper));
  --faint: color-mix(in oklab, var(--ink) 52%, var(--paper));
  --sans: "Work Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Fraunces", ui-serif, Georgia, serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}
/* The app's paper grain, at the same weight. Fixed so it reads as the sheet the
   page is printed on rather than something that scrolls with the text. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }

h1, h2, h3, h4 { font-family: var(--serif); letter-spacing: -0.01em; font-weight: 600; }
h1 { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); line-height: 1.08; margin: 0 0 .6rem; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 .6rem; color: var(--forest); }
h3 { font-size: 1.05rem; margin: 0 0 .3rem; }
p { margin: 0 0 1.05rem; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay); }
strong { font-weight: 600; }

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.35rem; }
.wrap-wide { max-width: 64rem; margin: 0 auto; padding: 0 1.35rem; }

/* Micro-label: the app's text-[10px] uppercase tracking-widest, used above every
   section heading so the page scans like the report does. */
.label {
  font-family: var(--sans); font-size: .625rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: var(--faint);
  display: block; margin-bottom: .35rem;
}

header.site {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in oklab, var(--paper) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
header.site .wrap-wide { display: flex; align-items: center; gap: 1.1rem; height: 62px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.22rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand span { color: var(--moss); }
header.site nav { margin-left: auto; display: flex; align-items: center; gap: .35rem; }
header.site nav a {
  font-size: .88rem; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: .4rem .75rem; border-radius: 999px;
}
header.site nav a:hover { color: var(--ink); background: var(--line-soft); }
header.site nav a[aria-current] { color: var(--ink); background: var(--line-soft); }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; margin-left: .3rem; padding: 0;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.theme-toggle:hover { color: var(--ink); border-color: color-mix(in oklab, var(--moss) 45%, transparent); }
.theme-toggle svg { width: 16px; height: 16px; }
:root:not(.dark) .theme-toggle .moon, :root.dark .theme-toggle .sun { display: none; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .94rem;
  padding: .78rem 1.4rem; border-radius: 1rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s cubic-bezier(0.34, 1.56, 0.64, 1), background .15s, border-color .15s;
}
.btn:active { transform: scale(0.96); }
.btn-primary { background: var(--forest); color: var(--paper); }
.btn-primary:hover { background: color-mix(in oklab, var(--forest) 88%, var(--ink)); color: var(--paper); }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: color-mix(in oklab, var(--moss) 55%, transparent); color: var(--ink); }

@keyframes fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fade-up .6s cubic-bezier(0.19, 1, 0.22, 1) both; }
.fade-up-2 { animation-delay: .08s; }
.fade-up-3 { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; }
  html { scroll-behavior: auto; }
}

.hero { padding: 5rem 0 3.5rem; text-align: center; }
.hero h1 { text-wrap: balance; }
.hero .lede { font-size: 1.16rem; color: var(--muted); max-width: 33rem; margin: 0 auto 2rem; text-wrap: pretty; }
.hero .cta { display: flex; gap: .65rem; flex-wrap: wrap; justify-content: center; }

.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(24rem, 1fr)); margin: 3.5rem 0; }
.feature {
  background: color-mix(in oklab, var(--cream) 70%, transparent);
  border: 1px solid var(--line); border-radius: 1.75rem; padding: 1.6rem 1.5rem;
}
.feature h3 { color: var(--forest); }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; text-wrap: pretty; }

/* Risk chips reuse the app's adaptive tone mixes so a verdict reads the same
   colour here as on a report, in both themes. */
.risk {
  display: inline-flex; align-items: center; font-family: var(--sans);
  font-size: .625rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .7rem; border-radius: 999px; white-space: nowrap;
}
.risk-none { background: color-mix(in oklab, var(--moss) 18%, transparent); color: color-mix(in oklab, var(--moss) 70%, var(--ink)); }
.risk-limited { background: color-mix(in oklab, var(--amber) 22%, transparent); color: color-mix(in oklab, var(--amber) 55%, var(--ink)); }
.risk-moderate { background: color-mix(in oklab, var(--clay) 18%, transparent); color: color-mix(in oklab, var(--clay) 75%, var(--ink)); }
.risk-hazard { background: color-mix(in oklab, var(--clay) 30%, transparent); color: color-mix(in oklab, var(--clay) 88%, var(--ink)); }
.risk-lg { font-size: .7rem; padding: .4rem .9rem; }

.dir-head { padding: 2.6rem 0 1.4rem; max-width: 40rem; }
.dir-head h1 { margin-bottom: .7rem; }
.dir-head p { color: var(--muted); margin: 0; text-wrap: pretty; }

.searchbar {
  position: sticky; top: 62px; z-index: 10;
  background: color-mix(in oklab, var(--paper) 88%, transparent);
  backdrop-filter: blur(12px);
  padding: 1rem 0 .9rem; margin-bottom: .5rem;
  border-bottom: 1px solid var(--line-soft);
}
input[type=search] {
  width: 100%; padding: .85rem 1.1rem; font-size: 1rem; font-family: var(--sans);
  color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 1rem;
  -webkit-appearance: none;
}
input[type=search]::placeholder { color: var(--faint); }
input[type=search]:focus {
  outline: none; border-color: color-mix(in oklab, var(--moss) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--moss) 16%, transparent);
}
.filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .7rem; }
.chip {
  font-family: var(--sans); font-size: .78rem; font-weight: 600;
  letter-spacing: .02em; padding: .35rem .8rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { color: var(--ink); }
.chip[aria-pressed=true] { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.count { font-size: .84rem; color: var(--faint); margin: .9rem 0 .6rem; }

ul.results { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
ul.results li a {
  display: grid; grid-template-columns: 4.3rem 1fr auto; align-items: center; gap: .3rem .9rem;
  background: var(--card); border: 1px solid var(--line-soft); border-radius: 1.15rem;
  padding: .9rem 1.1rem; text-decoration: none; color: var(--ink);
  transition: border-color .15s, transform .12s;
}
ul.results li a:hover { border-color: color-mix(in oklab, var(--moss) 45%, transparent); transform: translateY(-1px); }
ul.results .code { font-family: var(--serif); font-size: .9rem; color: var(--faint); font-variant-numeric: tabular-nums; }
ul.results .name { font-weight: 600; font-size: 1rem; }
ul.results .summary { grid-column: 2 / -1; color: var(--muted); font-size: .89rem; text-wrap: pretty; }
@media (max-width: 34rem) {
  ul.results li a { grid-template-columns: 1fr auto; }
  ul.results .code { grid-column: 1 / -1; }
  ul.results .summary { grid-column: 1 / -1; }
}

article header.page { padding: 3rem 0 0; }
.eyebrow { font-family: var(--sans); font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.summary-line { font-family: var(--serif); font-size: 1.35rem; line-height: 1.45; color: var(--ink); margin: 1rem 0 1.3rem; text-wrap: pretty; }
.metarow { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-top: .9rem; }
.tag { font-family: var(--sans); font-size: .72rem; font-weight: 500; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .25rem .7rem; }

section { margin: 2.6rem 0; }
.factgrid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); margin: 1.6rem 0 0; }
.fact { background: color-mix(in oklab, var(--cream) 70%, transparent); border: 1px solid var(--line-soft); border-radius: 1.15rem; padding: .9rem 1.05rem; }
.fact dt { font-family: var(--sans); font-size: .625rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); margin-bottom: .25rem; }
.fact dd { margin: 0; font-size: .96rem; font-weight: 500; }

.panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: 1.4rem; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: .8rem 1.1rem; vertical-align: top; }
thead th { font-family: var(--sans); font-size: .625rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); background: var(--line-soft); }
tbody tr + tr { border-top: 1px solid var(--line-soft); }
td em { color: var(--muted); }

.concern { border-left: 2px solid color-mix(in oklab, var(--clay) 40%, transparent); padding: .15rem 0 .15rem 1.15rem; margin: 1.4rem 0; }
.concern h3 { color: var(--ink); }
.concern .who { font-size: .78rem; color: var(--faint); letter-spacing: .01em; margin-bottom: .5rem; }
.concern p { margin-bottom: .6rem; }
.concern a { font-size: .89rem; }

ol.steps { padding-left: 1.2rem; margin: 0; }
ol.steps li { margin-bottom: .55rem; padding-left: .2rem; }
ol.steps::marker, ol.steps li::marker { color: var(--faint); font-family: var(--serif); }

ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
ul.plain li { padding-left: 1.1rem; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 0; top: .68em; width: 5px; height: 5px; border-radius: 999px; background: color-mix(in oklab, var(--moss) 55%, transparent); }

ul.refs { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .93rem; }
ul.refs .pub { color: var(--faint); }

.callout {
  background: color-mix(in oklab, var(--moss) 10%, transparent);
  border: 1px solid color-mix(in oklab, var(--moss) 25%, transparent);
  border-radius: 1.75rem; padding: 1.5rem 1.6rem; margin: 3rem 0 0;
}
.callout h2 { margin-bottom: .35rem; }
.callout p { color: var(--muted); font-size: .96rem; margin-bottom: 1.1rem; text-wrap: pretty; }

.updated { font-size: .8rem; color: var(--faint); margin-top: 2.5rem; }
.backlink { font-size: .9rem; font-weight: 500; text-decoration: none; display: inline-block; margin-top: .6rem; }
.backlink:hover { text-decoration: underline; }

footer.site { margin-top: 5rem; border-top: 1px solid var(--line-soft); background: color-mix(in oklab, var(--cream) 55%, transparent); }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 1.1rem; padding-top: 2rem; padding-bottom: 2.75rem; font-size: .86rem; color: var(--muted); }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--ink); text-decoration: underline; }

.js-only { display: none; }
