/* Prealign — design tokens + base
 *
 * Token foundation and shared semantic classes (.btn, .chip, .card, .matrix,
 * .field, .notice, .kicker, .nav, .icon-btn, .meta-line, .btn-link) are
 * mirrored from edfi-web/src/app.css so the embedded validation-run demo
 * renders identically here. Marketing-only sections (.hero, .eyebrow, .steps,
 * .faq, .trust-strip, .role-card, .res-card, .toc, .legal-body, .subpage-hero,
 * .dropdown, .announce, etc.) are website-specific and live below.
 */

:root {
  /* Text/UI colors */
  --color-bg: #f7f7f5;
  --color-bg-2: #f1f1ee;
  --color-ink: #1f1f23;
  --color-ink-2: #3a3a3f;
  --color-ink-on-accent: #ffffff;
  --color-muted: #6b6b70;
  --color-muted-2: #9a9a9e;
  --color-line: #e4e3dd;
  --color-line-2: #d7d6cf;
  --color-card: #ffffff;
  --color-accent: #b8801f;
  --color-accent-ink: #7e5712;
  --color-accent-tint: #f5ead0;
  --color-accent-soft: #fbf4df;
  --color-warn: #8a6a2b;
  --color-warn-tint: #f3ecd8;
  --color-sev-hi: #b85c4a;
  --color-sev-hi-ink: #6e2c1f;
  --color-sev-md: #c69341;
  --color-sev-lo: #6d8f9c;
  --color-sev-funding: #4a7a9c;
  --color-ok: #3f6f55;

  /* Legacy aliases — components reference --ink, --sans, --sev-*, etc. */
  --bg: var(--color-bg);
  --bg-2: var(--color-bg-2);
  --ink: var(--color-ink);
  --ink-2: var(--color-ink-2);
  --muted: var(--color-muted);
  --muted-2: var(--color-muted-2);
  --line: var(--color-line);
  --line-2: var(--color-line-2);
  --card: var(--color-card);
  --accent: var(--color-accent);
  --accent-ink: var(--color-accent-ink);
  --accent-tint: var(--color-accent-tint);
  --accent-soft: var(--color-accent-soft);
  --warn: var(--color-warn);
  --warn-tint: var(--color-warn-tint);
  --sev-hi: var(--color-sev-hi);
  --sev-md: var(--color-sev-md);
  --sev-lo: var(--color-sev-lo);
  --sev-funding: var(--color-sev-funding);
  --ok: var(--color-ok);

  /* Fonts */
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: var(--font-sans);
  --mono: var(--font-mono);

  /* Font sizes */
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-md: 18px;
  --text-lg: 22px;
  --text-xl: clamp(22px, 2.4vw, 28px);
  --text-2xl: clamp(28px, 3.6vw, 40px);

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line heights */
  --leading-tight: 1.1;
  --leading-snug: 1.2;
  --leading-normal: 1.3;
  --leading-relaxed: 1.5;
  --leading-body: 1.55;

  /* Radii */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;

  /* Marketing-only spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 128px;

  /* Layout widths */
  --wrap: 1240px;
  --wrap-tight: 980px;

  /* Section density (marketing-only) */
  --density-pad: 96px;
  --density-gap: 24px;
}

[data-density="compact"] {
  --density-pad: 64px;
  --density-gap: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Typography scale
 * H1/H2 keep the website's marketing-sized clamps; H3/H4 mirror edfi-web. */
h1, h2, h3, h4 {
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(40px, 5.6vw, 68px); line-height: 1.02; letter-spacing: -0.028em; }
h2 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -0.02em; }
h3 { font-size: var(--text-md); line-height: var(--leading-normal); }
h4 { font-size: 14px; line-height: var(--leading-normal); }
p { margin: 0; color: var(--ink-2); }
p.lede { font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); max-width: 62ch; text-wrap: pretty; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* Layout */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.wrap-tight { max-width: var(--wrap-tight); margin: 0 auto; padding: 0 32px; }
section.block { padding: var(--density-pad) 0; border-top: 1px solid var(--line); position: relative; }
section.block:first-of-type { border-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.08s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: var(--ink);
  color: var(--color-ink-on-accent);
  border-color: var(--ink);
}
.btn.primary:hover { background: #000; border-color: #000; }
.btn.accent {
  background: var(--accent);
  color: var(--color-ink-on-accent);
  border-color: var(--accent);
}
.btn.accent:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--sev-hi); }
.btn.danger:hover { border-color: var(--sev-hi); }
.btn .arrow { transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(2px); }
.btn.sm { height: 30px; padding: 0 12px; font-size: var(--text-xs); }

