/* valordb.org — public site styling. Shared by the landing + legal pages. */
:root {
  --navy: #0f2438;
  --navy-2: #15314a;
  --slate: #2b3a4a;
  --ink: #16202b;
  --heading: #0f2438;
  --muted: #5c6b7a;
  --line: #e2e8ee;
  --bg: #f7f9fb;
  --paper: #ffffff;
  --accent: #1f6feb;
  --accent-ink: #0b4bc0;
  --gold: #b8862f;
  --good: #1f8a4c;
  --warn-bg: #fff7e6;
  --warn-line: #e6c478;
  --radius: 12px;
  --maxw: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ── Sandbox / pre-launch banner ─────────────────────────────────────────── */
#env-banner {
  display: none;
  background: var(--gold);
  color: #1c1402;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  padding: 8px 16px;
  letter-spacing: .01em;
}
#env-banner.show { display: block; }
#env-banner code { background: rgba(0,0,0,.12); padding: 1px 6px; border-radius: 5px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
header.site {
  background: var(--navy);
  color: #eaf1f8;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
header.site .wrap { display: flex; align-items: center; gap: 18px; min-height: 62px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; color: #fff; font-size: 18px; flex: 0 0 auto; line-height: 1.15; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { display: block; flex: none; }
.brand .tag { font-weight: 500; font-size: 12px; color: #9fb6cd; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
header.site nav { margin-left: auto; display: flex; gap: 18px; align-items: center; flex-wrap: nowrap; }
header.site nav a { color: #cfdcea; font-size: 14.5px; white-space: nowrap; }
header.site nav a:hover { color: #fff; text-decoration: none; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14.5px;
  border: 1px solid transparent;
}
.btn:hover { background: var(--accent-ink); text-decoration: none; color: #fff; }
.btn.ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #eaf1f8; }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
/* Drop the wordmark tagline before it crowds the nav, then collapse the inline
   links to just the primary button on smaller screens. */
@media (max-width: 1080px) { .brand .tag { display: none; } header.site nav { gap: 16px; } }
@media (max-width: 880px) { header.site nav a.navlink { display: none; } }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, #1b3b58 100%);
  color: #eaf1f8;
  padding: 70px 0 56px;
}
.hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; color: #fff; letter-spacing: -.01em; }
.hero .lede { font-size: 19px; color: #cdddec; max-width: 720px; margin: 0 0 28px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.facts {
  display: flex; flex-wrap: wrap; gap: 0; margin-top: 44px;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,.04);
}
.facts .fact { flex: 1 1 180px; padding: 18px 20px; border-right: 1px solid rgba(255,255,255,.10); }
.facts .fact:last-child { border-right: 0; }
.facts .n { font-size: 24px; font-weight: 700; color: #fff; }
.facts .l { font-size: 12.5px; color: #9fb6cd; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }

/* ── Sections ────────────────────────────────────────────────────────────── */
section { padding: 56px 0; }
section.alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h2 { font-size: 27px; margin: 0 0 10px; color: var(--heading); letter-spacing: -.01em; }
.section-lede { color: var(--muted); font-size: 16.5px; max-width: 760px; margin: 0 0 30px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 22px 20px;
}
section.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 8px; font-size: 17.5px; color: var(--slate); }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); margin: 0 0 8px; }

/* ── Integrity / honesty primitives ──────────────────────────────────────── */
.integrity .card { border-left: 3px solid var(--good); }

/* ── Tiers ───────────────────────────────────────────────────────────────── */
.tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.tier { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.tier.feature { border-color: var(--accent); box-shadow: 0 6px 22px rgba(31,111,235,.10); }
.tier .name { font-weight: 700; color: var(--heading); font-size: 17px; }
.tier .who { color: var(--muted); font-size: 13.5px; margin: 2px 0 12px; }
.tier .price { font-size: 22px; font-weight: 700; color: var(--ink); }
.tier .price small { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.tier ul { margin: 14px 0 0; padding-left: 18px; color: var(--slate); font-size: 14px; }
.tier ul li { margin-bottom: 6px; }
.placeholder-note { font-size: 12.5px; color: var(--muted); margin-top: 18px; font-style: italic; }

/* ── Partner wall (curated ad slots) ─────────────────────────────────────── */
.ad-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
  margin-left: 8px; vertical-align: middle;
}
#partner-anchor:empty { display: none; }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.partner {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px; display: flex; flex-direction: column;
}
.partner.anchor { border: 2px solid var(--gold); margin-bottom: 4px; }
.partner .ptag { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.partner .pname { font-weight: 700; color: var(--heading); font-size: 16.5px; }
.partner .pblurb { color: var(--muted); font-size: 14px; margin: 6px 0 12px; flex: 1; }
.partner .pcta { align-self: flex-start; }
.partner.available {
  border-style: dashed; background: transparent; align-items: center; justify-content: center;
  text-align: center; color: var(--muted); min-height: 120px;
}
.partner.available a { font-weight: 600; }

/* ── Sub-regulatory guidance guardrail banner (M21 page) ─────────────────── */
.guardrail {
  background: #fdecec; border: 1px solid #e3a3a3; border-left: 4px solid #c0392b;
  border-radius: var(--radius); padding: 18px 20px; color: #6e1f1f; margin: 0 0 24px;
}
.guardrail strong { color: #5a1414; }
.guardrail .tier-pill {
  display: inline-block; background: #c0392b; color: #fff; font-size: 11px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 5px; margin-bottom: 8px;
}

/* ── M21 manual browser ──────────────────────────────────────────────────── */
.m21 .doc { max-width: var(--maxw); }
.m21 .stamp { color: var(--muted); font-size: 13px; margin: 0 0 18px; }
.m21-search { width: 100%; max-width: 420px; padding: 9px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14.5px; margin: 0 0 18px; background: var(--paper); color: var(--ink); }
.m21-search::placeholder { color: var(--muted); }
.m21-layout { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
@media (max-width: 760px) { .m21-layout { grid-template-columns: 1fr; } }
.m21-toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  max-height: 70vh; overflow: auto; padding: 8px; position: sticky; top: 78px; }
.m21-toc a { display: block; padding: 6px 9px; border-radius: 6px; font-size: 14px; color: var(--slate); }
.m21-toc a:hover { background: var(--bg); text-decoration: none; }
.m21-toc a.active { background: #eaf2ff; color: var(--accent-ink); font-weight: 600; }
.m21-toc .lvl1 { padding-left: 9px; }
.m21-toc .lvl2 { padding-left: 24px; font-size: 13.5px; }
.m21-toc .lvl3 { padding-left: 38px; font-size: 13px; color: var(--muted); }
.m21-content { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper);
  padding: 26px 28px; min-height: 50vh; }
.m21-content h1, .m21-content h2, .m21-content h3 { color: var(--heading); }
.m21-content .crumb { font-size: 12.5px; color: var(--muted); margin: 0 0 4px; }
.m21-content .chg { font-size: 12.5px; color: var(--gold); font-weight: 600; margin: 0 0 16px; }
.m21-content table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.m21-content td, .m21-content th { border: 1px solid var(--line); padding: 7px 10px; vertical-align: top; }
.m21-content .src { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.m21-content .m21-summary { font-style: italic; color: var(--slate); background: var(--bg);
  border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 6px 6px 0; margin: 0 0 12px; }
.m21-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.m21-tags .tag { font-size: 11.5px; color: var(--accent-ink); background: #eaf2ff; border: 1px solid #cfe0fb;
  border-radius: 20px; padding: 2px 10px; }
.m21-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--muted); }
/* reworked M21 view */
.m21-layout { grid-template-columns: 320px 1fr; }
.m21-toc a { padding: 7px 10px; line-height: 1.3; border-bottom: 1px solid transparent; }
.m21-toc a .crumb2 { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 1px; }
.m21-toc a .name2 { display: block; font-size: 13px; color: var(--slate); }
.m21-toc a.active .name2 { color: var(--accent-ink); font-weight: 600; }
.m21-toc .toc-manual { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--gold); padding: 10px 10px 4px; position: sticky; top: 0; background: var(--paper); }
.m21-content { max-width: none; }
.m21-content .body-wrap { max-width: 820px; }
.m21-content .body-wrap h2 { font-size: 21px; margin: 22px 0 8px; }
.m21-content .body-wrap h3, .m21-content .body-wrap h4 { font-size: 16.5px; margin: 18px 0 6px; color: var(--slate); }
.m21-content .body-wrap p, .m21-content .body-wrap li { font-size: 15px; line-height: 1.65; }
.m21-content .body-wrap a { word-break: break-word; }
.verbatim-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--good); border: 1px solid var(--good);
  border-radius: 20px; padding: 2px 10px; }
