/*
  NHID-Clinical standalone CSS
  Design philosophy: Swiss International Typographic Style adapted for clinical trust infrastructure.
  Preserve calm whitespace, precise hierarchy, soft medical blues, muted teal accents, and restrained movement.
*/
:root {
  --ink: #082a5b;
  --ink-soft: #334155;
  --body: #5d6b7a;
  --blue: #0b6ebc;
  --blue-soft: #eaf5fb;
  --teal: #188eaa;
  --teal-soft: #e8f8f4;
  --line: rgba(190, 213, 226, 0.78);
  --paper: #ffffff;
  --mist: #f8fbfd;
  --shadow: 0 28px 80px rgba(20, 74, 105, 0.1);
  --display: "Raleway", system-ui, sans-serif;
  --sans: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* aliases for inner page compatibility */
  --text: var(--ink-soft);
  --text-muted: var(--body);
  --bg: var(--mist);
  --bg-2: #eaf5fb;
  --surface: var(--paper);
  --border: var(--line);
  --radius: 6px;
  --radius-sm: 3px;
  --font-display: var(--display);
  --font-body: var(--sans);
  --nav-h: 5rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 92% 9%, rgba(204, 229, 244, 0.66), transparent 27rem),
    radial-gradient(circle at 7% 20%, rgba(225, 247, 248, 0.55), transparent 24rem),
    linear-gradient(180deg, #f9fcfe 0%, #f7fbfd 42%, #ffffff 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: min(100% - 2rem, 1320px);
  margin-inline: auto;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(203, 213, 225, 0.75);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  min-height: 5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  position: relative;
  display: inline-flex;
  width: 3.65rem;
  height: 3.65rem;
  align-items: center;
  justify-content: center;
  border-radius: 1rem 1rem 1.32rem 1.32rem;
  overflow: hidden;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-wave {
  position: absolute;
  bottom: 0.72rem;
  display: inline-flex;
  gap: 0.12rem;
}

.brand-wave span {
  width: 0.11rem;
  border-radius: 999px;
  background: #2194aa;
}

.brand-wave span:nth-child(1),
.brand-wave span:nth-child(3) { height: 0.42rem; }
.brand-wave span:nth-child(2) { height: 0.7rem; }

.brand strong {
  display: block;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.brand small {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  position: relative;
  padding: 1.8rem 0.9rem 1.55rem;
  color: #334155;
  font-size: 0.96rem;
  font-weight: 500;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: -1px;
  height: 0.18rem;
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: transform 260ms ease;
}

.nav-links a:hover,
.nav-links .is-active {
  color: #0b5f9e;
}

.nav-links a:hover::after,
.nav-links .is-active::after {
  transform: scaleX(1);
}

/* nav layer separator */
.nav-sep {
  display: inline-block;
  width: 1px;
  height: 1.05rem;
  background: var(--line);
  margin: 0 0.3rem;
  flex-shrink: 0;
  align-self: center;
}

[data-theme="dark"] .nav-sep { background: rgba(30, 65, 100, 0.65); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-button {
  display: inline-flex;
  width: 3.15rem;
  height: 3.15rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(15, 57, 96, 0.06);
  cursor: pointer;
}

.menu-button {
  display: none;
}

.primary-pill,
.cta-button,
.closing-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.2rem;
  padding: 0 1.45rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(13, 108, 166, 0.23);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.primary-pill:hover,
.cta-button:hover,
.closing-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 58px rgba(13, 108, 166, 0.3);
}

/* ── Hero section ────────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(203, 213, 225, 0.75);
  background: linear-gradient(90deg, rgba(255,255,255,0.98), rgba(235,246,252,0.86));
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.44;
  background-image:
    linear-gradient(rgba(12, 90, 130, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 90, 130, 0.045) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, transparent 0%, black 12%, black 74%, transparent 100%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  align-items: center;
  gap: 4rem;
  padding-block: 6rem;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  color: #197f91;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.status-dot {
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: #27a7a8;
  animation: pulse-dot 2.8s ease-out infinite;
}

.hero-copy h1 {
  margin: 1.5rem 0 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(3.4rem, 8vw, 7.15rem);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.hero-subtitle {
  max-width: 41rem;
  margin: 1.75rem 0 0;
  color: #334155;
  font-size: clamp(1.35rem, 2.2vw, 2.05rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.035em;
}

.hero-body {
  max-width: 36rem;
  margin: 1.75rem 0 0;
  color: var(--body);
  font-size: 1.05rem;
  line-height: 1.85;
}

.hero-notice {
  margin-top: 1.5rem;
  padding: .875rem 1.1rem;
  border-left: 3px solid var(--blue);
  background: rgba(15, 87, 139, .07);
  border-radius: 0 6px 6px 0;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--ink-soft);
}
[data-theme="dark"] .hero-notice {
  background: rgba(15, 87, 139, .18);
}
.callout {
  margin-top: 1.25rem;
  padding: .875rem 1.1rem;
  border-left: 3px solid var(--blue);
  background: rgba(15, 87, 139, .07);
  border-radius: 0 6px 6px 0;
  font-size: .875rem;
  line-height: 1.7;
  color: var(--ink-soft);
}
[data-theme="dark"] .callout {
  background: rgba(15, 87, 139, .18);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.25rem;
}

.cta-button,
.secondary-button {
  min-height: 3.9rem;
  padding-inline: 1.85rem;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(8, 42, 91, 0.42);
  border-radius: 999px;
  color: #0f578b;
  background: rgba(255,255,255,0.62);
  font-weight: 700;
}

.hero-art {
  position: relative;
  min-height: 28rem;
  overflow: hidden;
  border: 1px solid rgba(177, 210, 226, 0.32);
  border-radius: 2rem;
  background: rgba(255,255,255,0.52);
  box-shadow: inset 0 0 0 1px rgba(177, 210, 226, 0.32), 0 34px 90px rgba(34, 86, 121, 0.12);
}

.hero-art img {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  object-fit: cover;
  object-position: 76% center;
  mix-blend-mode: multiply;
}

.floating-note {
  position: absolute;
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.85rem;
  border: 1px solid rgba(168, 207, 222, 0.7);
  border-radius: 999px;
  color: #0f578b;
  background: rgba(255,255,255,0.84);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(20, 74, 105, 0.12);
  animation: float-note 5.8s ease-in-out infinite;
}

.note-one { left: 3%; bottom: 13%; }
.note-two { right: 8%; top: 16%; animation-delay: 1.1s; }

/* ── Standards section ───────────────────────────────────────────────────── */
.standards-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-block: 2.5rem 1.75rem;
}

.standard-card {
  min-height: 13rem;
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.standard-card:hover {
  transform: translateY(-5px);
  border-color: rgba(39, 167, 168, 0.38);
  box-shadow: 0 30px 82px rgba(20, 74, 105, 0.12);
}

.card-icon {
  display: inline-flex;
  width: 4.55rem;
  height: 4.55rem;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f6f93;
  background: linear-gradient(145deg, #eaf5fb, #f7fcfd);
  font-size: 2rem;
}

.tone-teal .card-icon { color: #1a8e8f; background: linear-gradient(145deg, #e8f8f4, #f7fcfd); }
.tone-indigo .card-icon { color: #4b519f; background: linear-gradient(145deg, #f0f0ff, #f9fbff); }

.standard-card h2,
.split-section h2,
.validation-section h2,
.closing-panel h2 {
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.055em;
}

.standard-card h2 {
  margin: 1.2rem 0 0;
  font-size: 1.3rem;
  line-height: 1.25;
}

.standard-card p {
  color: var(--body);
  line-height: 1.75;
}

.standard-card a {
  display: inline-flex;
  gap: 0.45rem;
  margin-top: 0.9rem;
  color: #0e78a5;
  font-weight: 700;
}

/* ── Benefits band ───────────────────────────────────────────────────────── */
.benefits-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3.5rem;
  padding: 1.55rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255,255,255,0.76);
  box-shadow: 0 20px 65px rgba(20, 74, 105, 0.06);
}

.benefits-band div {
  display: grid;
  gap: 0.35rem;
}

.benefits-band strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.benefits-band span {
  color: #64748b;
  font-size: 0.92rem;
}

/* ── Split sections ──────────────────────────────────────────────────────── */
.split-section {
  border-block: 1px solid var(--line);
  padding-block: 5.5rem;
}

.white-section { background: #fff; }
.blue-section { background: #eef7fa; }

.split-grid,
.validation-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  align-items: center;
  gap: 4rem;
}

.split-grid.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.split-section h2,
.validation-section h2,
.closing-panel h2 {
  margin: 1rem 0 0;
  font-size: clamp(2.3rem, 4vw, 3.5rem);
  line-height: 1.05;
}

.split-section p,
.validation-section .section-heading > p:not(.section-kicker),
.closing-panel p {
  color: var(--body);
  font-size: 1.08rem;
  line-height: 1.8;
}

.problem-panel {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 1.4rem;
  background: radial-gradient(circle at 85% 15%, rgba(211,239,243,0.66), transparent 15rem), rgba(248,252,254,0.86);
  box-shadow: var(--shadow);
}

.problem-panel div {
  padding: 1.15rem;
  border: 1px solid rgba(197, 216, 227, 0.76);
  border-radius: 1rem;
  color: #16456f;
  background: rgba(255,255,255,0.82);
  font-weight: 700;
}

.problem-panel .warn { color: #8a5b12; background: rgba(255,250,238,0.82); }
.problem-panel .good { color: #117879; background: rgba(239,253,250,0.9); }

/* ── Validation section ──────────────────────────────────────────────────── */
.validation-section {
  padding-block: 5.5rem;
}

.section-heading {
  max-width: 48rem;
  margin-inline: auto;
  text-align: center;
}

.section-heading .section-kicker {
  justify-content: center;
}

.validation-grid {
  grid-template-columns: 1.08fr 0.92fr;
  margin-top: 3.5rem;
}

.image-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 35px 100px rgba(23, 77, 111, 0.1);
}

.flow-list {
  display: grid;
  gap: 1.1rem;
}

.flow-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  padding: 1.35rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.15rem;
  background: rgba(255,255,255,0.84);
  box-shadow: 0 18px 54px rgba(20, 74, 105, 0.06);
}

.flow-list span {
  display: inline-flex;
  width: 2.7rem;
  height: 2.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #197f91;
  background: #e7f6f7;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.flow-list h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.flow-list p {
  margin: 0.5rem 0 0;
  color: var(--body);
  line-height: 1.7;
}

.badge-card {
  max-height: 31rem;
}

/* ── Tier grid (homepage) ────────────────────────────────────────────────── */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.tier-grid div {
  min-height: 8.4rem;
  padding: 1.15rem;
  border: 1px solid rgba(164,202,216,0.64);
  border-radius: 1rem;
  background: rgba(255,255,255,0.74);
}

.tier-grid strong {
  display: block;
  color: #0e78a5;
  font-family: var(--display);
  font-size: 2.1rem;
  line-height: 1;
  letter-spacing: -0.06em;
}

.tier-grid span {
  display: block;
  margin-top: 0.9rem;
  color: #506173;
  font-size: 0.95rem;
  line-height: 1.45;
}

/* ── Closing CTA ─────────────────────────────────────────────────────────── */
.closing-section {
  padding-block: 5.5rem;
}

.closing-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 2rem;
  min-height: 28rem;
  padding: clamp(2rem, 5vw, 4rem);
  border-radius: 2rem;
  background:
    radial-gradient(circle at 84% 8%, rgba(63,188,190,0.32), transparent 22rem),
    radial-gradient(circle at 14% 92%, rgba(136,196,234,0.25), transparent 18rem),
    linear-gradient(135deg, #082a5b, #0f578b 52%, #117879);
  box-shadow: 0 40px 120px rgba(8, 42, 91, 0.24);
}

.closing-panel .section-kicker {
  color: #a8f1ec;
}

.closing-panel h2,
.closing-panel p {
  color: white;
}

.closing-panel p {
  max-width: 43rem;
  color: rgba(239, 246, 255, 0.88);
}

.closing-button {
  color: #0f578b;
  background: white;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  background: white;
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  color: #64748b;
  font-size: 0.92rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-inner p {
  margin: 0;
  max-width: 56ch;
  line-height: 1.6;
}

.footer-inner div {
  display: flex;
  gap: 1.2rem;
}

.footer-inner a {
  color: #355a76;
  font-weight: 600;
}

.footer-copy {
  font-size: 0.78rem;
  color: #94a3b8;
  max-width: none;
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  margin-top: 1rem;
  line-height: 1.65;
  display: none;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(39,167,168,0.42); }
  70% { box-shadow: 0 0 0 0.68rem rgba(39,167,168,0); }
  100% { box-shadow: 0 0 0 0 rgba(39,167,168,0); }
}

@keyframes float-note {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ── Mobile drawer ───────────────────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  top: 0;
  right: -300px;
  bottom: 0;
  z-index: 200;
  width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 1.5rem 0 2rem;
  background: white;
  border-left: 1px solid rgba(203, 213, 225, 0.75);
  box-shadow: -8px 0 40px rgba(8, 42, 91, 0.12);
  transition: right 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-nav.open {
  right: 0;
}

.mobile-nav a {
  display: block;
  padding: 0.875rem 1.5rem;
  color: #334155;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(203, 213, 225, 0.5);
  transition: background 150ms, color 150ms;
}

.mobile-nav a:hover {
  background: var(--mist);
  color: var(--blue);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(8, 42, 91, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease;
  backdrop-filter: blur(2px);
}

.nav-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav-footer {
  margin-top: auto;
  padding: 1.25rem 1.5rem 0.5rem;
  border-top: 1px solid rgba(203, 213, 225, 0.5);
}

.mobile-theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #334155;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--sans);
}

.mobile-theme-toggle:hover { color: var(--blue); }

.mobile-theme-label { flex: 1; text-align: left; }

[data-theme="dark"] .mobile-nav-footer { border-top-color: rgba(25, 60, 95, 0.5); }
[data-theme="dark"] .mobile-theme-toggle { color: #8aabcc; }

/* ── Search overlay ──────────────────────────────────────────────────────── */
.search-overlay {
  border-top: 1px solid var(--line);
  padding: 0.75rem 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(18px);
}

.search-overlay[hidden] { display: none; }

.search-overlay-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-input {
  flex: 1;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  outline: none;
  padding: 0.35rem 0;
}

.search-input::placeholder { color: #94a3b8; }

.search-close {
  flex-shrink: 0;
  box-shadow: none;
  color: var(--body);
}

.search-results {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.2rem;
  max-height: 22rem;
  overflow-y: auto;
}

.search-result-item {
  display: block;
  padding: 0.7rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: background 150ms;
  text-decoration: none;
}

.search-result-item:hover,
.search-result-item.is-focused {
  background: var(--blue-soft);
}

.search-result-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  display: block;
}

.search-result-excerpt {
  font-size: 0.82rem;
  color: var(--body);
  margin-top: 0.2rem;
  display: block;
}

.search-result-excerpt mark {
  background: rgba(11, 110, 188, 0.15);
  color: var(--blue);
  border-radius: 2px;
  padding: 0 2px;
}

.search-empty {
  padding: 0.75rem 0.75rem;
  font-size: 0.9rem;
  color: var(--body);
}

/* ── Theme toggle ────────────────────────────────────────────────────────── */
.theme-toggle .sun-icon  { display: none; }
.theme-toggle .moon-icon { display: block; }
[data-theme="dark"] .theme-toggle .sun-icon  { display: block; }
[data-theme="dark"] .theme-toggle .moon-icon { display: none; }

/* ── Dark mode ───────────────────────────────────────────────────────────── */
[data-theme="dark"] {
  --ink: #cfe2f7;
  --ink-soft: #a0b8d0;
  --body: #728a9e;
  --blue: #58b4f0;
  --blue-soft: #0b1e33;
  --teal: #3ecece;
  --teal-soft: #091e26;
  --line: rgba(30, 65, 100, 0.65);
  --paper: #0d1d2f;
  --mist: #091524;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  /* aliases */
  --text: #a0b8d0;
  --text-muted: #728a9e;
  --bg: #091524;
  --bg-2: #0b1e33;
  --surface: #0d1d2f;
  --border: rgba(30, 65, 100, 0.65);
}

[data-theme="dark"] body {
  color: var(--ink-soft);
  background:
    radial-gradient(circle at 92% 9%, rgba(10, 40, 80, 0.7), transparent 27rem),
    radial-gradient(circle at 7% 20%, rgba(8, 50, 65, 0.55), transparent 24rem),
    linear-gradient(180deg, #091524 0%, #0c1e30 100%);
}

[data-theme="dark"] .site-header {
  background: rgba(9, 21, 36, 0.96);
  border-bottom-color: rgba(30, 60, 100, 0.7);
}



[data-theme="dark"] .brand strong { color: var(--ink); }
[data-theme="dark"] .brand small  { color: #5a7a96; }

[data-theme="dark"] .nav-links a { color: #8aabcc; }
[data-theme="dark"] .nav-links a:hover,
[data-theme="dark"] .nav-links .is-active { color: #58b4f0; }

[data-theme="dark"] .icon-button {
  background: rgba(13, 29, 47, 0.9);
  border-color: rgba(30, 65, 100, 0.5);
  color: var(--ink-soft);
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(90deg, rgba(9,21,36,0.98), rgba(10,30,50,0.92));
  border-bottom-color: rgba(30, 60, 100, 0.7);
}

[data-theme="dark"] .hero-art {
  background: rgba(10, 20, 35, 0.7);
  border-color: rgba(20, 50, 80, 0.5);
}

[data-theme="dark"] .hero-art img { mix-blend-mode: screen; opacity: 0.85; }

/* Theme-aware image pairs: show light in light mode, dark in dark mode */
.theme-img-dark { display: none; }
[data-theme="dark"] .theme-img-light { display: none; }
[data-theme="dark"] .theme-img-dark { display: block; }
[data-theme="dark"] .hero-art .theme-img-dark { mix-blend-mode: normal; opacity: 1; }

[data-theme="dark"] .floating-note {
  background: rgba(10, 25, 45, 0.92);
  border-color: rgba(30, 80, 120, 0.6);
  color: #7ec8f4;
}

[data-theme="dark"] .standard-card,
[data-theme="dark"] .content-card,
[data-theme="dark"] .cert-card,
[data-theme="dark"] .news-card,
[data-theme="dark"] .community-card,
[data-theme="dark"] .download-card,
[data-theme="dark"] .flow-list article,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .hero-summary-card,
[data-theme="dark"] .card,
[data-theme="dark"] .test-card {
  background: rgba(13, 29, 47, 0.92);
  border-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .benefits-band {
  background: rgba(10, 25, 45, 0.7);
  border-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .benefits-band strong { color: var(--ink); }
[data-theme="dark"] .benefits-band span   { color: #5a7a96; }

[data-theme="dark"] .problem-panel {
  background: rgba(8, 20, 38, 0.7);
  border-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .problem-panel div {
  background: rgba(13, 29, 47, 0.92);
  border-color: rgba(25, 60, 95, 0.65);
  color: #7ec8f4;
}

[data-theme="dark"] .problem-panel .warn {
  background: rgba(40, 25, 8, 0.8);
  color: #d4a052;
  border-color: rgba(100, 65, 15, 0.6);
}

[data-theme="dark"] .problem-panel .good {
  background: rgba(8, 40, 38, 0.85);
  color: #3ecece;
  border-color: rgba(20, 100, 90, 0.5);
}

[data-theme="dark"] .split-section { border-block-color: rgba(30, 65, 100, 0.65); }
[data-theme="dark"] .white-section  { background: #0d1d2f; }
[data-theme="dark"] .blue-section   { background: #091d2b; }

[data-theme="dark"] .image-card {
  background: rgba(10, 25, 45, 0.7);
  border-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .tier-grid div {
  background: rgba(13, 29, 47, 0.92);
  border-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .tier-grid strong { color: #58b4f0; }
[data-theme="dark"] .tier-grid span   { color: #5a7a96; }

[data-theme="dark"] .closing-panel {
  background:
    radial-gradient(circle at 84% 8%, rgba(20, 80, 90, 0.45), transparent 22rem),
    radial-gradient(circle at 14% 92%, rgba(20, 60, 100, 0.3), transparent 18rem),
    linear-gradient(135deg, #040e1c, #071829 52%, #041418);
}

[data-theme="dark"] .site-footer {
  background: #091524;
  border-top-color: rgba(25, 55, 85, 0.7);
}

[data-theme="dark"] .footer-inner { color: #5a7a96; }
[data-theme="dark"] .footer-inner a { color: #58b4f0; }

[data-theme="dark"] .mobile-nav {
  background: #0d1d2f;
  border-left-color: rgba(25, 60, 95, 0.65);
}

[data-theme="dark"] .mobile-nav a { color: #8aabcc; border-bottom-color: rgba(25, 60, 95, 0.5); }
[data-theme="dark"] .mobile-nav a:hover { background: rgba(10, 25, 45, 0.6); color: #58b4f0; }

[data-theme="dark"] .inner-hero {
  background: linear-gradient(135deg, #0c1d2e 0%, #091524 100%);
}

[data-theme="dark"] .page-section-alt { background: #091524; }

[data-theme="dark"] .pass-box {
  background: rgba(5, 50, 35, 0.5);
  border-color: rgba(16, 120, 80, 0.4);
}

[data-theme="dark"] .fail-box {
  background: rgba(50, 10, 10, 0.5);
  border-color: rgba(150, 30, 30, 0.4);
}

[data-theme="dark"] .faq-code {
  background: rgba(5, 15, 28, 0.85);
  border-color: rgba(25, 60, 95, 0.65);
  color: #a0b8d0;
}

[data-theme="dark"] .faq-table th { background: rgba(10, 25, 45, 0.7); color: var(--ink); }
[data-theme="dark"] .faq-table td { color: var(--body); }

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: rgba(10, 25, 45, 0.8);
  border-color: rgba(30, 70, 110, 0.7);
  color: var(--ink-soft);
}

[data-theme="dark"] .search-overlay {
  background: rgba(9, 21, 36, 0.98);
  border-top-color: rgba(30, 65, 100, 0.6);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item.is-focused { background: var(--blue-soft); }

[data-theme="dark"] .download-section { background: #091524; border-block-color: rgba(30, 65, 100, 0.65); }

[data-theme="dark"] .download-header { background: rgba(13, 29, 47, 0.92); border-color: rgba(25, 60, 95, 0.65); }

[data-theme="dark"] .article-link {
  background: rgba(13, 29, 47, 0.92);
  border-color: rgba(25, 60, 95, 0.65);
}

/* smooth transitions for theme switch */
body, .site-header, .mobile-nav, .site-footer,
.standard-card, .content-card, .cert-card, .news-card,
.community-card, .download-card, .faq-item, .card, .test-card,
.flow-list article, .hero-summary-card,
.problem-panel, .benefits-band, .tier-grid div,
.image-card, .pass-box, .fail-box, .inner-hero,
.download-section, .download-header, .article-link,
.hero-section, .white-section, .blue-section, .closing-panel {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ── Inner page hero ─────────────────────────────────────────────────────── */
.inner-hero {
  background: linear-gradient(135deg, #f4f9fd 0%, #edf5fb 100%);
  border-bottom: 1px solid var(--line);
  padding-block: 4rem 3rem;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--body);
  margin-bottom: 1.25rem;
}

.crumbs a { color: var(--blue); font-weight: 600; }
.crumbs a:hover { text-decoration: underline; }
.crumbs span { color: var(--body); }

.inner-hero h1 {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.05em;
  margin: 0.5rem 0 0;
}

.lede {
  color: var(--body);
  font-size: 1.1rem;
  line-height: 1.75;
  max-width: 62ch;
  margin: 1rem 0 0;
}

.inner-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}

.hero-summary-card {
  min-width: 280px;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  box-shadow: var(--shadow);
}

/* ── Page sections ───────────────────────────────────────────────────────── */
.page-section {
  padding-block: 4rem;
  border-bottom: 1px solid var(--line);
}

.page-section-alt {
  padding-block: 4rem;
  border-bottom: 1px solid var(--line);
  background: var(--mist);
}

.page-hero {
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  padding: 60px 0;
}

.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { color: var(--body); font-size: 1.05rem; max-width: 66ch; }

/* ── Content cards ───────────────────────────────────────────────────────── */
.content-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.content-card {
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 40px rgba(20, 74, 105, 0.06);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.content-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(20, 74, 105, 0.1);
}

.content-card h3 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.1rem;
  letter-spacing: -0.035em;
  margin: 0 0 0.5rem;
}

.content-card p {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── Generic card ────────────────────────────────────────────────────────── */
.card {
  padding: 1.5rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 40px rgba(20, 74, 105, 0.06);
}

.card h3 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.card p {
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0.375rem 0 0;
}

.card-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
}

.card-link:hover { text-decoration: underline; }

.card-action {
  display: inline-block;
  margin-top: 0.75rem;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
}

.card-action:hover { text-decoration: underline; }

/* ── Outline link ────────────────────────────────────────────────────────── */
.outline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(11, 110, 188, 0.35);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.875rem;
  font-weight: 700;
  transition: background 150ms, border-color 150ms;
}

.outline-link:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  box-shadow: 0 12px 32px rgba(13, 108, 166, 0.2);
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 45px rgba(13, 108, 166, 0.28);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  color: #0f578b;
  border: 1px solid rgba(8, 42, 91, 0.35);
  background: rgba(255,255,255,0.62);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 150ms, border-color 150ms;
}

.btn-secondary:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* ── Certification cards ─────────────────────────────────────────────────── */
.cert-badges-img {
  margin-block: 2rem 0;
  border-radius: 1rem;
  overflow: hidden;
}

.cert-badges-img img {
  width: 100%;
  height: auto;
  display: block;
}

.cert-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.cert-card {
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px rgba(20, 74, 105, 0.12);
}

.cert-label {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--blue-soft);
  color: var(--blue);
  margin-bottom: 1rem;
}

/* ── Pass/fail boxes ─────────────────────────────────────────────────────── */
.pass-fail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.pass-box, .fail-box {
  padding: 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--body);
}

.pass-box {
  background: rgba(16,163,108,0.06);
  border: 1px solid rgba(16,163,108,0.2);
}

.fail-box {
  background: rgba(220,38,38,0.05);
  border: 1px solid rgba(220,38,38,0.15);
}

.pass-box strong { color: #10a36c; display: block; margin-bottom: 0.35rem; }
.fail-box strong { color: #dc2626; display: block; margin-bottom: 0.35rem; }

/* ── CTS test cards ──────────────────────────────────────────────────────── */
.test-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.test-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  padding: 1.75rem 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 30px rgba(20, 74, 105, 0.06);
}

.test-card h3 {
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.375rem;
}

.test-card p {
  color: var(--body);
  font-size: 0.9rem;
  line-height: 1.65;
}

.test-id {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 0.25rem;
}

/* ── Community cards ─────────────────────────────────────────────────────── */
.community-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.community-card {
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.community-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  margin: 0;
}

.community-card p {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* ── News cards ──────────────────────────────────────────────────────────── */
.news-card {
  padding: 1.75rem 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 30px rgba(20, 74, 105, 0.06);
  margin-bottom: 1rem;
}

.news-date {
  font-size: 0.8rem;
  color: var(--body);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.news-link {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.875rem;
}

.news-link:hover { text-decoration: underline; }

.news-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

.news-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-release { background: var(--blue-soft); color: var(--blue); }
.badge-spec    { background: #e8f8f4; color: var(--teal); }
.badge-comm    { background: #f0f0ff; color: #4b519f; }
.badge-program { background: rgba(16,163,108,0.1); color: #059669; }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge-blue  { background: rgba(11,110,188,0.12); color: var(--blue); }
.badge-teal  { background: rgba(24,142,170,0.12); color: var(--teal); }
.badge-green { background: rgba(16,163,108,0.12); color: #10a36c; }
.badge-gray  { background: var(--blue-soft); color: var(--body); }

/* ── Download section (homepage + specs page) ───────────────────────────── */
.download-section {
  padding-block: 4rem;
  border-block: 1px solid var(--line);
  background: var(--mist);
}

.download-section .download-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

/* ── Download grid ───────────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  margin-top: 2rem;
  align-items: start;
}

.download-header {
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.download-header h2 {
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  margin: 0;
}

.download-header p {
  color: var(--body);
  font-size: 0.88rem;
  line-height: 1.7;
}

.download-icon {
  color: var(--blue);
}

.download-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.download-card {
  padding: 2rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 30px rgba(20, 74, 105, 0.06);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.download-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 50px rgba(20, 74, 105, 0.1);
}

.download-card h3 {
  color: var(--ink);
  font-size: 1.1rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.download-card p {
  color: var(--body);
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0 0 1rem;
}

.download-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
}

.download-link:hover { text-decoration: underline; }

.license-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.25rem 0.6rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  color: var(--body);
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.form-section {
  padding-block: 4rem;
  border-bottom: 1px solid var(--line);
}

.form-wrap { max-width: 640px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input, select, textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: white;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.875rem;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  line-height: 1.5;
}

input:focus, select:focus, textarea:focus { border-color: var(--blue); }
textarea { resize: vertical; min-height: 120px; }

.field-hint {
  font-size: 0.78rem;
  color: var(--body);
  line-height: 1.5;
}

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.faq-item {
  padding: 1.75rem;
  border: 1px solid rgba(198, 215, 226, 0.72);
  border-radius: 1.1rem;
  background: rgba(255,255,255,0.88);
  box-shadow: 0 12px 40px rgba(20, 74, 105, 0.06);
}

.faq-item h3 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  margin: 0 0 0.875rem;
}

.faq-item p {
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0 0 0.75rem;
}

.faq-item p:last-child { margin-bottom: 0; }

.faq-item ul, .faq-item ol {
  padding-left: 1.25rem;
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0.5rem 0;
}

.faq-item li { margin-bottom: 0.35rem; }
.faq-item strong { color: var(--ink-soft); }

.faq-code {
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: "IBM Plex Mono", "Fira Code", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink-soft);
  white-space: pre;
  overflow-x: auto;
  margin: 0.75rem 0;
}

.faq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 0.75rem 0;
  overflow-x: auto;
  display: block;
}

.faq-table th {
  background: var(--mist);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.faq-table td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--line);
  color: var(--body);
  line-height: 1.5;
}

.faq-check { color: #059669; font-weight: 700; }
.faq-cross { color: #dc2626; font-weight: 700; }

/* ── Article links ───────────────────────────────────────────────────────── */
.article-section {
  padding-block: 3.5rem;
  border-bottom: 1px solid var(--line);
}

.article-section-inner { max-width: 52rem; }

.article-section h2 {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.05em;
  margin: 0.75rem 0 0.5rem;
}

.article-section .article-lead {
  color: var(--body);
  font-size: 1rem;
  line-height: 1.75;
  margin: 0 0 1.75rem;
}

.article-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.article-link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 0 12px 40px rgba(20, 74, 105, 0.06);
  transition: transform 240ms ease, box-shadow 240ms ease;
  text-decoration: none;
}

.article-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 60px rgba(20, 74, 105, 0.1);
}

.article-link-source {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--body);
}

.article-link-title {
  color: var(--ink);
  font-family: var(--display);
  font-size: 0.975rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
}

.article-link-cta {
  margin-top: 0.25rem;
  color: var(--blue);
  font-weight: 700;
  font-size: 0.875rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1060px) {
  .nav-links {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-grid,
  .split-grid,
  .validation-grid,
  .closing-panel {
    grid-template-columns: 1fr;
  }

  .standards-section,
  .benefits-band,
  .tier-grid,
  .cert-tiers {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .inner-hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-summary-card {
    min-width: 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 1.25rem, 1320px);
  }

  .site-header {
    position: static;
  }

  .brand small,
  .primary-pill,
  .icon-button:not(.menu-button),
  .floating-note {
    display: none;
  }

  .hero-grid {
    gap: 2rem;
    padding-block: 4rem;
  }

  .hero-art,
  .hero-art img {
    min-height: 20rem;
  }

  .hero-art img {
    object-position: 70% center;
  }

  .standards-section,
  .benefits-band,
  .tier-grid,
  .cert-tiers {
    grid-template-columns: 1fr;
  }

  .content-cards {
    grid-template-columns: 1fr;
  }

  .flow-list article {
    grid-template-columns: 1fr;
  }

  .closing-panel {
    grid-template-columns: 1fr;
  }

  .footer-inner,
  .footer-inner div {
    flex-direction: column;
  }

  .pass-fail {
    grid-template-columns: 1fr;
  }

  .article-links {
    grid-template-columns: 1fr;
  }

  .inner-hero {
    padding-block: 2.5rem 2rem;
  }

  .hero-summary-card {
    display: none;
  }

  .page-section, .page-section-alt {
    padding-block: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .mobile-nav { transition: none; }
  .nav-backdrop { transition: none; }
}

/* ── NIST Provenance Card ─────────────────────────────────────────────────── */
.nist-provenance-section {
  padding-block: 2.25rem;
  border-bottom: 1px solid var(--line);
}

.nist-provenance-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
  padding: 1.75rem 2rem;
  border: 1px solid rgba(11, 110, 188, 0.28);
  border-left: 4px solid var(--blue);
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--blue-soft) 0%, rgba(248,252,254,0.5) 100%);
  box-shadow: 0 8px 30px rgba(11, 110, 188, 0.07);
}

.nist-gov-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.6rem;
  height: 3.6rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  color: white;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.nist-heading {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  margin: 0.45rem 0 0.6rem;
  color: var(--ink);
  font-family: var(--display);
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.nist-body {
  color: var(--body);
  font-size: 0.95rem;
  line-height: 1.75;
  margin: 0 0 0.65rem;
  max-width: 72ch;
}

.nist-meta {
  color: var(--body);
  font-size: 0.8rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  letter-spacing: 0.01em;
}

.nist-link {
  color: var(--blue);
  font-weight: 700;
  font-size: 0.9rem;
}

.nist-link:hover { text-decoration: underline; }

[data-theme="dark"] .nist-provenance-card {
  border-color: rgba(30, 80, 120, 0.45);
  border-left-color: var(--blue);
  background: linear-gradient(135deg, rgba(10, 25, 48, 0.85) 0%, rgba(9, 21, 36, 0.55) 100%);
}

.nist-provenance-card {
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

@media (max-width: 720px) {
  .nist-provenance-card {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* ── Specification page ──────────────────────────────────────────────────── */
.spec-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.spec-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.spec-badge-green { background: rgba(16,163,108,0.1); color: #059669; }
.spec-badge-teal  { background: rgba(24,142,170,0.12); color: var(--teal); }

.spec-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.spec-toc a {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(11, 110, 188, 0.25);
  border-radius: 999px;
  color: var(--blue);
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(234,245,251,0.5);
  transition: background 150ms, border-color 150ms;
  text-decoration: none;
}

.spec-toc a:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}

.spec-section-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
  display: block;
}

.spec-collapsible {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 1rem;
}

.spec-collapsible summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255,255,255,0.88);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  letter-spacing: -0.025em;
  user-select: none;
  list-style: none;
}

.spec-collapsible summary::-webkit-details-marker { display: none; }

.spec-collapsible summary::after {
  content: "＋";
  font-size: 1rem;
  color: var(--blue);
  flex-shrink: 0;
  margin-left: 1rem;
}

.spec-collapsible[open] summary::after { content: "－"; }

.spec-collapsible summary:hover { background: var(--mist); }

.spec-collapsible-body {
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid var(--line);
}

.spec-rule-tag {
  display: inline-flex;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.tag-must   { background: rgba(220,38,38,0.08); color: #dc2626; }
.tag-should { background: rgba(234,179,8,0.1);  color: #b45309; }
.tag-may    { background: rgba(16,163,108,0.08); color: #059669; }

.spec-example-compliant,
.spec-example-noncompliant {
  padding: 0.75rem 1rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.spec-example-compliant {
  border-left: 3px solid #10a36c;
  background: rgba(16,163,108,0.06);
}

.spec-example-noncompliant {
  border-left: 3px solid #dc2626;
  background: rgba(220,38,38,0.05);
}

.spec-example-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.spec-example-compliant    .spec-example-label { color: #10a36c; }
.spec-example-noncompliant .spec-example-label { color: #dc2626; }

.spec-highlight-box {
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(11, 110, 188, 0.25);
  border-radius: 0.75rem;
  background: var(--blue-soft);
  margin: 1rem 0;
}

.spec-back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  color: var(--blue);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
}

.spec-back-top:hover { text-decoration: underline; }

/* dark mode for spec components */
[data-theme="dark"] .spec-collapsible { border-color: rgba(25, 60, 95, 0.65); }

[data-theme="dark"] .spec-collapsible summary {
  background: rgba(13, 29, 47, 0.92);
  color: var(--ink);
}

[data-theme="dark"] .spec-collapsible summary:hover { background: rgba(10, 25, 45, 0.8); }

[data-theme="dark"] .spec-collapsible-body { border-top-color: rgba(25, 60, 95, 0.65); }

[data-theme="dark"] .spec-highlight-box {
  border-color: rgba(30, 80, 120, 0.4);
  background: var(--blue-soft);
}

[data-theme="dark"] .spec-example-compliant { background: rgba(5, 50, 35, 0.35); }
[data-theme="dark"] .spec-example-noncompliant { background: rgba(50, 10, 10, 0.35); }

[data-theme="dark"] .spec-toc a {
  background: rgba(10, 25, 45, 0.6);
  border-color: rgba(30, 80, 120, 0.4);
}

[data-theme="dark"] .spec-badge { background: var(--blue-soft); }
[data-theme="dark"] .spec-badge-green { background: rgba(5, 80, 50, 0.25); color: #3ecece; }

/* include spec components in smooth transition list */
.spec-collapsible, .spec-collapsible summary, .spec-highlight-box,
.spec-example-compliant, .spec-example-noncompliant {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* ── Expected Impact card ────────────────────────────────────────────────── */
.impact-section {
  padding-block: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.impact-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 2.25rem;
  border: 1px solid rgba(11,110,188,0.2);
  border-left: 4px solid var(--blue);
  border-radius: 1rem;
  background: linear-gradient(135deg, var(--blue-soft) 0%, rgba(248,252,254,0.4) 100%);
}

.impact-card-main h2 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0.5rem 0 0.875rem;
}

.impact-metrics {
  display: grid;
  gap: 0.875rem;
}

.impact-metric {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(11,110,188,0.15);
  border-radius: 0.65rem;
}

.impact-metric-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.impact-metric-icon.green { background: #059669; }
.impact-metric-icon.teal  { background: var(--teal); }

.impact-metric-body strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.impact-metric-body span { font-size: 0.83rem; color: var(--body); line-height: 1.5; }

.impact-green-lane {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: rgba(5,150,105,0.07);
  border: 1px solid rgba(5,150,105,0.2);
  border-left: 3px solid #059669;
  border-radius: 0 0.65rem 0.65rem 0;
  font-size: 0.875rem;
  color: var(--body);
  line-height: 1.65;
}

.impact-green-lane strong { color: #059669; }

.impact-footnote {
  margin-top: 0.875rem;
  font-size: 0.77rem;
  color: var(--body);
  opacity: 0.75;
}

@media (max-width: 800px) {
  .impact-card { grid-template-columns: 1fr; gap: 1.5rem; }
}

[data-theme="dark"] .impact-card {
  background: linear-gradient(135deg, rgba(10,25,48,0.8) 0%, rgba(9,21,36,0.5) 100%);
  border-color: rgba(30,80,120,0.4);
}

[data-theme="dark"] .impact-metric {
  background: rgba(9,21,36,0.65);
  border-color: rgba(30,80,120,0.35);
}

[data-theme="dark"] .impact-green-lane {
  background: rgba(5,80,50,0.2);
  border-color: rgba(5,150,105,0.3);
}

/* ── Script Examples page ────────────────────────────────────────────────── */
.script-example-block {
  margin-bottom: 1.5rem;
}

.script-example-block h4 {
  font-family: var(--display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.script-quote {
  padding: 1rem 1.25rem;
  border-radius: 0 0.65rem 0.65rem 0;
  font-size: 0.9rem;
  line-height: 1.7;
  font-style: italic;
  color: var(--ink-soft);
}

.script-quote-pass {
  border-left: 3px solid #059669;
  background: rgba(16,163,108,0.06);
}

.script-quote-fail {
  border-left: 3px solid #dc2626;
  background: rgba(220,38,38,0.05);
}

.script-fail-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #dc2626;
  font-style: normal;
  margin-bottom: 0.4rem;
}

.script-fail-reason {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--body);
  margin-top: 0.5rem;
}

.out-of-scope-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.out-of-scope-list li {
  padding: 0.75rem 1rem;
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  color: var(--body);
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.out-of-scope-list li::before {
  content: "—";
  color: var(--body);
  opacity: 0.45;
  flex-shrink: 0;
}

[data-theme="dark"] .out-of-scope-list li {
  background: rgba(9,21,36,0.55);
  border-color: rgba(30,65,100,0.5);
}

[data-theme="dark"] .script-quote-pass { background: rgba(5,80,50,0.25); }
[data-theme="dark"] .script-quote-fail { background: rgba(60,10,10,0.3); }

/* ── L1 Evidence Checklist ───────────────────────────────────────────────── */
.checklist-section {
  padding: 2rem 2.25rem;
  border: 1px solid rgba(11,110,188,0.2);
  border-left: 4px solid var(--teal);
  border-radius: 1rem;
  background: var(--blue-soft);
  margin-top: 2rem;
}

.checklist-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(11,110,188,0.12);
}

.checklist-item:last-child { border-bottom: none; }

.checklist-num {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--teal);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.checklist-item strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.checklist-item p {
  font-size: 0.87rem;
  color: var(--body);
  line-height: 1.6;
  margin: 0;
}

.checklist-optional {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(24,142,170,0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.5rem;
}

[data-theme="dark"] .checklist-section {
  background: rgba(9,21,36,0.65);
  border-color: rgba(24,142,170,0.3);
}

[data-theme="dark"] .checklist-item { border-bottom-color: rgba(25,60,95,0.5); }

/* ── What NHID-Clinical Does (about page) ────────────────────────────────── */
.positioning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 1.75rem;
  align-items: start;
}

.positioning-not-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.positioning-not-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.6;
}

.positioning-not-list li::before {
  content: "✗";
  color: var(--body);
  opacity: 0.5;
  font-weight: 700;
  flex-shrink: 0;
}

.positioning-does-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  margin-top: 1rem;
}

.positioning-does-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.9rem;
  color: var(--body);
  line-height: 1.6;
}

.positioning-does-list li::before {
  content: "✓";
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}

@media (max-width: 720px) { .positioning-grid { grid-template-columns: 1fr; } }

/* ── Impersonation latency dialogue transcript ───────────────────────────── */
.script-fail-severe-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #991b1b;
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.3);
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.script-dialogue {
  border-left: 3px solid #dc2626;
  background: rgba(220,38,38,0.05);
  border-radius: 0 0.65rem 0.65rem 0;
  padding: 1rem 1.25rem;
  display: grid;
  gap: 0.55rem;
}

.dialogue-turn {
  font-size: 0.875rem;
  line-height: 1.65;
}

.dialogue-speaker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.15rem;
}

.dialogue-speaker-agent { color: #dc2626; }
.dialogue-speaker-rep   { color: var(--body); }

.dialogue-text-agent {
  font-style: italic;
  color: var(--ink-soft);
}

.dialogue-text-rep {
  font-style: italic;
  color: var(--ink-soft);
}

.dialogue-system-note {
  display: block;
  font-size: 0.78rem;
  font-style: normal;
  color: var(--body);
  background: rgba(0,0,0,0.04);
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  margin-top: 0.1rem;
}

.script-fail-multi {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--body);
  line-height: 1.65;
  padding: 0.75rem 1rem;
  background: rgba(220,38,38,0.06);
  border-radius: 0.5rem;
}

.script-fail-multi strong { color: #991b1b; }

[data-theme="dark"] .script-dialogue { background: rgba(80,10,10,0.3); }
[data-theme="dark"] .dialogue-system-note { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .script-fail-multi { background: rgba(80,10,10,0.25); }
[data-theme="dark"] .script-fail-severe-label {
  background: rgba(220,38,38,0.18);
  border-color: rgba(220,38,38,0.4);
  color: #fca5a5;
}

/* ── Hero helper text ────────────────────────────────────────────────────── */
.hero-helper {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--body);
  line-height: 1.65;
  max-width: 30rem;
  opacity: 0.85;
}
