/* ─────────────────────────────────────────────────────────────────────────
   Self-hosted Newsreader and Geist — Newsreader ported from the Quilted
   Midwives site so both brands render identical headings.

   Deliberately NOT loaded from Google Fonts: that request is render-blocking
   and third-party, and it was the main cost of the previous Fraunces link.
   These are the same variable woff2 files Google serves.

   unicode-range comes from Google's css2 response, so the latin-ext faces
   only download when a page actually uses those characters.
   ───────────────────────────────────────────────────────────────────────── */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/newsreader-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Geist';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/geist-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --burgundy-0:#FDF3EC; --burgundy-1:#FBE7DC; --burgundy-2:#F6D3C2; --burgundy-3:#EFBAA4;
  --burgundy-4:#D89484; --burgundy-5:#B87768; --burgundy-6:#9E5F55; --burgundy-7:#834D46;
  --burgundy-8:#683B37; --burgundy-9:#4E2B2A;
  --cream-0:#FFFAF4; --cream-1:#FDF5EC; --cream-2:#F7EEE4; --cream-3:#F1E7DC; --cream-4:#E3D7C9;
  --dark-9:#141414; --dark-7:#242424; --dark-6:#2E2E2E;
  --gray-0:#F8F9FA; --gray-1:#F1F3F5; --gray-2:#E9ECEF; --gray-3:#DEE2E6;
  --gray-4:#CED4DA; --gray-6:#868E96; --gray-7:#6E747B;
  --green-1:#D3F9D8; --green-7:#37B24D;
  --fhr:#9E5F55; --toco:#B87768; --dil:#D89484;
  --yellow-1:#FFF3BF; --yellow-9:#E67700;
  --orange-1:#FFE8CC; --orange-8:#E8590C;
  --grid-line: rgba(20,20,20,0.05);
  --grid-line-strong: rgba(20,20,20,0.08);
  --shadow-sm: 0 7px 7px -5px rgba(0,0,0,.04), 0 10px 15px -5px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
  --shadow-md: 0 10px 10px -5px rgba(0,0,0,.04), 0 20px 25px -5px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
  /* Shared visual language for simulated Quilted EHR product assets. */
  --asset-text-primary:#242223;
  --asset-text-secondary:#6E747B;
  --asset-text-muted:#868E96;
  --asset-border:#D8CDBE;
  --asset-surface:#FFFFFF;
  --asset-surface-subtle:#FBF6EF;
  --asset-accent:#4E2B2A;
  --asset-accent-soft:#F6E4DB;
  --asset-success:#477B52;
  --asset-warning:#8A552C;
  --asset-danger:#975045;
  --asset-type-meta:12px;
  --asset-type-body:14px;
  --asset-type-title:16px;
  --asset-space-1:4px;
  --asset-space-2:8px;
  --asset-space-3:12px;
  --asset-space-4:16px;
  --asset-space-5:24px;
  --asset-radius-control:6px;
  --asset-radius-card:10px;
  --asset-radius-frame:14px;
  --asset-shadow-card:0 10px 24px rgba(69,43,48,.075);
  --asset-shadow-frame:0 16px 38px rgba(78,48,54,.09);
}
*,*::before,*::after { box-sizing: border-box; }
html,body {
  margin: 0;
  padding: 0;
  /* Prevent horizontal scroll caused by decorative elements
     (hero A1c at right:-200px, calendar at right:-110px, etc.)
     `overflow-x: clip` avoids the scrollbar without breaking position:sticky
     on the nav. Older browsers fall back to overflow-x: hidden. */
  overflow-x: hidden;
  overflow-x: clip;
}
html { scroll-behavior: smooth; }
/* Push anchor targets below the sticky nav (~56px) when scrolled into view */
#features, #workflow, #platform, #pricing, #faq { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ── Mobile composition pass ───────────────────────────────
   Deliberately layout-only: animation classes and keyframes are unchanged. */
@media (max-width: 760px) {
  html { scroll-padding-top: 74px; }
  html.mobile-menu-open {
    height:100%;
    overflow:hidden;
    overscroll-behavior:none;
  }
  body.mobile-menu-open {
    height:100%;
    overflow:hidden;
    overscroll-behavior:none;
    touch-action:none;
  }

  .nav-wrap {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav { min-height: 72px; padding: 12px 16px; gap: 12px; }
  .brand.brand-logo img { width: 132px; }
  .nav-actions { margin-left: auto; gap: 6px; }
  .nav-actions > .btn-ghost { display: none; }
  .nav-actions > .btn-primary { height: 42px; padding: 0 16px; white-space: nowrap; }
  .nav-menu-toggle {
    width: 42px; height: 42px; padding: 0; border: 1px solid var(--cream-4);
    border-radius: 50%; background: #fff; display: grid; place-content: center;
    color: var(--dark-9);
  }
  .nav-menu-toggle .menu-icon { width: 22px; height: 22px; overflow: visible; }
  .nav-menu-toggle .menu-line {
    fill: none; stroke: currentColor; stroke-width: 1.5;
    stroke-linecap: round; vector-effect: non-scaling-stroke;
    transform-box: fill-box; transform-origin: center;
    transition: transform .2s ease;
  }
  .nav-menu-toggle[aria-expanded="true"] .menu-line-top { transform: translateY(4px) rotate(45deg); }
  .nav-menu-toggle[aria-expanded="true"] .menu-line-bottom { transform: translateY(-4px) rotate(-45deg); }
  .mobile-menu {
    position: fixed; inset: 72px 0 0; z-index: 999; padding: 24px 20px max(24px,env(safe-area-inset-bottom));
    background: var(--cream-0); border-top: 1px solid var(--cream-4); overflow-y: auto;
  }
  .mobile-menu:not([hidden]) { display: grid; align-content: start; }
  .mobile-menu a { display: flex; align-items: center; min-height: 58px; border-bottom: 1px solid var(--cream-4); color: var(--dark-9); font-size: 19px; }
  .mobile-menu .mobile-menu-cta {
    justify-content:center;
    margin-top:24px;
    min-height:52px;
    border:0;
    border-radius:999px;
    background:var(--burgundy-9);
    color:#fff;
    font-size:15px;
  }
  body.mobile-menu-open .nav-actions > .btn-primary { display:none; }

  section { padding: 64px 20px; }
  /* The blanket `section` rule above is element-level, so any section styled by
     class kept its desktop 96–120px vertical padding on phones. Normalize the
     stragglers to the same 64px rhythm; keep their inline padding as authored
     since several manage horizontal spacing on an inner container. */
  .inc-section,
  .pc-section,
  .fm-section { padding-block: 64px; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(34px,10vw,44px); }

  .hero-wrap > .hero { padding: 48px 20px 54px; gap: 36px; }
  .hero .text-col { order: 1; }
  .hero .screen-col { order: 2; min-width: 0; }
  .hero h1 { margin-top: 22px; font-size: clamp(48px,14vw,64px); line-height: .96; }
  .hero p.lead { margin: 22px 0 0; font-size: 17px; line-height: 1.55; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 26px; }
  .hero-actions .btn { width: 100%; height: 52px; padding-inline: 18px; white-space: nowrap; }
  .hero-stage { padding: 0; min-height: 0; }
  .hs-client { width: 100%; max-width: none; transform: none; }
  .hs-client .head { padding: 16px; }
  .hs-client .avatar { width: 38px; height: 38px; }
  .hs-client .name { font-size: 15px; }
  .hs-client .status { padding: 5px 8px; font-size: 9px; }
  .hs-client .vitals { padding: 14px 16px 16px; gap: 6px; }
  .hs-client .vital .vnum { font-size: 23px; }
  .hs-client .vital .vlbl { font-size: 9px; }
  .hs-client .checklist { padding: 12px 16px 16px; }
  .hs-a1c,.hs-cal,.hs-photo,.hs-message { display: none !important; }
  #trace-canvas { opacity: .42; }

  .alt-feature,.alt-feature.wide-screen,.alt-feature.reverse { padding: 64px 20px; gap: 34px; }
  .alt-feature .text-col,.alt-feature.reverse .text-col { order: 1; }
  .alt-feature .screen-col,.alt-feature.reverse .screen-col { order: 2; width: 100%; overflow: hidden; }
  .alt-feature h2 { font-size: clamp(34px,10vw,44px); max-width: 12ch; }
  .alt-feature .text-col p { font-size: 16px; }

  /* Product illustrations become bounded responsive viewports instead of
     desktop canvases leaking off the right edge. */
  .template-carousel { width: 100%; min-height: 500px !important; }
  .template-carousel:has(.vitals-slide.is-active) { min-height: 720px !important; }
  .clinical-template-stage,.flowsheet-stage { width: 100%; height: 430px !important; overflow: hidden; }
  .exam-card,.labor-flowsheet { left: 4% !important; right: 4% !important; width: auto !important; height: 230px !important; }
  .note-card,.prenatal-flowsheet { left: 0 !important; right: 0 !important; width: auto !important; height: 275px !important; }
  .flow-actions > *:nth-child(n+5) { display: none !important; }
  .vitals-vignettes { min-height: 0 !important; height: auto !important; padding: 16px !important; }
  .vitals-grid { grid-template-columns: 1fr !important; }
  .trend-card { height: auto !important; min-height: 188px; }

  .pc-section { padding-inline: 0; }
  .pc-stage { display: flex; flex-direction: column; padding: 0 20px; }
  .pc-calc { order: 1; padding: 28px 20px 24px; }
  .pc-side { order: 2; grid-template-columns: 1fr; }
  .pc-display .total { font-size: clamp(44px,14vw,64px); }

  .fm-section { padding-inline: 0; }
  .fm-stage { padding: 0 20px; gap: 26px; }
  .fm-side .cats { display: flex; gap: 8px; overflow-x: auto; border: 0; padding-bottom: 4px; scrollbar-width: none; }
  .fm-side .cats::-webkit-scrollbar { display: none; }
  .fm-side .cat-btn { flex: 0 0 auto; min-height: 44px; width: auto; padding: 0 16px; border: 1px solid var(--cream-4); border-radius: 999px; gap: 8px; }
  .fm-side .cat-btn.active { background: var(--cream-1); border-color: var(--burgundy-9); }
  .fm-side .cat-btn.active::before,.fm-side .cat-btn .arr { display: none; }
  .fm-side .foot { margin-top: 18px; }
  .fm-row .q-btn { min-height: 62px; padding-block: 14px; }

  .as-section { padding: 64px 20px calc(72px + env(safe-area-inset-bottom)); }
  .as-stage { grid-template-columns: 1fr; }
  .as-card { min-height: 0; padding: 28px 24px; }
  .as-card h3 { font-size: 34px; }
  .as-card .as-btn { width: 100%; justify-content: center; min-height: 50px; }

  footer { padding-bottom: env(safe-area-inset-bottom); }
  footer .container.footer-split { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 32px 24px; padding-inline: 20px; }
  footer .ft-brand { grid-column: 1 / -1; }
  footer .brand.brand-logo img { width: 150px; }
  footer .copy { padding: 22px 20px; align-items: flex-start; overflow-wrap: anywhere; }
}

@media (max-width: 390px) {
  .brand.brand-logo img { width: 120px; }
  .nav-actions > .btn-primary { padding-inline: 13px; font-size: 13px; }
  .hero-wrap > .hero { padding-inline: 16px; }
  .hs-client .status { display: none; }
  footer .container.footer-split { grid-template-columns: 1fr; }
  footer .ft-brand { grid-column: auto; }
}
body {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--dark-9);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--burgundy-9); text-decoration: none; }
img { display:block; max-width:100%; }

/* ── Column grid background (Vitalis-style) ── */
.grid-bg {
  position: relative;
  background:
    linear-gradient(to bottom, transparent 0, transparent calc(100% - 1px), var(--grid-line) calc(100% - 1px), var(--grid-line) 100%);
}
.grid-bg::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: calc((100% - 64px) / 12) 100%;
  background-position: 32px 0;
  z-index: 0;
}
.grid-bg::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 120px;
  z-index: 0;
}
.grid-bg > * { position: relative; z-index: 1; }

/* ── Nav ── */
.nav-wrap { background: rgba(255,255,255,0.7); backdrop-filter: blur(12px); border-bottom: 1px solid var(--cream-4); position: sticky; top:0; z-index:50; }
.nav { max-width: 1280px; margin: 0 auto; padding: 18px 32px; display:flex; align-items:center; justify-content:space-between; }
.brand { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; display:flex; align-items:center; gap:10px; }
.brand-mark {
  width:28px; height:28px; border-radius:6px;
  background: linear-gradient(135deg, var(--burgundy-9), #6A3A34);
  display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:14px; font-weight:600;
}
/* QuiltedEHR SVG wordmark logo (header + footer) */
.brand.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  padding: 0;
  gap: 0;
}
.brand.brand-logo img {
  width: 150px;
  height: auto;
  display: block;
}
footer .brand.brand-logo img { width: 170px; }
.nav-links { display:flex; gap:36px; font-size:14px; }
.nav-links a { color: var(--dark-9); }
.nav-actions { display:flex; align-items:center; gap:12px; }
.nav-menu-toggle,.mobile-menu{display:none}

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding: 0 18px;
  border-radius:9999px; font-size:14px; font-weight:500; border:1px solid transparent; cursor:pointer; transition: all .15s; }
.btn-primary { background: var(--dark-9); color:#fff; }
.btn-primary:hover { background: var(--dark-7); }
.btn-outline { background: #fff; color: var(--dark-9); border-color: var(--cream-4); }
.btn-outline:hover { background: var(--cream-1); }
.btn-ghost { background:transparent; color: var(--dark-9); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15px; }

/* ── Hero ── */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 32px 32px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  min-height: 640px;
}
.eyebrow {
  display:inline-flex; align-items:center; gap:8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.05em;
  color: var(--gray-7); padding: 6px 14px; border: 1px solid var(--cream-4); border-radius: 9999px;
  background: rgba(255,255,255,0.7);
}
.eyebrow .dot { width:6px; height:6px; border-radius:50%; background: var(--green-7); }
.hero p.lead { font-size: 17px; line-height: 1.55; color: var(--gray-7); max-width: 520px; margin: 20px 0 28px; }
.hero h1 { font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: 96px; line-height: 0.98; letter-spacing: -0.025em; margin: 28px 0 0; font-weight: 500; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--burgundy-9) 0%, #B87768 50%, var(--gray-4) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero h1 .grayout { color: var(--gray-3); }
.hero-actions { margin-top: 28px; display:flex; gap: 14px; align-items:center; }
.hero-meta {
  margin-top: 56px;
  display:flex; gap: 24px; align-items:center;
  font-size: 12px; color: var(--gray-7); letter-spacing: 0.08em; text-transform: uppercase;
}
.hero-meta .logos { display:flex; gap: 28px; align-items: center; opacity: 0.7; }
.logo-pill { font-size: 14px; font-weight: 600; letter-spacing: 0.01em; color: var(--gray-6); text-transform: none; }
.logo-pill::before { content:"●"; color: var(--gray-4); margin-right: 6px; }

/* hero product card */
.hero-card { background: #fff; border-radius: 16px; border: 1px solid var(--cream-4); box-shadow: var(--shadow-lg); overflow: hidden; }
.hero-card .ph {
  aspect-ratio: 5/4;
  background-image: url('https://images.unsplash.com/photo-1631815589968-fdb09a223b1e?w=900&q=80');
  background-size: cover; background-position: center;
  position: relative;
}
.hero-card .ph::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 50%, rgba(20,20,20,0.7));
}
.hero-card .ph-tag {
  position: absolute; top: 16px; left: 16px; z-index: 2;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(6px);
  padding: 6px 12px; border-radius: 9999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  display:inline-flex; align-items:center; gap:6px; color: var(--dark-9);
}
.hero-card .ph-tag .live { width: 6px; height:6px; border-radius:50%; background: var(--green-7); }
.hero-card .ph-overlay {
  position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 2;
  color: #fff;
  display:flex; justify-content: space-between; align-items: flex-end;
}
.hero-card .ph-overlay .name { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; }
.hero-card .ph-overlay .sub { font-size: 12px; opacity: 0.85; }
.hero-card .ph-cta { background: rgba(255,255,255,0.9); color: var(--dark-9); padding: 8px 14px; border-radius: 9999px; font-size: 12px; font-weight: 500; }
.hero-card-foot { padding: 18px 22px; border-top: 1px solid var(--cream-4); display: flex; justify-content: space-between; align-items: center; }
.hero-card-foot .stat-label { font-size: 11px; letter-spacing: 0.08em; color: var(--gray-7); text-transform: uppercase; }
.hero-card-foot .stat-val { font-size: 15px; font-weight: 600; margin-top: 2px; }
.hero-card-foot .stat-val span { color: var(--green-7); font-size: 12px; font-weight: 500; margin-left: 4px; }

/* Full-bleed physiological trace behind the hero */
.hero-wrap { position: relative; overflow: hidden; background: var(--cream-0); }
#trace-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
}
.hero-wrap > .hero { position: relative; z-index: 1; }

/* ── Section base ── */
section { padding: 96px 32px; position: relative; }
.container { max-width: 1280px; margin: 0 auto; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 56px; }
.section-head h2 { font-size: 56px; line-height: 1.02; letter-spacing: -0.025em; margin: 12px 0 18px; font-weight: 600; }
.section-head .small-h { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burgundy-9); margin-bottom: 14px; display: inline-block; }
.section-head p { color: var(--gray-7); font-size: 16px; line-height: 1.55; }

/* ── Tabs row ── */
.tabs-row { background: var(--cream-0); border-top: 1px solid var(--cream-4); border-bottom: 1px solid var(--cream-4); padding: 24px 32px; }
.tabs-row .container { display:flex; justify-content:center; gap: 48px; flex-wrap: wrap; }
.tabs-row a { font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-7); font-weight: 500; padding: 4px 0; position: relative; }
.tabs-row a.active { color: var(--burgundy-9); }
.tabs-row a.active::after { content: ""; position: absolute; bottom: -10px; left: 0; right: 0; height: 2px; background: var(--burgundy-9); }

/* ── Asset feature wrap (containers for product screens) ── */
.asset-wrap { display: flex; justify-content: center; margin-top: 48px; }
.asset-wrap .qh-pat-frame,
.asset-wrap .qh-billing-card,
.asset-wrap .qh-cal-card,
.asset-wrap .qh-clients-card,
.asset-wrap .qh-ch-card,
.asset-wrap .qh-tests-card,
.asset-wrap .qh-lot-card { box-shadow: 0 20px 40px -16px rgba(20,20,20,.12), 0 1px 3px rgba(20,20,20,.05); }

/* alternating two-column feature */
.alt-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; max-width: 1280px; margin: 0 auto; padding: 96px 32px; border-bottom: 1px solid var(--cream-4); }
.alt-feature .text-col { max-width: 460px; }
.alt-feature.reverse .text-col { order: 2; }
.alt-feature h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 600; margin: 12px 0 16px; max-width: 380px; }
.alt-feature .text-col .small-h { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burgundy-9); }
.alt-feature .text-col p { color: var(--gray-7); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.alt-feature .text-col ul { list-style: none; padding: 0; margin: 16px 0 24px; }
.alt-feature .text-col li { padding: 8px 0; font-size: 14px; color: var(--dark-9); display: flex; gap: 10px; align-items: center; }
.alt-feature .text-col li::before { content: "›"; color: var(--burgundy-9); font-weight: 700; font-size: 16px; }
.alt-feature .screen-col { display: flex; justify-content: center; min-width: 0; }
.alt-feature .screen-col > * { width: 100%; max-width: 580px; transform: scale(.92); transform-origin: center; }

/* Wider-screen variant for assets that exceed 580px naturally
   (lab-order-templates 720, practice-billing 760, calendar 980, etc.) */
.alt-feature.wide-screen { grid-template-columns: 0.85fr 1.25fr; }
.alt-feature.wide-screen .screen-col > * { max-width: 760px; transform: scale(1); }

/* ── Full-bleed feature (header + wide screen + 3-column points) ──
   The "two-column text + screen" pattern stops working once the screen
   is a heavy multi-column table (clients roster, billing table, etc.).
   This layout gives the data its native width, treats the headline as a
   centered eyebrow + section title, and breaks the value bullets into a
   scannable 3-up below — the standard pattern on Stripe/Linear/Vercel
   for tables this dense. */
.full-feature { max-width: 1280px; margin: 0 auto; padding: 96px 32px; border-bottom: 1px solid var(--cream-4); }
.full-feature .head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.full-feature .head .small-h { font-size: 11px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burgundy-9); margin-bottom: 14px; display: inline-block; }
.full-feature .head h2 { font-size: 52px; line-height: 1.04; letter-spacing: -0.025em; font-weight: 600; margin: 4px 0 18px; }
.full-feature .head p { color: var(--gray-7); font-size: 17px; line-height: 1.55; max-width: 640px; margin: 0 auto; }
.full-feature .screen-row { display: flex; justify-content: center; max-width: 1200px; margin: 0 auto; }
.full-feature .screen-row > * { width: 100%; max-width: 1100px; }
.full-feature .points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 1080px; margin: 64px auto 0; }
.full-feature .point { padding-left: 20px; border-left: 2px solid var(--burgundy-9); }
.full-feature .point h4 { font-size: 15px; font-weight: 600; letter-spacing: -0.005em; margin: 0 0 8px; color: var(--dark-9); }
.full-feature .point p { font-size: 14px; color: var(--gray-7); line-height: 1.55; margin: 0; }
.full-feature .foot { text-align: center; margin-top: 48px; }

/* ── Big imagery section (burgundy + photo) ── */
.imagery {
  position: relative; border-radius: 24px; overflow: hidden;
  background: var(--burgundy-9); color: #fff;
  margin: 96px auto; max-width: 1280px; min-height: 460px;
}
.imagery .photo {
  aspect-ratio: 21/9;
  background-image: url('https://images.unsplash.com/photo-1519689680058-324335c77eba?w=1600&q=80');
  background-size: cover; background-position: center;
  position: relative;
}
.imagery .photo::after { content:""; position:absolute; inset:0; background: linear-gradient(to right, rgba(85,40,49,0.85), rgba(85,40,49,0.2)); }
.imagery .overlay { position: absolute; inset: 0; padding: 64px; display: flex; flex-direction: column; justify-content: flex-end; z-index: 2; max-width: 720px; }
.imagery h2 { font-size: 56px; line-height: 1.02; letter-spacing: -0.025em; margin: 0 0 18px; font-weight: 600; }
.imagery p { font-size: 17px; color: rgba(255,255,255,0.85); margin: 0 0 28px; }