.m21-meta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.m21-attach { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 18px 0; }
.m21-attach .h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.m21-attach a { display: block; font-size: 13.5px; padding: 3px 0; }
.m21-ai { border: 1px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin: 22px 0 0;
  background: rgba(31,111,235,.05); }
html[data-theme="dark"] .m21-ai { background: rgba(59,130,246,.08); }
.m21-ai .h { font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.m21-ai .sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.m21-ai textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 11px; font: inherit; font-size: 14px; background: var(--paper); color: var(--ink); resize: vertical; }
.m21-ai .ai-row { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.m21-ai-out { margin-top: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.m21-ai-out:empty { display: none; }

/* ── Editorial-independence wall + advertiser rate card ──────────────────── */
.wall {
  background: rgba(31,111,235,.06); border: 1px solid var(--accent); border-left: 5px solid var(--accent);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 26px;
}
.wall .h { font-weight: 800; color: var(--heading); font-size: 14px; text-transform: uppercase;
  letter-spacing: .05em; margin-bottom: 8px; }
.wall p { margin: 0; color: var(--ink); font-size: 15px; }
.wall strong { color: var(--heading); }
.indep-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.indep-note strong { color: var(--good); }
.price-table { width: 100%; border-collapse: collapse; margin: 16px 0 8px; font-size: 15px; }
.price-table th, .price-table td { border: 1px solid var(--line); padding: 12px 14px; text-align: left; vertical-align: top; }
.price-table th { background: var(--bg); color: var(--heading); }
.price-table .slot { font-weight: 700; color: var(--heading); }
.price-table .amt { font-weight: 700; color: var(--heading); white-space: nowrap; }
.price-table .save { color: var(--good); font-size: 12px; font-weight: 600; }

/* ── Theme toggle button (in header) ─────────────────────────────────────── */
.theme-toggle {
  background: transparent; border: 1px solid rgba(255,255,255,.28); color: #eaf1f8;
  border-radius: 8px; padding: 7px 11px; cursor: pointer; font-size: 14px; line-height: 1;
  margin-right: 4px;
}
.theme-toggle:hover { background: rgba(255,255,255,.08); }

/* ── Dark professional theme (default) ───────────────────────────────────── */
html[data-theme="dark"] {
  --navy: #0a1018; --navy-2: #0e1726; --slate: #c4d0dd; --ink: #e6edf5; --muted: #8b9bb0;
  --line: #26344a; --bg: #0b121d; --paper: #131d2c; --accent: #3b82f6; --accent-ink: #7ab0ff;
  --gold: #d4a548; --good: #3fb950; --warn-bg: #241d0a; --warn-line: #5c4d1f;
  --heading: #e9eef7;
}
html[data-theme="dark"] body { color: var(--ink); background: var(--bg); }
html[data-theme="dark"] section.alt { background: #0f1826; }
html[data-theme="dark"] .card,
html[data-theme="dark"] section.alt .card,
html[data-theme="dark"] .tier,
html[data-theme="dark"] .partner,
html[data-theme="dark"] .legal,
html[data-theme="dark"] .m21-content,
html[data-theme="dark"] .m21-toc { background: var(--paper); }
html[data-theme="dark"] .tier.feature { box-shadow: 0 6px 22px rgba(59,130,246,.16); }
html[data-theme="dark"] .facts { background: rgba(255,255,255,.03); }
html[data-theme="dark"] .legal th,
html[data-theme="dark"] .m21-content th,
html[data-theme="dark"] .m21-content .m21-summary { background: #0f1826; }
html[data-theme="dark"] .callout { background: #241d0a; border-color: #5c4d1f; color: #e8d9a8; }
html[data-theme="dark"] .callout strong { color: #fff0c4; }
html[data-theme="dark"] .guardrail { background: #2a1414; border-color: #7a2a2a; color: #f3b9b9; }
html[data-theme="dark"] .guardrail strong { color: #ffd9d9; }
html[data-theme="dark"] .m21-tags .tag { background: #10243f; border-color: #274a73; color: #9cc4ff; }
html[data-theme="dark"] .m21-toc a.active { background: #122844; color: #9cc4ff; }
html[data-theme="dark"] .partner.available { color: var(--muted); }
html[data-theme="dark"] .ad-label { color: var(--muted); border-color: var(--line); }

/* ── Disclaimer callout ──────────────────────────────────────────────────── */
.callout {
  background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: var(--radius);
  padding: 22px 24px; color: #5a4408;
}
.callout strong { color: #3f2f04; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer.site { background: var(--navy); color: #b9c9d8; padding: 40px 0 30px; font-size: 14px; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
footer.site h4 { color: #fff; font-size: 14px; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; }
footer.site a { color: #b9c9d8; display: block; margin-bottom: 6px; }
footer.site a:hover { color: #fff; }
footer.site .disclosure { margin-top: 26px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.10); color: #8ba2b7; font-size: 12.5px; line-height: 1.7; }

/* ── Legal pages ─────────────────────────────────────────────────────────── */
.legal { background: var(--paper); }
.legal .doc { max-width: 760px; margin: 0 auto; padding: 50px 22px 70px; }
.legal h1 { font-size: 32px; color: var(--heading); margin: 0 0 4px; }
.legal .updated { color: var(--muted); font-size: 13.5px; margin: 0 0 28px; }
.legal h2 { font-size: 20px; margin: 34px 0 8px; color: var(--slate); }
.legal p, .legal li { color: var(--ink); font-size: 16px; }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14.5px; }
.legal th, .legal td { border: 1px solid var(--line); padding: 8px 11px; text-align: left; vertical-align: top; }
.legal th { background: var(--bg); }
.legal .back { display: inline-block; margin-bottom: 20px; font-size: 14px; }
.legal .upper { font-variant: small-caps; }

/* ── Curated partner placements (assets/partners.js) ────────────────────────
   Anchor = a band just under the header on every page; standard slots = single
   tiles spread through the page (.vd-slot). Reuses the .partner* styles above. */
#vd-anchor { border-bottom: 1px solid var(--line); background: var(--bg); }
#vd-anchor .wrap { padding: 14px 22px; }
#vd-anchor .ad-label { display: inline-block; margin-bottom: 8px; }
#vd-anchor .partner.anchor { margin-bottom: 0; }
.vd-slot { margin: 28px 0; }
.vd-slot .ad-label { display: inline-block; margin-bottom: 8px; }
.vd-slot .partner { max-width: 420px; }
html[data-theme="dark"] #vd-anchor { background: var(--paper); }

/* ── Keyboard accessibility: visible focus ring (WCAG 2.4.7) ─────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent, #1f6feb);
  outline-offset: 2px;
  border-radius: 4px;
}
