:root {
  /* Palette: ink navy (institutional/audit) + saffron (alert, Indian context).
     Light body, one dark navy hero block. Saffron is the single accent. */
  --navy-900: #0b2545;
  --navy-800: #122f55;
  --navy-700: #163a68;
  --navy-600: #1e4a7a;
  --navy-50: #eef3f9;
  --saffron-700: #b45309;
  --saffron-600: #d97706;
  --saffron-50: #fdf3e6;
  --ink-900: #0f1419;
  --ink-700: #2a3441;
  --ink-500: #5a6675;
  --ink-300: #94a0ad;
  --line: #e3e8ee;
  --line-strong: #cbd3dd;
  --bg: #ffffff;
  --bg-alt: #f6f8fc;
  --bg-card: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --neutral: #64748b;
  --shadow-sm: 0 1px 2px rgba(15, 20, 25, 0.04), 0 1px 1px rgba(15, 20, 25, 0.03);
  --shadow-md: 0 4px 12px rgba(15, 20, 25, 0.06), 0 2px 4px rgba(15, 20, 25, 0.04);
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1180px;
  --font-display: "Archivo", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.4em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--navy-700); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--ink-500); }
code { font-family: var(--font-mono); font-size: 0.92em; background: var(--navy-50); padding: 1px 5px; border-radius: 4px; color: var(--navy-800); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--saffron-600); color: #fff; padding: 10px 14px; z-index: 100; border-radius: 0 0 6px 0; }
.skip:focus { left: 0; }

/* Scroll reveal: only active when JS is on, so no-JS never hides content */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
.js-reveal .reveal.in { opacity: 1; transform: none; }

/* HEADER */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--navy-900); color: #fff;
  border-radius: 8px; font-family: var(--font-display); font-weight: 800; font-size: 18px;
  position: relative;
}
/* saffron corner tick: the "watch" mark */
.brand-mark::after { content: ""; position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; background: var(--saffron-600); border-radius: 3px; }
.brand-mark.small { width: 28px; height: 28px; font-size: 15px; border-radius: 6px; }
.brand-text { display: inline-flex; flex-direction: column; line-height: 1.1; }
.brand-title { font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--ink-900); letter-spacing: -0.01em; }
.brand-sub { font-size: 11px; color: var(--ink-500); }