/* ── 8 features grid ── */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 56px; }
.feature-tile { background: #fff; border-radius: 12px; border: 1px solid var(--cream-4); padding: 24px 20px; min-height: 160px; box-shadow: var(--shadow-sm); }
.feature-tile .tile-ico { width:32px; height:32px; border-radius: 8px; background: var(--burgundy-1); margin-bottom: 16px; display:flex; align-items:center; justify-content:center; color: var(--burgundy-9); }
.feature-tile .tile-ico svg { width: 16px; height: 16px; }
.feature-tile h4 { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.feature-tile p { font-size: 12px; color: var(--gray-7); line-height: 1.5; margin: 0; }

/* ── Testimonial (dark) ── */
.testimonial-section { background: var(--dark-9); color: #fff; padding: 120px 32px; text-align: center; }
.testimonial-section .container { max-width: 880px; }
.testimonial-section p.quote { font-size: 32px; line-height: 1.25; letter-spacing: -0.01em; max-width: 820px; margin: 0 auto 28px; font-weight: 400; }
.testimonial-section p.quote em { color: var(--burgundy-2); font-style: normal; }
.testimonial-section cite { display:block; font-style: normal; font-size: 13px; color: var(--gray-4); letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Core EHR list ── */
.core-list { display:grid; grid-template-columns: repeat(2, 1fr); gap: 14px 48px; max-width: 760px; margin: 56px auto 0; }
.core-list .item { display:flex; align-items:center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--cream-4); font-size:15px; }
.check { width: 18px; height: 18px; border-radius: 50%; background: var(--burgundy-1); display:inline-flex; align-items:center; justify-content:center; color: var(--burgundy-9); font-size: 11px; font-weight: 600; }


/* Book a demo CTA under the Included section's lead line */
.inc-head .inc-cta { margin-top: 26px; align-self: start; }
@media (max-width: 860px) { .inc-head .inc-cta { margin-top: 20px; } }

/* ── Pricing ── */
.pricing-min { display:grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--cream-4); border-radius: 16px; overflow: hidden; background: #fff; max-width: 1080px; margin: 56px auto 0; }
.price-col { padding: 36px; border-right: 1px solid var(--cream-4); }
.price-col:last-child { border-right: none; }
.price-col.featured { background: var(--cream-0); }
.price-col .tier { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--burgundy-9); }
.price-col .amount { font-size: 56px; letter-spacing: -0.025em; font-weight: 600; line-height: 1; margin-top: 16px; }
.price-col .per { font-size: 13px; color: var(--gray-7); margin-top: 6px; }
.price-col ul { list-style: none; padding: 0; margin: 24px 0 28px; }
.price-col li { padding: 8px 0; font-size: 14px; color: var(--dark-9); display: flex; gap: 8px; }
.price-col li::before { content: "›"; color: var(--burgundy-9); font-weight: 600; }
.price-col .btn { width: 100%; }

/* ── FAQ ── */
.faq { max-width: 880px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--cream-4); padding: 22px 0; display:flex; justify-content:space-between; align-items:center; cursor: pointer; }
.faq-item .q { font-size: 17px; font-weight: 500; }
.faq-item .plus { color: var(--gray-7); font-size: 22px; }

/* ── Get-started CTA pair ── */
.cta-pair { display:grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 1080px; margin: 56px auto 0; }
.cta-card { padding: 36px; border-radius: 16px; min-height: 220px; display:flex; flex-direction: column; justify-content: space-between; }
.cta-card.dark { background: var(--dark-9); color:#fff; }
.cta-card.warm { background: linear-gradient(135deg, var(--burgundy-1), #f1d4d9); color: var(--dark-9); position: relative; overflow: hidden; }
.cta-card h3 { font-size: 28px; letter-spacing: -0.015em; margin: 0 0 10px; font-weight: 600; }
.cta-card p { font-size: 14px; opacity: 0.85; margin: 0 0 24px; }
.cta-card.dark .btn-primary { background: #fff; color: var(--dark-9); }
.cta-card.warm .btn-primary { background: var(--burgundy-9); color:#fff; }

/* ── Footer ── */
footer { background: var(--cream-1); border-top: 1px solid var(--cream-4); padding: 72px 32px 36px; }
footer .container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 64px; align-items: start; }
footer h5 { font: 600 11px/1 "Geist", system-ui, -apple-system, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--burgundy-9); margin: 0 0 18px; }

.ft-brand .ft-tagline {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--gray-7);
  max-width: 340px;
  margin: 18px 0 0;
}
.ft-contact { display: grid; gap: 8px; }
.ft-contact .ft-label {
  font: 600 14px/1.4 "Geist", system-ui, -apple-system, sans-serif;
  color: var(--dark-9);
  letter-spacing: -0.005em;
}
.ft-contact .ft-mail {
  font-size: 14px;
  color: var(--burgundy-9);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 240ms cubic-bezier(.2,.8,.2,1);
  display: inline-block;
  width: max-content;
}
.ft-contact .ft-mail:hover { border-bottom-color: var(--burgundy-9); }
.ft-contact .ft-loc {
  font-size: 14px;
  color: var(--gray-7);
  margin-top: 6px;
}
.ft-links { display: grid; align-content: start; gap: 11px; }
.ft-links h5 { margin-bottom: 8px; }
.ft-links a {
  width: max-content;
  max-width: 100%;
  color: var(--dark-9);
  font-size: 14px;
  line-height: 1.35;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}
.ft-links a:hover { color: var(--burgundy-9); border-bottom-color: var(--burgundy-4); }
.ft-sub {
  font-size: 14.5px;
  color: var(--gray-7);
  margin: 0 0 16px;
  line-height: 1.55;
  max-width: 280px;
}
.ft-form { display: grid; gap: 8px; max-width: 320px; }
.ft-form input {
  width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--cream-4);
  border-radius: 999px;
  background: #fff;
  font: 500 14px/1 "Geist", system-ui, -apple-system, sans-serif;
  color: var(--dark-9);
  outline: 0;
  transition: border-color 240ms cubic-bezier(.2,.8,.2,1), box-shadow 240ms cubic-bezier(.2,.8,.2,1);
}
.ft-form input::placeholder { color: var(--gray-7); font-weight: 400; }
.ft-form input:focus { border-color: var(--burgundy-9); box-shadow: 0 0 0 3px rgba(85,40,49,0.10); }
.ft-form button {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--burgundy-9);
  color: #fff;
  font: 600 14px/1 "Geist", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  transition: background 240ms cubic-bezier(.2,.8,.2,1);
}
.ft-form button:hover { background: #4a1f29; }

footer .copy { max-width: 1280px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid var(--cream-4); font-size: 12px; color: var(--gray-7); display: flex; justify-content: space-between; }
footer .copy a { color: var(--gray-7); }
footer .copy a:hover { color: var(--burgundy-9); }
/* ═══════════════════════════════════════════════════════════
   Release notes — quiet editorial index
   ═══════════════════════════════════════════════════════════ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.release-page { background: #fff; }
.release-shell { width: min(100% - 48px, 1100px); margin: 0 auto; }
.release-hero { padding: 112px 0 88px; background-color: var(--cream-0); border-bottom: 1px solid var(--cream-4); }
.release-hero .release-shell { position: relative; z-index: 1; }
.release-kicker {
  display: block;
  margin-bottom: 20px;
  color: var(--burgundy-9);
  font: 600 11px/1 "Geist", system-ui, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.release-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--dark-9);
  font-family: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 500;
  letter-spacing: -.035em;
  line-height: .98;
}
.release-hero p { max-width: 590px; margin: 28px 0 0; color: var(--gray-7); font-size: 18px; line-height: 1.6; }
.release-index { padding: 48px 0 112px; }
.release-tools { display: flex; justify-content: space-between; gap: 24px; padding-bottom: 32px; border-bottom: 1px solid var(--cream-4); }
.release-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.release-filter {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--cream-4);
  border-radius: 999px;
  background: #fff;
  color: var(--gray-7);
  font: 500 13px/1 "Geist", system-ui, sans-serif;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.release-filter:hover { border-color: var(--burgundy-4); color: var(--burgundy-9); }
.release-filter.is-active { border-color: var(--burgundy-9); background: var(--burgundy-9); color: #fff; }
.release-filter:focus-visible, .release-search:focus-within { outline: 2px solid var(--burgundy-7); outline-offset: 3px; }
.release-search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: min(260px, 100%);
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--cream-4);
  border-radius: 999px;
  background: #fff;
  color: var(--gray-7);
}
.release-search svg { width: 17px; height: 17px; flex: 0 0 auto; }
.release-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--dark-9); font: 500 13px/1 "Geist", system-ui, sans-serif; }
.release-search input::placeholder { color: var(--gray-7); }
.release-sample-note { margin: 28px 0 0; padding: 12px 14px; border-left: 2px solid var(--burgundy-7); background: var(--burgundy-0); color: var(--gray-7); font-size: 12px; line-height: 1.5; }
.release-list { margin-top: 22px; border-top: 1px solid var(--cream-4); }
.release-entry {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 24px;
  gap: 32px;
  align-items: start;
  padding: 38px 4px;
  border-bottom: 1px solid var(--cream-4);
  transition: background 180ms ease, padding 180ms ease;
}
.release-entry:hover { padding-left: 14px; padding-right: 14px; background: var(--cream-0); }
.release-entry[hidden] { display: none; }
.release-entry time { padding-top: 3px; color: var(--gray-7); font-size: 13px; }
.release-category { display: block; margin-bottom: 10px; color: var(--burgundy-9); font-size: 12px; font-weight: 600; }
.release-copy h2 { margin: 0; color: var(--dark-9); font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: clamp(25px, 3vw, 34px); font-weight: 500; letter-spacing: -.018em; line-height: 1.12; }
.release-copy h2 a { color: inherit; }
.release-copy p { max-width: 680px; margin: 12px 0 0; color: var(--gray-7); font-size: 15px; line-height: 1.6; }
.release-entry-link { color: var(--burgundy-9); }
.release-arrow { width: 20px; height: 20px; margin-top: 3px; color: var(--burgundy-9); }
.release-empty { padding: 64px 0; color: var(--gray-7); text-align: center; }

/* Release-note article */
.article-shell { width: min(100% - 48px, 900px); margin: 0 auto; }
.article-hero { padding: 72px 0 88px; background-color: var(--cream-0); border-bottom: 1px solid var(--cream-4); }
.article-hero .article-shell { position: relative; z-index: 1; }
.article-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 64px; color: var(--gray-7); font-size: 13px; }
.article-back:hover { color: var(--burgundy-9); }
.article-back svg { width: 17px; height: 17px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 24px; color: var(--gray-7); font-size: 13px; }
.article-meta > span:first-child { color: var(--burgundy-9); font-weight: 600; }
.article-read { display: inline-flex; align-items: center; gap: 6px; }
.article-read svg { width: 15px; height: 15px; }
.article-hero h1 { max-width: 860px; margin: 0; font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: clamp(44px, 6.4vw, 76px); font-weight: 500; letter-spacing: -.032em; line-height: 1.02; }
.article-summary { max-width: 700px; margin: 28px 0 0; color: var(--gray-7); font-size: 19px; line-height: 1.6; }
.article-body { padding-top: 72px; padding-bottom: 112px; }
.article-media { width: 100%; margin: 0 0 72px; overflow: hidden; border: 1px solid var(--cream-4); border-radius: 16px; background: var(--cream-0); }
.article-media img { width: 100%; height: auto; }
.article-media-placeholder { aspect-ratio: 16 / 9; display: grid; place-items: center; background-color: var(--cream-1); background-image: linear-gradient(to right, var(--grid-line) 1px, transparent 1px), linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px); background-size: 48px 48px; }
.article-media-placeholder span { padding: 9px 13px; border: 1px solid var(--cream-4); border-radius: 999px; background: rgba(255,255,255,.88); color: var(--gray-7); font-size: 12px; }
.article-prose { max-width: 720px; margin: 0 auto; }
.article-prose p { margin: 0 0 28px; color: var(--dark-7); font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: 19px; line-height: 1.75; }
.article-prose h2 { margin: 64px 0 20px; color: var(--dark-9); font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: clamp(30px, 4vw, 42px); font-weight: 500; letter-spacing: -.02em; line-height: 1.1; }
.article-prose ul { margin: 0 0 36px; padding: 0; list-style: none; }
.article-prose li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid var(--cream-4); color: var(--dark-7); font-size: 16px; line-height: 1.55; }
.article-prose li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 7px; height: 7px; border-radius: 50%; background: var(--burgundy-7); }
.article-cta { max-width: 720px; margin: 80px auto 0; padding: 30px; display: flex; justify-content: space-between; align-items: center; gap: 28px; border: 1px solid var(--cream-4); border-radius: 16px; background: var(--cream-0); }
.article-cta h2 { margin: 0; font-family: "Newsreader", Georgia, "Iowan Old Style", serif; font-size: 25px; font-weight: 500; }
.article-cta p { margin: 7px 0 0; color: var(--gray-7); font-size: 14px; }
.article-cta .btn { flex: 0 0 auto; }

@media (max-width: 800px) {
  .release-hero { padding: 80px 0 64px; }
  .release-tools { flex-direction: column; }
  .release-search { width: 100%; }
  .release-entry { grid-template-columns: 1fr 20px; gap: 14px 20px; }
  .release-entry time { grid-column: 1; }
  .release-copy { grid-column: 1; }
  .release-arrow { grid-column: 2; grid-row: 1 / span 2; }
}

@media (max-width: 640px) {
  .release-shell { width: min(100% - 36px, 1100px); }
  .release-index { padding: 32px 0 80px; }
  .release-filters { flex-wrap: nowrap; width: calc(100vw - 36px); overflow-x: auto; padding-bottom: 4px; }
  .release-filter { flex: 0 0 auto; }
  .release-entry { padding: 28px 0; }
  .release-entry:hover { padding-left: 0; padding-right: 0; }
  .article-shell { width: min(100% - 36px, 900px); }
  .article-hero { padding: 52px 0 64px; }
  .article-back { margin-bottom: 48px; }
  .article-body { padding-top: 40px; padding-bottom: 80px; }
  .article-media { margin-bottom: 48px; border-radius: 12px; }
  .article-prose p { font-size: 17px; }
  .article-cta { margin-top: 56px; padding: 24px; flex-direction: column; align-items: flex-start; }
}

@media (max-width: 1024px) {
  .hero, .alt-feature, .alt-feature.wide-screen, .alt-feature.reverse, .pricing-min, footer .container, .features-grid, .full-feature .points { grid-template-columns: 1fr; }
  footer .container { gap: 40px; }
  footer .copy { flex-direction: column; gap: 8px; }
  .full-feature { padding: 64px 24px; }
  .full-feature .head h2 { font-size: 36px; }
  .full-feature .points { gap: 24px; margin-top: 48px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 60px; }
  .alt-feature { padding: 64px 24px; gap: 40px; }
  .alt-feature h2, .imagery h2 { font-size: 32px; }
  .alt-feature .text-col { max-width: none; }
  /* Stack with the asset ABOVE the text on narrow screens — easier to
     scan, and avoids a tall thin text column while the asset gets squished. */
  .alt-feature .text-col { order: 2; }
  .alt-feature .screen-col { order: 1; }
  .alt-feature.reverse .text-col { order: 2; }
  .alt-feature.reverse .screen-col { order: 1; }
  .alt-feature.wide-screen .screen-col > *,
  .alt-feature .screen-col > * { max-width: 100%; transform: none; }
  .core-list { grid-template-columns: 1fr; }
  .cta-pair { grid-template-columns: 1fr; }
  /* Nav: hide deep links, keep brand + Sign in + Book a demo */
  .nav-links { display: none; }
  .nav { padding: 14px 20px; }
  .hero { padding: 48px 24px 32px; min-height: auto; }
  .hero h1 { font-size: 44px; }
  .section-head h2 { font-size: 36px; }
  section { padding: 64px 20px; }
}

@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 36px; }
  .alt-feature h2 { font-size: 26px; }
  .section-head h2 { font-size: 28px; }
  /* Pricing — let each card breathe full-width */
  .pricing-min { border: none; background: transparent; gap: 16px; }
  .price-col { border: 1px solid var(--cream-4); border-radius: 12px; background: #fff; }
  .price-col.featured { background: var(--cream-0); }
  .cta-card { padding: 28px; }
}