/* Icon button — transparent square for table-row actions, modal close, etc. */
.icon-btn {
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
  color: var(--muted);
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}
.icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.icon-btn.danger:hover { color: var(--sev-hi); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn:disabled:hover { background: transparent; color: var(--muted); }

/* Table action column */
.actions-col { text-align: right; white-space: nowrap; }
.actions-cell {
  display: inline-flex;
  gap: 4px;
  justify-content: flex-end;
  align-items: center;
}

/* Meta line — inline kicker label + value pairs */
.meta-line {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  font-size: var(--text-sm);
}
.meta-line li {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}
.meta-line .k {
  font-family: var(--mono);
  font-size: var(--text-2xs);
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.meta-line .v { color: var(--ink); }
.meta-line .v.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.meta-line .v.muted { color: var(--muted); }

/* Rule meta line — slightly looser meta-line used in validation-run header */
.rule-meta-line {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 13px;
}
.rule-meta-line li {
  display: inline-flex;
  gap: 6px;
  align-items: baseline;
}
.rule-meta-line .k {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rule-meta-line .v { color: var(--ink); }
.rule-meta-line .v.num { font-family: var(--mono); }
.rule-meta-line .v.muted { color: var(--muted); }

.btn-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
}
.btn-link:hover { color: var(--accent-ink); border-color: var(--accent); }
.btn-link.danger { color: var(--sev-hi); }
.btn-link.danger:hover { color: var(--sev-hi); border-color: var(--sev-hi); }

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chip.solid { background: var(--bg-2); }
.chip.ok { color: var(--ok); }
.chip.ok .dot { background: var(--ok); }
.chip.hi { color: var(--sev-hi); }
.chip.hi .dot { background: var(--sev-hi); }
.chip.md { color: var(--sev-md); }
.chip.md .dot { background: var(--sev-md); }
.chip.lo { color: var(--sev-lo); }
.chip.lo .dot { background: var(--sev-lo); }
.chip.muted { color: var(--muted); }
.chip.muted .dot { background: var(--muted-2); }
.chip.funding { color: var(--sev-funding); }
.chip.funding .dot { background: var(--sev-funding); }
.chip .sub {
  font-size: 9px;
  margin-left: 2px;
  padding: 1px 4px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--line-2); }
.card.compact { padding: 16px; }

/* Kicker — small mono uppercase label */
.kicker {
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kicker .tick {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  margin-right: 10px;
  transform: translateY(-1px);
  border-radius: 1px;
}
.card h3 { margin-top: 10px; margin-bottom: 8px; }

/* Eyebrow — marketing-sized variant of kicker (used in hero, sec-head, subpage-hero) */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}
.eyebrow .tick {
  display: inline-block;
  width: 6px; height: 6px; background: var(--accent);
  margin-right: 10px; transform: translateY(-1px);
  border-radius: 1px;
}

/* Grid dot background */
.grid-bg {
  background-image:
    radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0);
  background-size: 24px 24px;
}
.grid-bg-fade {
  mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%, #000 80%, transparent);
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247, 247, 245, 0.82);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand-glyph {
  width: 22px;
  height: 22px;
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand-glyph::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--ink);
  border-radius: 1px;
}
.brand-name { font-size: 15px; }
.brand-name em {
  font-style: normal;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  margin-left: 6px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--card);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.15s ease;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle-bars::before { top: -5px; }
.nav-toggle-bars::after { top: 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  margin-left: 8px;
}
.nav-link {
  position: relative;
  padding: 8px 12px;
  font-size: var(--text-sm);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); background: var(--bg-2); }
.nav-link.active { color: var(--ink); background: var(--bg-2); }
.nav-link.has-menu::after {
  content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); opacity: 0.5;
}
.nav-cta {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Skip-to-content link — visible only when focused via keyboard. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  z-index: 100;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus {
  left: 0;
}

.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 320px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 12px 40px -12px rgba(20,20,23,0.15);
  padding: 10px;
  display: none;
}
.nav-link.has-menu:hover + .dropdown,
.dropdown:hover { display: block; }
.nav-item { position: relative; }
.nav-item:hover .dropdown { display: block; }
.dropdown a {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border-radius: var(--r-sm);
  font-size: 13.5px;
}
.dropdown a strong { font-weight: 500; color: var(--ink); }
.dropdown a span { color: var(--muted); font-size: 12px; }
.dropdown a:hover { background: var(--bg-2); }