.site-nav { display: flex; gap: 22px; align-items: center; }
.site-nav a {
  color: var(--ink-700); font-size: 14px; font-weight: 500;
  padding: 6px 0; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.site-nav a:hover { color: var(--navy-700); border-bottom-color: var(--saffron-600); text-decoration: none; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle-bar {
  display: block; width: 18px; height: 2px; background: var(--navy-900); border-radius: 1px;
}
.nav-toggle:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 2px; }

/* Loading strip (above header while labs.json fetches) */
.load-banner {
  background: var(--navy-900); color: rgba(255,255,255,0.9);
  font-family: var(--font-mono); font-size: 12px; font-weight: 500;
  text-align: center; padding: 7px 12px;
  transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
  max-height: 40px; overflow: hidden;
}
.load-banner.done {
  opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0;
  pointer-events: none;
}
.load-banner[hidden] { display: none; }

.hero-cta-sep { margin: 0 8px; opacity: 0.45; }
.detail-wide { grid-column: 1 / -1; }
.table-placeholder td {
  text-align: center; padding: 28px 14px !important;
  color: var(--ink-500); font-size: 13px; white-space: normal !important;
}

/* HERO: dark navy ledger block with faint graph-paper grid */
.hero {
  background:
    radial-gradient(ellipse 70% 55% at 85% -10%, rgba(217,119,6,0.16), transparent 60%),
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  background-size: auto, 32px 32px, 32px 32px, auto;
  padding: 64px 0 56px;
  color: #fff;
}
.hero-inner { max-width: 860px; }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--saffron-600); margin: 0 0 16px;
}
.hero h1 { color: #fff; margin-bottom: 16px; max-width: 16ch; }
.lede { font-size: 1.06rem; color: rgba(255,255,255,0.78); max-width: 640px; margin-bottom: 28px; }
.lede strong { color: #fff; font-weight: 600; }

.hero-search {
  display: flex; gap: 10px; max-width: 640px; margin-bottom: 36px;
  background: #fff; border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px; padding: 6px 6px 6px 18px;
  box-shadow: 0 8px 24px rgba(4, 12, 24, 0.35);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.hero-search:focus-within { box-shadow: 0 8px 28px rgba(4, 12, 24, 0.45), 0 0 0 3px rgba(217,119,6,0.4); }
.hero-search input {
  flex: 1; border: 0; outline: none; background: transparent;
  font: inherit; font-size: 15px; color: var(--ink-900); padding: 10px 0; min-width: 0;
}
.hero-search input::placeholder { color: var(--ink-300); }
.hero-search button {
  border: 0; background: var(--navy-900); color: #fff;
  font: inherit; font-weight: 600; font-size: 14px; padding: 0 24px;
  border-radius: 999px; cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.hero-search button:hover { background: var(--saffron-600); }
.hero-search button:active { transform: scale(0.97); }
.hero-check-cta { margin: -18px 0 28px; font-size: 14px; }
.hero-check-cta a {
  color: rgba(255,255,255,0.88); border-bottom: 1px solid rgba(217,119,6,0.7);
  text-decoration: none; font-weight: 500;
}
.hero-check-cta a:hover { color: #fff; border-bottom-color: var(--saffron-600); }

/* stats as a ledger strip, not four equal boxes */
.hero-stats {
  display: flex; flex-wrap: wrap; max-width: 720px;
  border-top: 1px solid rgba(255,255,255,0.16);
}
.hero-stats > div {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 28px 4px 0; margin-right: 28px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.hero-stats > div:last-child { border-right: 0; margin-right: 0; }
.stat-num { font-family: var(--font-mono); font-size: 1.7rem; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.stat-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.55); }

/* SECTIONS */
.section { padding: 60px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 30px; max-width: 760px; }
.section-head h2 { margin-bottom: 8px; }
.section-sub { color: var(--ink-500); font-size: 0.95rem; margin: 0; }

/* FILTERS */
.filters {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
}
.filter-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; color: var(--ink-500); font-weight: 500; }
.field-grow { flex: 1; }
input[type="search"], input[type="text"], select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 14px; color: var(--ink-900);
  background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 9px 10px;
  width: 100%; min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input[id="f-cert"], input[id="v-cert"] { font-family: var(--font-mono); }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%235a6675' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 28px;
}
input:focus, select:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(30, 74, 122, 0.15); }

.filter-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.result-count { margin-left: auto; color: var(--ink-500); font-size: 13px; font-family: var(--font-mono); }

.btn-primary, .btn-ghost {
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  border-radius: var(--radius-sm); padding: 9px 16px; border: 1px solid transparent;
  transition: background 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.btn-primary:hover { background: var(--navy-700); }
.btn-primary:active { transform: scale(0.97); }
.btn-ghost { background: #fff; color: var(--ink-700); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-alt); border-color: var(--ink-300); }
.btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; }

/* Mono utility used in check validity + table cells */
.t-mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-700); }

/* TABLE — compact ledger (20 rows / page, less page scroll) */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: auto;
  background: #fff; box-shadow: var(--shadow-sm);
  max-height: min(52vh, 440px);
}
.labs-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.labs-table thead { position: sticky; top: 0; background: var(--bg-alt); z-index: 1; }
.labs-table th, .labs-table td {
  text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
  vertical-align: middle;
}
.labs-table th {
  font-family: var(--font-mono); font-weight: 600; color: var(--ink-700); font-size: 10px;
  text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer; user-select: none;
  transition: background 0.12s ease, color 0.12s ease;
  padding-top: 8px; padding-bottom: 8px;
}
.labs-table th:hover { background: var(--navy-50); color: var(--navy-800); }
.labs-table th[tabindex="0"]:focus { outline: 2px solid var(--navy-600); outline-offset: -2px; }
.labs-table th[data-sorted="asc"]::after { content: " ▲"; color: var(--saffron-700); font-size: 9px; }
.labs-table th[data-sorted="desc"]::after { content: " ▼"; color: var(--saffron-700); font-size: 9px; }
.labs-table tbody tr.lab-row { cursor: pointer; transition: background 0.12s ease, box-shadow 0.12s ease; }
.labs-table tbody tr.lab-row:hover { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--saffron-600); }
.labs-table tbody tr.lab-row.open { background: var(--navy-50); box-shadow: inset 3px 0 0 var(--saffron-600); }
.labs-table td.lab-name {
  font-weight: 600; color: var(--ink-900); white-space: normal;
  max-width: 280px; font-size: 12.5px; line-height: 1.35;
}
.labs-table td.t-mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-700); }
.labs-table .badge { padding: 2px 8px; font-size: 10px; }
.disc-mini { font-size: 10px; color: var(--ink-500); font-weight: 400; }