/* ───────── Asset library CSS (5 components) ───────── */
/* ── patient-sidebar ── */
  .qh-pat-frame {
    --b0:#FDF3EC; --b1:#FBE7DC; --b2:#F6D3C2; --b7:#834D46; --b9:#4E2B2A;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green1:#D3F9D8; --green7:#37B24D;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 880px;
    position: relative;
    -webkit-font-smoothing: antialiased;
    overflow: visible;
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: 0;
    padding: 18px;
  }
  .qh-pat-frame * { box-sizing: border-box; }
  .qh-pat-sidebar { display: flex; flex-direction: column; gap: 10px; padding-right: 14px; }
  .qh-pat-patient { background: #fff; border: 1px solid var(--c4); border-radius: 8px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
  .qh-pat-patient .id-row { display: flex; gap: 12px; align-items: flex-start; }
  .qh-pat-patient .avatar { width: 40px; height: 40px; background: var(--b1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--b9); font: 600 13px/1 system-ui, sans-serif; flex-shrink: 0; letter-spacing: 0.04em; }
  .qh-pat-patient .id { flex: 1; min-width: 0; }
  .qh-pat-patient .name-line { font: 600 16px/1.2 system-ui, sans-serif; letter-spacing: -0.005em; color: var(--d9); }
  .qh-pat-patient .name-line .pronouns { font: 400 12px/1 system-ui, sans-serif; color: var(--g7); margin-left: 6px; }
  .qh-pat-patient .dob { font: 400 11px/1.4 system-ui, sans-serif; color: var(--g7); margin-top: 4px; }
  .qh-pat-patient .partner { font: 400 12px/1.4 system-ui, sans-serif; color: var(--d9); }
  .qh-pat-patient .partner .lbl { color: var(--g7); }
  .qh-pat-patient .partner .who { font-weight: 500; }
  .qh-pat-patient .partner .pn { color: var(--g7); margin-left: 4px; }
  .qh-pat-contact { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
  .qh-pat-contact .lbl { font: 400 12px/1 system-ui, sans-serif; color: var(--g7); margin-right: 2px; }
  .qh-pat-contact-chip { display: inline-flex; align-items: center; padding: 5px 9px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 600 10px/1 system-ui, sans-serif; letter-spacing: 0.08em; color: var(--d9); cursor: pointer; transition: all .15s ease; }
  .qh-pat-contact-chip:hover { border-color: var(--g4); background: var(--c0); }
  .qh-pat-contact-chip.sm { padding: 4px 7px; font-size: 10px; }
  .qh-pat-banner { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: var(--b9); color: #fff; border-radius: 4px; font: 500 13px/1 system-ui, sans-serif; }
  .qh-pat-banner .dot { width: 6px; height: 6px; background: #fff; border-radius: 50%; flex-shrink: 0; }
  .qh-pat-tagrow { display: flex; gap: 6px; flex-wrap: wrap; }
  .qh-pat-tag { display: inline-flex; align-items: center; padding: 6px 10px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 500 12px/1 system-ui, sans-serif; color: var(--d9); white-space: nowrap; }
  .qh-pat-panel { background: #fff; border: 1px solid var(--c4); border-radius: 8px; padding: 14px 16px; }
  .qh-pat-panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
  .qh-pat-panel-title { font: 600 10px/1 system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--g7); }
  .qh-pat-link { font: 400 12px/1 system-ui, sans-serif; color: var(--g7); cursor: pointer; background: transparent; border: 0; padding: 4px 6px; }
  .qh-pat-link:hover { color: var(--d9); }
  .qh-pat-add { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 500 12px/1 system-ui, sans-serif; color: var(--d9); cursor: pointer; transition: border-color .15s; }
  .qh-pat-add:hover { border-color: var(--g4); }
  .qh-pat-add svg { width: 10px; height: 10px; }
  .qh-pat-chiprow { display: flex; gap: 6px; flex-wrap: wrap; }
  .qh-pat-bloodtype { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 500 12px/1 system-ui, sans-serif; }
  .qh-pat-bloodtype .k { color: var(--g7); font-weight: 400; }
  .qh-pat-bloodtype .v { color: var(--d9); font-weight: 600; }
  .qh-pat-medlist { display: flex; flex-direction: column; gap: 4px; font: 400 13px/1.5 system-ui, sans-serif; color: var(--d9); }
  .qh-pat-main { background: var(--c1); border: 1px solid var(--c4); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
  .qh-pat-outer-tabs { background: var(--c2); padding: 6px 6px 0; display: flex; border-bottom: 1px solid var(--c4); }
  .qh-pat-outer-tab { padding: 8px 14px; font: 500 13px/1 system-ui, sans-serif; color: var(--g7); background: transparent; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; cursor: pointer; margin-bottom: -1px; transition: all .15s ease; }
  .qh-pat-outer-tab:hover { color: var(--d9); background: rgba(255,255,255,0.45); }
  .qh-pat-outer-tab.active { background: var(--b9); color: #fff; border-color: var(--b9); }
  .qh-pat-inner-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 14px 14px 0; background: var(--c2); border-radius: 6px; padding: 4px; gap: 4px; }
  .qh-pat-inner-tab { padding: 9px; text-align: center; font: 500 13px/1 system-ui, sans-serif; color: var(--g7); background: transparent; border: 0; cursor: pointer; border-radius: 4px; transition: all .15s ease; }
  .qh-pat-inner-tab.active { background: #fff; color: var(--d9); box-shadow: 0 1px 2px rgba(0,0,0,0.06); }
  .qh-pat-section { background: #fff; border: 1px solid var(--c4); border-radius: 6px; margin: 14px 14px 0; padding: 16px 18px 14px; }
  .qh-pat-section:last-child { margin-bottom: 14px; }
  .qh-pat-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .qh-pat-section-title { font: 600 15px/1.2 system-ui, sans-serif; letter-spacing: -0.005em; color: var(--d9); }
  .qh-pat-section.dense .qh-pat-section-title { font-size: 14px; }
  .qh-pat-schedule { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; background: var(--b9); color: #fff; border: 1px solid var(--b9); border-radius: 4px; font: 500 12px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
  .qh-pat-schedule:hover { background: #6E3640; }
  .qh-pat-schedule svg { width: 10px; height: 10px; }
  .qh-pat-encounter { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  .qh-pat-encounter .info { min-width: 0; }
  .qh-pat-encounter-name { font: 600 13.5px/1.2 system-ui, sans-serif; color: var(--d9); }
  .qh-pat-encounter-meta { font: 400 12px/1.4 system-ui, sans-serif; color: var(--g7); margin-top: 2px; }
  .qh-pat-outline-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 500 12px/1 system-ui, sans-serif; color: var(--d9); cursor: pointer; transition: all .15s; white-space: nowrap; }
  .qh-pat-outline-btn:hover { border-color: var(--g4); background: var(--c0); }
  .qh-pat-form-row { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--c3); }
  .qh-pat-form-row:first-of-type { border-top: 0; padding-top: 4px; }
  .qh-pat-form-name { font: 500 13px/1.2 system-ui, sans-serif; color: var(--d9); }
  .qh-pat-form-meta { font: 400 12px/1 system-ui, sans-serif; color: var(--g7); }
  @media (max-width: 768px) {
    .qh-pat-frame { grid-template-columns: 1fr; padding: 14px; }
    .qh-pat-sidebar { padding-right: 0; padding-bottom: 12px; gap: 10px; }
    /* Outer tabs: horizontal scroll, hidden scrollbar */
    .qh-pat-outer-tabs {
      overflow-x: auto;
      flex-wrap: nowrap;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .qh-pat-outer-tabs::-webkit-scrollbar { display: none; }
    .qh-pat-outer-tab { flex-shrink: 0; }
  }
  @media (max-width: 768px) {
    .qh-pat-frame { padding: 12px; max-width: 100%; }
    .qh-pat-patient { padding: 14px; }
    .qh-pat-patient .name-line { font-size: 15px; }
    .qh-pat-section { margin: 10px 10px 0; padding: 14px 14px 12px; }
    .qh-pat-section:last-child { margin-bottom: 10px; }
    .qh-pat-inner-tabs { margin: 10px 10px 0; }
    .qh-pat-section-title { font-size: 14px; }
    .qh-pat-encounter-name { font-size: 13px; }
    .qh-pat-outer-tab { padding: 8px 12px; font-size: 12px; }
  }

/* ── practice-billing ── */
  .qh-billing-card {
    --b0:#FDF3EC; --b1:#FBE7DC; --b2:#F6D3C2; --b5:#B87768; --b7:#834D46; --b9:#4E2B2A;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green1:#D3F9D8; --green7:#37B24D;
    --orange1:#FFE8CC; --orange7:#FD7E14; --orange8:#E8590C;
    --red1:#FFE3E3; --red7:#F03E3E;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 760px;
    position: relative;
    -webkit-font-smoothing: antialiased;
  }
  .qh-billing-card * { box-sizing: border-box; }
  .qh-billing-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px 18px; flex-wrap: wrap; }
  .qh-billing-header h3 { margin: 0; font: 600 20px/1.2 system-ui, sans-serif; letter-spacing: -0.012em; color: var(--d9); }
  .qh-billing-tools { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .qh-billing-select { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 400 13px/1 system-ui, sans-serif; color: var(--d9); cursor: pointer; transition: border-color .15s; }
  .qh-billing-select:hover { border-color: var(--g4); }
  .qh-billing-select .lbl { color: var(--g7); }
  .qh-billing-select .val { color: var(--d9); font-weight: 500; }
  .qh-billing-select svg { width: 12px; height: 12px; color: var(--g7); }
  .qh-billing-search { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: #fff; border: 1px solid var(--g4); border-radius: 4px; min-width: 160px; }
  .qh-billing-search svg { width: 14px; height: 14px; color: var(--g6); }
  .qh-billing-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: 400 13px/1 system-ui, sans-serif; color: var(--d9); }
  .qh-billing-search input::placeholder { color: var(--g6); }
  .qh-billing-submit { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: var(--b9); color: #fff; border: 1px solid var(--b9); border-radius: 4px; font: 500 13px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
  .qh-billing-submit:hover { background: #6E3640; }
  .qh-billing-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .qh-billing-table colgroup col:nth-child(1) { width: 22%; }
  .qh-billing-table colgroup col:nth-child(2) { width: 17%; }
  .qh-billing-table colgroup col:nth-child(3) { width: 17%; }
  .qh-billing-table colgroup col:nth-child(4) { width: 11%; }
  .qh-billing-table colgroup col:nth-child(5) { width: 13%; }
  .qh-billing-table colgroup col:nth-child(6) { width: 20%; }
  .qh-billing-table thead th { padding: 10px 14px; background: var(--c2); border-top: 1px solid var(--c4); border-bottom: 1px solid var(--c4); text-align: left; color: var(--d9); }
  .qh-billing-table thead th:first-child { padding-left: 28px; }
  .qh-billing-table thead th:last-child { padding-right: 28px; }
  .qh-billing-table thead .th-sort { display: inline-flex; align-items: center; gap: 6px; font: 600 11px/1 system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; color: var(--d9); cursor: pointer; user-select: none; }
  .qh-billing-table thead .th-sort .arr { display: inline-flex; flex-direction: column; gap: 1px; }
  .qh-billing-table thead .th-sort .arr svg { width: 8px; height: 5px; color: var(--g6); }
  .qh-billing-table thead .th-sort:hover .arr svg { color: var(--d9); }
  .qh-billing-table tbody td { padding: 14px; font: 400 13.5px/1.4 system-ui, sans-serif; color: var(--d9); border-bottom: 1px solid var(--c3); vertical-align: middle; }
  .qh-billing-table tbody td:first-child { padding-left: 28px; font-weight: 500; }
  .qh-billing-table tbody td:last-child { padding-right: 28px; }
  .qh-billing-table tbody tr:last-child td { border-bottom: none; }
  .qh-billing-table tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
  .qh-billing-table tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }
  .qh-billing-table tbody tr:hover td { background: var(--c0); }
  .qh-billing-table td.codes { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; color: var(--d9); white-space: nowrap; }
  .qh-billing-table td.codes .sep { color: var(--g6); margin: 0 6px; }
  .qh-billing-table td.charge { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; font-weight: 600; color: var(--d9); }
  .qh-billing-status { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 9999px; border: 1px solid transparent; font: 600 10px/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
  .qh-billing-status.submitted { background: var(--orange1); border-color: var(--orange7); color: var(--orange8); }
  .qh-billing-status.draft { background: var(--b1); border-color: var(--b5); color: var(--b9); }
  .qh-billing-status.paid { background: var(--green1); border-color: var(--green7); color: var(--green7); }
  .qh-billing-status.denied { background: var(--red1); border-color: var(--red7); color: var(--red7); }

  /* Filters button (mobile-only collapse target — hidden on desktop) */
  .qh-billing-filters {
    display: none;
    align-items: center; gap: 6px;
    height: 34px; padding: 0 12px;
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 4px;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer; transition: border-color .15s;
    white-space: nowrap;
  }
  .qh-billing-filters:hover { border-color: var(--g4); }
  .qh-billing-filters svg { width: 12px; height: 12px; color: var(--g7); }

  /* ── Mobile (≤600px) — priority crop: keep Client / Charge / Status ── */
  @media (max-width: 768px) {
    .qh-billing-card { max-width: 100%; border-radius: 14px; }
    .qh-billing-header { flex-direction: column; align-items: stretch; padding: 18px 18px 14px; gap: 12px; }
    .qh-billing-header h3 { font-size: 18px; }
    .qh-billing-tools {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      width: 100%;
    }
    .qh-billing-select { display: none; }
    .qh-billing-filters { display: inline-flex; grid-column: 2; }
    .qh-billing-search { grid-column: 1; min-width: 0; }
    .qh-billing-submit { grid-column: 1 / -1; justify-content: center; height: 38px; }
    /* Auto layout so display:none cells drop out and visible cols share full width */
    .qh-billing-table { table-layout: auto; }
    .qh-billing-table colgroup col:nth-child(1),
    .qh-billing-table colgroup col:nth-child(2),
    .qh-billing-table colgroup col:nth-child(3),
    .qh-billing-table colgroup col:nth-child(4),
    .qh-billing-table colgroup col:nth-child(5),
    .qh-billing-table colgroup col:nth-child(6) { width: auto; }
    .qh-billing-table thead th:nth-child(2),
    .qh-billing-table thead th:nth-child(3),
    .qh-billing-table thead th:nth-child(4),
    .qh-billing-table tbody td:nth-child(2),
    .qh-billing-table tbody td:nth-child(3),
    .qh-billing-table tbody td:nth-child(4) { display: none; }
    .qh-billing-table thead .th-sort { gap: 4px; }
    .qh-billing-table thead .th-sort .arr { display: none; }
    .qh-billing-table thead th { padding: 8px 8px; font-size: 10px; letter-spacing: 0.04em; white-space: nowrap; }
    .qh-billing-table thead th:first-child { padding-left: 18px; }
    .qh-billing-table thead th:last-child { padding-right: 18px; }
    .qh-billing-table tbody td { padding: 12px 8px; font-size: 12.5px; line-height: 1.4; }
    .qh-billing-table tbody td:first-child { padding-left: 18px; font-weight: 500; }
    .qh-billing-table tbody td:last-child { padding-right: 18px; white-space: nowrap; }
    .qh-billing-table td.charge { font-size: 13px; white-space: nowrap; }
    .qh-billing-status { padding: 3px 7px; font-size: 9px; letter-spacing: 0.06em; }
  }

/* ── calendar ── */

  /* ───────────────────────────────────────────────
     THE ASSET — Calendar (.qh-cal-*)
     Desktop: week view (7 days, 9am–5pm)
     Tablet: compressed week (smaller text)
     Mobile: 3-day view + day strip header + FAB
     ─────────────────────────────────────────────── */
  .qh-cal-card {
    --b0:#FDF3EC; --b1:#FBE7DC; --b9:#4E2B2A; --b7:#834D46;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green1:#D3F9D8; --green3:#8CE99A; --green6:#40C057; --green7:#37B24D;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    --hour-h: 56px;
    --grid-start-hour: 9;
    --grid-end-hour: 18; /* 6pm exclusive, so 9–17 = 9am–5pm rows */

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 980px;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
  }
  .qh-cal-card * { box-sizing: border-box; }

  /* Header tabs row (Calendar / Schedules) */
  .qh-cal-tabs {
    display: flex; gap: 24px;
    padding: 0 24px;
    border-bottom: 1px solid var(--c4);
  }
  .qh-cal-tab {
    padding: 14px 0;
    background: transparent; border: 0; cursor: pointer;
    font: 500 14px/1 system-ui, sans-serif;
    color: var(--g7);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s;
  }
  .qh-cal-tab:hover { color: var(--d9); }
  .qh-cal-tab.active { color: var(--d9); border-bottom-color: var(--d9); }

  /* Controls row */
  .qh-cal-controls {
    display: flex; justify-content: space-between; align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--c4);
    gap: 16px;
    flex-wrap: wrap;
  }
  .qh-cal-controls-left { display: inline-flex; gap: 10px; align-items: center; }
  .qh-cal-today {
    height: 32px; padding: 0 12px;
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 4px;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer; transition: border-color .15s;
  }
  .qh-cal-today:hover { border-color: var(--g4); }
  .qh-cal-nav {
    width: 28px; height: 28px;
    background: transparent; border: 0; border-radius: 4px;
    cursor: pointer; color: var(--d9);
    display: inline-flex; align-items: center; justify-content: center;
  }
  .qh-cal-nav:hover { background: var(--c1); }
  .qh-cal-nav svg { width: 14px; height: 14px; }
  .qh-cal-month {
    font: 600 17px/1 system-ui, sans-serif;
    letter-spacing: -0.005em;
    color: var(--d9);
    margin-left: 6px;
  }

  .qh-cal-controls-right { display: inline-flex; gap: 12px; align-items: center; }
  .qh-cal-view {
    display: inline-flex; align-items: center; gap: 14px;
    font: 500 13px/1 system-ui, sans-serif;
  }
  .qh-cal-view button {
    background: transparent; border: 0; cursor: pointer;
    color: var(--g7);
    padding: 4px 0;
    border-bottom: 1px solid transparent;
  }
  .qh-cal-view button:hover { color: var(--d9); }
  .qh-cal-view button.active { color: var(--d9); border-bottom-color: var(--d9); font-weight: 600; }
  .qh-cal-create {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px;
    background: var(--b9); color: #fff;
    border: 1px solid var(--b9); border-radius: 4px;
    font: 500 13px/1 system-ui, sans-serif;
    cursor: pointer; transition: background .15s;
  }
  .qh-cal-create:hover { background: #6E3640; }
  .qh-cal-create svg { width: 12px; height: 12px; }

  /* Day headers row */
  .qh-cal-day-row {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    border-bottom: 1px solid var(--c4);
    background: var(--c1);
  }
  .qh-cal-day-corner { border-right: 1px solid var(--c4); }
  .qh-cal-day-head {
    padding: 10px 8px;
    text-align: center;
    border-right: 1px solid var(--c4);
    font: 400 12px/1.2 system-ui, sans-serif;
    color: var(--g7);
  }
  .qh-cal-day-head:last-child { border-right: 0; }
  .qh-cal-day-head .dname { display: inline; }
  .qh-cal-day-head .dnum {
    display: block;
    font: 600 15px/1 system-ui, sans-serif;
    color: var(--d9);
    margin-top: 4px;
    letter-spacing: -0.005em;
  }
  .qh-cal-day-head.today .dnum {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: var(--b9); color: #fff;
    border-radius: 50%;
    margin-top: 2px;
  }

  /* Grid body */
  .qh-cal-body {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    position: relative;
  }
  .qh-cal-times {
    display: flex; flex-direction: column;
    border-right: 1px solid var(--c4);
  }
  .qh-cal-time {
    height: var(--hour-h);
    position: relative;
    font: 400 11px/1 system-ui, sans-serif;
    color: var(--g7);
    text-align: right;
    padding-right: 8px;
    padding-top: 4px;
    font-variant-numeric: tabular-nums;
  }
  .qh-cal-col {
    position: relative;
    border-right: 1px solid var(--c4);
    height: calc(var(--hour-h) * 9);
    background-image: linear-gradient(to bottom, transparent calc(var(--hour-h) - 1px), var(--c3) calc(var(--hour-h) - 1px), var(--c3) var(--hour-h));
    background-size: 100% var(--hour-h);
  }
  .qh-cal-col:last-child { border-right: 0; }

  /* Events */
  .qh-cal-event {
    position: absolute;
    left: 4px; right: 4px;
    top: calc(var(--start) * var(--hour-h) + 3px);
    height: calc(var(--dur) * var(--hour-h) - 6px);
    background: var(--green1);
    border: 1px solid var(--green6);
    border-left: 3px solid var(--green7);
    border-radius: 4px;
    padding: 5px 8px;
    overflow: hidden;
    cursor: pointer;
    transition: filter .15s;
  }
  .qh-cal-event:hover { filter: brightness(0.97); }
  .qh-cal-event .ev-name {
    font: 600 12px/1.2 system-ui, sans-serif;
    color: var(--d9);
    letter-spacing: -0.005em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .qh-cal-event .ev-sub {
    font: 400 11px/1.2 system-ui, sans-serif;
    color: var(--g7);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Current time line (burgundy/9) */
  .qh-cal-now {
    position: absolute;
    left: 56px; right: 0;
    top: calc(var(--now) * var(--hour-h));
    height: 0;
    border-top: 1.5px solid var(--b9);
    z-index: 2;
    pointer-events: none;
  }
  .qh-cal-now::before {
    content: "";
    position: absolute;
    left: -5px; top: -5px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--b9);
  }
  .qh-cal-now-label {
    position: absolute;
    left: -52px;
    top: -8px;
    font: 600 10px/1 system-ui, sans-serif;
    color: var(--b9);
    background: #fff;
    padding: 1px 4px;
    border-radius: 2px;
    font-variant-numeric: tabular-nums;
  }

  /* Mobile-only header (hidden on desktop) */
  .qh-cal-mobile-head { display: none; }
  .qh-cal-mobile-strip { display: none; }
  .qh-cal-fab { display: none; }

  /* ── Tablet (≤1024px) — compressed week ── */
  @media (max-width: 1024px) {
    .qh-cal-card { --hour-h: 50px; }
    .qh-cal-controls { padding: 12px 18px; }
    .qh-cal-controls-right { gap: 8px; }
    .qh-cal-day-head { padding: 8px 4px; font-size: 11px; }
    .qh-cal-day-head .dnum { font-size: 14px; }
    .qh-cal-event { padding: 4px 6px; }
    .qh-cal-event .ev-name { font-size: 11px; }
    .qh-cal-event .ev-sub { font-size: 10px; }
    .qh-cal-time { font-size: 10px; }
  }

  /* ── Mobile (≤768px) — 3-day view ── */
  @media (max-width: 768px) {
    .qh-cal-card { --hour-h: 56px; max-width: 100%; border-radius: 14px; }

    /* Hide desktop chrome */
    .qh-cal-tabs { display: none; }
    .qh-cal-controls { display: none; }
    .qh-cal-day-row { display: none; }

    /* Show mobile header */
    .qh-cal-mobile-head {
      display: flex; align-items: center; justify-content: space-between;
      padding: 14px 16px;
      border-bottom: 1px solid var(--c4);
    }
    .qh-cal-mobile-head .left { display: inline-flex; gap: 14px; align-items: center; }
    .qh-cal-mobile-head .ham {
      width: 36px; height: 36px;
      background: transparent; border: 0; border-radius: 4px;
      cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .qh-cal-mobile-head .ham:hover { background: var(--c1); }
    .qh-cal-mobile-head .ham svg { width: 18px; height: 18px; color: var(--d9); }
    .qh-cal-mobile-head .month {
      display: inline-flex; align-items: center; gap: 6px;
      font: 600 17px/1 system-ui, sans-serif;
      letter-spacing: -0.005em;
      color: var(--d9);
      background: transparent; border: 0; cursor: pointer;
    }
    .qh-cal-mobile-head .month svg { width: 14px; height: 14px; color: var(--g7); }
    .qh-cal-mobile-head .right { display: inline-flex; gap: 4px; align-items: center; }
    .qh-cal-mobile-head .right button {
      width: 36px; height: 36px;
      background: transparent; border: 0; border-radius: 4px;
      cursor: pointer;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .qh-cal-mobile-head .right button:hover { background: var(--c1); }
    .qh-cal-mobile-head .right button svg { width: 18px; height: 18px; color: var(--d9); }

    /* Day strip M T W T F S S */
    .qh-cal-mobile-strip {
      display: grid;
      grid-template-columns: repeat(7, 1fr);
      padding: 8px 8px 10px;
      border-bottom: 1px solid var(--c4);
      background: var(--c0);
    }
    .qh-cal-strip-day {
      display: flex; flex-direction: column; align-items: center; gap: 4px;
      background: transparent; border: 0; cursor: pointer;
      padding: 6px 4px;
      border-radius: 8px;
    }
    .qh-cal-strip-day .dl {
      font: 500 10px/1 system-ui, sans-serif;
      color: var(--g7);
      text-transform: uppercase;
      letter-spacing: 0.06em;
    }
    .qh-cal-strip-day .dn {
      width: 28px; height: 28px;
      display: inline-flex; align-items: center; justify-content: center;
      font: 500 14px/1 system-ui, sans-serif;
      color: var(--d9);
      border-radius: 50%;
      font-variant-numeric: tabular-nums;
    }
    .qh-cal-strip-day.today .dn {
      background: var(--b9); color: #fff;
      font-weight: 600;
    }
    .qh-cal-strip-day.in-view .dl { color: var(--d9); }
    .qh-cal-strip-day.dim .dl, .qh-cal-strip-day.dim .dn { color: var(--g6); }

    /* 3-day grid: 56px time col + 3 day cols */
    .qh-cal-day-row-mobile {
      display: grid;
      grid-template-columns: 56px repeat(3, 1fr);
      border-bottom: 1px solid var(--c4);
      background: var(--c0);
    }
    .qh-cal-day-corner { display: block; border-right: 1px solid var(--c4); }
    .qh-cal-day-head-mobile {
      display: block;
      padding: 6px 4px;
      text-align: center;
      border-right: 1px solid var(--c4);
      font: 400 11px/1.2 system-ui, sans-serif;
      color: var(--g7);
    }
    .qh-cal-day-head-mobile .dnum { display: block; font: 600 14px/1 system-ui, sans-serif; color: var(--d9); margin-top: 2px; }
    .qh-cal-day-head-mobile.today .dnum {
      display: inline-flex; align-items: center; justify-content: center;
      width: 26px; height: 26px;
      background: var(--b9); color: #fff; border-radius: 50%;
    }
    .qh-cal-day-head-mobile:last-child { border-right: 0; }

    /* Body: hide cols 4-7 (Wed-Sat) — show Sun + first 2 days only? */
    /* Actually show today + next 2 days; original cols Sun-Sat (1-7) */
    /* For preview: show Mon, Tue, Wed (cols 2, 3, 4) */
    .qh-cal-body {
      grid-template-columns: 56px repeat(7, 1fr);
    }
    .qh-cal-col[data-day="0"], .qh-cal-col[data-day="4"],
    .qh-cal-col[data-day="5"], .qh-cal-col[data-day="6"] { display: none; }

    /* Adjust grid columns to reflect only visible day cols */
    .qh-cal-body { grid-template-columns: 56px repeat(3, 1fr); }

    /* Event text smaller */
    .qh-cal-event { padding: 4px 6px; }
    .qh-cal-event .ev-name { font-size: 11px; }
    .qh-cal-event .ev-sub { font-size: 10px; }

    /* Floating Action Button */
    .qh-cal-fab {
      display: inline-flex; align-items: center; justify-content: center;
      position: absolute;
      right: 14px; bottom: 14px;
      width: 52px; height: 52px;
      background: var(--b9); color: #fff;
      border: 0; border-radius: 50%;
      box-shadow: 0 6px 14px rgba(85, 40, 49, 0.32), 0 2px 4px rgba(0,0,0,0.08);
      cursor: pointer;
      transition: all .15s ease;
      z-index: 4;
    }
    .qh-cal-fab:hover { background: #6E3640; transform: scale(1.04); }
    .qh-cal-fab svg { width: 22px; height: 22px; }
  }

/* ── clients-table ── */


  /* ───────────────────────────────────────────────
     THE ASSET — Clients table (.qh-clients-*)
     Three-tier responsive:
       desktop  (>1024px): all 7 columns
       tablet   (≤1024px): drop DOB + MRN
       mobile   (≤768px):  drop DOB + MRN + Provider + Location
     ─────────────────────────────────────────────── */
  .qh-clients-card {
    --b0:#FDF3EC; --b1:#FBE7DC; --b2:#F6D3C2; --b5:#B87768; --b7:#834D46; --b9:#4E2B2A;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --y1:#FFF3BF; --y9:#E67700;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 1080px;
    position: relative;
    -webkit-font-smoothing: antialiased;
  }
  .qh-clients-card * { box-sizing: border-box; }

  .qh-clients-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 22px 28px 18px;
  }
  .qh-clients-header h3 {
    margin: 0;
    font: 600 22px/1.2 system-ui, sans-serif;
    letter-spacing: -0.015em;
    color: var(--d9);
  }
  .qh-clients-tools {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  .qh-clients-tools-right {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
  }
  .qh-clients-check {
    display: inline-flex; align-items: center; gap: 8px;
    font: 400 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    user-select: none;
  }
  .qh-clients-check input { appearance: none; -webkit-appearance: none;
    width: 14px; height: 14px;
    border: 1px solid var(--g4);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    position: relative;
  }
  .qh-clients-check input:checked { background: var(--b9); border-color: var(--b9); }
  .qh-clients-check input:checked::after {
    content: ""; position: absolute;
    left: 3px; top: 1px;
    width: 5px; height: 8px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
  }
  .qh-clients-select {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 10px;
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 4px;
    font: 400 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    transition: border-color .15s;
  }
  .qh-clients-select:hover { border-color: var(--g4); }
  .qh-clients-select .lbl { color: var(--g7); }
  .qh-clients-select .val { color: var(--d9); font-weight: 500; }
  .qh-clients-select svg { width: 12px; height: 12px; color: var(--g7); }
  .qh-clients-search {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 10px;
    background: #fff;
    border: 1px solid var(--g4);
    border-radius: 4px;
    min-width: 180px;
  }
  .qh-clients-search svg { width: 14px; height: 14px; color: var(--g6); }
  .qh-clients-search input {
    flex: 1; min-width: 0;
    border: 0; background: transparent; outline: none;
    font: 400 13px/1 system-ui, sans-serif;
    color: var(--d9);
  }
  .qh-clients-search input::placeholder { color: var(--g6); }
  .qh-clients-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color .15s;
  }
  .qh-clients-icon-btn:hover { border-color: var(--g4); }
  .qh-clients-icon-btn svg { width: 14px; height: 14px; color: var(--d9); }
  .qh-clients-add {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 14px;
    background: var(--b9); color: #fff;
    border: 1px solid var(--b9); border-radius: 4px;
    font: 500 13px/1 system-ui, sans-serif;
    cursor: pointer; transition: background .15s;
    white-space: nowrap;
  }
  .qh-clients-add:hover { background: #6E3640; }
  .qh-clients-add svg { width: 12px; height: 12px; }
  .qh-clients-add .lbl-short { display: none; }

  /* Mobile-only Filters button (consolidates checkbox + select) */
  .qh-clients-filters {
    display: none;
    align-items: center; gap: 6px;
    height: 32px; padding: 0 12px;
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 4px;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    transition: border-color .15s;
    white-space: nowrap;
  }
  .qh-clients-filters:hover { border-color: var(--g4); }
  .qh-clients-filters svg { width: 12px; height: 12px; color: var(--g7); }

  .qh-clients-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .qh-clients-table colgroup col:nth-child(1) { width: 18%; }
  .qh-clients-table colgroup col:nth-child(2) { width: 16%; }
  .qh-clients-table colgroup col:nth-child(3) { width: 12%; }
  .qh-clients-table colgroup col:nth-child(4) { width: 14%; }
  .qh-clients-table colgroup col:nth-child(5) { width: 16%; }
  .qh-clients-table colgroup col:nth-child(6) { width: 16%; }
  .qh-clients-table colgroup col:nth-child(7) { width: 8%; }

  .qh-clients-table thead th {
    padding: 11px 14px;
    background: var(--c2);
    border-top: 1px solid var(--c4);
    border-bottom: 1px solid var(--c4);
    text-align: left; color: var(--d9);
    vertical-align: middle;
  }
  .qh-clients-table thead th:first-child { padding-left: 28px; }
  .qh-clients-table thead th:last-child { padding-right: 28px; }
  .qh-clients-table thead .th-sort {
    display: inline-flex; align-items: center; gap: 6px;
    font: 600 11px/1.2 system-ui, sans-serif;
    letter-spacing: 0.05em; text-transform: uppercase;
    color: var(--d9);
    cursor: pointer; user-select: none;
  }
  .qh-clients-table thead .th-sort .arr { display: inline-flex; flex-direction: column; gap: 1px; }
  .qh-clients-table thead .th-sort .arr svg { width: 8px; height: 5px; color: var(--g6); }

  .qh-clients-table tbody td {
    padding: 14px;
    font: 400 13.5px/1.4 system-ui, sans-serif;
    color: var(--d9);
    border-bottom: 1px solid var(--c3);
    vertical-align: middle;
  }
  .qh-clients-table tbody td:first-child { padding-left: 28px; font-weight: 500; }
  .qh-clients-table tbody td:last-child { padding-right: 28px; }
  .qh-clients-table tbody tr:last-child td { border-bottom: none; }
  .qh-clients-table tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
  .qh-clients-table tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }
  .qh-clients-table tbody tr:hover td { background: var(--c0); }

  /* Name cell — last on top, first below */
  .qh-clients-name { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
  .qh-clients-name .nm { font-weight: 500; line-height: 1.25; }
  .qh-clients-name .pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 9999px; background: var(--y1); border: 1px solid var(--y9); color: var(--y9); font: 600 9px/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }

  /* EDD cell */
  .qh-clients-edd { display: flex; flex-direction: column; gap: 2px; }
  .qh-clients-edd .date { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
  .qh-clients-edd .ga { color: var(--g7); font-size: 12px; font-variant-numeric: tabular-nums; }

  .qh-clients-table td.date { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
  .qh-clients-table td.empty { color: var(--g6); }

  /* Action menu trigger */
  .qh-clients-menu {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px;
    background: transparent; border: 0; border-radius: 4px;
    cursor: pointer; color: var(--g7);
    transition: background .15s;
  }
  .qh-clients-menu:hover { background: var(--c1); color: var(--d9); }
  .qh-clients-menu svg { width: 14px; height: 14px; }

  /* ── Tablet (≤1024px) — drop DOB + MRN ── */
  @media (max-width: 1024px) {
    .qh-clients-table thead th:nth-child(3),
    .qh-clients-table thead th:nth-child(4),
    .qh-clients-table tbody td:nth-child(3),
    .qh-clients-table tbody td:nth-child(4) { display: none; }
    .qh-clients-table { table-layout: auto; }
    .qh-clients-table colgroup col:nth-child(1),
    .qh-clients-table colgroup col:nth-child(2),
    .qh-clients-table colgroup col:nth-child(3),
    .qh-clients-table colgroup col:nth-child(4),
    .qh-clients-table colgroup col:nth-child(5),
    .qh-clients-table colgroup col:nth-child(6),
    .qh-clients-table colgroup col:nth-child(7) { width: auto; }
  }

  /* ── Mobile (≤768px) — drop Provider + Location too ── */
  @media (max-width: 768px) {
    .qh-clients-card { max-width: 100%; border-radius: 14px; }

    /* Header stacks: title + tools below */
    .qh-clients-header {
      grid-template-columns: 1fr;
      gap: 12px;
      padding: 18px 18px 14px;
    }
    .qh-clients-header h3 { font-size: 18px; }
    .qh-clients-tools { display: none; }
    .qh-clients-tools-right {
      display: grid;
      grid-template-columns: 1fr auto auto;
      gap: 8px;
      width: 100%;
    }
    .qh-clients-search { min-width: 0; grid-column: 1; }
    .qh-clients-filters { display: inline-flex; grid-column: 2; }
    .qh-clients-add { grid-column: 3; padding: 0 10px; }
    .qh-clients-add .lbl { display: none; }
    .qh-clients-add .lbl-short { display: inline; }
    .qh-clients-icon-btn { display: none; }

    /* Drop Provider (5) + Location (6) on top of tablet drops */
    .qh-clients-table thead th:nth-child(5),
    .qh-clients-table thead th:nth-child(6),
    .qh-clients-table tbody td:nth-child(5),
    .qh-clients-table tbody td:nth-child(6) { display: none; }

    .qh-clients-table thead th { padding: 8px 10px; font-size: 10px; }
    .qh-clients-table thead th:first-child { padding-left: 18px; }
    .qh-clients-table thead th:last-child { padding-right: 18px; }
    .qh-clients-table tbody td { padding: 14px 10px; font-size: 13px; }
    .qh-clients-table tbody td:first-child { padding-left: 18px; }
    .qh-clients-table tbody td:last-child { padding-right: 18px; text-align: right; width: 1%; white-space: nowrap; }
    .qh-clients-table thead th:last-child { width: 1%; }
    .qh-clients-name .pill { font-size: 8px; padding: 2px 6px; }
  }

/* ── client-history ── */

  /* ───────────────────────────────────────────────
     THE ASSET — Client History (.qh-ch-*)
     Desktop: sidebar + 2 tab tiers + sub-tabs + accept-review sections
     Tablet:  sidebar icon-only, tabs stay
     Mobile:  hamburger + 2 dropdown selectors + accordion
     ─────────────────────────────────────────────── */
  .qh-ch-card {
    --b0:#FDF3EC; --b1:#FBE7DC; --b2:#F6D3C2; --b5:#B87768; --b7:#834D46; --b9:#4E2B2A;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g0:#F8F9FA; --g1:#F1F3F5; --g2:#E9ECEF; --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green1:#D3F9D8; --green6:#40C057; --green7:#37B24D;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);

    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fffdfa;
    border-radius: 14px;
    border: 1px solid var(--c4);
    box-shadow: 0 18px 42px rgba(85,40,49,.10);
    width: 100%;
    max-width: 1200px;
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;

    display: grid;
    grid-template-columns: 64px 1fr;
  }
  .qh-ch-card * { box-sizing: border-box; }

  /* ── Sidebar ────────────────────────────────── */
  .qh-ch-sidebar {
    background: #fffdfa;
    border-right: 1px solid var(--c4);
    padding: 14px 12px;
    display: flex; flex-direction: column;
    gap: 6px;
    align-items: center;
  }
  .qh-ch-sidebar-toggle, .qh-ch-sidebar-icon, .qh-ch-sidebar-foot {
    width: 36px; height: 36px;
    background: transparent; border: 0; border-radius: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--g7);
    transition: background .15s;
  }
  .qh-ch-sidebar-toggle:hover, .qh-ch-sidebar-icon:hover, .qh-ch-sidebar-foot:hover { background: var(--c1); }
  .qh-ch-sidebar-toggle svg, .qh-ch-sidebar-icon svg, .qh-ch-sidebar-foot svg { width: 18px; height: 18px; }
  .qh-ch-sidebar-icon.active { background: #f4e9eb; color: var(--b9); position: relative; }
  .qh-ch-sidebar-icon.active::before {
    content: ""; position: absolute;
    left: -12px; top: 50%; transform: translateY(-50%);
    width: 2px; height: 22px;
    background: var(--b9);
    border-radius: 1px;
  }
  .qh-ch-sidebar-avatar {
    width: 36px; height: 36px;
    background: var(--g1);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font: 600 13px/1 system-ui, sans-serif;
    color: var(--g7);
    cursor: pointer;
    margin-bottom: 6px;
  }
  .qh-ch-sidebar-sep {
    width: 24px; height: 1px;
    background: var(--c4);
    margin: 6px 0;
  }
  .qh-ch-sidebar-spacer { flex: 1; }

  /* ── Main area ────────────────────────────── */
  .qh-ch-main {
    display: flex; flex-direction: column;
    min-width: 0;
  }

  /* Top user bar (right side) */
  .qh-ch-top {
    display: flex; justify-content: flex-end; align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid #e8e2de;
    gap: 8px;
  }
  .qh-ch-top .user-avatar {
    width: 30px; height: 30px;
    background: var(--c2);
    border: 1px solid var(--c4);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--g7);
    cursor: pointer;
  }
  .qh-ch-top .user-avatar svg { width: 14px; height: 14px; }
  /* Mobile hamburger — hidden on desktop, shown at ≤768 */
  .qh-ch-top .ham-mobile { display: none; }

  /* Outer + inner tab strips — variable-width file-folder tabs.
     Tabs grow to fill the full row width inside the 18px gutters; adjacent borders
     overlap so they collapse to a single 1px divider between tabs (no double-border). */
  .qh-ch-tabs-outer {
    display: flex;
    gap: 0;
    padding: 14px 18px 0;
    background: #fffdfa;
    position: relative;
    z-index: 1;
    margin-top: 14px;
  }
  .qh-ch-tab-pill {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 20px 30px;
    background: #f7f2ee;
    border: 1px solid #E3D7C9;
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    transition: background .15s ease;
    white-space: nowrap;
    flex: 1 1 auto;
    margin-right: -1px;
  }
  .qh-ch-tab-pill:last-child { margin-right: 0; }
  .qh-ch-tab-pill:hover { background: var(--c1); position: relative; z-index: 2; }
  .qh-ch-tab-pill svg { width: 14px; height: 14px; color: var(--g7); }
  .qh-ch-tabs-inner {
    display: flex;
    gap: 0;
    padding: 0 18px 0;
    background: transparent;
    position: relative;
    z-index: 2;
    margin-top: -16px;
    margin-bottom: -8px;
  }
  .qh-ch-tab-inner {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 16px 22px;
    background: #f7f2ee;
    border: 1px solid #E3D7C9;
    border-radius: 8px 8px 0 0;
    border-bottom: 0;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    transition: background .15s ease;
    white-space: nowrap;
    flex: 1 1 auto;
    margin-right: -1px;
  }
  .qh-ch-tab-inner:last-child { margin-right: 0; }
  .qh-ch-tab-inner:hover:not(.active) { background: var(--c1); position: relative; z-index: 2; }
  .qh-ch-tab-inner svg { width: 14px; height: 14px; color: var(--g7); }
  .qh-ch-tab-inner.active {
    background: var(--b9);
    color: #fff;
    border-color: var(--b9);
    position: relative;
    z-index: 3;
  }
  .qh-ch-tab-inner.active svg { color: #fff; }

  /* Sub-tabs (Tier 4) — pills inside gray/1 strip
     Migrated from legacy cream/2 to canonical gray/1 segmented-control surface.
     Inset from card edges to align with tabs above and content below. */
  .qh-ch-subtabs {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin: 0 18px;
    padding: 14px 16px;
    background: #f4f3f2;
    border: 1px solid #E3D7C9;
    border-radius: 6px;
    position: relative;
    z-index: 3;
  }
  .qh-ch-subtab {
    padding: 8px 14px;
    background: transparent;
    border: 0;
    border-radius: 6px;
    font: 500 13px/1 system-ui, sans-serif;
    color: var(--d9);
    cursor: pointer;
    transition: background .15s;
  }
  .qh-ch-subtab:hover { background: var(--g2); }
  .qh-ch-subtab.active {
    background: #fff;
    color: var(--d9);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
    font-weight: 600;
  }

  /* Mobile-only selectors (hidden on desktop) */
  .qh-ch-mobile-bar { display: none; }

  /* Content area — L/R padding aligns with tabs container + sub-tabs strip inset */
  .qh-ch-content {
    padding: 24px 18px 22px;
  }
  .qh-ch-title {
    display: inline-flex; align-items: center; gap: 10px;
    font: 600 22px/1.2 system-ui, sans-serif;
    letter-spacing: -0.015em;
    color: var(--d9);
    margin: 0 0 18px;
  }
  .qh-ch-title svg { width: 18px; height: 18px; color: var(--d9); }

  /* Accordion section */
  .qh-ch-section {
    background: #fff;
    border: 1px solid var(--c4);
    border-radius: 6px;
    margin-bottom: 14px;
  }
  .qh-ch-section-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--c4);
    cursor: pointer;
  }
  .qh-ch-section-head h4 {
    margin: 0;
    font: 600 14px/1.2 system-ui, sans-serif;
    letter-spacing: -0.005em;
    color: var(--d9);
  }
  .qh-ch-section-head .chev { color: var(--g7); transition: transform .15s; }
  .qh-ch-section-head .chev svg { width: 14px; height: 14px; }
  .qh-ch-section.collapsed .qh-ch-section-head { border-bottom: 0; }
  .qh-ch-section.collapsed .qh-ch-section-body { display: none; }
  .qh-ch-section.collapsed .qh-ch-section-head .chev { transform: rotate(180deg); }

  /* Accept-all subhead */
  .qh-ch-accept-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--c3);
    flex-wrap: wrap;
    gap: 12px;
  }
  .qh-ch-accept-head h5 {
    margin: 0;
    font: 600 13px/1.2 system-ui, sans-serif;
    color: var(--d9);
  }
  .qh-ch-accept-actions { display: inline-flex; gap: 12px; align-items: center; }
  .qh-ch-accept-all {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px;
    background: #edf5ef;
    border: 1px solid #c9ddce;
    border-radius: 4px;
    font: 500 12px/1 system-ui, sans-serif;
    color: var(--asset-success);
    cursor: pointer;
    transition: filter .15s;
  }
  .qh-ch-accept-all:hover { filter: brightness(0.97); }
  .qh-ch-accept-all svg { width: 12px; height: 12px; }
  .qh-ch-edit {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 0;
    font: 500 12px/1 system-ui, sans-serif;
    color: var(--b9);
    cursor: pointer;
    padding: 0;
  }
  .qh-ch-edit:hover { opacity: 0.72; }
  .qh-ch-edit svg { width: 12px; height: 12px; }

  /* Data row */
  .qh-ch-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 16px;
    align-items: center;
    padding: 13px 18px;
    border-bottom: 1px solid var(--c3);
  }
  .qh-ch-row:last-of-type { border-bottom: 0; }
  .qh-ch-row .label {
    font: 400 13px/1.4 system-ui, sans-serif;
    color: var(--g7);
  }
  .qh-ch-row .value {
    font: 500 14px/1.2 system-ui, sans-serif;
    color: var(--d9);
    font-variant-numeric: tabular-nums;
    text-align: right;
  }
  .qh-ch-row .value.empty { color: var(--g6); font-weight: 400; }
  .qh-ch-row-accept {
    display: inline-flex; align-items: center;
    height: 26px; padding: 0 12px;
    background: #edf5ef;
    border: 1px solid #c9ddce;
    border-radius: 4px;
    font: 500 11px/1 system-ui, sans-serif;
    color: var(--asset-success);
    cursor: pointer;
    transition: filter .15s;
  }
  .qh-ch-row-accept:hover { filter: brightness(0.97); }

  /* Meta row at bottom of section */
  .qh-ch-meta-row {
    padding: 10px 18px;
    background: linear-gradient(90deg, rgba(255,224,230,0.5), rgba(255,251,249,0.4));
    border-top: 1px solid var(--c3);
    font: 400 11.5px/1.4 system-ui, sans-serif;
    color: var(--g7);
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  }
  .qh-ch-meta-row .name { color: var(--d9); font-weight: 600; }
  .qh-ch-meta-row .sep { color: rgba(85,40,49,0.4); }
  .qh-ch-meta-row .ver { color: var(--d9); font-weight: 600; }
  .qh-ch-meta-row .ver-link {
    color: var(--d9);
    border-bottom: 1px solid var(--d9);
    cursor: pointer;
    padding-bottom: 1px;
    font-weight: 500;
  }

  /* ── Tablet (≤1024px) — sidebar stays icon-only (already is) ── */
  @media (max-width: 1024px) {
    .qh-ch-card { max-width: 100%; }
    .qh-ch-tabs-outer, .qh-ch-tabs-inner { padding-left: 14px; padding-right: 14px; }
    .qh-ch-tab-pill, .qh-ch-tab-inner { padding: 8px 8px; font-size: 12px; }
    .qh-ch-tab-pill svg, .qh-ch-tab-inner svg { display: none; }
    .qh-ch-subtabs { padding: 12px 14px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .qh-ch-subtabs::-webkit-scrollbar { display: none; }
    .qh-ch-subtab { white-space: nowrap; flex-shrink: 0; }
    .qh-ch-content { padding: 20px 16px 16px; }
  }

  /* ── Mobile (≤768px) — hamburger + two selectors ── */
  @media (max-width: 768px) {
    .qh-ch-card {
      grid-template-columns: 1fr;
      border-radius: 14px;
    }
    .qh-ch-sidebar { display: none; }
    .qh-ch-top {
      justify-content: space-between;
      padding: 12px 14px;
    }
    .qh-ch-top .ham-mobile {
      display: inline-flex; align-items: center; justify-content: center;
      width: 36px; height: 36px;
      background: transparent; border: 0; border-radius: 4px;
      cursor: pointer; color: var(--d9);
    }
    .qh-ch-top .ham-mobile:hover { background: var(--c1); }
    .qh-ch-top .ham-mobile svg { width: 18px; height: 18px; }
    .qh-ch-tabs-outer, .qh-ch-tabs-inner, .qh-ch-subtabs { display: none; }

    /* Show mobile selector bar */
    .qh-ch-mobile-bar {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--c4);
      background: var(--c1);
    }
    .qh-ch-selector {
      display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
      height: 38px; padding: 0 12px;
      background: #fff;
      border: 1px solid var(--c4);
      border-radius: 4px;
      font: 500 13px/1 system-ui, sans-serif;
      color: var(--d9);
      cursor: pointer;
      text-align: left;
      width: 100%;
    }
    .qh-ch-selector .lbl-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
    .qh-ch-selector .lbl-row .kicker {
      font: 400 9px/1 system-ui, sans-serif;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--g7);
    }
    .qh-ch-selector .lbl-row .val {
      font: 600 13px/1.2 system-ui, sans-serif;
      color: var(--d9);
      letter-spacing: -0.005em;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .qh-ch-selector svg { width: 12px; height: 12px; color: var(--g7); flex-shrink: 0; }

    .qh-ch-content { padding: 16px 14px 14px; }
    .qh-ch-title { font-size: 18px; margin-bottom: 14px; }
    .qh-ch-accept-head { padding: 12px 14px; }
    .qh-ch-accept-head h5 { font-size: 12.5px; }
    .qh-ch-accept-actions { gap: 10px; }
    .qh-ch-row { padding: 13px 14px; grid-template-columns: 1fr auto; gap: 12px; }
    .qh-ch-row .value { grid-column: 2; }
    .qh-ch-row-accept { grid-column: 1 / -1; justify-self: end; }
    .qh-ch-meta-row { padding: 10px 14px; font-size: 11px; }
  }

/* ── tests-table ── */
  .qh-tests-card {
    --b0:#FDF3EC; --b1:#FBE7DC; --b2:#F6D3C2; --b5:#B87768; --b7:#834D46; --b9:#4E2B2A;
    --c0:#FFFAF4; --c1:#FDF5EC; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green1:#D3F9D8; --green7:#37B24D;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 760px;
    position: relative;
    -webkit-font-smoothing: antialiased;
  }
  .qh-tests-card * { box-sizing: border-box; }
  .qh-tests-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px 18px; }
  .qh-tests-header h3 { margin: 0; font: 600 20px/1.2 system-ui, sans-serif; letter-spacing: -0.012em; color: var(--d9); }
  .qh-tests-tools { display: inline-flex; gap: 10px; align-items: center; }
  .qh-tests-select { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 12px; background: #fff; border: 1px solid var(--c4); border-radius: 4px; font: 400 13px/1 system-ui, sans-serif; color: var(--d9); cursor: pointer; transition: border-color .15s; }
  .qh-tests-select:hover { border-color: var(--g4); }
  .qh-tests-select .lbl { color: var(--g7); }
  .qh-tests-select .val { color: var(--d9); font-weight: 500; }
  .qh-tests-select svg { width: 12px; height: 12px; color: var(--g7); }
  .qh-tests-new { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: var(--b9); color: #fff; border: 1px solid var(--b9); border-radius: 4px; font: 500 13px/1 system-ui, sans-serif; cursor: pointer; transition: background .15s; }
  .qh-tests-new:hover { background: #6E3640; }
  .qh-tests-new svg { width: 12px; height: 12px; }
  .qh-tests-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .qh-tests-table colgroup col:nth-child(1) { width: 16%; }
  .qh-tests-table colgroup col:nth-child(2) { width: 26%; }
  .qh-tests-table colgroup col:nth-child(3) { width: 13%; }
  .qh-tests-table colgroup col:nth-child(4) { width: 13%; }
  .qh-tests-table colgroup col:nth-child(5) { width: 13%; }
  .qh-tests-table colgroup col:nth-child(6) { width: 19%; }
  .qh-tests-table thead th { padding: 10px 14px; background: linear-gradient(90deg, rgba(255,224,230,0.55), rgba(247,242,237,0.95)); border-top: 1px solid var(--c4); border-bottom: 1px solid var(--c4); font: 600 11px/1 system-ui, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; color: var(--d9); }
  .qh-tests-table thead th:first-child { padding-left: 28px; }
  .qh-tests-table thead th:last-child { padding-right: 28px; }
  .qh-tests-table tbody td { padding: 14px; font: 400 13.5px/1.4 system-ui, sans-serif; color: var(--d9); border-bottom: 1px solid var(--c3); vertical-align: middle; }
  .qh-tests-table tbody td:first-child { padding-left: 28px; font-weight: 500; }
  .qh-tests-table tbody td:last-child { padding-right: 28px; }
  .qh-tests-table tbody tr:last-child td { border-bottom: none; }
  .qh-tests-table tbody tr:last-child td:first-child { border-bottom-left-radius: 16px; }
  .qh-tests-table tbody tr:last-child td:last-child { border-bottom-right-radius: 16px; }
  .qh-tests-table tbody tr:hover td { background: var(--c0); }
  .qh-tests-table td.date { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
  .qh-tests-status { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 9999px; border: 1px solid transparent; font: 600 10px/1 system-ui, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; }
  .qh-tests-status.needs-review { background: var(--b1); border-color: var(--b5); color: var(--b9); }
  .qh-tests-status.reviewed { background: var(--green1); border-color: var(--green7); color: var(--green7); }

  /* ── Mobile (≤600px) — priority crop: keep Client / Lab Order / Status ── */
  @media (max-width: 768px) {
    .qh-tests-card { max-width: 100%; border-radius: 14px; }
    .qh-tests-header { flex-direction: column; align-items: stretch; padding: 18px 18px 14px; gap: 12px; }
    .qh-tests-header h3 { font-size: 18px; }
    .qh-tests-tools { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .qh-tests-select, .qh-tests-new { white-space: nowrap; }
    .qh-tests-select { min-width: 0; justify-content: space-between; }
    /* Auto layout so display:none cells drop out and visible cols share full width */
    .qh-tests-table { table-layout: auto; }
    .qh-tests-table colgroup col:nth-child(1),
    .qh-tests-table colgroup col:nth-child(2),
    .qh-tests-table colgroup col:nth-child(3),
    .qh-tests-table colgroup col:nth-child(4),
    .qh-tests-table colgroup col:nth-child(5),
    .qh-tests-table colgroup col:nth-child(6) { width: auto; }
    .qh-tests-table thead th:nth-child(3),
    .qh-tests-table thead th:nth-child(4),
    .qh-tests-table thead th:nth-child(5),
    .qh-tests-table tbody td:nth-child(3),
    .qh-tests-table tbody td:nth-child(4),
    .qh-tests-table tbody td:nth-child(5) { display: none; }
    .qh-tests-table thead th { padding: 8px 8px; font-size: 10px; letter-spacing: 0.04em; }
    .qh-tests-table thead th:first-child { padding-left: 18px; }
    .qh-tests-table thead th:last-child { padding-right: 18px; }
    .qh-tests-table tbody td { padding: 12px 8px; font-size: 12.5px; line-height: 1.4; }
    .qh-tests-table tbody td:first-child { padding-left: 18px; font-size: 12.5px; font-weight: 500; }
    .qh-tests-table tbody td:first-child br { display: none; }
    .qh-tests-table tbody td:last-child { padding-right: 18px; }
    .qh-tests-status { padding: 3px 7px; font-size: 9px; letter-spacing: 0.06em; }
  }

/* ── lab-order-templates ── */
  .qh-lot-card {
    --b9:#4E2B2A; --b1:#FBE7DC; --b0:#FDF3EC;
    --c0:#FFFAF4; --c2:#F7EEE4; --c3:#F1E7DC; --c4:#E3D7C9;
    --d9:#141414;
    --g4:#CED4DA; --g6:#868E96; --g7:#6E747B;
    --green7:#37B24D;
    --shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--d9);
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--c4);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 720px;
    position: relative;
    -webkit-font-smoothing: antialiased;
  }
  .qh-lot-card * { box-sizing: border-box; }
  .qh-lot-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 28px 18px; }
  .qh-lot-header h3 { margin: 0; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.012em; color: var(--d9); }
  .qh-lot-new { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: var(--b9); color: #fff; border: 1px solid var(--b9); border-radius: 4px; font: 500 13px/1 system-ui, -apple-system, sans-serif; cursor: pointer; transition: background .15s ease; }
  .qh-lot-new:hover { background: #6E3640; }
  .qh-lot-new svg { width: 12px; height: 12px; }
  .qh-lot-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
  .qh-lot-table colgroup col:nth-child(1) { width: 32%; }
  .qh-lot-table colgroup col:nth-child(2) { width: 24%; }
  .qh-lot-table colgroup col:nth-child(3) { width: 22%; }
  .qh-lot-table colgroup col:nth-child(4) { width: 22%; }
  .qh-lot-table thead th { padding: 10px 16px; background: var(--c2); border-top: 1px solid var(--c4); border-bottom: 1px solid var(--c4); font: 600 11px/1 system-ui, -apple-system, sans-serif; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; color: var(--d9); vertical-align: middle; }
  .qh-lot-table thead th:first-child { padding-left: 28px; }
  .qh-lot-table thead th:last-child { padding-right: 28px; text-align: right; }
  .qh-lot-table tbody tr.row td { padding: 16px; font: 400 14px/1.4 system-ui, -apple-system, sans-serif; color: var(--d9); vertical-align: middle; }
  .qh-lot-table tbody tr.row td:first-child { padding-left: 28px; font-weight: 600; letter-spacing: -0.005em; }
  .qh-lot-table tbody tr.row td.labs { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
  .qh-lot-table tbody tr.row td:last-child { padding-right: 28px; text-align: right; }
  .qh-lot-actions { display: inline-flex; gap: 16px; align-items: center; }
  .qh-lot-actions a { display: inline-flex; align-items: center; gap: 6px; color: var(--b9); font: 500 13px/1 system-ui, sans-serif; cursor: pointer; padding: 4px 2px; border-radius: 3px; transition: opacity .15s; }
  .qh-lot-actions a:hover { opacity: 0.72; }
  .qh-lot-actions svg { width: 14px; height: 14px; }
  .qh-lot-table tbody tr.meta td { padding: 8px 28px; background: linear-gradient(90deg, rgba(255,224,230,0.55) 0%, rgba(255,224,230,0.30) 60%, rgba(255,251,249,0.35) 100%); border-top: 1px solid rgba(85,40,49,0.07); border-bottom: 1px solid var(--c4); font: 400 12px/1.4 system-ui, sans-serif; color: var(--g7); }
  .qh-lot-table tbody tr.meta td .name { color: var(--d9); font-weight: 600; }
  .qh-lot-table tbody tr.meta td .sep { color: rgba(85,40,49,0.4); margin: 0 8px; display: inline-block; vertical-align: middle; }
  .qh-lot-table tbody tr.meta td .current { color: var(--d9); font-weight: 600; }
  .qh-lot-table tbody tr.meta td .ver-link { color: var(--d9); border-bottom: 1px solid var(--d9); cursor: pointer; padding-bottom: 1px; font-weight: 500; }
  .qh-lot-table tbody tr.meta:last-child td { border-bottom: none; border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; }

  /* Smart-template carousel. The first frame is real UI; the remaining frames
     are intentionally neutral placeholders until final product assets land. */
  .template-tabs {
    display: grid;
    margin: 24px 0 28px;
    padding: 0;
    border-top: 1px solid rgba(20,20,20,.09);
    background: transparent;
  }
  .template-tabs li { padding: 0 !important; }
  .template-tabs li::before { display: none; }
  .template-tab {
    position: relative;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 12px 4px 12px 14px;
    border: 0;
    border-bottom: 1px solid rgba(20,20,20,.09);
    border-radius: 0;
    background: transparent;
    color: var(--dark-9);
    text-align: left;
    cursor: pointer;
    transition: color .2s ease, padding-left .2s ease;
  }
  .template-tab-num {
    color: var(--burgundy-9);
    font: 500 11px/1 "SF Mono", ui-monospace, Menlo, monospace;
    letter-spacing: .03em;
    transition: color .2s ease;
  }
  .template-tab-label { font: 600 15px/1.35 "Geist", system-ui, -apple-system, sans-serif; }
  .template-tab-arrow { display: none; }
  .template-tab:hover { color: var(--burgundy-9); padding-left: 18px; }
  .template-tab.is-active {
    color: var(--burgundy-9);
    background: transparent;
    box-shadow: none;
  }
  .template-tab.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    border-radius: 2px;
    background: var(--burgundy-9);
  }
  .template-tab.is-active .template-tab-num { color: var(--burgundy-9); font-weight: 650; }
  .template-tab:focus-visible { outline: 2px solid var(--burgundy-7); outline-offset: 2px; }
  .template-carousel { position: relative; width: 100%; min-height: 430px; padding: 28px 26px 42px 0; }
  .template-slide {
    position: absolute;
    inset: 28px 26px 42px 0;
    display: flex;
    align-items: center;
    opacity: .34;
    transform: translate(26px, -16px) scale(.94);
    transform-origin: center;
    pointer-events: none;
    transition: opacity .35s ease, transform .45s cubic-bezier(.2,.8,.2,1);
  }
  .template-slide:nth-child(2) { transform: translate(13px, -8px) scale(.97); }
  .template-slide.is-active { z-index: 3; opacity: 1; transform: translate(0, 0) scale(1); pointer-events: auto; }
  .template-placeholder {
    min-height: 350px;
    align-self: center;
    display: block;
    overflow: hidden;
    border: 1px solid var(--cream-4);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(85,40,49,.10);
  }
  .placeholder-toolbar { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px 18px; font-weight: 600; border-bottom: 1px solid var(--cream-4); }
  .placeholder-action { padding: 8px 12px; border-radius: 5px; background: var(--burgundy-9); color: #fff; font-size: 12px; font-weight: 500; }
  .placeholder-body { padding: 26px; }
  .placeholder-heading { width: 62%; height: 18px; margin-bottom: 24px; border-radius: 4px; background: var(--burgundy-2); color: transparent; }
  .placeholder-field { width: 68%; height: 34px; margin: 12px 0; border-radius: 5px; background: var(--cream-2); }
  .placeholder-field.wide { width: 100%; height: 68px; }
  .placeholder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .placeholder-grid span { height: 38px; border-radius: 5px; background: var(--cream-2); }
  .placeholder-chart { height: 118px; display: flex; align-items: end; gap: 12px; padding: 14px; border-radius: 8px; background: var(--cream-1); }
  .placeholder-chart i { flex: 1; height: 42%; border-radius: 3px 3px 0 0; background: var(--burgundy-3); }
  .placeholder-chart i:nth-child(2) { height: 64%; }
  .placeholder-chart i:nth-child(3) { height: 48%; }
  .placeholder-chart i:nth-child(4) { height: 82%; }
  .placeholder-chart i:nth-child(5) { height: 70%; }
  .placeholder-chart i:nth-child(6) { height: 92%; }
  .placeholder-alert { width: 100%; height: 48px; margin-top: 14px; border-left: 3px solid var(--burgundy-7); border-radius: 5px; background: var(--burgundy-1); }
  .placeholder-body p { margin: 20px 0 0; color: var(--gray-6); font-size: 12px; }
  .template-dots { position: absolute; left: 50%; bottom: 10px; z-index: 5; display: flex; gap: 7px; transform: translateX(-50%); }
  .template-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--cream-4); }
  .template-dots span.is-active { width: 18px; border-radius: 6px; background: var(--burgundy-9); }

  /* ── Mobile (≤600px) — priority crop: drop "Created By", icon-only actions ── */
  @media (max-width: 768px) {
    .template-carousel { min-height: 390px; padding-right: 12px; }
    .template-slide { right: 12px; }
    .template-placeholder { min-height: 320px; }
    .qh-lot-card { max-width: 100%; border-radius: 14px; }
    .qh-lot-header { flex-direction: column; align-items: stretch; padding: 18px 18px 14px; gap: 12px; }
    .qh-lot-header h3 { font-size: 18px; white-space: nowrap; }
    .qh-lot-new { align-self: flex-start; white-space: nowrap; height: 36px; }
    /* Auto layout so display:none cells drop out and visible cols share full width */
    .qh-lot-table { table-layout: auto; }
    .qh-lot-table colgroup col:nth-child(1),
    .qh-lot-table colgroup col:nth-child(2),
    .qh-lot-table colgroup col:nth-child(3),
    .qh-lot-table colgroup col:nth-child(4) { width: auto; }
    .qh-lot-table thead th:nth-child(3),
    .qh-lot-table tbody tr.row td:nth-child(3) { display: none; }
    .qh-lot-table thead th { padding: 8px 10px; font-size: 10px; letter-spacing: 0.05em; }
    .qh-lot-table thead th:first-child { padding-left: 18px; }
    .qh-lot-table thead th:last-child { padding-right: 18px; }
    .qh-lot-table tbody tr.row td { padding: 14px 10px; font-size: 13px; }
    .qh-lot-table tbody tr.row td:first-child { padding-left: 18px; }
    .qh-lot-table tbody tr.row td:last-child { padding-right: 18px; }
    .qh-lot-actions { gap: 18px; justify-content: flex-end; }
    .qh-lot-actions a { padding: 6px 4px; }
    .qh-lot-actions a .lbl { display: none; }
    .qh-lot-actions a svg { width: 16px; height: 16px; }
    .qh-lot-table tbody tr.meta td { padding: 8px 18px; font-size: 11px; line-height: 1.45; }
    .qh-lot-table tbody tr.meta td .sep { margin: 0 6px; }
  }

  /* ── Interop orbits component ── */
  .io-stage {
    position: relative;
    aspect-ratio: 1 / 1;
    max-width: 760px;
    margin: 0 auto;
    width: 100%;
  }
  .io-stage .rings {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    animation: io-rings-spin 120s linear infinite;
    transform-origin: center;
  }
  .io-stage .rings circle { fill: none; stroke: var(--burgundy-6); stroke-dasharray: 3 6; }
  .io-stage .rings .r1 { opacity: 0.34; }
  .io-stage .rings .r2 { opacity: 0.24; }
  .io-stage .rings .r3 { opacity: 0.18; }
  .io-stage .rings .r4 { opacity: 0.12; }
  @keyframes io-rings-spin { to { transform: rotate(360deg); } }

  .io-stage .center-dot {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--burgundy-9);
    box-shadow: 0 0 0 6px rgba(85, 40, 49, 0.08), 0 0 0 14px rgba(85, 40, 49, 0.04);
    z-index: 4;
    animation: io-pulse-dot 3.4s ease-in-out infinite;
  }
  @keyframes io-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 6px rgba(85, 40, 49, 0.08), 0 0 0 14px rgba(85, 40, 49, 0.04); }
    50%      { box-shadow: 0 0 0 10px rgba(85, 40, 49, 0.10), 0 0 0 22px rgba(85, 40, 49, 0.05); }
  }

  .io-stage .center-stack {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: grid;
    gap: 12px;
    width: 320px;
  }
  .io-stage .io-card {
    background: #fff;
    border: 1px solid var(--cream-4);
    border-radius: 12px;
    box-shadow: 0 12px 12px -7px rgba(0,0,0,.04), 0 23px 28px -7px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    overflow: hidden;
    font-size: 12px;
  }
  .io-stage .lab-card .cc-h {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 14px;
    background: var(--cream-1);
    border-bottom: 1px solid var(--cream-4);
  }
  .io-stage .lab-card .ttl { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13px; }
  .io-stage .lab-card .ttl .x { color: var(--gray-7); }
  .io-stage .lab-card .ex { background: #fff; border: 1px solid var(--cream-4); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; }
  .io-stage .lab-card .meta { padding: 12px 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; border-bottom: 1px solid var(--cream-3); }
  .io-stage .lab-card .lbl { font-size: 10px; color: var(--gray-7); }
  .io-stage .lab-card .val { font-size: 12px; color: var(--dark-9); font-weight: 500; margin-top: 2px; }
  .io-stage .lab-card .res-h { padding: 10px 14px 4px; font-size: 10px; color: var(--gray-7); letter-spacing: 0.04em; }
  .io-stage .lab-card table { width: 100%; border-collapse: collapse; font-size: 11px; }
  .io-stage .lab-card td { padding: 7px 14px; border-bottom: 1px solid var(--cream-3); }
  .io-stage .lab-card tr:last-child td { border-bottom: none; }
  .io-stage .lab-card .tn { color: var(--burgundy-7); font-weight: 500; }
  .io-stage .lab-card .hi { color: var(--red-7); font-weight: 500; text-align: right; }
  .io-stage .lab-card .nm { color: var(--green-7); font-weight: 500; text-align: right; }

  .io-stage .chart-card { padding: 12px 14px; }
  .io-stage .chart-card .ch-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12px; margin-bottom: 8px; }
  .io-stage .chart-card .ch-h .x { color: var(--gray-7); }
  .io-stage .chart-svg { width: 100%; height: 64px; display: block; margin-bottom: 8px; }
  .io-stage .chart-card .row {
    display: grid; grid-template-columns: 1fr auto; padding: 5px 0;
    border-top: 1px solid var(--cream-3); font-size: 11px;
  }
  .io-stage .chart-card .date { color: var(--gray-7); }
  .io-stage .chart-card .cval { font-weight: 600; }

  .io-stage .orbit {
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    transform-origin: 0 0;
    animation: io-orbit-fwd var(--dur, 60s) linear infinite;
    animation-delay: var(--delay, 0s);
    pointer-events: none;
  }
  .io-stage .orbit > .orbit-child {
    position: absolute;
    top: 0; left: 0;
    transform-origin: center;
    transform: translate(-50%, calc(-50% - var(--r))) rotate(0deg);
    animation: io-orbit-rev var(--dur, 60s) linear infinite;
    animation-delay: var(--delay, 0s);
  }
  @keyframes io-orbit-fwd { to { transform: rotate(360deg); } }
  @keyframes io-orbit-rev {
    to { transform: translate(-50%, calc(-50% - var(--r))) rotate(-360deg); }
  }

  .io-stage .plogo {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 14px;
    background: #fff; border: 1px solid var(--cream-4); border-radius: 10px;
    box-shadow: 0 7px 7px -5px rgba(0,0,0,.04), 0 10px 15px -5px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
    color: var(--dark-9);
    white-space: nowrap;
  }
  .io-stage .plogo .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
  .io-stage .plogo.labcorp .dot { background: linear-gradient(135deg, #00B5E2, #1F2962); }
  .io-stage .plogo.quest .dot   { background: #6FB546; }
  .io-stage .plogo.natera .dot  { background: #0066CC; }
  .io-stage .plogo.unity .dot   { background: var(--burgundy-7); }

  .io-stage .ibadge {
    width: 42px; height: 42px; border-radius: 11px;
    background: #fff; border: 1px solid var(--cream-4);
    box-shadow: 0 7px 7px -5px rgba(0,0,0,.04), 0 10px 15px -5px rgba(0,0,0,.05), 0 1px 3px rgba(0,0,0,.05);
    display: flex; align-items: center; justify-content: center;
    color: var(--burgundy-9);
  }
  .io-stage .ibadge svg { width: 20px; height: 20px; stroke-width: 1.6; }

  /* Ensure interop section's screen-col doesn't transform-scale the stage */
  .alt-feature.wide-screen.io-section .screen-col > * { transform: none; max-width: 760px; }

  @media (max-width: 1024px) {
    .io-stage { max-width: 600px; }
  }
  @media (max-width: 640px) {
    .io-stage { max-width: 380px; }
    .io-stage .orbit > .orbit-child {
      transform: translate(-50%, calc(-50% - var(--r) * 0.5)) rotate(0deg);
    }
    @keyframes io-orbit-rev-mobile {
      to { transform: translate(-50%, calc(-50% - var(--r) * 0.5)) rotate(-360deg); }
    }
    .io-stage .orbit > .orbit-child { animation-name: io-orbit-rev-mobile; }
    .io-stage .center-stack { width: 240px; }
  }

  /* Interoperability data-flow study used on the homepage. */
  .io-flow-stage {
    position: relative;
    width: 100%;
    max-width: 760px;
    aspect-ratio: 760 / 700;
    margin: 0 auto;
    overflow: hidden;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  }
  .io-flow-stage::before {
    content: "";
    position: absolute;
    inset: 7% 4%;
    border-radius: 50%;
    background: repeating-radial-gradient(circle at 50% 50%, transparent 0 58px, rgba(111,62,72,.09) 59px 60px);
    mask-image: radial-gradient(circle, #000 0 67%, transparent 82%);
  }
  .io-flow-sources {
    position: absolute;
    z-index: 3;
    left: 0;
    top: 70px;
    bottom: 70px;
    width: 154px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .io-flow-source {
    min-height: 56px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 1px solid var(--cream-4);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(69,43,48,.07);
  }
  .io-flow-source i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
  .io-flow-source i.labcorp { background: #1687b9; }
  .io-flow-source i.quest { background: #62ad45; }
  .io-flow-source i.natera { background: #1976c9; }
  .io-flow-source i.billion { background: #9b6570; }
  .io-flow-source b { font-size: 12px; white-space: nowrap; }
  .io-flow-lines { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; }
  .io-flow-lines path { fill: none; vector-effect: non-scaling-stroke; }
  .io-flow-base path { stroke: #d7d8da; stroke-width: 1.25; }
  .io-flow-active path {
    stroke: var(--burgundy-9);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
  }
  .io-flow-stage.is-running .io-in { animation: io-flow-draw .9s cubic-bezier(.35,.05,.25,1) forwards; }
  .io-flow-stage.is-running .io-in-1 { animation-delay: .12s; }
  .io-flow-stage.is-running .io-in-2 { animation-delay: .42s; }
  .io-flow-stage.is-running .io-in-3 { animation-delay: .72s; }
  .io-flow-stage.is-running .io-in-4 { animation-delay: 1.02s; }
  .io-flow-stage.is-running .io-out { animation: io-flow-draw .78s cubic-bezier(.35,.05,.25,1) forwards; }
  .io-flow-stage.is-running .io-out-1 { animation-delay: 2.05s; }
  .io-flow-stage.is-running .io-out-2 { animation-delay: 2.15s; }
  .io-flow-stage.is-running .io-out-3 { animation-delay: 2.25s; }
  .io-flow-stage.is-running .io-out-4 { animation-delay: 2.35s; }
  @keyframes io-flow-draw { to { stroke-dashoffset: 0; } }
  .io-flow-hub {
    position: absolute;
    z-index: 4;
    left: 48.4%;
    top: 48.5%;
    width: 104px;
    height: 104px;
    transform: translate(-50%,-50%);
    display: grid;
    place-items: center;
    border: 1px solid #d8d2ce;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(72,43,49,.11);
  }
  .io-flow-hub>span { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--burgundy-9); color: #fff; font: 500 28px Georgia, serif; }
  .io-flow-hub small { position: absolute; bottom: 7px; color: #999ba0; font-size: 7px; letter-spacing: .1em; }
  .io-flow-stage.is-running .io-flow-hub { animation: io-hub-pulse .45s ease 1.8s both; }
  @keyframes io-hub-pulse { 50% { box-shadow: 0 0 0 8px rgba(85,40,49,.09),0 14px 34px rgba(72,43,49,.11); } }
  .io-flow-results {
    position: absolute;
    z-index: 3;
    right: 0;
    top: 104px;
    width: 244px;
    display: grid;
    gap: 12px;
  }
  .io-flow-card { overflow: hidden; border: 1px solid var(--cream-4); border-radius: 10px; background: #fff; box-shadow: 0 10px 28px rgba(69,43,48,.09); opacity: .74; transition: opacity .35s ease; }
  .io-flow-stage.is-populated .io-flow-card { opacity: 1; }
  .io-flow-card header { min-height: 40px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--cream-3); }
  .io-flow-card header b { font-size: 11px; }
  .io-flow-card header button { padding: 5px 8px; border: 1px solid var(--cream-4); border-radius: 5px; background: #fff; font-size: 9px; }
  .io-flow-meta { display: grid; grid-template-columns: 1fr 1fr; padding: 9px 12px; border-bottom: 1px solid var(--cream-3); }
  .io-flow-meta small,.io-flow-meta b { display: block; }
  .io-flow-meta small { color: var(--gray-7); font-size: 8px; }
  .io-flow-meta b { margin-top: 2px; font-size: 10px; }
  .io-flow-label { padding: 7px 12px 4px; color: var(--gray-7); font-size: 8px; }
  .io-flow-result { display: grid; grid-template-columns: 1fr 34px 42px; gap: 5px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--cream-3); font-size: 9px; }
  .io-flow-result:last-child { border-bottom: 0; }
  .io-flow-result>span { color: var(--burgundy-7); }
  .io-flow-result b,.io-flow-result em { text-align: right; }
  .io-flow-result em { color: #9b4c3e; font-style: normal; }
  .io-flow-result em.normal { color: #3d884f; }
  .io-history-card svg { width: 100%; height: 92px; padding: 7px 9px 0; overflow: visible; }
  .io-history-card svg line { stroke: #eee9e6; stroke-width: 1; stroke-dasharray: 3 3; }
  .io-history-fill { fill: #f3e5e8; opacity: 0; }
  .io-history-line { fill: none; stroke: var(--burgundy-9); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
  .io-history-card svg circle { fill: var(--burgundy-9); opacity: 0; }
  .io-flow-stage.is-populated .io-history-fill { animation: io-history-show .45s ease .35s forwards; }
  .io-flow-stage.is-populated .io-history-line { animation: io-flow-draw 1s ease .25s forwards; }
  .io-flow-stage.is-populated .io-history-card svg circle { animation: io-history-show .2s ease forwards; }
  .io-flow-stage.is-populated .io-history-card svg circle:nth-of-type(1) { animation-delay: .4s; }
  .io-flow-stage.is-populated .io-history-card svg circle:nth-of-type(2) { animation-delay: .7s; }
  .io-flow-stage.is-populated .io-history-card svg circle:nth-of-type(3) { animation-delay: 1s; }
  @keyframes io-history-show { to { opacity: 1; } }
  .io-history-row { display: flex; justify-content: space-between; padding: 6px 12px; border-top: 1px solid var(--cream-3); font-size: 8.5px; }
  .io-history-row>span { color: var(--gray-7); }
  .alt-feature.wide-screen.io-section .screen-col > .io-flow-stage { max-width: 760px; transform: none; }

  @media (max-width: 1024px) {
    .io-flow-stage { max-width: 680px; }
  }
  @media (max-width: 700px) {
    .io-flow-stage { aspect-ratio: auto; min-height: 760px; display: grid; gap: 18px; padding: 18px; }
    .io-flow-stage::before,.io-flow-lines { display: none; }
    .io-flow-sources,.io-flow-results,.io-flow-hub { position: relative; inset: auto; width: auto; }
    .io-flow-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .io-flow-hub { justify-self: center; transform: none; width: 90px; height: 90px; }
    .io-flow-hub>span { width: 48px; height: 48px; font-size: 24px; }
    .io-flow-results { display: grid; grid-template-columns: 1fr 1fr; }
    .io-flow-card { opacity: 1; }
  }
  @media (max-width: 480px) {
    .io-flow-stage { min-height: 1040px; }
    .io-flow-sources,.io-flow-results { grid-template-columns: 1fr; }
  }


/* ── Walkthrough (Direction 2 — auto-advance + WebGL wave) ── */
.walkthrough-section { position: relative; overflow: hidden; padding: 72px 0 88px; background: var(--cream-0); }
.walkthrough-section > .wave-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.walkthrough-section > .container { position: relative; z-index: 1; }
.walkthrough-section .section-head { margin-bottom: 28px; }

.walkthrough-section .wt-stage {
  position: relative;
  height: 580px;
  overflow: hidden;
  margin-top: 0;
}
.walkthrough-section .wt-frame {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .55s ease;
  padding: 12px;
  overflow: hidden;
}
.walkthrough-section .wt-frame.active { opacity: 1; }
.walkthrough-section .wt-frame > * {
  flex-shrink: 0;
  transform: scale(var(--asset-scale, 0.85));
  transform-origin: center center;
}
.walkthrough-section .wt-frame[data-key="prenatal"] { --asset-scale: 0.78; }
.walkthrough-section .wt-frame[data-key="labs"]     { --asset-scale: 1.00; }
.walkthrough-section .wt-frame[data-key="birth"]    { --asset-scale: 0.86; }
.walkthrough-section .wt-frame[data-key="billing"]  { --asset-scale: 1.00; }

.walkthrough-section .wt-controls {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
  margin-top: 20px;
  max-width: 1100px;
  margin-left: auto; margin-right: auto;
}
.walkthrough-section .wt-ctrl {
  cursor: pointer;
  text-align: left;
  padding: 18px 4px 0;
  background: transparent;
  border: none;
  border-top: 2px solid var(--cream-4);
  position: relative;
  transition: all .2s ease;
  font-family: inherit;
}
.walkthrough-section .wt-ctrl::before {
  content: "";
  position: absolute; top: -2px; left: 0;
  height: 2px; width: 0;
  background: var(--burgundy-9);
}
.walkthrough-section .wt-ctrl.active::before {
  animation: wt-fill 5.4s linear forwards;
}
@keyframes wt-fill { from { width: 0; } to { width: 100%; } }
.walkthrough-section .wt-ctrl .wt-ctrl-num { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-size: 11px; color: var(--gray-7); font-weight: 500; letter-spacing: 0.04em; }
.walkthrough-section .wt-ctrl.active .wt-ctrl-num { color: var(--burgundy-9); }
.walkthrough-section .wt-ctrl .wt-ctrl-title { font-size: 16px; font-weight: 600; color: var(--dark-9); margin-top: 4px; letter-spacing: -0.005em; }
.walkthrough-section .wt-ctrl .wt-ctrl-copy { font-size: 13px; color: var(--gray-7); margin-top: 6px; line-height: 1.45; opacity: 0; max-height: 0; overflow: hidden; transition: all .3s ease; }
.walkthrough-section .wt-ctrl.active .wt-ctrl-copy { opacity: 1; max-height: 80px; margin-top: 8px; }

@media (max-width: 1024px) {
  .walkthrough-section .wt-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .walkthrough-section { padding: 64px 0; }
  .walkthrough-section .wt-stage { height: 460px; }
  .walkthrough-section .wt-controls { grid-template-columns: 1fr; gap: 12px; }
  /* CROP pattern (experimental): anchor mockup to top-left, keep it near full size,
     let overflow: hidden clip the rest. Shows a readable slice instead of a
     shrunk-tiny whole. Revert this block to restore the scale-down pattern. */
  .walkthrough-section .wt-frame {
    justify-content: flex-start;
    align-items: flex-start;
    padding: 0;
  }
  .walkthrough-section .wt-frame > * { transform-origin: top left; }
  .walkthrough-section .wt-frame[data-key="prenatal"] { --asset-scale: 0.78; }
  .walkthrough-section .wt-frame[data-key="labs"]     { --asset-scale: 0.85; }
  .walkthrough-section .wt-frame[data-key="birth"]    { --asset-scale: 0.80; }
  .walkthrough-section .wt-frame[data-key="billing"]  { --asset-scale: 0.85; }
}

/* ═══════════════════════════════════════════════════════════
   SERIF EDITORIAL OVERRIDES — applied from Exploration 7
   Headlines switch to Newsreader at weight 400 with italic em accents.
   Buttons switch to taller pills with hover-translate arrow.
   Body, brand, nav, asset chrome remain in the system sans.
   ═══════════════════════════════════════════════════════════ */

/* ── Charting section asset — compress so it doesn't dominate ── */
.asset-wrap .qh-ch-card {
  max-width: 920px;
  transform: scale(0.78);
  transform-origin: top center;
  /* pull surrounding flow up to absorb the visual gap left by the scale */
  margin-bottom: -180px;
}

/* ── Hero stage: layered client + A1c + photo composition ── */
.hero-stage {
  position: relative;
  width: 100%;
  min-height: 560px;
  padding: 20px 30px 30px;
}

/* Primary client info card — the focal piece */
.hs-client {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  background: #fff;
  border: 1px solid var(--cream-4);
  border-radius: 16px;
  box-shadow: 0 24px 40px -18px rgba(20, 20, 20, 0.16),
              0 12px 16px -10px rgba(20, 20, 20, 0.08);
  overflow: hidden;
  transform: rotate(-1deg);
}
.hs-client .head {
  padding: 18px 20px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.hs-client .who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hs-client .avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background-image: linear-gradient(135deg, #d8a888, #8B5E3C);
  background-size: cover; background-position: center;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.hs-client .id { min-width: 0; }
.hs-client .name { font-size: 16px; font-weight: 600; letter-spacing: -0.005em; color: var(--dark-9); }
.hs-client .meta { font-size: 12px; color: var(--gray-7); margin-top: 2px; letter-spacing: 0; }
.hs-client .status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: #E5F5E8;
  color: #2B7A3A;
  border-radius: 9999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.hs-client .status::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #2B7A3A;
}

.hs-client .vitals {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 16px 20px 18px;
  border-top: 1px solid var(--cream-3);
  gap: 8px;
}
.hs-client .vital .vlbl {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-7);
  margin-bottom: 6px;
}
.hs-client .vital .vnum {
  font-size: 26px; font-weight: 600; color: var(--dark-9);
  letter-spacing: -0.015em; line-height: 1;
}
.hs-client .vital .vunit {
  font-size: 12px; color: var(--gray-7); font-weight: 500;
  margin-left: 3px;
}

.hs-client .checklist {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--cream-3);
  background: var(--cream-0);
}
.hs-client .checklist .clbl {
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-7);
  margin-bottom: 10px;
}
.hs-client .check-item {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0;
  font-size: 13px;
}
.hs-client .check-item .box {
  width: 18px; height: 18px; border-radius: 4px;
  border: 1.5px solid var(--cream-4);
  background: #fff;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.hs-client .check-item.done .box {
  background: #4F7A48;
  border-color: #4F7A48;
  color: #fff;
  font-size: 11px;
}
.hs-client .check-item.done .box::after { content: "✓"; }
.hs-client .check-item.done .label {
  color: var(--gray-7);
  text-decoration: line-through;
}
.hs-client .check-item .label { color: var(--dark-9); }

/* A1c card — peeks above the client card from the top-right */
.hs-a1c {
  position: absolute;
  top: -40px; right: -200px;
  z-index: 4;
  width: 240px;
  background: #fff;
  border: 1px solid var(--cream-4);
  border-radius: 12px;
  box-shadow: 0 16px 28px -14px rgba(20, 20, 20, 0.16),
              0 8px 12px -6px rgba(20, 20, 20, 0.06);
  padding: 12px 14px;
  font-size: 12px;
  transform: rotate(4deg);
}
.hs-a1c .h {
  display: flex; align-items: center; gap: 6px;
  font-weight: 600; font-size: 12px;
}
.hs-a1c .h .x { color: var(--gray-7); }
.hs-a1c .sub {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray-7);
  margin: 4px 0 8px;
  display: flex; align-items: center; gap: 6px;
}
.hs-a1c .sub .pill {
  display: inline-flex; align-items: center; gap: 3px;
  background: #E5F5E8; color: #2B7A3A;
  padding: 1px 7px; border-radius: 9999px;
  font-size: 9px; font-weight: 700;
  text-transform: none; letter-spacing: 0;
}
.hs-a1c svg.chart { width: 100%; height: 54px; display: block; }
.hs-a1c .row {
  display: grid; grid-template-columns: 1fr auto;
  font-size: 10px; padding: 3px 0;
  border-top: 1px solid var(--cream-3);
}
.hs-a1c .row:first-of-type { margin-top: 6px; }
.hs-a1c .row .d { color: var(--gray-7); }
.hs-a1c .row .v { font-weight: 600; }

/* Photo card — prenatal moment, bottom-left */
.hs-photo {
  position: absolute;
  left: 0; bottom: 0;
  z-index: 2;
  width: 200px; height: 250px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 32px -16px rgba(20, 20, 20, 0.20),
              0 10px 16px -8px rgba(20, 20, 20, 0.10);
  transform: rotate(-4deg) translate(-10px, 10px);
  background: linear-gradient(135deg, #3a8a94, #2e7a85);
  background-size: cover; background-position: center;
}
.hs-photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(0,0,0,0.15));
}
.hs-photo .badge {
  position: absolute; left: 12px; bottom: 12px;
  background: #fff;
  padding: 7px 14px;
  border-radius: 9999px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dark-9);
  box-shadow: 0 6px 12px -4px rgba(0,0,0,0.15);
  z-index: 2;
}

/* Mobile calendar card — bottom-right of stage */
.hs-cal {
  position: absolute;
  right: -110px; bottom: 40px;
  z-index: 5;
  width: 200px;
  background: #fff;
  border: 1px solid var(--cream-4);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 44px -14px rgba(20, 20, 20, 0.20),
              0 10px 18px -8px rgba(20, 20, 20, 0.10);
  transform: rotate(3deg);
  font-family: system-ui, -apple-system, sans-serif;
}
.hs-cal .cal-h {
  padding: 12px 14px 10px;
  display: flex; align-items: center; justify-content: space-between;
}
.hs-cal .cal-month {
  font-size: 13px; font-weight: 600; color: var(--dark-9);
  letter-spacing: -0.005em;
}
.hs-cal .cal-tools { display: flex; gap: 8px; }
.hs-cal .cal-tico { width: 14px; height: 14px; color: var(--gray-7); }
.hs-cal .cal-tico svg { width: 100%; height: 100%; }

.hs-cal .cal-strip {
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--cream-1);
  border-top: 1px solid var(--cream-4);
  border-bottom: 1px solid var(--cream-4);
  padding: 8px 4px;
}
.hs-cal .cal-day {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.hs-cal .cd-l {
  font-size: 9px; font-weight: 600;
  color: var(--gray-7);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.hs-cal .cd-n {
  font-size: 12px; font-weight: 500;
  color: var(--dark-9);
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.hs-cal .cd-n.today {
  background: var(--burgundy-9);
  color: #fff;
  font-weight: 600;
}

.hs-cal .cal-body {
  position: relative;
  display: grid; grid-template-columns: 22px 1fr;
  padding: 8px 10px 8px 6px;
  height: 250px;
}
.hs-cal .cal-times {
  display: flex; flex-direction: column;
  padding-top: 0;
}
.hs-cal .cal-time {
  font-size: 9px; color: var(--gray-7);
  height: 42px;
  text-align: right;
  padding-right: 4px;
  padding-top: 2px;
}
.hs-cal .cal-grid {
  position: relative;
  border-left: 1px solid var(--cream-3);
}
.hs-cal .cal-evt {
  position: absolute; left: 4px; right: 4px;
  background: #DFF5E0;
  border-left: 3px solid #6BAA68;
  border-radius: 4px;
  padding: 4px 6px;
  font-size: 9px;
  line-height: 1.2;
  overflow: hidden;
}
.hs-cal .ce-t { font-weight: 600; color: var(--dark-9); }
.hs-cal .ce-s { color: var(--gray-7); margin-top: 1px; }

.hs-cal .cal-now {
  position: absolute;
  top: 144px; left: -4px; right: 0;
  height: 0;
  border-top: 1.5px solid var(--burgundy-9);
  display: flex; align-items: center;
  z-index: 2;
}
.hs-cal .cal-now-label {
  position: absolute;
  left: -22px; top: -7px;
  font-size: 8px; font-weight: 700;
  color: var(--burgundy-9);
  background: #fff;
  padding: 1px 3px;
  border-radius: 2px;
}

.hs-cal .cal-fab {
  position: absolute;
  right: 12px; bottom: 12px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--burgundy-9);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 12px -2px rgba(85, 40, 49, 0.4);
}
.hs-cal .cal-fab svg { width: 14px; height: 14px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-stage {
    min-height: auto;
    padding: 20px 0 0;
    display: flex; flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .hs-client, .hs-a1c, .hs-photo, .hs-message {
    position: static;
    transform: none;
    margin: 0;
  }
  .hs-client { max-width: none; }
  .hs-a1c { width: 100%; }
  .hs-photo { width: 100%; height: 200px; }
  .hs-message { width: 100%; }
}


/* ── Headlines: Newsreader serif at weight 400 ── */
.hero h1,
h1.hero-title,
.section-head h2,
.alt-feature h2,
.full-feature .head h2,
.imagery .overlay h2,
.walkthrough-section .section-head h2,
.testimonial-section .quote,
.io-section .text-col h2,
.cta-pair h3,
.cta h2 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.022em;
  line-height: 1.02;
}

/* Hero — sized to share space with the product card */
.hero h1 {
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 400;
}

/* Centered section heads (Charting, Walkthrough, modules, included, plans, FAQ, etc.) */
.section-head h2,
.walkthrough-section .section-head h2 {
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* Alt-feature h2 — lives in a column, needs to be smaller */
.alt-feature h2,
.io-section .text-col h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

/* Full-feature h2 — centered headline of a tall full-bleed section */
.full-feature .head h2 {
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

/* Imagery overlay h2 (the dark "Care is the point" and "Our promise" blocks) */
.imagery .overlay h2 {
  font-size: clamp(32px, 3.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.018em;
}

/* CTA outro h2 */
.cta h2 {
  font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.022em;
}

/* Italic em accents — burgundy on light bg, pink on dark bg */
.hero h1 em,
.section-head h2 em,
.alt-feature h2 em,
.full-feature .head h2 em,
.io-section .text-col h2 em,
.cta h2 em {
  font-style: italic;
  color: var(--burgundy-9);
  font-weight: 400;
}
.imagery .overlay h2 em,
.testimonial-section .quote em {
  font-style: italic;
  color: var(--burgundy-1);
  font-weight: 400;
}

/* The existing .grad span in hero becomes an italic burgundy run */
.hero h1 .grad {
  background: none !important;
  -webkit-text-fill-color: var(--burgundy-9) !important;
  color: var(--burgundy-9) !important;
  font-style: italic;
  font-weight: 400;
}
/* Soften .grayout so it doesn't fight the serif weight */
.hero h1 .grayout {
  color: var(--dark-9);
  opacity: 0.85;
}

/* Pricing amounts in serif too */
.pricing-min .amount,
.price-col .amount {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-weight: 400;
  letter-spacing: -0.025em;
}

/* Quote on testimonial — keep readable size but in serif */
.testimonial-section .quote {
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.24;
  letter-spacing: -0.008em;
}

/* ── Buttons: pill shape, larger, animated arrow ── */
.btn {
  height: 46px;
  padding: 0 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: background .25s, color .25s, border-color .25s, transform .25s;
}
.btn-lg {
  height: 54px;
  padding: 0 30px;
  font-size: 15px;
}
.btn-primary {
  background: var(--burgundy-9);
  color: #fff;
  border-color: var(--burgundy-9);
}
.btn-primary:hover {
  background: var(--burgundy-7);
  border-color: var(--burgundy-7);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--dark-9);
  border: 1px solid rgba(20, 20, 20, 0.15);
}
.btn-outline:hover {
  background: rgba(20, 20, 20, 0.04);
  border-color: rgba(20, 20, 20, 0.3);
}

/* Arrow inside buttons gains a hover-translate */
.btn .arrow,
.btn::after {
  display: inline-block;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
}
.btn:hover .arrow { transform: translateX(5px); }

/* Hero CTA pair — make them a touch larger to match Exp 7 weight */
.hero-actions .btn { height: 54px; padding: 0 30px; font-size: 15px; }

/* Hero secondary CTA — frosted glass so the trace animation passing
   behind it dissolves into a wash instead of fighting the label. */
.hero-actions .btn-outline {
  background: rgba(255, 251, 249, 0.78);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(85, 40, 49, 0.14);
  color: var(--dark-9);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 6px 18px -12px rgba(85, 40, 49, 0.30);
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.hero-actions .btn-outline:hover {
  background: rgba(255, 251, 249, 0.90);
  border-color: rgba(85, 40, 49, 0.24);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 24px -14px rgba(85, 40, 49, 0.36);
}
/* No backdrop-filter support: fall back to a near-opaque cream fill */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero-actions .btn-outline { background: rgba(255, 251, 249, 0.94); }
}

/* Mobile: scale down sensibly */
@media (max-width: 640px) {
  .hero h1 { font-size: clamp(34px, 8.5vw, 48px); }
  .section-head h2,
  .walkthrough-section .section-head h2,
  .full-feature .head h2,
  .imagery .overlay h2 { font-size: clamp(26px, 6.6vw, 36px); }
  .alt-feature h2,
  .io-section .text-col h2 { font-size: clamp(24px, 6vw, 32px); }
  .cta h2 { font-size: clamp(30px, 7.5vw, 44px); }
  .testimonial-section .quote { font-size: clamp(18px, 4.6vw, 24px); }
  .btn { height: 44px; padding: 0 20px; }
  .btn-lg { height: 50px; padding: 0 26px; }
}

/* ═══════════════════════════════════════════════════════════
   Buttons: remove underline from any anchor-based button
   ═══════════════════════════════════════════════════════════ */
.btn,
a.btn,
.hero-actions a.btn,
.btn:hover,
.btn:focus {
  text-decoration: none !important;
}

/* ═══════════════════════════════════════════════════════════
   Hero glass morphism — convert the existing client, A1c,
   and calendar cards to translucent glass over the ribbon.
   ═══════════════════════════════════════════════════════════ */

/* Client info card */
.hs-client {
  background: rgba(255, 255, 255, 0.32) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    0 24px 50px -14px rgba(85, 40, 49, 0.18),
    0 12px 24px -8px rgba(85, 40, 49, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
.hs-client .head,
.hs-client .vitals,
.hs-client .checklist {
  border-color: rgba(255, 255, 255, 0.4) !important;
}
.hs-client .head { border-bottom: 1px solid rgba(255, 255, 255, 0.4); border-top: none; }
.hs-client .vitals { border-top: 1px solid rgba(255, 255, 255, 0.4); }
.hs-client .checklist {
  background: rgba(255, 255, 255, 0.18) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.4);
}
.hs-client .status {
  background: rgba(229, 245, 232, 0.7) !important;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 122, 58, 0.2);
}
.hs-client .check-item .box {
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.35);
}
.hs-client .check-item.done .box {
  background: rgba(79, 122, 72, 0.85);
  border-color: rgba(79, 122, 72, 0.9);
}

/* A1c card */
.hs-a1c {
  background: rgba(255, 255, 255, 0.32) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    0 16px 28px -14px rgba(85, 40, 49, 0.20),
    0 8px 14px -6px rgba(85, 40, 49, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
.hs-a1c .row {
  border-top: 1px solid rgba(255, 255, 255, 0.4) !important;
}
.hs-a1c .sub .pill {
  background: rgba(229, 245, 232, 0.7);
  border: 1px solid rgba(43, 122, 58, 0.2);
}

/* Calendar card */
.hs-cal {
  background: rgba(255, 255, 255, 0.32) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  box-shadow:
    0 24px 44px -14px rgba(85, 40, 49, 0.22),
    0 10px 18px -8px rgba(85, 40, 49, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.6) !important;
}
.hs-cal .cal-strip {
  background: rgba(255, 255, 255, 0.25) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35) !important;
}
.hs-cal .cal-evt {
  background: rgba(223, 245, 224, 0.7) !important;
}

/* (The ribbon canvas that used to sit behind these cards has been
   replaced by the physiological trace — see #trace-canvas.) */

/* Active Labor pill visibility — widen card + tighten pill so the
   "ACTIVE LABOR" text doesn't get clipped by the card's overflow. */
.hs-client { max-width: 480px; }
.hs-client .head { padding: 18px 16px 14px; gap: 12px; }
.hs-client .who { min-width: 0; flex: 1 1 auto; }
.hs-client .meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hs-client .status {
  padding: 5px 10px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  gap: 5px;
}

/* ═══════════════════════════════════════════════════════════
   Hero motion design — entrance + ambient + micro-interactions
   ═══════════════════════════════════════════════════════════ */

/* Headline reveal — each line rises in stagger */
.hero h1 > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  will-change: transform, opacity;
  animation: hero-rise 700ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hero h1 > span:nth-of-type(1) { animation-delay: 250ms; }
.hero h1 > span:nth-of-type(2) { animation-delay: 400ms; }
.hero h1 > span:nth-of-type(3) { animation-delay: 550ms; }
/* "care." uses rgba color instead of element-opacity so the
   animation can control opacity freely. Previously it was set
   to opacity: 0.85 elsewhere and visible immediately. */
.hero h1 > .grayout {
  color: rgba(20, 20, 20, 0.85);
  opacity: 0;
}

/* Lead paragraph + CTAs rise after headline */
.hero p.lead {
  opacity: 0; transform: translateY(16px);
  will-change: transform, opacity;
  animation: hero-rise 500ms cubic-bezier(0.2, 0.8, 0.2, 1) 800ms forwards;
}
.hero-actions {
  opacity: 0; transform: translateY(16px);
  will-change: transform, opacity;
  animation: hero-rise 500ms cubic-bezier(0.2, 0.8, 0.2, 1) 1000ms forwards;
}
@keyframes hero-rise { to { opacity: 1; transform: translateY(0); } }

/* Cards — scale + fade entrance, then continuous Y drift */
.hs-client {
  opacity: 0; transform: rotate(-1deg) scale(0.94);
  will-change: transform, opacity;
  animation: card-enter-client 800ms cubic-bezier(0.2, 0.8, 0.2, 1) 650ms forwards;
}
@keyframes card-enter-client {
  from { opacity: 0; transform: rotate(-1deg) scale(0.94); }
  to   { opacity: 1; transform: rotate(-1deg) scale(1); }
}
@keyframes drift-client {
  0%, 100% { transform: rotate(-1deg) translateY(0) scale(1); }
  50%      { transform: rotate(-1deg) translateY(-7px) scale(1); }
}

.hs-a1c {
  opacity: 0;
  will-change: transform, opacity;
  animation: card-enter-a1c 800ms cubic-bezier(0.2, 0.8, 0.2, 1) 820ms forwards;
}
@keyframes card-enter-a1c {
  from { opacity: 0; transform: rotate(4deg) translateY(20px) scale(0.94); }
  to   { opacity: 1; transform: rotate(4deg) scale(1); }
}
@keyframes drift-a1c {
  0%, 100% { transform: rotate(4deg) translateY(0) scale(1); }
  50%      { transform: rotate(4deg) translateY(-8px) scale(1); }
}

.hs-cal {
  opacity: 0;
  will-change: transform, opacity;
  animation: card-enter-cal 800ms cubic-bezier(0.2, 0.8, 0.2, 1) 990ms forwards;
}
@keyframes card-enter-cal {
  from { opacity: 0; transform: rotate(3deg) scale(0.94); }
  to   { opacity: 1; transform: rotate(3deg) scale(1); }
}
@keyframes drift-cal {
  0%, 100% { transform: rotate(3deg) translateY(0) scale(1); }
  50%      { transform: rotate(3deg) translateY(-5px) scale(1); }
}

/* Active Labor dot — live status pulse */
.hs-client .status::before {
  animation: pulse-dot 2.2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(43, 122, 58, 0.55); }
  50%      { box-shadow: 0 0 0 7px rgba(43, 122, 58, 0); }
}

/* A1c trend line — draws on after card lands */
.hs-a1c svg.chart .trend-line {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw-line 1.2s cubic-bezier(0.4, 0, 0.2, 1) 1500ms forwards;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }

/* A1c trend dots — pop in sequentially as the line passes them */
.hs-a1c svg.chart .trend-dot {
  opacity: 0;
  transform-box: fill-box; transform-origin: center;
  transform: scale(0);
  animation: dot-pop 400ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hs-a1c svg.chart .trend-dot:nth-of-type(4) { animation-delay: 1700ms; }
.hs-a1c svg.chart .trend-dot:nth-of-type(5) { animation-delay: 2100ms; }
.hs-a1c svg.chart .trend-dot:nth-of-type(6) { animation-delay: 2500ms; }
@keyframes dot-pop { to { opacity: 1; transform: scale(1); } }

/* Calendar events — stagger in after card lands */
.hs-cal .cal-evt {
  opacity: 0; transform: translateX(-8px);
  will-change: transform, opacity;
  animation: evt-slide 500ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hs-cal .cal-evt:nth-child(1) { animation-delay: 1700ms; }
.hs-cal .cal-evt:nth-child(2) { animation-delay: 1850ms; }
.hs-cal .cal-evt:nth-child(3) { animation-delay: 2000ms; }
@keyframes evt-slide { to { opacity: 1; transform: translateX(0); } }

/* Reduced motion: disable everything, snap to final state */
@media (prefers-reduced-motion: reduce) {
  .hero h1 > span, .hero p.lead, .hero-actions,
  .hs-client, .hs-a1c, .hs-cal,
  .hs-client .status::before,
  .hs-a1c svg.chart .trend-line,
  .hs-a1c svg.chart .trend-dot,
  .hs-cal .cal-evt {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
    box-shadow: none !important;
  }
  .hs-client { transform: rotate(-1deg) !important; }
  .hs-a1c    { transform: rotate(4deg) !important; }
  .hs-cal    { transform: rotate(3deg) !important; }
}

/* ═══════════════════════════════════════════════════════════
   Promise: Cinematic Backdrop + Glass Cards (Direction 8)
   Namespaced .pr- so it doesn't collide with anything else.
   ═══════════════════════════════════════════════════════════ */
.pr-section {
  position: relative;
  padding: 140px 0 90px;
  background-image: url('/website-photos/group-3.webp');
  background-size: cover; background-position: center 40%;
  color: #fff;
  overflow: hidden;
}
.pr-section[data-proof-bg="group-1"] { background-image: url('/website-photos/group-1.webp'); }
.pr-section[data-proof-bg="group-2"] { background-image: url('/website-photos/group-2.webp'); }
.pr-section[data-proof-bg="group-3"] { background-image: url('/website-photos/group-3.webp'); }
.pr-section::before {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(20,20,20,0.55) 0%, rgba(20,20,20,0.30) 35%, rgba(20,20,20,0.78) 100%),
    linear-gradient(160deg, rgba(85, 40, 49, 0.35) 0%, transparent 70%);
  pointer-events: none;
}
.pr-section .pr-container { max-width: 1280px; margin: 0 auto; padding: 0 40px; position: relative; z-index: 1; }
.pr-section .pr-head { max-width: 880px; margin: 0 auto 80px; text-align: center; }
.pr-section .pr-eyebrow {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--burgundy-2);
}
.pr-section .pr-eyebrow::before, .pr-section .pr-eyebrow::after {
  content:""; width: 28px; height: 1px; background: var(--burgundy-2); opacity: 0.6;
}
.pr-section h2 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: clamp(40px, 5.4vw, 76px); line-height: 1.05;
  letter-spacing: -0.022em; font-weight: 400;
  margin: 0 0 24px; color: #fff;
}
.pr-section h2 em { font-style: italic; color: var(--burgundy-1); }
.pr-section .pr-lead {
  font-size: 18px; line-height: 1.6; color: rgba(255,255,255,0.78);
  max-width: 560px; margin: 0 auto;
}
.pr-section .pr-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  max-width: 900px; margin: 0 auto;
}
.pr-section .pr-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 24px 22px 22px;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 240px;
  transition: background .25s ease, transform .25s ease;
}
.pr-section .pr-card:hover {
  background: rgba(255,255,255,0.12);
  transform: translateY(-4px);
}
.pr-section .pr-card .pr-num {
  font-family: "Newsreader", Georgia, serif; font-size: 36px; font-weight: 400;
  color: var(--burgundy-1); letter-spacing: -0.02em; line-height: 1;
}
.pr-section .pr-card h3 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: 18px; font-weight: 400; line-height: 1.22;
  letter-spacing: -0.012em; margin: 0; color: #fff;
}
.pr-section .pr-card h3 em { font-style: italic; color: var(--burgundy-1); }
.pr-section .pr-card p {
  font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,0.72);
  margin: 0; flex: 1;
}
.pr-section .pr-card .pr-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--burgundy-2);
  padding-top: 12px; margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.14);
}
@media (max-width: 1024px) {
  .pr-section .pr-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .pr-section { padding: 72px 0; }
  .pr-section .pr-container { padding: 0 22px; }
  .pr-section h2 { font-size: clamp(32px, 9vw, 44px); }
  .pr-section .pr-grid { grid-template-columns: 1fr; }
  .pr-section .pr-head { margin-bottom: 48px; }
}

/* ═══════════════════════════════════════════════════════════
   Included — Editorial Manifest
   Asymmetric: header anchors the left column; numbered 4×2
   list anchors the right. Stripe-grade restraint, no chrome.
   ═══════════════════════════════════════════════════════════ */
.inc-section { padding: 100px 0 120px; background: #fff; }
.inc-section .inc-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 4fr 7fr;
  gap: 96px;
  align-items: start;
}
.inc-head .inc-eyebrow {
  font: 600 11px/1 "Geist", system-ui, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy-9);
  margin-bottom: 22px;
  display: inline-block;
}
.inc-head .inc-h2 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.05;
  margin: 0 0 24px;
  color: #141414;
}
.inc-head .inc-h2 em { font-style: italic; color: var(--burgundy-9); }
.inc-head .inc-lead {
  font-size: 16px;
  line-height: 1.65;
  color: var(--gray-7);
  max-width: 380px;
  margin: 0;
}
.inc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 56px;
  row-gap: 0;
}
.inc-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(20,20,20,0.08);
}
.inc-row.no-rule { border-bottom: none; }
.inc-row .inc-ico {
  width: 52px; height: 52px; border-radius: 12px;
  background: var(--burgundy-1);
  color: var(--burgundy-8);
  display: flex; align-items: center; justify-content: center;
  flex: none; margin-top: 1px;
  transition: background 0.2s ease, color 0.2s ease;
}
.inc-row .inc-ico svg {
  width: 26px; height: 26px; display: block;
  stroke-width: 1.75;
}
.inc-row:hover .inc-ico {
  background: var(--burgundy-8);
  color: var(--cream-0);
}
.inc-row .nm {
  font: 600 16px/1.3 "Geist", system-ui, sans-serif;
  color: #141414;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.inc-row .desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gray-7);
}

/* Scroll-triggered reveal — stagger eyebrow → h2 → lead → 8 rows */
.inc-section .inc-head .inc-eyebrow,
.inc-section .inc-head .inc-h2,
.inc-section .inc-head .inc-lead,
.inc-section .inc-list .inc-row {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms cubic-bezier(.2,.8,.2,1),
    transform 700ms cubic-bezier(.2,.8,.2,1);
}
.inc-section.in-view .inc-head .inc-eyebrow { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.inc-section.in-view .inc-head .inc-h2      { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.inc-section.in-view .inc-head .inc-lead    { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.inc-section.in-view .inc-list .inc-row:nth-child(1),.inc-section.in-view .inc-list .inc-row:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 280ms; }
.inc-section.in-view .inc-list .inc-row:nth-child(3),.inc-section.in-view .inc-list .inc-row:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 360ms; }
.inc-section.in-view .inc-list .inc-row:nth-child(5),.inc-section.in-view .inc-list .inc-row:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 440ms; }
.inc-section.in-view .inc-list .inc-row:nth-child(7),.inc-section.in-view .inc-list .inc-row:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 520ms; }

@media (max-width: 960px) {
  .inc-section .inc-container { grid-template-columns: 1fr; gap: 40px; padding: 0 24px; }
  .inc-list { grid-template-columns: 1fr; column-gap: 0; }
  .inc-row.no-rule { border-bottom: 1px solid rgba(20,20,20,0.08); }
  .inc-row:last-child { border-bottom: none; }
}
@media (prefers-reduced-motion: reduce) {
  .inc-section .inc-head .inc-eyebrow,
  .inc-section .inc-head .inc-h2,
  .inc-section .inc-head .inc-lead,
  .inc-section .inc-list .inc-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Pricing — Provider Calculator
   Solo and Network as mini cards on the left; Group calculator
   on the right with live price recalc ($55 base + $20 × users).
   ═══════════════════════════════════════════════════════════ */
.pc-section { background: #fff; padding: 100px 0 120px; }
.pc-section .pc-head {
  max-width: 1280px;
  margin: 0 auto 56px;
  padding: 0 32px;
  text-align: center;
}
.pc-section .pc-head .small-h {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy-9);
  margin-bottom: 18px;
  display: inline-block;
}
.pc-section .pc-head h2 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.06;
  margin: 0 auto 16px;
  max-width: 760px;
  color: var(--dark-9);
}
.pc-section .pc-head h2 em { font-style: italic; color: var(--burgundy-9); }
.pc-section .pc-head p {
  font-size: 15.5px;
  color: var(--gray-7);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.6;
}

.pc-stage {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  align-items: stretch;
}

.pc-side { display: grid; gap: 14px; align-content: start; }
.pc-mini {
  background: var(--cream-1);
  border: 1px solid var(--cream-4);
  border-radius: 18px;
  padding: 28px 28px;
  cursor: default;
  transition:
    transform 380ms cubic-bezier(.2,.8,.2,1),
    background 360ms cubic-bezier(.2,.8,.2,1),
    box-shadow 360ms cubic-bezier(.2,.8,.2,1);
}
.pc-mini:hover {
  transform: translateY(-3px);
  background: #fff;
  box-shadow: 0 16px 36px -24px rgba(85,40,49,0.18), 0 2px 6px -3px rgba(20,20,20,0.05);
}
.pc-mini .tier-name {
  font: 600 11px/1 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--burgundy-9);
  margin-bottom: 14px;
}
.pc-mini .pr {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1;
  color: var(--dark-9);
  margin-bottom: 4px;
}
.pc-mini .pr .unit {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-size: 0.42em;
  color: var(--burgundy-9);
  margin-left: 4px;
}
.pc-mini .pr.custom { font-style: italic; color: var(--burgundy-9); }
.pc-mini .sub {
  font-size: 13px;
  color: var(--gray-7);
  margin-top: 8px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.pc-mini .mini-feats {
  display: grid;
  gap: 6px;
  margin: 12px 0 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(20,20,20,0.08);
}
.pc-mini .mini-feats .f {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  font-size: 12.5px;
  color: var(--dark-9);
  line-height: 1.45;
}
.pc-mini .mini-feats .f::before {
  content: '›';
  color: var(--burgundy-9);
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 14px;
}
.pc-mini .cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 13px/1 "Geist", system-ui, -apple-system, sans-serif;
  color: var(--burgundy-9);
  cursor: pointer;
  text-decoration: none;
  transition: gap 320ms cubic-bezier(.2,.8,.2,1);
}
.pc-mini:hover .cta { gap: 14px; }

/* Calculator card */
.pc-calc {
  background: radial-gradient(ellipse at 0% 0%, var(--burgundy-0) 0%, #fff 60%);
  border: 1px solid var(--burgundy-3);
  border-radius: 22px;
  padding: 44px 44px 36px;
  position: relative;
  display: grid;
  gap: 28px;
  overflow: hidden;
}
.pc-calc::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(85,40,49,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.pc-calc .calc-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.pc-calc .calc-head .tier-name {
  font: 600 11px/1 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--burgundy-9);
}
.pc-calc .calc-head .badge {
  font: 600 10px/1 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--burgundy-9);
  background: var(--burgundy-1);
  padding: 6px 10px;
  border-radius: 4px;
}

.pc-display {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(20,20,20,0.08);
}
.pc-display .total {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: clamp(48px, 6.4vw, 80px);
  font-weight: 500;
  letter-spacing: -0.026em;
  line-height: 1;
  color: var(--dark-9);
  transition: color 220ms cubic-bezier(.2,.8,.2,1);
}
.pc-display .total .unit {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-size: 0.32em;
  color: var(--burgundy-9);
  letter-spacing: 0;
  margin-left: 6px;
}
.pc-display .breakdown {
  font: 500 13px/1.5 "Geist", system-ui, -apple-system, sans-serif;
  color: var(--gray-7);
  text-align: right;
}
.pc-display .breakdown b {
  display: block;
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-weight: 500;
  color: var(--burgundy-9);
  font-size: 16px;
  margin-bottom: 2px;
}

.pc-slider-wrap { display: grid; gap: 14px; }
.pc-slider-wrap .lbl-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font: 500 12px/1 "Geist", system-ui, -apple-system, sans-serif;
  color: var(--gray-7);
  letter-spacing: 0.04em;
}
.pc-slider-wrap .lbl-row strong {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-weight: 500;
  font-size: 16px;
  color: var(--dark-9);
  transition: color 220ms cubic-bezier(.2,.8,.2,1);
}
.pc-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--cream-3);
  outline: none;
  cursor: pointer;
}
.pc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px; height: 24px;
  background: var(--burgundy-9);
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--burgundy-9), 0 6px 16px -8px rgba(85,40,49,0.5);
  border-radius: 50%;
  cursor: grab;
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), box-shadow 320ms cubic-bezier(.2,.8,.2,1);
}
.pc-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 0 0 1px var(--burgundy-9), 0 0 0 8px rgba(85,40,49,0.12), 0 8px 24px -10px rgba(85,40,49,0.6);
}
.pc-slider::-webkit-slider-thumb:active { cursor: grabbing; transform: scale(1.08); }
.pc-slider::-moz-range-thumb {
  width: 24px; height: 24px;
  background: var(--burgundy-9);
  border: 4px solid #fff;
  box-shadow: 0 0 0 1px var(--burgundy-9);
  border-radius: 50%;
  cursor: grab;
}
.pc-ticks {
  display: flex;
  justify-content: space-between;
  font: 500 11px/1 "SF Mono", ui-monospace, Menlo, monospace;
  color: var(--gray-7);
  letter-spacing: 0.04em;
  margin-top: 4px;
}

.pc-feats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(20,20,20,0.08);
}
.pc-feats .f {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 10px;
  font-size: 13.5px;
  color: var(--dark-9);
  line-height: 1.45;
}
.pc-feats .f::before {
  content: '›';
  color: var(--burgundy-9);
  font-family: "Newsreader", Georgia, serif;
  font-style: italic;
  font-size: 15px;
}

.pc-cta-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
}
.pc-cta {
  height: 54px;
  border-radius: 999px;
  background: var(--burgundy-9);
  color: #fff;
  border: 0;
  font: 600 15px/1 "Geist", system-ui, -apple-system, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background 280ms cubic-bezier(.2,.8,.2,1),
    transform 320ms cubic-bezier(.2,.8,.2,1);
}
.pc-cta:hover { background: #421f26; transform: translateY(-2px); }
.pc-cta-note {
  font-size: 12px;
  color: var(--gray-7);
  letter-spacing: 0.01em;
  max-width: 200px;
  line-height: 1.4;
  text-align: right;
}

/* Scroll-triggered reveal — stagger head, mini cards, calc */
.pc-section .pc-head .small-h,
.pc-section .pc-head h2,
.pc-section .pc-head p,
.pc-section .pc-mini,
.pc-section .pc-calc {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms cubic-bezier(.2,.8,.2,1),
    transform 700ms cubic-bezier(.2,.8,.2,1);
}
.pc-section.in-view .pc-head .small-h { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.pc-section.in-view .pc-head h2       { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.pc-section.in-view .pc-head p        { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.pc-section.in-view .pc-side .pc-mini:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 280ms; }
.pc-section.in-view .pc-side .pc-mini:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 360ms; }
.pc-section.in-view .pc-calc { opacity: 1; transform: translateY(0); transition-delay: 320ms; }

@media (max-width: 1000px) {
  .pc-stage { grid-template-columns: 1fr; }
  .pc-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .pc-stage { padding: 0 20px; }
  .pc-side { grid-template-columns: 1fr; }
  .pc-calc { padding: 32px 24px 28px; }
  .pc-feats { grid-template-columns: 1fr; }
  .pc-cta-row { grid-template-columns: 1fr; }
  .pc-cta-note { text-align: left; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .pc-section .pc-head .small-h,
  .pc-section .pc-head h2,
  .pc-section .pc-head p,
  .pc-section .pc-mini,
  .pc-section .pc-calc {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   FAQ — Sticky Sidebar Manifest
   Asymmetric: 3 categories sticky on left, expandable rows on right.
   ═══════════════════════════════════════════════════════════ */
.fm-section {
  background: var(--cream-0);
  border-top: 1px solid var(--cream-4);
  border-bottom: 1px solid var(--cream-4);
  padding: 96px 0 120px;
}
.fm-section .section-head { text-align: center; margin-bottom: 64px; }

.fm-stage {
  display: grid;
  grid-template-columns: 3fr 7fr;
  gap: 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  align-items: start;
}
.fm-side { position: sticky; top: 100px; }
.fm-side .cats { display: grid; gap: 0; border-top: 1px solid rgba(20,20,20,.09); }
.fm-side .cat-btn {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: center;
  padding: 19px 4px 19px 14px;
  border: 0;
  border-bottom: 1px solid rgba(20,20,20,.09);
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  color: var(--dark-9);
  font-family: inherit;
  position: relative;
  transition: color 220ms ease, padding-left 220ms ease;
}
.fm-side .cat-btn:hover { color: var(--burgundy-9); padding-left: 18px; }
.fm-side .cat-btn.active {
  color: var(--burgundy-9);
  background: transparent;
  box-shadow: none;
}
.fm-side .cat-btn.active::before { content:""; position:absolute; left:0; top:17px; bottom:17px; width:2px; border-radius:2px; background:var(--burgundy-9); }
.fm-side .cat-btn .num {
  font: 500 11px/1 "SF Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.04em;
  color: var(--burgundy-9);
  transition: background 320ms cubic-bezier(.2,.8,.2,1), color 320ms cubic-bezier(.2,.8,.2,1);
}
.fm-side .cat-btn.active .num {
  color: var(--burgundy-9);
  font-weight: 650;
}
.fm-side .cat-btn .nm {
  font: 600 15px/1.3 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.005em;
}
.fm-side .cat-btn .arr { display:none; }
.fm-side .cat-btn svg { width: 14px; height: 14px; }
.fm-side .foot {
  margin-top: 26px;
  padding-top: 0;
  border-top: 0;
  font-size: 13px;
  color: var(--gray-7);
  line-height: 1.55;
  max-width: 280px;
}
.fm-side .foot a {
  color: var(--burgundy-9);
  text-decoration: none;
  font-weight: 600;
}

.fm-panels { position: relative; }
.fm-panel { display: none; }
.fm-panel.active { display: block; animation: fm-in 540ms cubic-bezier(.2,.8,.2,1) both; }
@keyframes fm-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fm-row {
  border-bottom: 1px solid rgba(20,20,20,0.08);
  transition: background 320ms ease;
}
.fm-row:first-child { border-top: 1px solid rgba(20,20,20,0.08); }
.fm-row.open { background: linear-gradient(90deg, var(--cream-1) 0%, transparent 60%); }
.fm-row .q-btn {
  display: grid;
  grid-template-columns: 1fr 24px;
  gap: 24px;
  align-items: center;
  width: 100%;
  padding: 23px 4px 23px 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: var(--dark-9);
  transition: padding-left 540ms cubic-bezier(.2,.8,.2,1);
}
.fm-row:hover .q-btn { padding-left: 0; }
.fm-row.open .q-btn { padding-left: 0; }
.fm-row .q {
  font: 600 16px/1.35 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.005em;
  color: var(--dark-9);
  transition: color 360ms cubic-bezier(.2,.8,.2,1);
}
.fm-row:hover .q, .fm-row.open .q { color: var(--burgundy-9); }
.fm-row .plus {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--burgundy-9);
  transition: transform 360ms cubic-bezier(.2,.8,.2,1);
}
.fm-row .plus svg { width: 14px; height: 14px; }
.fm-row.open .plus { transform: rotate(45deg); }
.fm-row .a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 540ms cubic-bezier(.2,.8,.2,1);
}
.fm-row.open .a { max-height: 360px; }
.fm-row .a-inner {
  padding: 0 56px 28px 24px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--gray-7);
  max-width: 620px;
}

/* Reveal animations */
.fm-section .section-head .small-h,
.fm-section .section-head h2,
.fm-section .fm-side {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.fm-section.in-view .section-head .small-h { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.fm-section.in-view .section-head h2       { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.fm-section.in-view .fm-side               { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.fm-section.in-view .fm-panel.active { animation: fm-row-in 560ms cubic-bezier(.2,.8,.2,1) 260ms both; }
.fm-section.in-view .fm-panel.active .fm-row { opacity:1; transform:none; animation:none; }
@keyframes fm-row-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 960px) {
  .fm-stage { grid-template-columns: 1fr; gap: 32px; padding: 0 24px; }
  .fm-side { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  .fm-section .section-head .small-h,
  .fm-section .section-head h2,
  .fm-section .fm-side,
  .fm-section .fm-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
  .fm-panel.active { animation: none !important; }
}

/* ═══════════════════════════════════════════════════════════
   Final CTA — Asymmetric Editorial
   Hero trial card (burgundy gradient, dominant) + quieter demo sidecar.
   The size hierarchy tells you which action is recommended.
   ═══════════════════════════════════════════════════════════ */
.as-section { background: #fff; padding: 96px 0 110px; }
.as-section .section-head { text-align: center; margin-bottom: 56px; }
.as-section .section-head h2 em {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-style: italic;
  font-weight: 500;
  color: var(--burgundy-9);
}

.as-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.as-card {
  position: relative;
  border-radius: 24px;
  padding: 56px 52px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 420px;
  transition: transform 520ms cubic-bezier(.2,.8,.2,1), box-shadow 460ms cubic-bezier(.2,.8,.2,1);
}
.as-card:hover { transform: translateY(-6px); }

/* Hero — burgundy gradient (was near-black; warmed to burgundy per design note) */
.as-hero {
  background:
    radial-gradient(ellipse at 25% -10%, #834D46 0%, var(--burgundy-9) 55%, #331812 100%),
    var(--burgundy-9);
  color: #fbf7f1;
}
.as-hero:hover { box-shadow: 0 36px 64px -32px rgba(85,40,49,0.5); }
.as-hero::before {
  /* Soft burgundy-pink glow that intensifies on hover */
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(240, 188, 197, 0.32) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0.75;
  transition: opacity 720ms cubic-bezier(.2,.8,.2,1);
}
.as-hero:hover::before { opacity: 1; }
.as-hero h3 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: clamp(40px, 4.8vw, 60px);
  font-weight: 500;
  letter-spacing: -0.024em;
  line-height: 1.02;
  margin: 0 0 22px;
  color: #fbf7f1;
}
.as-hero h3 em { font-style: italic; color: #f0bcc5; }
.as-hero p {
  font-size: 17px;
  line-height: 1.55;
  color: rgba(247,231,234,0.82);
  margin: 0 0 38px;
  max-width: 760px;
}
.as-hero .as-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 32px;
  border-radius: 999px;
  font: 600 15px/1 "Geist", system-ui, -apple-system, sans-serif;
  background: #fbf7f1;
  color: var(--burgundy-9);
  align-self: flex-start;
  transition: background 320ms cubic-bezier(.2,.8,.2,1);
}
.as-hero .as-btn:hover { background: #fff; }
.as-hero .as-btn svg { width: 15px; height: 15px; transition: transform 380ms cubic-bezier(.2,.8,.2,1); }
.as-hero:hover .as-btn svg { transform: translateX(5px); }

/* Sidecar — demo card */
.as-side {
  background: var(--cream-1);
  color: var(--dark-9);
  border: 1px solid var(--cream-4);
}
.as-side:hover {
  background: #fff;
  border-color: var(--burgundy-3);
  box-shadow: 0 24px 44px -28px rgba(85,40,49,0.28);
}
.as-side h3 {
  font-family: "Newsreader", Georgia, "Iowan Old Style", serif;
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.022em;
  line-height: 1.06;
  margin: 0 0 16px;
  color: var(--dark-9);
}
.as-side h3 em { font-style: italic; color: var(--burgundy-9); }
.as-side p {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--gray-7);
  margin: 0 0 28px;
  max-width: 280px;
}
.as-side .as-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  font: 600 14px/1 "Geist", system-ui, -apple-system, sans-serif;
  background: var(--burgundy-9);
  color: #fff;
  align-self: flex-start;
  transition: background 320ms cubic-bezier(.2,.8,.2,1);
}
.as-side .as-btn:hover { background: #4a1f29; }
.as-side .as-btn svg { width: 14px; height: 14px; transition: transform 380ms cubic-bezier(.2,.8,.2,1); }
.as-side:hover .as-btn svg { transform: translateX(4px); }

/* Reveal */
.as-section .section-head h2,
.as-section .section-head p,
.as-section .as-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(.2,.8,.2,1), transform 700ms cubic-bezier(.2,.8,.2,1);
}
.as-section.in-view .section-head h2  { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.as-section.in-view .section-head p   { opacity: 1; transform: translateY(0); transition-delay: 100ms; }
.as-section.in-view .as-hero          { opacity: 1; transform: translateY(0); transition-delay: 220ms; }
.as-section.in-view .as-side          { opacity: 1; transform: translateY(0); transition-delay: 340ms; }

@media (max-width: 900px) {
  .as-stage { grid-template-columns: 1fr; padding: 0 24px; }
  .as-card { padding: 40px 32px; min-height: 320px; }
}
@media (prefers-reduced-motion: reduce) {
  .as-hero::before { transition: none; }
  .as-section .section-head h2,
  .as-section .section-head p,
  .as-section .as-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   Ticker — burgundy strip after the first product section
   Replaces the old static "For midwives / Designed for birth /
   HIPAA compliant" tab row with a continuously scrolling marquee.
   Eyebrow: system uppercase. Items: Newsreader serif italic.
   ═══════════════════════════════════════════════════════════ */
.ticker-section {
  background: var(--burgundy-9);
  color: #fbf7f1;
  padding: 24px 0 30px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
@keyframes tickerfade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ticker-eyebrow {
  text-align: center;
  font: 600 11px/1 "Geist", system-ui, -apple-system, sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(247, 231, 234, 0.65);
  margin: 0 0 18px;
}
.ticker-viewport {
  position: relative;
  overflow: hidden;
}
/* Soft fades on the edges so items dissolve in/out instead of clipping */
.ticker-viewport::before,
.ticker-viewport::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  pointer-events: none;
  z-index: 2;
}
.ticker-viewport::before {
  left: 0;
  background: linear-gradient(90deg, var(--burgundy-9) 0%, rgba(85,40,49,0) 100%);
}
.ticker-viewport::after {
  right: 0;
  background: linear-gradient(270deg, var(--burgundy-9) 0%, rgba(85,40,49,0) 100%);
}

.ticker-track {
  display: flex;
  align-items: center;
  gap: 64px;
  width: max-content;
  list-style: none;
  padding: 0;
  margin: 0;
  animation: ticker-scroll 96s linear infinite;
  will-change: transform;
}
.ticker-section:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}
.ticker-item {
  font-family: "Newsreader", Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: -0.012em;
  color: rgba(247, 231, 234, 0.92);
  white-space: nowrap;
  flex-shrink: 0;
}
/* Subtle dot separator between items via positioned ::after */
.ticker-item + .ticker-item {
  position: relative;
  padding-left: 64px;
}
.ticker-item + .ticker-item::before {
  content: '';
  position: absolute;
  left: 30px; top: 50%;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: rgba(247, 231, 234, 0.35);
  transform: translateY(-50%);
}

@media (max-width: 700px) {
  .ticker-section { padding: 20px 0 24px; }
  .ticker-eyebrow { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 14px; }
  .ticker-track { gap: 40px; }
  .ticker-item + .ticker-item { padding-left: 40px; }
  .ticker-item + .ticker-item::before { left: 18px; }
  .ticker-track { animation-duration: 60s; }
  .ticker-viewport::before,
  .ticker-viewport::after { width: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-section { animation: none; }
  .ticker-track { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════
   Page-wide scroll motion — reveals + micro-interactions
   Applied below the hero. Hero has its own dedicated motion above.
   Pattern: IntersectionObserver toggles .in-view on observed groups,
   children animate in with content-aware stagger.
   Easing: cubic-bezier(.2,.8,.2,1) — fast start, soft land.
   ═══════════════════════════════════════════════════════════════════════ */

/* Section heads — eyebrow → headline → lede stagger */
.section-head > .small-h,
.section-head > h2,
.section-head > p {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 700ms cubic-bezier(.2,.8,.2,1),
    transform 700ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.section-head.in-view > .small-h { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.section-head.in-view > h2       { opacity: 1; transform: translateY(0); transition-delay: 110ms; }
.section-head.in-view > p        { opacity: 1; transform: translateY(0); transition-delay: 220ms; }

/* alt-feature (Smart Templates, Interop) — text col then screen col */
.alt-feature .text-col,
.alt-feature .screen-col {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 800ms cubic-bezier(.2,.8,.2,1),
    transform 800ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.alt-feature.in-view .text-col   { opacity: 1; transform: translateY(0); transition-delay: 60ms; }
.alt-feature.in-view .screen-col { opacity: 1; transform: translateY(0); transition-delay: 180ms; }

/* full-feature (Practice) — head, screen row, points stagger, foot */
.full-feature .head,
.full-feature .screen-row,
.full-feature .points > *,
.full-feature .foot {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 720ms cubic-bezier(.2,.8,.2,1),
    transform 720ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.full-feature.in-view .head        { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.full-feature.in-view .screen-row  { opacity: 1; transform: translateY(0); transition-delay: 160ms; }
.full-feature.in-view .points > * { opacity: 1; transform: translateY(0); transition-delay: 280ms; }
.full-feature.in-view .foot        { opacity: 1; transform: translateY(0); transition-delay: 380ms; }

/* Promise (Direction 8) — head then glass card stagger */
.pr-section .pr-head,
.pr-section .pr-card {
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 900ms cubic-bezier(.2,.8,.2,1),
    transform 900ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.pr-section.in-view .pr-head { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.pr-section.in-view .pr-card:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 200ms; }
.pr-section.in-view .pr-card:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 320ms; }
.pr-section.in-view .pr-card:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 440ms; }
.pr-section.in-view .pr-card:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 560ms; }

/* Walkthrough — head, stage, controls */
.walkthrough-section .section-head,
.walkthrough-section .wt-stage,
.walkthrough-section .wt-controls {
  /* section-head children already animate via above rule */
}
.walkthrough-section .wt-stage,
.walkthrough-section .wt-controls {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 820ms cubic-bezier(.2,.8,.2,1),
    transform 820ms cubic-bezier(.2,.8,.2,1);
  will-change: opacity, transform;
}
.walkthrough-section.in-view .wt-stage    { opacity: 1; transform: translateY(0); transition-delay: 180ms; }
.walkthrough-section.in-view .wt-controls { opacity: 1; transform: translateY(0); transition-delay: 300ms; }

/* 8-module grid — tight stagger across all tiles */
.features-grid .feature-tile {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 640ms cubic-bezier(.2,.8,.2,1),
    transform 640ms cubic-bezier(.2,.8,.2,1),
    box-shadow 280ms ease,
    border-color 280ms ease;
  will-change: opacity, transform;
}
.features-grid.in-view .feature-tile:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.features-grid.in-view .feature-tile:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 60ms; }
.features-grid.in-view .feature-tile:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 120ms; }
.features-grid.in-view .feature-tile:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 180ms; }
.features-grid.in-view .feature-tile:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 240ms; }
.features-grid.in-view .feature-tile:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 300ms; }
.features-grid.in-view .feature-tile:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 360ms; }
.features-grid.in-view .feature-tile:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 420ms; }

/* Module tile hover — soft lift, warmer border */
.features-grid .feature-tile { cursor: default; }
.features-grid .feature-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(89, 28, 45, 0.22), 0 2px 8px -3px rgba(20,20,20,0.06);
}

/* Core-list (modules eyebrow list, if rendered) */
.core-list {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms cubic-bezier(.2,.8,.2,1),
    transform 700ms cubic-bezier(.2,.8,.2,1);
}
.core-list.in-view { opacity: 1; transform: translateY(0); }

/* Pricing — 3-up card stagger, featured emphasis */
.pricing-min .price-col {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 760ms cubic-bezier(.2,.8,.2,1),
    transform 360ms cubic-bezier(.2,.8,.2,1),
    box-shadow 320ms ease,
    border-color 280ms ease;
  will-change: opacity, transform;
}
.pricing-min.in-view .price-col:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.pricing-min.in-view .price-col:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 120ms; }
.pricing-min.in-view .price-col:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 240ms; }
.pricing-min .price-col:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -28px rgba(89, 28, 45, 0.28), 0 3px 10px -4px rgba(20,20,20,0.07);
}
.pricing-min .price-col.featured:hover {
  transform: translateY(-8px);
}

/* FAQ — item stagger + chevron-style plus rotation on hover */
.faq .faq-item {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 600ms cubic-bezier(.2,.8,.2,1),
    transform 600ms cubic-bezier(.2,.8,.2,1),
    background-color 240ms ease,
    border-color 240ms ease;
  will-change: opacity, transform;
}
.faq.in-view .faq-item:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.faq.in-view .faq-item:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 70ms; }
.faq.in-view .faq-item:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 140ms; }
.faq.in-view .faq-item:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 210ms; }
.faq.in-view .faq-item:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 280ms; }
.faq.in-view .faq-item:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 350ms; }
.faq .faq-item .plus {
  display: inline-block;
  transition: transform 280ms cubic-bezier(.2,.8,.2,1), color 240ms ease;
  transform-origin: center;
}
.faq .faq-item:hover .plus { transform: rotate(90deg); color: var(--c-burgundy, #591c2d); }
.faq .faq-item:hover { cursor: pointer; }

/* CTA pair — final dual-card reveal + arrow hover nudge */
.cta-pair .cta-card {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 800ms cubic-bezier(.2,.8,.2,1),
    transform 800ms cubic-bezier(.2,.8,.2,1),
    box-shadow 320ms ease;
  will-change: opacity, transform;
}
.cta-pair.in-view .cta-card:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0ms; }
.cta-pair.in-view .cta-card:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 140ms; }
.cta-pair .cta-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 60px -30px rgba(89, 28, 45, 0.32), 0 4px 12px -4px rgba(20,20,20,0.08);
}
.cta-pair .cta-card a,
.cta-pair .cta-card .arrow,
.cta-pair .cta-card .btn {
  transition: transform 260ms cubic-bezier(.2,.8,.2,1);
}
.cta-pair .cta-card:hover a span.arrow,
.cta-pair .cta-card:hover .arrow { transform: translateX(4px); }