.announce {
  background: var(--ink); color: #F3F3EF;
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 8px 16px;
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.announce .dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.announce-text-narrow { display: none; }
@media (max-width: 600px) {
  .announce-text-wide { display: none; }
  .announce-text-narrow { display: inline; }
}

/* Hero (marketing) */
.hero {
  padding: 80px 0 48px;
  position: relative; overflow: hidden;
}
.hero-text {
  position: relative;
  z-index: 1;
}
.hero-visual {
  position: relative;
  z-index: 2;
}
.hero > .wrap { position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; }
.hero .sub { max-width: 54ch; margin-top: 24px; color: var(--muted); font-size: 19px; line-height: 1.5; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero .meta-row { display: flex; gap: 24px; margin-top: 40px; font-family: var(--mono); font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.hero .meta-row span::before { content: "›"; margin-right: 8px; color: var(--accent); }

.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center;
}
.hero-centered { text-align: center; }
.hero-centered h1 { margin: 0 auto; }
.hero-centered .sub { margin-left: auto; margin-right: auto; }
.hero-centered .cta-row { justify-content: center; }
.hero-centered .meta-row { justify-content: center; }
.hero-centered .hero-visual { margin-top: 56px; }

/* Product UI mockups (issue queue) */
.ui-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(20,20,23,0.02), 0 30px 60px -30px rgba(20,20,23,0.12);
}
.ui-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}
.ui-topbar .dots { display: flex; gap: 5px; }
.ui-topbar .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: block; }
.ui-topbar .path { margin-left: 8px; }
.ui-topbar .path b { color: var(--ink-2); font-weight: 500; }

.ui-body { display: grid; grid-template-columns: 180px 1fr; min-height: 320px; }
.ui-sidebar { border-right: 1px solid var(--line); padding: 14px; background: #FCFCFA; }
.ui-sidebar .section-label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-2); margin: 10px 0 6px; }
.ui-sidebar .item { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border-radius: 4px; font-size: 13px; color: var(--ink-2); margin-bottom: 2px; }
.ui-sidebar .item .count { font-family: var(--mono); font-size: 11px; color: var(--muted-2); }
.ui-sidebar .item.active { background: var(--bg-2); color: var(--ink); }

.ui-main { padding: 14px 16px; }
.ui-main .main-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ui-main .main-head h4 { font-size: 14px; font-weight: 500; }
.ui-main .main-head .filter { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.issue {
  display: grid; grid-template-columns: 20px 1fr auto; gap: 12px;
  align-items: center; padding: 10px 12px; border-radius: 6px;
  border: 1px solid transparent;
  margin-bottom: 4px;
}
.issue:hover { background: var(--bg-2); border-color: var(--line); }
.issue .sev { width: 8px; height: 8px; border-radius: 50%; margin: 0 auto; }
.issue .sev.hi { background: var(--sev-hi); }
.issue .sev.md { background: var(--sev-md); }
.issue .sev.lo { background: var(--sev-lo); }
.issue .title { font-size: 13px; color: var(--ink); font-weight: 500; }
.issue .title .rule { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: 8px; font-weight: 400; }
.issue .meta { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.issue .count-pill { font-family: var(--mono); font-size: 11px; color: var(--muted); background: var(--bg-2); padding: 2px 8px; border-radius: 999px; }

/* Trust strip */
.trust-strip {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card);
  overflow: hidden;
}
.trust-item {
  padding: 22px 20px; text-align: center; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center;
}
.trust-item:last-child { border-right: 0; }
.trust-item .mono { font-size: 11px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
.trust-item .val { font-size: 14px; color: var(--ink); font-weight: 500; }

/* Feature grid */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--density-gap); }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--density-gap); }
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--density-gap); }
.six-col { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--density-gap); }