/* Detail row (expanded) */
.detail-row td { padding: 0 !important; border-bottom: 1px solid var(--line); overflow: hidden; white-space: normal; }
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 20px;
  padding: 16px 18px; background: var(--bg-alt); font-size: 13px; color: var(--ink-700);
  max-width: 100%;
}
.detail-grid > div { line-height: 1.5; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.d-label {
  display: block; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-500); margin-bottom: 2px;
}
.detail-grid .badge { margin: 2px 3px 2px 0; }
.d-cert { background: var(--saffron-50); border-left: 3px solid var(--saffron-600); padding: 4px 8px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.v-hit { margin-bottom: 10px; }
.v-hit:last-child { margin-bottom: 0; }

/* Multi-select discipline filter */
select.multi { height: auto; min-height: 34px; }
select.multi option { padding: 3px 6px; }

@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.js-reveal .labs-table tbody tr { animation: rowIn 0.3s ease both; animation-delay: calc(var(--i, 0) * 18ms); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; letter-spacing: 0.02em;
}
.badge.ok { background: #e7f6ec; color: var(--ok); }
.badge.warn { background: var(--saffron-50); color: var(--warn); }
.badge.bad { background: #fdeaea; color: var(--bad); }
.badge.neutral { background: #eef2f6; color: var(--ink-700); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(21,128,61,0.35); } 70% { box-shadow: 0 0 0 6px rgba(21,128,61,0); } 100% { box-shadow: 0 0 0 0 rgba(21,128,61,0); } }
.badge.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); animation: pulse 2.2s ease-out infinite; }

.empty-state { padding: 32px; text-align: center; color: var(--ink-500); }

.pager {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 12px; flex-wrap: wrap;
}
.pager .btn-ghost { padding: 7px 12px; font-size: 13px; }
#page-info {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-500);
  min-width: 140px; text-align: center;
}

/* DISCIPLINES: compact chip grid (was tall bar list → long scroll) */
.disc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  max-width: 100%;
}
.disc-chip {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left; background: var(--bg-card);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 9px 11px; cursor: pointer;
  font: inherit; color: var(--ink-900);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  min-width: 0;
}
.disc-chip:hover {
  background: var(--navy-50); border-color: var(--line-strong);
  box-shadow: inset 3px 0 0 var(--saffron-600);
}
.disc-chip:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 1px; }
.disc-chip[aria-pressed="true"] {
  background: var(--navy-50); border-color: var(--navy-600);
  box-shadow: inset 3px 0 0 var(--navy-600);
}
.disc-chip-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.disc-name {
  font-weight: 600; font-size: 12.5px; line-height: 1.3;
  color: var(--ink-900); min-width: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.disc-count {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: var(--ink-500); flex-shrink: 0;
}
.disc-track { height: 4px; background: #e8edf4; border-radius: 3px; overflow: hidden; }
.disc-fill {
  display: block; height: 100%; width: 0; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy-800), var(--navy-600));
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.disc-chip:hover .disc-fill,
.disc-chip[aria-pressed="true"] .disc-fill {
  background: linear-gradient(90deg, var(--saffron-700), var(--saffron-600));
}
.disc-chip.in .disc-fill,
.reveal.in .disc-fill { width: var(--w); }

/* legacy disc-row (unused) kept harmless */
.disc-list { display: grid; gap: 4px; }
.disc-row { display: none; }

/* PRE-TEST LAB CHECK */
.section-kicker {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--saffron-700); margin: 0 0 8px;
}
.req, .opt { font-weight: 500; letter-spacing: 0; text-transform: none; font-size: 11px; }
.req { color: var(--saffron-700); }
.opt { color: var(--ink-300); }
.check-form {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-sm);
  margin-bottom: 18px; max-width: 820px;
}
.check-grid {
  display: grid; grid-template-columns: 1fr; gap: 14px;
}
.check-field-main { grid-column: 1 / -1; }
/* Desktop: lab name | city (wider for geo control) | cert */
@media (min-width: 720px) {
  .check-field-main { grid-column: auto; }
  .check-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.25fr) minmax(0, 0.9fr); gap: 14px; }
}
.check-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.check-examples {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px;
}
.check-examples-label {
  font-size: 12px; color: var(--ink-500); font-weight: 500; margin-right: 2px;
}
.check-chip {
  font: inherit; font-size: 12px; font-weight: 500; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg-alt); color: var(--ink-700);
  border-radius: 999px; padding: 5px 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.check-chip:hover { background: var(--navy-50); border-color: var(--navy-600); color: var(--navy-800); }
.check-chip:focus-visible { outline: 2px solid var(--navy-600); outline-offset: 1px; }
/* Result card: same language as directory table + detail-grid (white ledger, not mint wash) */
.check-result {
  max-width: 820px;
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  color: var(--ink-900);
  font-family: var(--font-body);
}
.check-result.pop { animation: fadeUp 0.28s ease; }
/* Status only as left rail — matches table open-row saffron/navy accent, not full fill */
.check-result.ok { box-shadow: inset 3px 0 0 var(--ok), var(--shadow-sm); }
.check-result.warn { box-shadow: inset 3px 0 0 var(--warn), var(--shadow-sm); }
.check-result.bad { box-shadow: inset 3px 0 0 var(--bad), var(--shadow-sm); }