/* Tab row (sub-nav under hero) — quiet fade-in on first paint */
.tab-row, .tab-bar, .for-midwives-tabs {
  animation: tabrow-in 700ms cubic-bezier(.2,.8,.2,1) both;
  animation-delay: 600ms;
}
@keyframes tabrow-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion — collapse all of the above to instant final state */
@media (prefers-reduced-motion: reduce) {
  .section-head > *,
  .alt-feature .text-col,
  .alt-feature .screen-col,
  .full-feature .head,
  .full-feature .screen-row,
  .full-feature .points > *,
  .full-feature .foot,
  .pr-section .pr-head,
  .pr-section .pr-card,
  .walkthrough-section .wt-stage,
  .walkthrough-section .wt-controls,
  .features-grid .feature-tile,
  .core-list,
  .pricing-min .price-col,
  .faq .faq-item,
  .cta-pair .cta-card,
  .tab-row, .tab-bar, .for-midwives-tabs {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}


/* ═══════════════════════════════════════════════════════════
   HERO — physiological trace + live labor card
   Ported from hero-heartbeat-adjustable.html. The card is
   namespaced .hb- so it does not inherit the retired .hs-*
   three-card stage styling further up this sheet.
   ═══════════════════════════════════════════════════════════ */
.hero-wrap > .hero {
  min-height: 760px;
  padding: 76px 32px 116px;
}
.hero h1 .ital { font-style: italic; color: var(--burgundy-9); }

/* ═══════════════════════════════════════════════════════════
   Hero variant switcher (exploration/hero-grid)
   .hero-wrap[data-hero-variant="stack"] → show carousel/stack (default)
   .hero-wrap[data-hero-variant="grid"]  → show mosaic grid
   ═══════════════════════════════════════════════════════════ */
.hero-wrap[data-hero-variant="stack"] .hero-grid { display: none; }
.hero-wrap[data-hero-variant="grid"] .hero-carousel { display: none; }

/* ═══════════════════════════════════════════════════════════
   Hero photo carousel — shuffling stack of cards (variant 1)
   ═══════════════════════════════════════════════════════════ */
.hero-carousel {
  position: relative;
  z-index: 2;
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 540px;
}
.hc-frames {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: visible;
  padding: 24px;
  margin: -24px;
}
.hc-frame {
  position: absolute;
  top: 24px; left: 24px; right: 24px; bottom: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  object-fit: cover;
  border-radius: 18px;
  background: var(--cream-2);
  box-shadow: 0 24px 48px -18px rgba(78, 43, 42, 0.24),
              0 6px 14px -6px rgba(78, 43, 42, 0.12);
  opacity: 0;
  transform: translate(0, 0) rotate(0deg) scale(0.85);
  transition: transform 0.9s cubic-bezier(0.34, 1.2, 0.64, 1),
              opacity 0.6s ease,
              box-shadow 0.9s ease;
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
}
.hc-frame.pos-back {
  opacity: 1;
  transform: translate(34px, -22px) rotate(5deg) scale(0.92);
  z-index: 1;
  box-shadow: 0 14px 28px -14px rgba(78, 43, 42, 0.16);
}
.hc-frame.pos-mid {
  opacity: 1;
  transform: translate(16px, -10px) rotate(2.5deg) scale(0.96);
  z-index: 2;
  box-shadow: 0 20px 38px -16px rgba(78, 43, 42, 0.20);
}
.hc-frame.pos-front {
  opacity: 1;
  transform: translate(0, 0) rotate(0deg) scale(1);
  z-index: 3;
  pointer-events: auto;
  box-shadow: 0 32px 60px -22px rgba(78, 43, 42, 0.30),
              0 10px 22px -10px rgba(78, 43, 42, 0.14);
}
.hc-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
}
.hc-dot {
  width: 8px; height: 8px; padding: 0; border: 0;
  border-radius: 999px;
  background: var(--burgundy-2);
  cursor: pointer;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s ease;
}
.hc-dot:hover { background: var(--burgundy-4); }
.hc-dot.is-active { width: 26px; background: var(--burgundy-9); }
.hc-dot.is-active:hover { background: var(--burgundy-9); }
@media (prefers-reduced-motion: reduce) {
  .hc-frame { transition: none; }
  .hc-dot { transition: none; }
}
@media (max-width: 900px) {
  .hero-carousel { max-width: 100%; justify-self: stretch; }
  .hc-frames { aspect-ratio: 4 / 3; border-radius: 16px; }
}

