/* AgenticFides — site stylesheet
   Two typefaces: Newsreader (variable serif, with optical sizes) for h1-h3,
   Source Sans 3 (variable) for body, interface and wordmark. One accent, flat surfaces.
   Self-hosted type (SIL Open Font License). No third-party requests. */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('fonts/newsreader-latin-opsz-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 200 900; font-display: swap; src: url('fonts/source-sans-3-latin-wght-normal.woff2') format('woff2'); }
/* Metric-matched fallbacks: system fonts resized to the web fonts' proportions so text does not reflow when the web fonts arrive. */
@font-face { font-family: 'Newsreader Fallback'; src: local('Times New Roman'), local('TimesNewRomanPSMT'), local('Liberation Serif'); size-adjust: 109.51%; ascent-override: 67.12%; descent-override: 24.2%; line-gap-override: 0%; }
@font-face { font-family: 'Source Sans 3 Fallback'; src: local('Arial'), local('ArialMT'), local('Liberation Sans'); size-adjust: 94.72%; ascent-override: 108.1%; descent-override: 42.23%; line-gap-override: 0%; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/ibm-plex-mono-latin-500.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/ibm-plex-mono-latin-600.woff2') format('woff2'); }

:root {
  /* Surfaces */
  --ink: #0b1326;            /* near-black navy: hero, footer, dark band, primary buttons */
  --ink-2: #141d33;          /* raised surface on ink */
  --white: #ffffff;
  --mist: #f4f6f9;           /* alternate sections, flat panels */
  --mist-2: #e9edf2;         /* pressed / hover on mist */
  /* Text */
  --text: #0b1326;
  --text-2: #4b5567;         /* supporting copy */
  --text-3: #7a8494;         /* captions, footnotes */
  --on-ink: #ffffff;
  --on-ink-2: #aeb7c6;
  --on-ink-3: #7d879a;
  /* Accent */
  --blue: #22407f;           /* deep navy-blue: links, small labels, wordmark accent */
  --blue-deep: #182f60;      /* hover */
  --blue-tint: #ebeff6;
  --blue-on-ink: #a9bbe0;    /* muted light blue for labels and accents on ink */
  /* Lines */
  --line: #e2e6ec;
  --line-strong: #c9d0da;
  --line-ink: rgba(255,255,255,.14);
  /* Status (unchanged) */
  --amber: #b57b00;
  --amber-bg: #fff6dc;
  --green: #168454;
  --green-bg: #e7f4ed;
  --zone-low: #8db38b;
  --zone-medium: #e3c05b;
  --zone-high: #d9823b;
  --zone-critical: #b4322b;
  /* Layout */
  --max: 1200px;
  --gutter: 24px;
  --radius: 6px;
  --radius-lg: 12px;
  --section: clamp(44px, 5vw, 72px);
  --serif: 'Newsreader', 'Newsreader Fallback', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Source Sans 3 Fallback', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 84px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' 0;
}
a { color: inherit; }
main p a, main li a, main dd a, main td a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
main p a:hover, main li a:hover, main dd a:hover, main td a:hover { color: var(--blue-deep); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.dark :focus-visible, .hero-home :focus-visible, .page-hero :focus-visible, .site-footer :focus-visible, .scenario-drawer :focus-visible { outline-color: #fff; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 10px 14px; transform: translateY(-160%); background: var(--white); color: var(--text); border-radius: var(--radius); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.container { width: min(calc(100% - 2 * var(--gutter)), var(--max)); margin-inline: auto; }

/* ---------- Type ---------- */
h1, h2, h3 { margin: 0; color: inherit; font-family: var(--serif); font-weight: 500; text-wrap: balance; }
/* One page-title scale for every page (home hero, page heroes, legal pages, profile document). */
h1 { font-size: clamp(2.3rem, 3.8vw, 3.5rem); line-height: 1.06; letter-spacing: -.012em; }
h2 { font-size: clamp(1.8rem, 2.9vw, 2.6rem); line-height: 1.12; letter-spacing: -.008em; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: 0; font-weight: 600; }
/* Thin serif strokes on ink: a touch more weight so headlines hold up on lower-resolution screens. */
.hero-home h1, .page-hero h1, .section.dark h2 { font-weight: 550; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; }

/* Small labels: sentence case, medium weight, no tracking. */
.eyebrow, .kicker, .micro, .number, .section-label {
  display: block;
  margin: 0 0 10px;
  color: var(--blue);
  font-size: .88rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.number { margin-bottom: 8px; }
.eyebrow.light { color: var(--blue-on-ink); }
.muted { color: var(--text-2); }
.id { font-family: var(--mono); font-weight: 500; font-size: .92em; }

/* ---------- Header ---------- */
[data-site-header]:empty { min-height: 68px; background: var(--white); }
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.nav-wrap { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 1.15rem; font-weight: 600; letter-spacing: -.005em; }
.brand img { width: 28px; height: 28px; }
.brand-fides { color: var(--blue); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a { padding: 8px 12px; border-radius: var(--radius); color: var(--text-2); font-size: .92rem; font-weight: 500; text-decoration: none; }
.site-nav a:hover { color: var(--text); background: var(--mist); }
.site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .nav-cta { margin-left: 10px; padding: 9px 16px; color: var(--on-ink); background: var(--ink); }
.site-nav .nav-cta:hover { background: #1d2740; color: #fff; }
.menu-button { display: none; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text); background: transparent; font-weight: 500; }

/* ---------- Buttons ---------- */
.actions, .page-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.005em;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.button.primary { background: var(--ink); color: #fff; }
.button.primary:hover { background: #1d2740; }
/* On ink: the primary button inverts to white. */
.hero-home .button.primary, .page-hero .button.primary, .section.dark .button.primary { background: #fff; color: var(--ink); }
.hero-home .button.primary:hover, .page-hero .button.primary:hover, .section.dark .button.primary:hover { background: #e6e9f0; }
.button.ink { background: var(--ink); color: #fff; }
.button.ink:hover { background: #1d2740; }
.button.outline { border-color: var(--line-strong); color: var(--text); background: transparent; }
.button.outline:hover { border-color: var(--text); }
.button.secondary { border-color: rgba(255,255,255,.3); color: #fff; background: transparent; }
.button.secondary:hover { border-color: #fff; background: rgba(255,255,255,.06); }

/* ---------- Heroes ---------- */
.hero-home, .page-hero { color: var(--on-ink); background: var(--ink); }
.hero-home .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
  gap: clamp(32px, 4vw, 56px);
  align-items: center;
  padding: clamp(28px, 3vw, 40px) 0;
}
.hero-home h1 { max-width: 16ch; }
.hero-home .hero-copy > p.hero-question {
  max-width: 40ch;
  margin: 18px 0 0;
  color: #fff;
  font-size: clamp(1.1rem, 1.4vw, 1.25rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -.005em;
}
.hero-home .hero-copy > p:not(.eyebrow):not(.hero-question) { max-width: 50ch; margin: 10px 0 0; color: var(--on-ink-2); font-size: 1rem; line-height: 1.55; }
.hero-home .actions { margin-top: 22px; }

/* Risk Map in the hero: the real component, rendered static and scaled to the column */
.hero-map { display: block; min-width: 0; color: var(--text); text-decoration: none; border-radius: var(--radius-lg); }
.hero-map:hover .risk-plot { border-color: rgba(255,255,255,.55); }
.hero-plot { border-color: rgba(255,255,255,.22); }
.hero-plot .plot-title { padding: 9px 14px; font-size: .8rem; }
.hero-plot .heatmap-scroll { overflow: visible; padding: 10px; }
.hero-plot .risk-heatmap { min-width: 0; border-spacing: 3px; }
.hero-plot .risk-heatmap thead th { height: 40px; padding: 5px 4px; font-size: .66rem; }
.hero-plot .risk-heatmap thead th strong { font-size: .85rem; }
.hero-plot .risk-heatmap .matrix-corner, .hero-plot .risk-heatmap tbody th { width: 96px; padding: 5px 8px; font-size: .66rem; }
.hero-plot .risk-heatmap .matrix-corner { font-size: .62rem; line-height: 1.2; }
.hero-plot .risk-heatmap .matrix-corner span { font-size: .6rem; margin-top: 4px; white-space: nowrap; }
.hero-plot .risk-heatmap tbody th strong { font-size: .85rem; }
.hero-plot .risk-heatmap td { height: 46px; padding: 4px; }
.hero-plot .scenario-marker { min-width: 0; padding: 4px 6px; font-size: .64rem; cursor: inherit; }
.hero-plot .heatmap-legend { padding: 0 14px 12px; font-size: .76rem; gap: 4px 14px; }
.hero-plot .heatmap-note { display: none; }

.page-hero { padding: clamp(40px, 4.5vw, 56px) 0; }
.page-hero h1 { max-width: 20ch; }
.page-hero p:not(.eyebrow) { max-width: 60ch; margin: 18px 0 0; color: var(--on-ink-2); font-size: 1rem; line-height: 1.55; }
/* Split page hero (content pages): heading left, intro and actions right. Stacks below 900px. */
@media (min-width: 900px) {
  .page-hero.split .container { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(40px, 6vw, 96px); align-items: start; }
  .page-hero.split .eyebrow { grid-column: 1; grid-row: 1; }
  .page-hero.split h1 { grid-column: 1; grid-row: 2 / span 2; }
  /* Intro starts level with the top of the headline. */
  .page-hero.split p:not(.eyebrow) { grid-column: 2; grid-row: 2; margin-top: 0; padding-top: .45rem; }
  .page-hero.split .page-actions { grid-column: 2; grid-row: 3; }
}

/* ---------- Sections ---------- */
.section { padding: var(--section) 0; }
.section.alt { background: var(--mist); }
.section.dark { background: var(--ink); color: var(--on-ink); }
.section.dark .eyebrow.light { color: var(--blue-on-ink); }
.section.dark .section-heading > p { color: var(--on-ink-2); }
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  margin-bottom: clamp(22px, 2.5vw, 32px);
}
.section-heading.compact-heading { margin-bottom: 22px; }
.section-heading > p { max-width: 52ch; margin: 0; padding-top: .3em; color: var(--text-2); font-size: 1rem; }
.section-heading > p:empty { display: none; }
.bridge-copy { max-width: 62ch; margin-top: 24px; }
.bridge-copy:has(h2) { margin-top: clamp(40px, 4vw, 56px); }
.bridge-copy p { color: var(--text-2); font-size: 1rem; }
.bridge-copy h2 { margin-bottom: 12px; }
.section .bridge-copy + .research-list { margin-top: 20px; }

/* ---------- Construct grid (hairline sequence) ---------- */
.construct-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.construct-grid.four-up { grid-template-columns: repeat(4, 1fr); }
.construct-card { padding: 20px 24px 0 0; margin-right: 24px; border-top: 2px solid var(--ink); margin-top: -1px; }
.construct-card:last-child { margin-right: 0; }
.construct-card span { display: block; color: var(--text-3); font-size: .88rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.construct-card h3 { margin-top: 22px; font-size: 1.25rem; }
.construct-card p { margin: 8px 0 0; color: var(--text-2); font-size: .95rem; }

/* ---------- Definition rows ---------- */
.definition-list { border-top: 1px solid var(--line); }
.definition-row { display: grid; grid-template-columns: 170px 260px minmax(0, 1fr); gap: 32px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.definition-row span { color: var(--text-3); font-size: .92rem; font-weight: 500; }
.definition-row strong { font-size: 1.05rem; letter-spacing: -.01em; }
.definition-row p { margin: 0; color: var(--text-2); }
.section.alt .definition-list, .section.alt .definition-row { border-color: #d9dfe7; }

/* ---------- Cards (flat panels) ---------- */
.card-grid, .output-grid { display: grid; gap: 12px; }
.card-grid { grid-template-columns: repeat(3, 1fr); }
.output-grid { grid-template-columns: repeat(2, 1fr); }
.card, .output-card { padding: 24px; border-radius: var(--radius-lg); background: var(--mist); }
.section.alt .card, .section.alt .output-card { background: var(--white); }
.card h3, .output-card h3 { font-size: 1.25rem; }
.card p, .output-card p { margin: 8px 0 0; color: var(--text-2); font-size: .95rem; }

/* ---------- Two-column lists ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.two-col h3 { font-size: 1.3rem; margin-bottom: 14px; }
.fit-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.fit-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.fit-list strong { display: block; }
.fit-list span { display: block; margin-top: 3px; color: var(--text-2); font-size: .95rem; }

/* ---------- Notes & boundaries ---------- */
.boundary-box { margin-top: 20px; padding: 14px 18px; border-radius: var(--radius); background: var(--amber-bg); color: #3f3620; font-size: .95rem; line-height: 1.55; }
.boundary-box strong { color: #2d2614; }
.positive-box { background: var(--green-bg); color: #1b3d2c; }
.positive-box strong { color: #12301f; }
.section.dark .boundary-box { background: rgba(255,255,255,.06); color: var(--on-ink-2); }
.section.dark .boundary-box strong { color: #fff; }
.boundary-note { margin: 18px 0 0; color: var(--text-3); font-size: .88rem; }
.boundary-box + .boundary-box { margin-top: 10px; }

/* ---------- Tables ---------- */
.table-frame { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); }
.decision-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.decision-table th, .decision-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.decision-table thead th { padding-block: 11px; color: var(--text-3); background: var(--mist); font-size: .88rem; font-weight: 500; }
.decision-table tbody th { font-size: 1rem; font-weight: 600; letter-spacing: -.01em; }
.decision-table td { color: var(--text-2); font-size: .95rem; line-height: 1.55; }
.decision-table tr:last-child th, .decision-table tr:last-child td { border-bottom: 0; }
.decision-table th:nth-child(1) { width: 18%; }
.decision-table th:nth-child(2) { width: 30%; }
.decision-table th:nth-child(3) { width: 29%; }
.decision-table th:nth-child(4) { width: 23%; }
.three-column-table th:nth-child(1) { width: 22%; }
.three-column-table th:nth-child(2) { width: 44%; }
.three-column-table th:nth-child(3) { width: 34%; }

/* ---------- Record sheets ---------- */
.record-sheet { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.record-column { padding: 24px; border-radius: var(--radius-lg); background: var(--mist); }
.record-column h3 { margin: 2px 0 8px; font-size: 1.2rem; }
.record-column p { margin: 0; color: var(--text-2); font-size: .98rem; }
.section.dark .record-column { background: var(--ink-2); }
.section.dark .record-column p { color: var(--on-ink-2); }
.section.dark .record-column .number { color: var(--blue-on-ink); }

/* ---------- Process ledger (numbered: a real sequence) ---------- */
.process-ledger { border-top: 1px solid var(--line); }
.process-ledger > div { display: grid; grid-template-columns: 72px 260px minmax(0, 1fr); gap: 32px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line); }
.process-ledger span { color: var(--text-3); font-size: 1.5rem; font-weight: 500; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.process-ledger strong { font-size: 1.1rem; letter-spacing: -.01em; }
.process-ledger p { margin: 0; color: var(--text-2); }

/* ---------- Evidence tiers ---------- */
.evidence-ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.evidence-ledger > div { padding: 22px; border-radius: var(--radius-lg); background: var(--ink-2); }
.evidence-ledger span { font-family: var(--mono); font-weight: 600; font-size: .95rem; color: var(--blue-on-ink); }
.evidence-ledger strong { display: block; margin-top: 12px; font-size: 1.1rem; }
.evidence-ledger p { margin: 8px 0 0; color: var(--on-ink-2); font-size: .95rem; }

/* ---------- People ---------- */
.founders-compact { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.founder-compact { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 20px; align-items: start; padding: 22px; border-radius: var(--radius-lg); background: var(--mist); }
.founder-compact img { width: 88px; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius); }
.founder-compact h3 { margin: 0; font-size: 1.3rem; }
.founder-compact .number { margin-bottom: 6px; color: var(--text-3); }
.founder-compact p { margin: 10px 0 0; color: var(--text-2); font-size: .95rem; }
.section.alt .founder-compact { background: var(--white); }

/* ---------- Research list ---------- */
.research-list { border-top: 1px solid var(--line); }
.research-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) 24px; gap: 28px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.research-item:hover h3 { color: var(--blue); }
.research-item span { color: var(--text-3); font-size: .92rem; font-weight: 500; padding-top: .15em; }
.research-item h3 { font-size: 1.02rem; font-weight: 600; letter-spacing: -.01em; text-wrap: pretty; }
.research-item p { margin: 2px 0 0; color: var(--text-3); font-size: .92rem; }
.research-item b { font-weight: 500; color: var(--text-3); }
.section.alt .research-list, .section.alt .research-item { border-color: #d9dfe7; }

/* ---------- Closing bands ---------- */
.pilot, .closing-cta { background: var(--mist); border-top: 1px solid var(--line); }
.closing-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 80px); align-items: end; padding-block: clamp(40px, 4.5vw, 60px); }
.closing-grid h2 { max-width: 18ch; }
.closing-grid p:not(.eyebrow) { max-width: 46ch; color: var(--text-2); font-size: 1rem; }
.closing-grid > div:last-child { padding-bottom: .2em; }
.closing-grid .button { margin-top: 16px; }
.closing-grid .actions .button { margin-top: 0; }
.closing-grid .actions { margin-top: 16px; }
.pilot .eyebrow.light, .closing-cta .eyebrow.light { color: var(--blue); }

/* ---------- Footer ---------- */
.site-footer { padding-block: 40px 20px; background: var(--ink); color: var(--on-ink); }
.footer-top { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 40px; }
.footer-top p { max-width: 36ch; margin: 14px 0 0; color: var(--on-ink-2); }
.site-footer .brand-fides { color: var(--blue-on-ink); }
.footer-links { display: grid; align-content: start; gap: 8px; }
.footer-links span { margin-bottom: 6px; color: var(--on-ink-3); font-size: .88rem; font-weight: 500; }
.footer-links a { color: #e3e8f1; text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line-ink); color: var(--on-ink-3); font-size: .85rem; }

/* ---------- Legal pages ---------- */
.legal-page { min-height: 65vh; padding: clamp(40px, 4.5vw, 56px) 0 clamp(48px, 5vw, 72px); }
.legal-page h1 { max-width: 20ch; }
.legal-page h1 + p { margin-top: 24px; }
.legal-page h2 { margin-top: 36px; margin-bottom: 10px; font-size: 1.5rem; }
.legal-page p, .legal-page li { max-width: 68ch; color: var(--text-2); }

/* ---------- Risk Map ---------- */
.risk-map-experience { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .7fr); gap: 12px; align-items: start; }
.risk-plot { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.plot-title { display: flex; justify-content: space-between; gap: 20px; padding: 14px 20px; border-bottom: 1px solid var(--line); color: var(--text-3); font-size: .9rem; font-weight: 500; }
.plot-title span:last-child { color: var(--text); }
.heatmap-scroll { overflow-x: auto; padding: 16px; }
.risk-heatmap { width: 100%; min-width: 720px; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
.risk-heatmap caption { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.risk-heatmap th, .risk-heatmap td { border: 0; }
.risk-heatmap thead th { height: 56px; padding: 8px 6px; color: var(--text-2); background: var(--mist); border-radius: 4px; font-size: .8rem; font-weight: 500; line-height: 1.25; text-align: center; }
.risk-heatmap thead th strong { display: block; color: var(--text); font-size: 1rem; }
.risk-heatmap .matrix-corner { width: 150px; padding: 9px 12px; text-align: left; }
.risk-heatmap .matrix-corner span { display: block; margin-top: 4px; color: var(--text-3); font-size: .75rem; }
.risk-heatmap tbody th { width: 150px; padding: 9px 12px; color: var(--text-2); background: var(--mist); border-radius: 4px; font-size: .8rem; font-weight: 500; line-height: 1.2; text-align: left; }
.risk-heatmap tbody th strong { display: block; color: var(--text); font-size: 1rem; }
.risk-heatmap td { position: relative; height: 74px; padding: 7px; border-radius: 4px; text-align: center; vertical-align: middle; }
.zone-low { background: var(--zone-low); } .zone-medium { background: var(--zone-medium); } .zone-high { background: var(--zone-high); } .zone-critical { background: var(--zone-critical); }
.zone-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.cell-records { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.scenario-marker { min-width: 52px; padding: 5px 8px; border: 1px solid rgba(11,19,38,.25); border-radius: 4px; color: var(--text); background: rgba(255,255,255,.96); font: 600 .72rem var(--mono); cursor: pointer; transition: background .15s, color .15s, border-color .15s, box-shadow .15s; }
.scenario-marker:hover, .scenario-marker:focus-visible, .scenario-marker.selected { color: #fff; background: var(--ink); border-color: var(--ink); box-shadow: 0 0 0 3px rgba(255,255,255,.9); outline: 0; }
.heatmap-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 2px 20px 0; list-style: none; color: var(--text-2); font-size: .85rem; }
.heatmap-legend li { display: inline-flex; align-items: center; gap: 8px; }
.heatmap-legend i { width: 12px; height: 12px; border-radius: 3px; }
.heatmap-note { margin: 0; padding: 10px 20px 18px; color: var(--text-3); font-size: .85rem; }
.scenario-drawer { padding: 28px; border-radius: var(--radius-lg); color: var(--on-ink); background: var(--ink); scroll-margin-top: 84px; }
.scenario-drawer > span { display: block; color: var(--blue-on-ink); font-size: .85rem; font-weight: 500; }
.scenario-drawer h3 { margin-top: 12px; font-size: 1.6rem; letter-spacing: 0; }
.scenario-drawer > p { margin-top: 12px; color: var(--on-ink-2); font-size: .98rem; }
.scenario-drawer dl { margin: 24px 0 0; border-top: 1px solid var(--line-ink); }
.scenario-drawer dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line-ink); }
.scenario-drawer dt { color: var(--on-ink-3); font-size: .92rem; }
.scenario-drawer dd { margin: 0; font-weight: 500; text-align: right; }
.scenario-drawer .drawer-note { margin-top: 22px; color: var(--on-ink-3); font-size: .85rem; }

/* ---------- Illustrative Risk Profile (document) ---------- */
.print-controls { justify-content: flex-end; margin: 0 0 14px; }
.section:has(> .container > .print-controls) { padding-top: 24px; }
.profile-document { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.profile-doc-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; padding: clamp(24px, 3.5vw, 40px); color: var(--on-ink); background: var(--ink); }
.profile-doc-header h1 { max-width: 16ch; }
.profile-doc-header > div > p:not(.eyebrow) { max-width: 60ch; margin: 16px 0 0; color: var(--on-ink-2); font-size: 1rem; line-height: 1.55; }
.illustrative-stamp { align-self: start; padding: 8px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: var(--radius); color: #fff; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.profile-meta-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); background: var(--mist); }
.profile-meta-grid > div { min-width: 0; padding: 14px 20px; border-right: 1px solid var(--line); }
.profile-meta-grid > div:nth-child(4n) { border-right: 0; }
.profile-meta-grid > div:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
.profile-meta-grid span { display: block; color: var(--text-3); font-size: .85rem; }
.profile-meta-grid strong { display: block; margin-top: 4px; font-size: .95rem; line-height: 1.4; }
.profile-meta-grid > div:first-child strong { font-family: var(--mono); font-weight: 600; }
.profile-doc-section { padding: clamp(24px, 3.5vw, 40px); border-bottom: 1px solid var(--line); }
.profile-doc-section:last-child { border-bottom: 0; }
.profile-doc-section h2 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.profile-doc-section .section-heading { margin-bottom: 22px; }
.profile-signal { display: grid; grid-template-columns: .8fr 1.2fr; border-radius: var(--radius-lg); background: var(--blue-tint); }
.profile-signal > div { padding: 22px 24px; }
.profile-signal > div:first-child { border-right: 1px solid rgba(26,92,255,.18); }
.profile-signal span { display: block; color: var(--blue); font-size: .9rem; font-weight: 500; }
.profile-signal strong { display: block; margin-top: 8px; font-size: 1.6rem; line-height: 1.15; letter-spacing: -.01em; }
.profile-signal p { margin: 0; color: #2b3650; }
.profile-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.profile-metrics > div { padding: 16px 20px; border-radius: var(--radius-lg); background: var(--mist); }
.profile-metrics span { display: block; color: var(--text-3); font-size: .88rem; }
.profile-metrics strong { display: block; margin-top: 6px; font-size: 1.5rem; line-height: 1.15; letter-spacing: -.01em; }
.profile-scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.profile-scope-grid h3 { font-size: 1.35rem; }
.profile-scope-grid p { margin: 12px 0 0; color: var(--text-2); }
.profile-scope-grid .fit-list { margin-top: 14px; }
.exposure-table { table-layout: auto; }
.exposure-table th:nth-child(1) { width: 8%; }
.exposure-table th:nth-child(2) { width: 17%; }
.exposure-table th:nth-child(3) { width: 29%; }
.exposure-table th:nth-child(4) { width: 11%; }
.exposure-table th:nth-child(5) { width: 11%; }
.exposure-table th:nth-child(6) { width: 24%; }
.exposure-table tbody th { font-family: var(--mono); font-weight: 600; font-size: .85rem; }
.exposure-table td strong { display: block; color: var(--text); }
.exposure-table td small { display: block; margin-top: 6px; color: var(--text-3); font-size: .88rem; line-height: 1.45; }
.rating-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; color: var(--text); background: var(--mist-2); font-size: .8rem; font-weight: 500; white-space: nowrap; }
.rating-chip.referral { background: #f7e2d2; color: #6e3511; }
.rating-chip.gap { background: var(--amber-bg); color: #5b3f00; }
.rating-chip.adequate { background: var(--green-bg); color: #0f5a39; }
.condition-register { border-top: 1px solid var(--line); }
.condition-row { display: grid; grid-template-columns: 80px 1fr 1fr; gap: 28px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.condition-row > span { color: var(--blue); font: 600 .85rem/1.6 var(--mono); }
.condition-row strong { letter-spacing: -.01em; }
.condition-row p { margin: 0; color: var(--text-2); font-size: .95rem; }
.profile-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.profile-notes .fit-list { margin-top: 16px; }
.profile-source-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.profile-source-list li { padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text-2); font-size: .95rem; }
.profile-source-list a { color: var(--text); font-weight: 600; text-decoration: none; }
.profile-source-list a:hover { color: var(--blue); }

/* ---------- Responsive ---------- */
@media (max-width: 1060px) {
  .site-nav { gap: 2px; }
  .site-nav a { padding: 8px 9px; font-size: .88rem; }
  .definition-row { grid-template-columns: 140px 200px minmax(0, 1fr); gap: 20px; }
  .research-item { grid-template-columns: 120px minmax(0, 1fr) 24px; }
  .risk-map-experience { grid-template-columns: 1fr; }
  .scenario-drawer dl { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .scenario-drawer dl > div:nth-last-child(-n+2) { border-bottom: 0; }
  .construct-grid.four-up { grid-template-columns: repeat(2, 1fr); }
  .construct-grid.four-up .construct-card:nth-child(2n) { margin-right: 0; }
  .evidence-ledger { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .nav-wrap { flex-wrap: wrap; }
  .site-nav { width: 100%; padding-bottom: 16px; align-items: flex-start; flex-direction: column; }
  .js .menu-button { display: inline-flex; align-items: center; }
  .js .site-nav {
    width: auto;
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    padding: 12px 16px 20px;
    align-items: stretch;
    flex-direction: column;
    gap: 2px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
  }
  .js .site-nav a { padding: 12px 10px; font-size: 1rem; }
  .js .site-nav .nav-cta { margin: 10px 0 0; text-align: center; justify-content: center; display: flex; }
  .js .site-header.open .site-nav { display: flex; }
  .section-heading, .two-col, .closing-grid, .profile-scope-grid, .profile-notes, .profile-doc-header, .profile-signal, .hero-home .hero-grid { grid-template-columns: 1fr; }
  .hero-home .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .hero-map { max-width: 640px; }
  .section-heading > p { padding-top: 0; }
  .closing-grid { align-items: start; }
  .construct-grid { grid-template-columns: 1fr; border-top: 0; }
  .construct-card, .construct-grid.four-up .construct-card { margin-right: 0; padding-right: 0; }
  .construct-card h3 { margin-top: 14px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .record-sheet { grid-template-columns: 1fr; }
  .founders-compact { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-top > :first-child { grid-column: 1 / -1; }
  .profile-meta-grid, .profile-metrics { grid-template-columns: 1fr 1fr; }
  .profile-meta-grid > div:nth-child(2n) { border-right: 0; }
  .profile-meta-grid > div:nth-child(-n+6) { border-bottom: 1px solid var(--line); }
  .profile-signal > div:first-child { border-right: 0; border-bottom: 1px solid rgba(26,92,255,.18); }
  .illustrative-stamp { justify-self: start; }
  .process-ledger > div { grid-template-columns: 56px minmax(0, 1fr); gap: 10px 20px; }
  .process-ledger p { grid-column: 2; }
}

@media (max-width: 620px) {
  :root { --gutter: 16px; }
  h1, .hero-home h1, .page-hero h1, .legal-page h1, .profile-doc-header h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  h2 { font-size: clamp(1.6rem, 7.2vw, 2rem); }
  .hero-home .hero-copy > p.hero-question { margin-top: 20px; font-size: 1.15rem; }
  .section { padding: 40px 0; }
  .closing-grid { padding-block: 40px; }
  .hero-plot .plot-title { flex-direction: row; }
  .actions .button, .page-actions .button { flex: 1 1 auto; }
  .definition-row { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .card-grid, .output-grid, .evidence-ledger { grid-template-columns: 1fr; }
  .research-item { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 18px 0; }
  .research-item > span:first-child { grid-column: 1 / -1; }
  .founder-compact { grid-template-columns: 72px minmax(0, 1fr); gap: 16px; padding: 20px; }
  .founder-compact img { width: 72px; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-top > :first-child { grid-column: auto; }
  .footer-bottom { flex-direction: column; }
  .table-frame { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .decision-table, .decision-table tbody, .decision-table tr, .decision-table th, .decision-table td { display: block; width: 100% !important; }
  .decision-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .decision-table tr { margin-bottom: 12px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
  .decision-table tbody th, .decision-table tbody td { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
  .decision-table tbody th::before, .decision-table tbody td::before { content: attr(data-label); color: var(--text-3); font: 500 .8rem/1.5 var(--sans); }
  .decision-table tr > :last-child { border-bottom: 0; }
  .profile-meta-grid > div { padding: 14px 16px; }
  .profile-metrics > div { padding: 16px; }
  .profile-metrics strong { font-size: 1.25rem; }
  .condition-row { grid-template-columns: 1fr; gap: 6px; }
  .scenario-drawer dl { grid-template-columns: 1fr; }
  .scenario-drawer dl > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--line-ink); }
  .scenario-drawer dl > div:last-child { border-bottom: 0; }
  .plot-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .heatmap-scroll { padding: 10px; }
}

/* Risk Map on phones: fit the full 5 x 5 grid in the viewport; labels never drop below 11px */
@media (max-width: 700px) {
  .heatmap-scroll { overflow: visible; padding: 8px; }
  .risk-heatmap { min-width: 0; border-spacing: 2px; }
  .risk-heatmap thead th { height: auto; padding: 6px 2px; font-size: .6875rem; line-height: 1.15; }
  .risk-heatmap thead th strong { font-size: .8rem; }
  .risk-heatmap .matrix-corner, .risk-heatmap tbody th { width: 64px; padding: 6px 5px; font-size: .6875rem; line-height: 1.2; }
  .risk-heatmap .matrix-corner span { margin-top: 3px; font-size: .6875rem; }
  .risk-heatmap tbody th strong { font-size: .85rem; }
  .risk-heatmap td { height: 60px; padding: 3px 2px; }
  .cell-records { flex-direction: column; align-items: center; gap: 3px; }
  .scenario-marker { min-width: 0; padding: 3px 2px; font-size: .6875rem; white-space: nowrap; letter-spacing: -.02em; }
  .risk-heatmap td { padding-inline: 1px; }
  .heatmap-legend { padding: 4px 12px 0; font-size: .78rem; gap: 4px 12px; }
  .heatmap-note { padding: 8px 12px 12px; font-size: .78rem; }
}

@media (max-width: 700px) {
  .hero-plot .heatmap-scroll { padding: 8px; }
  .hero-plot .risk-heatmap { border-spacing: 2px; }
  .hero-plot .risk-heatmap thead th { height: auto; padding: 6px 2px; font-size: .6875rem; }
  .hero-plot .risk-heatmap thead th strong { font-size: .8rem; }
  .hero-plot .risk-heatmap .matrix-corner, .hero-plot .risk-heatmap tbody th { width: 64px; padding: 6px 5px; font-size: .6875rem; }
  .hero-plot .risk-heatmap .matrix-corner span { font-size: .6875rem; white-space: normal; }
  .hero-plot .risk-heatmap tbody th strong { font-size: .85rem; }
  .hero-plot .risk-heatmap td { height: 60px; padding: 3px 2px; }
  .hero-plot .scenario-marker { padding: 3px 2px; font-size: .6875rem; white-space: nowrap; letter-spacing: -.02em; }
}

/* Narrowest phones (under 350px): keep 11px labels and let the grid scroll sideways inside its frame. */
@media (max-width: 349px) {
  .heatmap-scroll, .hero-plot .heatmap-scroll { overflow-x: auto; }
  .risk-heatmap, .hero-plot .risk-heatmap { min-width: 318px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .scenario-marker { transition: none; }
}

/* ---------- Print (illustrative Risk Profile) ---------- */
@media print {
  @page { size: A4; margin: 12mm; }
  body { color: #111; background: #fff; font-size: 10pt; }
  .site-header, .site-footer, .print-controls, .closing-cta, .skip-link { display: none !important; }
  .container { width: 100%; max-width: none; }
  .section { padding: 0; }
  .profile-document { border: 0; border-radius: 0; }
  .profile-doc-header { background: #0b1326 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .decision-table thead th, .profile-meta-grid, .profile-metrics > div, .profile-signal, .record-column, .boundary-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .profile-doc-header, .profile-meta-grid, .profile-signal, .profile-metrics, .boundary-box, .boundary-note,
  .profile-scope-grid > div, .record-column, .condition-row, .fit-list li, .profile-source-list li,
  .decision-table tr, .section-heading { break-inside: avoid; }
  h1, h2, h3, .section-heading { break-after: avoid; }
  .profile-doc-section { padding: 6mm 0; }
  a { text-decoration: none; }
}
.site-footer p { text-wrap: balance; }