.check-result-inner { padding: 20px 22px 18px; }
.check-verdict { margin-bottom: 0; }
.check-query {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: var(--ink-700);
  padding: 8px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.check-query .d-label { margin-bottom: 2px; }
.check-partial-note {
  padding: 8px 10px;
  background: var(--saffron-50);
  border-left: 3px solid var(--saffron-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.check-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.check-lab-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0 0 4px;
  line-height: 1.25;
}
/* Street + pin is primary location; city/state is secondary */
.check-addr {
  margin: 0 0 2px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-900);
  font-family: var(--font-body);
  overflow-wrap: anywhere;
}
.check-loc {
  color: var(--ink-500);
  margin: 0 0 10px;
  font-size: 13px;
  font-family: var(--font-body);
}
.check-expect {
  margin-top: -4px;
  font-size: 13.5px;
  color: var(--ink-600);
  max-width: 42rem;
}
.check-branch-hint {
  margin: 0 0 10px;
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.45;
}
/* City + location: single composed control (input | pin action) */
.check-field-city { min-width: 0; }
.check-city-control {
  display: flex;
  align-items: stretch;
  min-height: 44px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.check-city-control:hover {
  border-color: var(--ink-300);
}
.check-city-control:focus-within {
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(30, 74, 122, 0.15);
}
.check-city-control input,
.check-city-control input:focus {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  border-radius: 0;
  background: transparent;
  padding: 10px 12px;
  font: inherit;
  font-size: 14px;
  color: var(--ink-900);
}
.check-geo-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--line);
  background: var(--navy-50);
  color: var(--navy-800);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.check-geo-btn:hover:not(:disabled) {
  background: var(--navy-900);
  color: #fff;
  border-left-color: var(--navy-900);
}
.check-geo-btn:active:not(:disabled) {
  transform: scale(0.98);
}
.check-geo-btn:focus-visible {
  outline: 2px solid var(--saffron-600);
  outline-offset: -2px;
  z-index: 1;
}
.check-geo-btn:disabled,
.check-geo-btn.is-busy {
  opacity: 0.85;
  cursor: wait;
  color: var(--navy-700);
  background: var(--navy-50);
}
.check-geo-icon {
  flex-shrink: 0;
  display: block;
}
.check-geo-text {
  display: inline-flex;
  align-items: center;
}
.check-geo-text-short { display: none; }
/* Mid widths: city column is tight — shorter label */
@media (max-width: 960px) and (min-width: 720px) {
  .check-geo-text-full { display: none; }
  .check-geo-text-short { display: inline; }
  .check-geo-btn { padding: 0 12px; gap: 6px; }
}
/* Mobile: stack — full-width action bar, 44px+ touch target */
@media (max-width: 719px) {
  .check-city-control {
    flex-direction: column;
    min-height: 0;
  }
  .check-city-control input {
    padding: 12px 14px;
    min-height: 44px;
  }
  .check-geo-btn {
    border-left: 0;
    border-top: 1px solid var(--line);
    min-height: 48px;
    padding: 12px 14px;
    justify-content: center;
    gap: 8px;
    font-size: 13.5px;
    background: var(--navy-50);
  }
  .check-geo-btn:hover:not(:disabled) {
    background: var(--navy-900);
    border-top-color: var(--navy-900);
  }
  .check-geo-text-full { display: inline; }
  .check-geo-text-short { display: none; }
}
/* Busy state: soft pulse on the pin (respect reduced motion) */
.check-geo-btn.is-busy .check-geo-icon {
  animation: geoPulse 1s ease-in-out infinite;
}
@keyframes geoPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}
@media (prefers-reduced-motion: reduce) {
  .check-geo-btn.is-busy .check-geo-icon { animation: none; }
  .check-geo-btn:active:not(:disabled) { transform: none; }
}
.check-geo-status {
  margin: 7px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-500);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  border: 1px solid transparent;
}
.check-geo-status[hidden] {
  display: none !important;
}
.check-geo-status.ok {
  color: var(--ok);
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.check-geo-status.warn {
  color: var(--saffron-700);
  background: var(--saffron-50);
  border-color: #fcd9a8;
}
.check-maps {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy-700);
  white-space: nowrap;
}
.check-maps:hover { color: var(--saffron-700); }
.check-lead {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--ink-900);
  line-height: 1.5;
}
.check-multi {
  font-size: 12.5px;
  margin: 0 0 14px;
  padding: 8px 10px;
  background: var(--navy-50);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--navy-600);
  color: var(--ink-700);
}
/* Fact grid mirrors .detail-grid from expanded directory rows */
.check-facts {
  list-style: none;
  padding: 14px 16px;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px 18px;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--ink-700);
}
.check-facts li { line-height: 1.5; min-width: 0; overflow-wrap: anywhere; }
.check-facts .d-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
  margin-bottom: 3px;
}
.check-facts .badge { margin: 2px 4px 2px 0; }
.check-facts .check-fact-cert {
  background: var(--saffron-50);
  border-left: 3px solid var(--saffron-600);
  padding: 6px 8px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: -2px 0;
}
.check-facts .check-fact-wide { grid-column: 1 / -1; }
.check-ext {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--navy-700);
  white-space: nowrap;
}
.check-ext:hover { color: var(--saffron-700); }
.check-meta-warn {
  color: var(--saffron-700);
  font-weight: 600;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.check-hint {
  font-size: 13px;
  margin: 0 0 12px;
  color: var(--ink-500);
  line-height: 1.5;
}
.check-next {
  margin: 10px 0 0;
  padding: 10px 12px 10px 1.4em;
  font-size: 13px;
  color: var(--ink-700);
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.check-next li { margin-bottom: 4px; }
.check-empty {
  margin: 0;
  padding: 20px 22px;
  font-size: 14px;
  color: var(--ink-700);
}
.check-inline-actions { margin-top: 4px; }
.check-inline-actions .btn-ghost {
  font-size: 13px;
  border-color: var(--line-strong);
  color: var(--ink-700);
}

/* Sublists: ledger blocks, same as table chrome */
.check-other, .check-alts {
  margin: 0;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.check-other h4, .check-alts h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-500);
}
.check-alt-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.check-alt-btn, .check-alt-static {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 10px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink-900);
}
.check-alt-list li:last-child .check-alt-btn,
.check-alt-list li:last-child .check-alt-static { border-bottom: 0; }
.check-alt-btn {
  cursor: pointer;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}