/* ═══════════════════════════════════════════════════════════
   Hero photo grid — short + wide, extends past right edge
   3 columns × 2 rows. Grid bleeds past its container to the
   right so it feels editorial and full-bleed.
   ═══════════════════════════════════════════════════════════ */
.hero-grid {
  position: relative;
  z-index: 2;
  justify-self: end;
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 1.35 / 1;
  margin-right: 0;
  /* Isolate the grid so nothing inside can shift the parent layout */
  contain: layout paint;
}
.hg-cell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  border-radius: 14px;
  background: var(--cream-2);
  box-shadow: 0 16px 34px -14px rgba(78, 43, 42, 0.24),
              0 4px 10px -4px rgba(78, 43, 42, 0.10);
  /* Rest state — sits at scale 1, no translate. Rotation is per-cell. */
  opacity: 1;
  scale: 1;
  translate: 0 0;
  transition:
    opacity 0.4s ease,
    scale 0.3s cubic-bezier(0.34, 1.2, 0.64, 1),
    translate 0.3s cubic-bezier(0.34, 1.2, 0.64, 1),
    box-shadow 0.3s ease;
  /* Isolate each cell from parent reflow */
  contain: paint;
}
/* Before the grid enters the viewport, cells are hidden and shrunken */
.hero-grid:not(.is-in-view) .hg-cell {
  opacity: 0;
  scale: 0.82;
  translate: 0 12px;
  transition: none;
}
/* Enter: staggered scale-in. Scoped to .is-entering, which JS strips once the
   last cell has settled. Keeping it off .is-in-view matters: when a swap ends
   and .is-swapping is removed, the cell's `animation` value must NOT fall back
   to the enter keyframes, or the browser replays the whole scale-in. */