/* Section header */
.sec-head { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; margin-bottom: 40px; align-items: end; }
.sec-head .sec-title h2 { max-width: 14ch; }
.sec-head p { color: var(--muted); font-size: 17px; max-width: 52ch; }
@media (max-width: 860px) {
  .sec-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 28px; }
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--card); }
.step { padding: 24px; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step .num { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; }
.step h4 { margin: 12px 0 8px; font-size: 16px; font-weight: 500; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* Matrix tables (shared with edfi-web; values consolidated here) */
.matrix {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: var(--text-sm);
}
.matrix th,
.matrix td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.matrix th {
  font-weight: 500;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: var(--bg-2);
}
.matrix tr:last-child td { border-bottom: 0; }
.matrix tbody tr:hover { background: var(--bg-2); }
.matrix td.num,
.matrix th.num { text-align: right; font-family: var(--mono); }
.matrix td.label { font-weight: 500; color: var(--ink); width: 28%; }
.matrix a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
}
.matrix a:hover { color: var(--accent-ink); border-color: var(--accent); }
.matrix a.mono { font-size: 12px; }

/* Tabs */
.tabs-head { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); padding: 4px; width: fit-content; flex-wrap: wrap; }
.tabs-head button { padding: 7px 12px; border-radius: 4px; font-size: 13px; color: var(--muted); font-family: var(--sans); }
.tabs-head button.active { background: var(--bg-2); color: var(--ink); }
.tabs-body { margin-top: 24px; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-q { display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 16px; }
.faq-q h4 { font-size: 16px; font-weight: 500; }
.faq-q .plus { font-family: var(--mono); color: var(--muted); font-size: 14px; }
.faq-a { padding-top: 12px; color: var(--muted); font-size: 14.5px; line-height: 1.6; max-width: 72ch; display: none; }
.faq-item.open .faq-a { display: block; }
.faq-item.open .plus { transform: rotate(45deg); }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full { grid-column: 1 / -1; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field select,
.field textarea,
.input {
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field textarea { min-height: 110px; resize: vertical; }

/* Notice / banner */
.notice {
  border: 1px dashed var(--line-2);
  background: var(--bg-2);
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--ink-2);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.notice .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warn);
  flex-shrink: 0;
  padding-top: 2px;
}
.notice .mono {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--warn);
  flex-shrink: 0;
  padding-top: 2px;
}
.notice.error {
  border-color: var(--sev-hi);
  background: #fbeae6;
  color: var(--color-sev-hi-ink);
}
.notice.error .label { color: var(--sev-hi); }
.notice.info {
  border-color: var(--line-2);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
.notice.info .label { color: var(--accent-ink); }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 80px 0 48px; background: #F4F3EF; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; font-weight: 500; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a { font-size: 13.5px; color: var(--ink-2); }
.footer a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 24px; border-top: 1px solid var(--line); gap: 24px; flex-wrap: wrap; }

/* Placeholder image */
.placeholder-img {
  background:
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(31,31,35,0.03) 12px 13px),
    var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase;
  aspect-ratio: 16 / 9;
}