.check-alt-btn:hover {
  background: var(--navy-50);
  box-shadow: inset 3px 0 0 var(--saffron-600);
}
.check-alt-btn:focus-visible { outline: 2px solid var(--navy-600); outline-offset: -2px; }
.check-alt-btn strong, .check-alt-static strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}
.check-mini-addr {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-800);
  margin-top: 4px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.check-mini-meta {
  display: block;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--ink-500);
  margin-top: 4px;
  line-height: 1.45;
}
.check-mini-meta code {
  font-size: 11.5px;
  background: var(--navy-50);
  color: var(--navy-800);
}
.check-mini-scopes {
  display: block;
  font-size: 12px;
  font-family: var(--font-body);
  color: var(--ink-500);
  margin-top: 3px;
}
.check-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--line);
  background: var(--bg-alt);
}
.check-share-note, .check-disclaimer {
  font-size: 12px;
  margin: 8px 0 0;
  width: 100%;
  word-break: break-word;
  color: var(--ink-500);
  line-height: 1.45;
}
.check-share-note a, .check-disclaimer a {
  font-size: 12px;
  color: var(--navy-700);
  font-family: var(--font-mono);
}
.check-disclaimer { margin-top: 6px; }
input[id="c-cert"] { font-family: var(--font-mono); }