@keyframes hg-cell-enter {
  from { opacity: 0; scale: 0.82; translate: 0 12px; }
  to   { opacity: 1; scale: 1; translate: 0 0; }
}
.hero-grid.is-entering .hg-cell {
  animation: hg-cell-enter 0.75s cubic-bezier(0.34, 1.2, 0.64, 1) both;
}
.hero-grid.is-entering .hg-1 { animation-delay: 0s; }
.hero-grid.is-entering .hg-2 { animation-delay: 0.15s; }
.hero-grid.is-entering .hg-3 { animation-delay: 0.30s; }
.hero-grid.is-entering .hg-4 { animation-delay: 0.45s; }
.hero-grid.is-entering .hg-5 { animation-delay: 0.60s; }

/* Swap crossfade — pure opacity, no scale change.
   Scale dips read as a visible "pop" on the large center tile, so the
   swap stays flat and only the opacity moves. */
@keyframes hg-cell-swap {
  0%   { opacity: 1; }
  50%  { opacity: 0; }
  100% { opacity: 1; }
}
.hero-grid.is-entering .hg-cell.is-swapping,
.hg-cell.is-swapping {
  animation: hg-cell-swap 1s ease-in-out both;
  animation-delay: 0s;
}

.hg-cell:hover {
  translate: 0 -4px;
  scale: 1.02;
  box-shadow: 0 24px 46px -16px rgba(78, 43, 42, 0.32),
              0 8px 18px -6px rgba(78, 43, 42, 0.14);
  z-index: 5;
}
/* Feature (main) photo: middle column, spans both rows */
.hg-1 { grid-column: 2; grid-row: 1 / span 2; rotate: -0.5deg; }
/* Top-left small */
.hg-2 { grid-column: 1; grid-row: 1; rotate: -1deg; }
/* Right column top */
.hg-3 { grid-column: 3; grid-row: 1; rotate: 1deg; }
/* Bottom-left */
.hg-4 { grid-column: 1; grid-row: 2; rotate: 0.5deg; }
/* Bottom-right */
.hg-5 { grid-column: 3; grid-row: 2; rotate: -0.5deg; }
/* Two hidden by default at desktop — used at mobile only */
.hg-6, .hg-7 { display: none; }