/* Tweaks panel */
.tweaks {
  position: fixed; right: 20px; bottom: 20px; z-index: 50;
  width: 260px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 20px 60px -20px rgba(20,20,23,0.18);
  padding: 14px; font-size: 13px;
  display: none;
}
.tweaks.open { display: block; }
.tweaks .row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.tweaks .row:last-child { margin-bottom: 0; }
.tweaks label { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.tweaks input[type=range] { width: 120px; }
.tweaks h5 { margin: 0 0 10px; font-size: 12px; font-weight: 500; font-family: var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.tweaks select {
  font-size: 12px; padding: 4px 6px; border: 1px solid var(--line-2); border-radius: 4px;
  background: var(--card); color: var(--ink);
}

/* Switches */
.switch { position: relative; width: 30px; height: 18px; background: var(--line-2); border-radius: 999px; cursor: pointer; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: transform .15s ease; }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(12px); }

/* Contact page two-column layout: form left (wider), sidebar right.
   Collapses via the shared .two-col mobile breakpoint below. */
.contact-grid {
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
}

/* Small responsive */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .trust-strip { grid-template-columns: repeat(3, 1fr); }
  .trust-item:nth-child(3) { border-right: 0; }
  .trust-item:nth-child(1), .trust-item:nth-child(2), .trust-item:nth-child(3) { border-bottom: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step { border-bottom: 1px solid var(--line); }
  .three-col, .four-col, .six-col { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }

  /* Mobile nav: hamburger replaces inline links + CTA. */
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 16px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px -16px rgba(20, 20, 23, 0.12);
    display: none;
  }
  .nav-menu--open { display: flex; }
  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-left: 0;
  }
  .nav-link { padding: 12px 14px; font-size: var(--text-base); }
  .nav-cta {
    margin: 8px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
  }
  .nav-cta .btn { width: 100%; justify-content: center; }
  body.nav-locked { overflow: hidden; }

  /* Lift form-field font-size to 16px so iOS Safari doesn't auto-zoom on focus. */
  .field input,
  .field select,
  .field textarea,
  .input {
    font-size: 16px;
  }
}
@media (max-width: 600px) {
  .trust-strip { grid-template-columns: 1fr 1fr; }
  .three-col, .four-col, .six-col, .two-col { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  h1 { font-size: 36px; }
}

/* Subtle anim */
@keyframes pulse-dot {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}
.pulse { animation: pulse-dot 2.2s ease-in-out infinite; }

@keyframes slide-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.issue { animation: slide-in .4s ease backwards; }
.issue:nth-child(1) { animation-delay: .05s; }
.issue:nth-child(2) { animation-delay: .12s; }
.issue:nth-child(3) { animation-delay: .19s; }
.issue:nth-child(4) { animation-delay: .26s; }
.issue:nth-child(5) { animation-delay: .33s; }
.issue:nth-child(6) { animation-delay: .40s; }

/* Data flow lines (svg diagrams) */
.diagram-node {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px; font-family: var(--mono); font-size: 11px;
  color: var(--ink-2);
}

/* Subpage hero (marketing /product, /contact, /cookies, /privacy, /terms) */
.subpage-hero { padding: 80px 0 56px; border-bottom: 1px solid var(--line); }
.subpage-hero .eyebrow { margin-bottom: 20px; display: inline-block; }
.subpage-hero h1 { max-width: 20ch; font-size: clamp(32px, 4vw, 52px); }
.subpage-hero p.lede { margin-top: 20px; }

/* link list */
.toc {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); padding: 10px;
  font-family: var(--mono); font-size: 12px;
}
.toc a { padding: 10px 12px; border-radius: 4px; color: var(--ink-2); }
.toc a:hover { background: var(--bg-2); }
@media (max-width: 860px) { .toc { grid-template-columns: repeat(2, 1fr); } }

/* Legal pages */
.legal-body h2 { margin-top: 40px; margin-bottom: 12px; font-size: 22px; }
.legal-body h3 { margin-top: 24px; margin-bottom: 8px; font-size: 16px; }
.legal-body p, .legal-body li { font-size: 14.5px; color: var(--ink-2); line-height: 1.65; }
.legal-body ul { padding-left: 20px; }
.legal-body .review-banner {
  background: var(--warn-tint); border: 1px solid #E6D4A6;
  border-radius: var(--r-md); padding: 14px 16px;
  font-size: 13px; display: flex; gap: 12px; align-items: flex-start;
  margin-bottom: 32px;
}
.legal-body .review-banner b { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--warn); }

/* Role card */
.role-card { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 28px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.role-card + .role-card { margin-top: 12px; }
.role-card h3 { font-size: 18px; margin-bottom: 4px; }
.role-card .col .mono { color: var(--muted); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 6px; display: block; }
.role-card p { font-size: 13.5px; }
@media (max-width: 980px) { .role-card { grid-template-columns: 1fr; } }

/* Resource card */
.res-card { display: flex; flex-direction: column; gap: 14px; }
.res-card .thumb {
  aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.res-card .thumb::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, var(--line-2) 1px, transparent 0);
  background-size: 16px 16px;
  opacity: 0.6;
}
.res-card .thumb .label { position: relative; z-index: 1; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: var(--card); padding: 6px 10px; border-radius: 2px; border: 1px solid var(--line); }
.res-card h4 { font-size: 15px; font-weight: 500; }
.res-card p { font-size: 13px; color: var(--muted); }

/* Link accent */
.ilink { color: var(--ink); border-bottom: 1px solid var(--line-2); padding-bottom: 1px; }
.ilink:hover { border-color: var(--accent); color: var(--accent-ink); }

/* Anchor offset for sticky nav */
[id] { scroll-margin-top: 80px; }

/* Demo pages (/demo/{district}) — personalized screencast + one CTA */
.demo-player { max-width: 1040px; margin: 0 auto; }
.demo-player video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); }
.demo-caption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1040px; margin: 14px auto 0; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.demo-caption b { font-weight: 500; color: var(--ink-2); }
.demo-hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.demo-cta .cta-row { justify-content: center; margin-top: 32px; }
@media (max-width: 720px) { .demo-caption { flex-direction: column; gap: 6px; } }