/* VERIFY */
.verify-form { display: flex; align-items: flex-end; gap: 10px; max-width: 560px; margin-bottom: 18px; }
.verify-form .field { display: flex; flex-direction: column; gap: 4px; min-width: 0; width: 100%; }
.verify-form .field-grow { flex: 1 1 auto; }
.verify-form button { flex: 0 0 auto; height: 40px; padding: 0 18px; }
@media (max-width: 640px) {
  .verify-form { flex-direction: column; align-items: stretch; }
  .verify-form button { width: 100%; }
}
.verify-result {
  padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--bg-card); max-width: 560px; min-height: 20px;
}
.verify-result.ok { border-color: #bfe3cd; background: #f3fbf6; box-shadow: inset 3px 0 0 var(--ok); }
.verify-result.bad { border-color: #f0cdc6; background: #fdf3f1; box-shadow: inset 3px 0 0 var(--bad); }
.verify-result.warn { border-color: #f3e0b8; background: var(--saffron-50); box-shadow: inset 3px 0 0 var(--warn); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.verify-result.pop { animation: fadeUp 0.28s ease; }

/* CALLOUT */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  background: var(--navy-900); color: #fff;
  border-radius: var(--radius); padding: 28px 32px;
  box-shadow: var(--shadow-md);
  position: relative; overflow: hidden;
}
.callout::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}
.callout > * { position: relative; }
.callout-num {
  font-family: var(--font-display); font-size: 3rem; font-weight: 900;
  color: var(--saffron-600); letter-spacing: -0.03em; line-height: 1;
}
.callout-body h2 { margin-bottom: 6px; font-size: 1.3rem; color: #fff; }
.callout-body p { margin-bottom: 8px; color: rgba(255,255,255,0.82); }
.callout-body strong { color: var(--saffron-600); }
.callout-body .muted { font-size: 12px; color: rgba(255,255,255,0.55); }
.callout-body a { color: var(--saffron-600); }



/* PROSE */
.prose { max-width: 720px; color: var(--ink-700); font-size: 15px; }
.prose p { margin-bottom: 14px; }
.prose strong { color: var(--ink-900); }

/* FOOTER */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 28px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-nav { display: flex; gap: 18px; }
.footer-nav a { color: var(--ink-700); font-size: 13px; transition: color 0.15s ease; }
.footer-nav a:hover { color: var(--saffron-700); }
.footer-note { font-size: 12px; width: 100%; margin: 0; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .filter-grid { grid-template-columns: repeat(3, 1fr); }
  .disc-row { grid-template-columns: 170px 1fr 80px; }
}
@media (max-width: 720px) {
  .check-grid { grid-template-columns: 1fr; }
  .check-field-main { grid-column: auto; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md); padding: 8px 0; max-width: none;
    z-index: 55;
  }
  .site-nav.open { display: flex; }
  .site-nav a {
    font-size: 15px; padding: 12px 20px; border-bottom: 0;
    border-left: 3px solid transparent;
  }
  .site-nav a:hover {
    background: var(--navy-50); border-left-color: var(--saffron-600);
    border-bottom-color: transparent;
  }
  .header-inner { position: relative; }
}
@media (max-width: 640px) {
  .site-nav a { font-size: 15px; }
  .hero { padding: 44px 0 40px; }
  .hero h1 { max-width: none; }
  .hero-search { flex-direction: column; padding: 10px; border-radius: var(--radius); gap: 8px; }
  .hero-search button { padding: 12px; }
  .hero-stats > div { padding-right: 18px; margin-right: 18px; }
  .stat-num { font-size: 1.35rem; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .disc-row { grid-template-columns: 1fr 72px; row-gap: 8px; }
  .disc-track { grid-column: 1 / -1; order: 3; }
  .callout { grid-template-columns: 1fr; gap: 12px; }
  .callout-num { font-size: 2.2rem; }
  .filter-actions { flex-wrap: wrap; }
  .result-count { width: 100%; text-align: left; margin: 8px 0 0 0; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .table-wrap { max-height: min(48vh, 380px); }
  .labs-table th, .labs-table td { padding: 6px 8px; }
  .disc-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; }
  .disc-chip { padding: 8px 9px; }
}
@media (max-width: 420px) {
  .filter-grid { grid-template-columns: 1fr; }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
  .reveal.in .disc-fill, .disc-fill { width: var(--w); transition: none; }
}

/* Print */
@media print {
  .site-header, .site-footer, .hero-search, .filters, .pager, .verify-form, .site-nav { display: none; }
  body { color: #000; background: #fff; }
  .hero, .callout { background: #fff; color: #000; }
  .hero h1, .callout-body h2, .callout-body p { color: #000; }
  .labs-table { font-size: 11px; }
  .table-wrap { max-height: none; border: 1px solid #ccc; }
}

/* 3D perspective + scroll parallax (CSS only, zero deps) */
body { perspective: 1200px; perspective-origin: 50% 40%; }
.hero { transform: translateZ(0); transform-style: preserve-3d; }
.hero-search { transition: transform 0.25s ease, box-shadow 0.25s ease; transform-style: preserve-3d; }
.hero-search:hover { transform: translateZ(8px) scale(1.005); }
.disc-chip { transform-style: preserve-3d; }
.labs-table tbody tr.lab-row { transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.2s ease; transform-style: preserve-3d; }
.labs-table tbody tr.lab-row:hover { transform: translateZ(2px); }
.callout { transform-style: preserve-3d; }
.filters:hover { transform: translateY(-1px) translateZ(2px); }
.verify-result { transform-style: preserve-3d; }
.filters { transform-style: preserve-3d; }
.detail-row td { transform-style: preserve-3d; }

/* Scroll parallax: sections depth-shift on scroll */
.section { transform-style: preserve-3d; }
@supports (animation-timeline: view()) {
  .section { animation: parallaxIn ease both; animation-timeline: view(); animation-range: entry 0% cover 40%; }
  @keyframes parallaxIn { from { opacity: 0.6; transform: translateZ(-20px) scale(0.98); } to { opacity: 1; transform: translateZ(0) scale(1); } }
  .hero { animation: heroIn ease both; animation-timeline: view(); animation-range: entry 0% cover 50%; }
  @keyframes heroIn { from { opacity: 0.8; transform: translateZ(-30px) scale(0.97); } to { opacity: 1; transform: translateZ(0) scale(1); } }
}

/* ─────────────────────────────────────────────────────────────
   v2 MOTION + DEPTH LAYER
   Layers on top of base. No build step. Reduced-motion safe.
   ───────────────────────────────────────────────────────────── */

/* Hero canvas: constellation network of lab "nodes" */
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; pointer-events: none; opacity: 0.9;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 35%, transparent 85%);
}
.hero { position: relative; overflow: hidden; }
.hero-inner { position: relative; z-index: 2; }

/* Aurora glow that drifts behind hero content */
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 120%;
  pointer-events: none; z-index: 1;
  background:
    radial-gradient(ellipse 50% 40% at 18% 30%, rgba(217,119,6,0.22), transparent 60%),
    radial-gradient(ellipse 45% 35% at 82% 25%, rgba(30,74,122,0.35), transparent 65%),
    radial-gradient(ellipse 60% 45% at 50% 95%, rgba(180,83,9,0.14), transparent 70%);
  filter: blur(24px);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0% { transform: translate3d(0,0,0) scale(1); opacity: 0.85; }
  50% { transform: translate3d(2%, -1%, 0) scale(1.04); opacity: 1; }
  100% { transform: translate3d(-2%, 1%, 0) scale(1.02); opacity: 0.9; }
}

/* Eyebrow: animated underline sweep */
.eyebrow { position: relative; padding-bottom: 2px; }
.eyebrow::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: linear-gradient(90deg, var(--saffron-600), transparent);
  animation: underSlide 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}
@keyframes underSlide { to { width: 100%; } }

/* H1: gradient text + slow gradient drift */
.hero h1 {
  background: linear-gradient(120deg, #ffffff 0%, #e8eef9 35%, #fdf3e6 65%, #ffffff 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: h1Shimmer 9s ease-in-out infinite;
}
@keyframes h1Shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Stats: glow on numbers, gradient saffron for the "uplift" stat */
.hero-stats .stat-num {
  text-shadow: 0 0 22px rgba(217,119,6,0.18);
  transition: text-shadow 0.4s ease;
}
.hero-stats > div:last-child .stat-num {
  background: linear-gradient(120deg, var(--saffron-600), #fbbf24, var(--saffron-700));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 100%; animation: upliftPulse 4s ease-in-out infinite;
}
@keyframes upliftPulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.hero-stats > div { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.hero-stats > div:hover { transform: translateY(-2px); }
.hero-stats > div:hover .stat-num { text-shadow: 0 0 30px rgba(217,119,6,0.5); }

/* Hero search: stronger 3D lift + glow ring on hover */
.hero-search {
  transform: translateZ(0);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}
.hero-search:hover {
  transform: translateZ(10px) scale(1.01);
  box-shadow: 0 14px 36px rgba(4,12,24,0.45), 0 0 0 1px rgba(217,119,6,0.35), 0 0 30px rgba(217,119,6,0.18);
}
.hero-search button {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  background-size: 200% 100%; background-position: 0% 50%;
  transition: background-position 0.5s ease, transform 0.1s ease;
}
.hero-search button:hover {
  background: linear-gradient(135deg, var(--saffron-600), var(--saffron-700));
  background-position: 100% 50%;
}
.hero-search button::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.hero-search button:hover::before { left: 140%; }

/* Magnetic buttons: JS sets --mx --my for translate */
.magnet {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.15s ease,
              box-shadow 0.25s ease;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  will-change: transform;
}
.magnet:hover {
  box-shadow: 0 6px 18px rgba(11,37,69,0.28), 0 0 0 1px rgba(217,119,6,0.4);
}
.magnet:active { transform: translate3d(var(--mx, 0), var(--my, 0), 0) scale(0.96); }

/* 3D tilt target: JS sets --rx --ry */
.tilt-target {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.tilt-target > * { transform: translateZ(20px); }
.tilt-target .callout-num { transform: translateZ(40px); }

/* Discipline rows: richer 3D tilt + animated bar gradient */
.disc-row {
  transform-style: preserve-3d;
  transition: background 0.15s ease, border-color 0.15s ease,
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease;
}
.disc-row:hover {
  background: #fff;
  border-color: var(--line);
  transform: translateX(3px) rotateY(-1.5deg) translateZ(6px);
  box-shadow: -4px 4px 16px rgba(11,37,69,0.10);
}
.disc-fill {
  background: linear-gradient(90deg, var(--navy-800), var(--navy-600), var(--saffron-600));
  background-size: 200% 100%; background-position: 0% 50%;
  transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1), background-position 0.5s ease;
}
.disc-row:hover .disc-fill { background-position: 100% 50%; }

/* Lab rows: smoother expand + 3D lift on hover */
.labs-table tbody tr.lab-row {
  transform-style: preserve-3d;
  transition: background 0.15s ease, box-shadow 0.15s ease,
              transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.labs-table tbody tr.lab-row:hover {
  background: var(--navy-50);
  box-shadow: inset 3px 0 0 var(--saffron-600), 0 4px 14px rgba(11,37,69,0.08);
  transform: translateZ(3px);
}
.labs-table tbody tr.lab-row.open {
  background: var(--navy-50);
  box-shadow: inset 3px 0 0 var(--saffron-600);
}
.detail-row td { overflow: hidden; }
.detail-grid {
  animation: detailIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center; transform-style: preserve-3d;
}
@keyframes detailIn {
  from { opacity: 0; transform: translateY(-8px) rotateX(-6deg); }
  to { opacity: 1; transform: none; }
}

/* Callout: deeper grid pulse + saffron edge glow */
.callout {
  transform-style: preserve-3d;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(217,119,6,0.18), 0 20px 60px rgba(11,37,69,0.25);
}
.callout::before { animation: gridShift 16s linear infinite; }
@keyframes gridShift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 28px 28px, 28px 28px; }
}
.callout-num {
  text-shadow: 0 0 28px rgba(217,119,6,0.55), 0 0 6px rgba(251,191,36,0.4);
  animation: numGlow 5s ease-in-out infinite alternate;
}
@keyframes numGlow {
  from { text-shadow: 0 0 22px rgba(217,119,6,0.45), 0 0 6px rgba(251,191,36,0.3); }
  to { text-shadow: 0 0 36px rgba(217,119,6,0.7), 0 0 12px rgba(251,191,36,0.6); }
}

/* Brand mark: rotating saffron tick + glow on hover */
.brand:hover .brand-mark { transform: rotate(-4deg) scale(1.05); }
.brand-mark {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 0 0 rgba(217,119,6,0);
}
.brand-mark::after {
  animation: tickPulse 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(217,119,6,0.5);
}
@keyframes tickPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(217,119,6,0.5); }
  50% { transform: scale(1.15); box-shadow: 0 0 0 4px rgba(217,119,6,0); }
}
.brand:hover .brand-mark { box-shadow: 0 6px 18px rgba(11,37,69,0.25); }

/* Nav links: animated underline (replaces static border) */
.site-nav a { position: relative; border-bottom: 0 !important; }
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--saffron-600), var(--saffron-700));
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:hover::after, .site-nav a:focus-visible::after { width: 100%; }
.site-nav a:focus-visible { outline: none; }