@media (prefers-reduced-motion: reduce) {
  .hg-cell { transition: none; }
  .hg-cell:hover { transform: none; }
}
@media (max-width: 900px) {
  .hero-grid {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 1 / 1.05;
    gap: 8px;
  }
  .hg-1 { grid-column: 1 / span 2; grid-row: 1; }
  .hg-2 { grid-column: 1; grid-row: 2; }
  .hg-3 { grid-column: 2; grid-row: 2; }
  .hg-4 { grid-column: 1; grid-row: 3; }
  .hg-5 { grid-column: 2; grid-row: 3; }
  .hg-6, .hg-7 { display: none; }
  .hg-cell { border-radius: 12px; }
}

.hb-stage { position: relative; justify-self: end; width: 100%; max-width: 452px; }
.hb-stage .hb-card { position: relative; z-index: 3; }
.hb-stage .hs-a1c { top: -82px; right: -190px; z-index: 2; }
.hb-stage .hs-cal {
  top: 64px;
  right: -170px;
  bottom: auto;
  z-index: 5;
}
.hb-card {
  background: rgba(255,255,255,0.38);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 16px;
  box-shadow: 0 24px 50px -14px rgba(85,40,49,0.20), inset 0 1px 0 rgba(255,255,255,0.6);
  overflow: hidden;
}
.hb-card .head { display:flex; align-items:center; justify-content:space-between; padding: 18px 18px 14px; border-bottom: 1px solid rgba(255,255,255,0.45); gap:12px; }
.hb-card .who { display:flex; align-items:center; gap:12px; min-width:0; }
.hb-card .avatar { width:40px; height:40px; border-radius:50%; background-size:cover; background-position:center; flex-shrink:0; }
.hb-card .id { min-width:0; }
.hb-card .name { font-size:15px; font-weight:600; }
.hb-card .meta { font-size:12px; color: var(--gray-7); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hb-card .status { background: rgba(229,245,232,0.75); border:1px solid rgba(43,122,58,0.25); color:#2b7a3a; padding:5px 10px; border-radius:9999px; font-size:9.5px; font-weight:600; letter-spacing:0.06em; text-transform:uppercase; display:inline-flex; align-items:center; gap:5px; white-space:nowrap; }
.hb-card .status .lv { width:5px; height:5px; border-radius:50%; background:#2b7a3a; }

.hb-card .vitals { display:grid; grid-template-columns: repeat(3,1fr); gap:6px; padding: 16px 18px 6px; }
.hb-card .vital { min-width:0; }
.hb-card .vhd { display:flex; align-items:center; gap:6px; }
.hb-card .vdot { width:7px; height:7px; border-radius:50%; flex-shrink:0; box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
.hb-card .vdot.hollow { background:transparent !important; border:1.5px solid var(--dil); box-shadow:none; }
.hb-card .vlbl { font-size:10px; letter-spacing:0.06em; text-transform:uppercase; color: var(--gray-7); }
.hb-card .vnum { font-size:25px; font-weight:600; margin-top:4px; letter-spacing:-0.02em; font-variant-numeric: tabular-nums; }
.hb-card .vnum .vunit { font-size:12px; font-weight:500; color: var(--gray-6); margin-left:2px; }
.hb-card .vsub { font-size:10.5px; color: var(--gray-6); margin-top:2px; letter-spacing:0.01em; }

.hb-card .checklist { background: rgba(255,255,255,0.22); border-top: 1px solid rgba(255,255,255,0.45); padding: 14px 18px 18px; margin-top: 10px; }
.hb-card .clbl { font-size:10px; letter-spacing:0.08em; text-transform:uppercase; color: var(--gray-7); margin-bottom:10px; }
.hb-card .check-item { display:flex; align-items:center; gap:10px; font-size:13px; padding:5px 0; }
.hb-card .check-item .box { width:16px; height:16px; border-radius:5px; border:1.5px solid rgba(120,90,95,0.4); background: rgba(255,255,255,0.35); flex-shrink:0; }
.hb-card .check-item.done .box { background: rgba(79,122,72,0.85); border-color: rgba(79,122,72,0.9); position:relative; }
.hb-card .check-item.done .box::after { content:"✓"; color:#fff; font-size:11px; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; }
.hb-card .check-item.done .label { color: var(--gray-6); text-decoration: line-through; }

/* Entrance + ambient drift, matching the rest of the hero motion */
.hb-card {
  opacity: 0;
  will-change: transform, opacity;
  animation:
    hb-card-enter 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 600ms forwards,
    hb-card-drift 9s ease-in-out 1900ms infinite;
}
@keyframes hb-card-enter {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes hb-card-drift {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-7px) scale(1); }
}
.hb-card .status .lv { animation: pulse-dot 2.2s ease-in-out infinite; }

@media (max-width: 1024px) {
  .hero-wrap > .hero { min-height: auto; padding: 52px 24px 72px; }
  .hb-stage { justify-self: stretch; max-width: none; }
  .hb-stage .hs-a1c,
  .hb-stage .hs-cal { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hb-card, .hb-card .status .lv {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   MOTION SETTINGS — circular trigger in the bottom-right,
   panel springs open above it.
   ═══════════════════════════════════════════════════════════ */
.settings-fab {
  position: fixed; right: 24px; bottom: 24px; z-index: 201;
  width: 48px; height: 48px; border-radius: 50%; padding: 0;
  background: var(--burgundy-9); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 24px -8px rgba(85,40,49,0.55), 0 2px 6px rgba(20,20,20,0.12);
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .2s ease;
}
.settings-fab:hover { background: var(--burgundy-8); transform: translateY(-2px); }
.settings-fab:focus-visible { outline: 2px solid var(--burgundy-5); outline-offset: 3px; }
.settings-fab svg { width: 20px; height: 20px; display: block; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.settings-fab[aria-expanded="true"] svg { transform: rotate(60deg); }

.knobs {
  position: fixed; right: 24px; bottom: 84px; z-index: 200; width: 264px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--cream-4); border-radius: 14px; box-shadow: var(--shadow-lg);
  font-size: 12px; color: var(--dark-9);
  transform-origin: bottom right;
  opacity: 0; transform: translateY(10px) scale(0.96); pointer-events: none;
  transition: opacity .18s ease, transform .24s cubic-bezier(.2,.8,.2,1);
}
.knobs.open { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.knobs > header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px; border-bottom: 1px solid var(--cream-3);
  font-weight: 600; user-select: none;
}
.knobs-close {
  border: none; background: transparent; cursor: pointer;
  color: var(--gray-6); font-size: 17px; line-height: 1;
  padding: 0 2px; border-radius: 6px;
}
.knobs-close:hover { color: var(--dark-9); }
.knobs .body { padding: 12px 13px; max-height: 58vh; overflow: auto; }
.knob-group { font-size: 10px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--burgundy-7); font-weight: 600; margin: 14px 0 9px; padding-bottom: 5px; border-bottom: 1px solid var(--cream-3); }
.knob-group:first-child { margin-top: 0; }
.knob { margin-bottom: 11px; }
.knob label { display: flex; justify-content: space-between; font-size: 11px; color: var(--gray-7); margin-bottom: 5px; }
.knob label b { color: var(--dark-9); font-weight: 600; font-variant-numeric: tabular-nums; }
.knob input[type=range] { width: 100%; accent-color: var(--burgundy-7); margin: 0; }
.knob select {
  width: 100%;
  padding: 6px 8px;
  font: inherit;
  font-size: 12px;
  color: var(--dark-9);
  background: var(--cream-0);
  border: 1px solid var(--cream-4);
  border-radius: 6px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='none' stroke='%234E2B2A' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M1 1l4 4 4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 26px;
}
.knob select:focus { outline: 2px solid var(--burgundy-7); outline-offset: 1px; }
.knobs .row { display: flex; gap: 8px; margin-top: 6px; }
.knobs .row button {
  flex: 1; height: 32px; border-radius: 9px; border: 1px solid var(--cream-4);
  background: var(--cream-1); font-size: 11px; font-weight: 500; cursor: pointer; color: var(--dark-9);
}
.knobs .row button.primary { background: var(--burgundy-9); color: #fff; border-color: var(--burgundy-9); }

@media (max-width: 900px) {
  .knobs, .settings-fab { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .knobs, .settings-fab, .settings-fab svg { transition: none; }
}

/* Final responsive precedence. Keep this last: the homepage accumulated
   legacy component media queries during exploration. */
@media (max-width: 760px) {
  .nav-wrap {
    background:#fff;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  .nav-wrap .nav { min-height:72px;padding:12px 16px;gap:10px }
  .nav-wrap .brand.brand-logo img { width:132px }
  .nav-wrap .nav-links,.nav-wrap .nav-actions>.btn-ghost { display:none }
  .nav-wrap .nav-actions { margin-left:auto;gap:6px }
  .nav-wrap .nav-actions>.btn-primary { display:inline-flex;height:42px;padding:0 16px;white-space:nowrap }
  .nav-wrap .nav-menu-toggle { display:grid }

  .hero-wrap>.hero { grid-template-columns:1fr;padding:48px 20px 54px;gap:36px;min-height:0 }
  .hero-wrap .hero>.text-col { order:1 }
  .hero-wrap .hero>.screen-col { order:2;min-width:0 }
  .hero-wrap .hero h1 { font-size:clamp(48px,14vw,64px);line-height:.96 }
  .hero-wrap .hero-actions { display:grid;grid-template-columns:1fr;gap:10px }
  .hero-wrap .hero-actions .btn { width:100%;height:52px }
  .hero-wrap .hero-stage { min-height:0;padding:0;display:block }
  .hero-wrap .hs-client { position:relative;width:100%;max-width:none;margin:0;transform:none }
  .hero-wrap .hs-a1c,.hero-wrap .hs-cal,.hero-wrap .hs-photo,.hero-wrap .hs-message { display:none!important }

  .alt-feature,.alt-feature.reverse,.alt-feature.wide-screen { grid-template-columns:1fr;padding:64px 20px;gap:34px }
  .alt-feature .text-col,.alt-feature.reverse .text-col { order:1 }
  .alt-feature .screen-col,.alt-feature.reverse .screen-col { order:2;width:100%;overflow:hidden }
  .alt-feature .screen-col>*,.alt-feature.wide-screen .screen-col>* { max-width:100%;transform:none }

  .template-carousel { min-height:500px!important }
  .template-carousel:has(.vitals-slide.is-active) { min-height:720px!important }
  .clinical-template-stage,.flowsheet-stage { height:430px!important;overflow:hidden }
  .vitals-vignettes { min-height:0!important;height:auto!important }
  .vitals-grid { grid-template-columns:1fr!important }

  .pc-stage { display:flex;flex-direction:column }
  .pc-calc { order:1 }
  .pc-side { order:2 }
  .fm-stage { grid-template-columns:1fr;padding-inline:20px }
  .fm-side { position:static }
  .fm-side .cats { display:flex;overflow-x:auto;gap:8px;border:0 }
  .fm-side .cat-btn { flex:0 0 auto;width:auto;min-height:44px;padding:0 16px;border:1px solid var(--cream-4);border-radius:999px }
  .fm-side .cat-btn.active::before { display:none }

  .as-stage { grid-template-columns:1fr }
  .as-card { min-height:0;padding:28px 24px }
  .as-card .as-btn { width:100%;justify-content:center }
  footer .container.footer-split { grid-template-columns:repeat(2,minmax(0,1fr));padding-inline:20px }
  footer .ft-brand { grid-column:1/-1 }
}

@media (max-width:390px) {
  .nav-wrap .brand.brand-logo img { width:120px }
  .nav-wrap .nav-actions>.btn-primary { padding-inline:12px;font-size:13px }
  footer .container.footer-split { grid-template-columns:1fr }
  footer .ft-brand { grid-column:auto }
}