/* Primary buttons get gradient + shimmer sweep */
.btn-primary {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  background-size: 200% 100%; background-position: 0% 50%;
  position: relative; overflow: hidden;
  transition: background-position 0.45s ease, transform 0.1s ease, box-shadow 0.25s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--navy-700), var(--saffron-700));
  background-position: 100% 50%;
  box-shadow: 0 6px 18px rgba(11,37,69,0.28);
}
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.btn-primary:hover::before { left: 140%; }

/* Ghost buttons: subtle inner depth */
.btn-ghost {
  background: linear-gradient(180deg, #fff, #f6f8fc);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 1px 2px rgba(15,20,25,0.04);
  transition: background 0.2s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn-ghost:hover:not(:disabled) {
  background: linear-gradient(180deg, #fff, #eef3f9);
  border-color: var(--ink-300);
  transform: translateY(-1px);
}

/* Section heads: gradient divider */
.section-head h2 {
  position: relative; padding-bottom: 14px;
}
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 56px;
  background: linear-gradient(90deg, var(--navy-700), var(--saffron-600));
  border-radius: 2px;
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.section-head.in h2::after { transform: scaleX(1); }

/* Verify result: 3D pop on appear */
.verify-result.pop {
  animation: verifyPop 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: top center; transform-style: preserve-3d;
}
@keyframes verifyPop {
  from { opacity: 0; transform: translateY(10px) rotateX(-8deg) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* Badge ok: stronger pulse */
.badge.ok::before { animation: pulse 2s ease-out infinite; }

/* Custom scrollbar (webkit) */
.table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-track { background: var(--bg-alt); }
.table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--navy-600), var(--navy-700));
  border-radius: 5px; border: 2px solid var(--bg-alt);
}
.table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--saffron-600), var(--saffron-700));
}

/* Focus ring: saffron glow */
:focus-visible {
  outline: 2px solid var(--saffron-600);
  outline-offset: 2px;
  border-radius: 4px;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.18), 0 0 16px rgba(217,119,6,0.12);
}

/* Footer brand: gentle hover lift */
.footer-brand .brand-mark { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.footer-brand:hover .brand-mark { transform: rotate(-4deg); box-shadow: 0 4px 12px rgba(11,37,69,0.18); }

/* Hero parallax layers: JS translates them by --px --py */
[data-parallax] {
  transform: translate3d(var(--px, 0), var(--py, 0), var(--pz, 0));
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

/* Reveal: springier entry */
.js-reveal .reveal { transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.js-reveal .reveal.in { transform: translateZ(0); }

/* Print: kill all motion */
@media print {
  .hero-glow, #hero-canvas { display: none; }
  .hero h1 { -webkit-text-fill-color: #000; color: #000; background: none; }
  .hero-stats .stat-num, .hero-stats > div:last-child .stat-num {
    -webkit-text-fill-color: #000; color: #000; background: none; text-shadow: none;
  }
  .callout::before { animation: none; }
}

/* Reduced motion: disable every v2 animation */
@media (prefers-reduced-motion: reduce) {
  .hero-glow, .callout::before, .callout-num, .brand-mark::after,
  .hero h1, .hero-stats > div:last-child .stat-num { animation: none !important; }
  [data-parallax], .magnet, .tilt-target { transform: none !important; }
  .hero-search:hover { transform: none; box-shadow: 0 8px 24px rgba(4,12,24,0.35); }
  .labs-table tbody tr.lab-row:hover { transform: none; }
  .disc-row:hover { transform: translateX(3px); }
  .btn-primary::before, .hero-search button::before { display: none; }
  .verify-result.pop { animation: none; }
}
