/* outfit-latin-ext-400-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/outfit-latin-ext-400-normal-5tcqmc2S.woff2) format('woff2'), url(/assets/outfit-latin-ext-400-normal-DHm7mdGe.woff) format('woff');
  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;
}

/* outfit-latin-400-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/assets/outfit-latin-400-normal-BGsTXAXT.woff2) format('woff2'), url(/assets/outfit-latin-400-normal-DMwTpYkH.woff) format('woff');
  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;
}/* outfit-latin-ext-500-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/outfit-latin-ext-500-normal-zeox_O30.woff2) format('woff2'), url(/assets/outfit-latin-ext-500-normal-DrCvqoFD.woff) format('woff');
  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;
}

/* outfit-latin-500-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/outfit-latin-500-normal-DKnIMDSk.woff2) format('woff2'), url(/assets/outfit-latin-500-normal-ClnHRwRh.woff) format('woff');
  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;
}/* outfit-latin-ext-600-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/outfit-latin-ext-600-normal-B85nYjL1.woff2) format('woff2'), url(/assets/outfit-latin-ext-600-normal-CWJcPgd7.woff) format('woff');
  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;
}

/* outfit-latin-600-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/assets/outfit-latin-600-normal-B7SfZ07L.woff2) format('woff2'), url(/assets/outfit-latin-600-normal-BEfTtDA7.woff) format('woff');
  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;
}/* outfit-latin-ext-700-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/assets/outfit-latin-ext-700-normal-CI4iH74K.woff2) format('woff2'), url(/assets/outfit-latin-ext-700-normal-fjS8-Gm7.woff) format('woff');
  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;
}

/* outfit-latin-700-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/assets/outfit-latin-700-normal-Cu9v6i1X.woff2) format('woff2'), url(/assets/outfit-latin-700-normal-D4itBLBr.woff) format('woff');
  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;
}/* outfit-latin-ext-800-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/assets/outfit-latin-ext-800-normal-DRv2ic_2.woff2) format('woff2'), url(/assets/outfit-latin-ext-800-normal-DyhPHUt-.woff) format('woff');
  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;
}

/* outfit-latin-800-normal */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-display: swap;
  font-weight: 800;
  src: url(/assets/outfit-latin-800-normal-CQna6-G7.woff2) format('woff2'), url(/assets/outfit-latin-800-normal-BRHLSPcU.woff) format('woff');
  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;
}/* newsreader-vietnamese-500-normal */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/newsreader-vietnamese-500-normal-CL6a8tp2.woff2) format('woff2'), url(/assets/newsreader-vietnamese-500-normal-BEAbKU8A.woff) format('woff');
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB;
}

/* newsreader-latin-ext-500-normal */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/newsreader-latin-ext-500-normal-BNHmvKvI.woff2) format('woff2'), url(/assets/newsreader-latin-ext-500-normal-CZruMFou.woff) format('woff');
  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;
}

/* newsreader-latin-500-normal */
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url(/assets/newsreader-latin-500-normal-B66TYsaK.woff2) format('woff2'), url(/assets/newsreader-latin-500-normal-DFwuUcdu.woff) format('woff');
  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;
}/* Theme only. Original document widths, form geometry, evidence grids,
   sticky sections, scroll timing, phone illustrations and order are intact. */
.bento-theme-public {
  background: var(--bg-raised, #ffffff) !important;
  color: var(--text-primary, #172820) !important;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif) !important;
}
.bento-theme-public :is(article, h1, h2, h3) {
  color: var(--text-primary, #172820) !important;
}
.bento-theme-public h1 {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: 400 !important;
}
.bento-theme-public :is(h2, h3, input, textarea, select, button) {
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif) !important;
}
.bento-theme-public a { color: var(--accent, #285e48) !important; }
.bento-theme-public :is(input, textarea, select) {
  background: var(--bg-card, #ffffff) !important;
  color: var(--text-primary, #172820) !important;
}

.bento-theme-auth {
  color: var(--text-primary, #172820);
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
}
.bento-theme-auth :is(input, textarea, select, .card) {
  background: var(--bg-card, #ffffff) !important;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.bento-theme-auth :is(h1, h2) {
  font-family: Georgia, 'Times New Roman', serif !important;
  font-weight: 400 !important;
}
.bento-theme-provider .card {
  border-color: var(--border, rgba(37, 74, 54, .16));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 12px 32px rgba(36, 66, 50, .09) !important;
}
.bento-theme-provider .card > div:first-child {
  background: var(--accent, #285e48) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 16px rgba(37, 74, 54, .14) !important;
}
.patient-auth-root.bento-theme-auth .patient-auth-hero {
  background: rgba(27, 57, 39, .91) !important;
  border-color: rgba(211, 232, 217, .24);
  -webkit-backdrop-filter: var(--glass-blur, blur(22px) saturate(145%));
  backdrop-filter: var(--glass-blur, blur(22px) saturate(145%));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .1);
}
.patient-auth-root.bento-theme-auth .patient-auth-hero > div[style*="radial-gradient"] {
  background: none !important;
}
.patient-auth-root.bento-theme-auth > div:not(.patient-auth-hero) {
  background: var(--bg-card, #ffffff) !important;
}

/* Evidence palette stays light and stable even when the legacy evidence CSS
   follows an OS dark preference. No visibility/position/progress overrides. */
body .why-v2-root.bento-theme-evidence,
body .why-v2-root.bento-theme-evidence .roadmap-section {
  --bg: var(--bg-base, #e3ebe5);
  --bg-surface: #ffffff;
  --bg-deep: #172b21;
  --text-primary: #172820;
  --text-secondary: #53665c;
  --text-tertiary: #617368;
  --text-muted: #53665c;
  --accent: #285e48;
  --accent-soft: rgba(40, 94, 72, .12);
  --accent-strong: #204d3b;
  --accent-glow: rgba(40, 94, 72, .14);
  --success: #0f6e56;
  --info: #185fa5;
  --danger: #a32d2d;
  --border: rgba(37, 74, 54, .16);
  --border-strong: rgba(37, 74, 54, .28);
  --on-accent: #f3f8f4;
  --on-accent-muted: #d1e3d7;
  --bg-deep-text: #f3f8f4;
  --bg-deep-text-muted: #c8d8cd;
  --bg-deep-text-accent: #d1e3d7;
  --invasive: #805824;
  --invasive-bg: #f5efe4;
  --no-mort: #9b3c39;
  --no-mort-bg: #f7ecea;
  --neutral: #617368;
  --neutral-bg: #edf2ee;
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
}
body .why-v2-root.bento-theme-evidence .npled-section {
  --accent: #285e48;
  --accent-strong: #204d3b;
  --accent-soft: rgba(40, 94, 72, .12);
  --accent-glow: rgba(40, 94, 72, .14);
  --map-canvas: #edf3ed;
  --land: #b4cab9;
  --land-stroke: #6a8c73;
  --land-shadow: rgba(37, 74, 54, .08);
  --water-grid: rgba(37, 74, 54, .045);
}
body .why-v2-root.bento-theme-evidence :is(.md-title, .cc-title, .sv-title, .section-title, .fp-funnel-title) {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
}
body .why-v2-root.bento-theme-evidence :is(.md-card, .hero-table, .study-card, .conclusion, .sv-controls, .sv-panel) {
  background: #ffffff;
  border-color: var(--border);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: 0 4px 18px rgba(36, 66, 50, .055);
}
body .why-v2-root.bento-theme-evidence :is(.cc-col-head, .roadmap-rail) {
  background: var(--glass-bg, rgba(248, 252, 249, .64));
  border-color: var(--glass-border, rgba(255, 255, 255, .76));
  -webkit-backdrop-filter: var(--glass-blur, blur(22px) saturate(145%));
  backdrop-filter: var(--glass-blur, blur(22px) saturate(145%));
}
body .why-root.bento-theme-evidence-footer {
  --bg: var(--bg-base, #e3ebe5);
  --text: var(--text-primary, #172820);
  --muted: var(--text-secondary, #53665c);
  --accent: var(--primary, #285e48);
  --border: rgba(37, 74, 54, .16);
  color: var(--text-primary, #172820);
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
}

@media (prefers-reduced-transparency: reduce) {
  body .why-v2-root.bento-theme-evidence :is(.cc-col-head, .roadmap-rail) {
    background: #ffffff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .patient-auth-root.bento-theme-auth .patient-auth-hero {
    background: #1b3927 !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
/*
 * App.css — split into per-route modules for maintainability.
 *
 * Before: 4,261 lines in a single file.
 * After:  6 focused files under src/styles/.
 *
 * This file re-imports them so existing import paths work unchanged.
 * Over time, individual route components can import their own module
 * directly (e.g., LandingPage imports landing.css) for per-route
 * CSS loading, but that's a separate migration.
 */

/* Fonts loaded via index.html <link> for faster preconnect */

:root {
  /* ─── Global Light Editorial Palette ─── */
  --bg-base: #F7F6F3;
  --bg-raised: #ffffff;
  --bg-surface: #f0eeeb;
  --bg-card: #ffffff;
  --bg-input: #f0eeeb;
  --bg-hover: #e8e6e2;

  /* Glassmorphism — light glass */
  --glass-blur: blur(20px);
  --glass-border: rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.7);

  /* Borders */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(11, 122, 95, 0.18);

  /* Text */
  --text-primary: #1a1d2e;
  --text-secondary: #5a5f72;
  --text-muted: #8c91a3;

  /* Accent — Clinical Teal */
  --accent: #0B7A5F;
  --accent-dim: rgba(11, 122, 95, 0.07);
  --accent-hover: #096B53;
  --accent-glow: rgba(11, 122, 95, 0.12);

  /* Status */
  --success: #0d9668;
  --success-dim: rgba(13, 150, 104, 0.07);
  --warning: #d97706;
  --warning-dim: rgba(217, 119, 6, 0.07);
  --danger: #dc2626;
  --danger-dim: rgba(220, 38, 38, 0.07);
  --purple: #7c3aed;
  --purple-dim: rgba(124, 58, 237, 0.07);

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows — light theme */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --glow-accent: none;

  /* Fonts */
  --font-heading: 'Outfit', 'Google Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Outfit', 'Google Sans Text', 'Helvetica Neue', sans-serif;

  /* Aliases for backward compat */
  --primary: var(--accent);
  --bg-main: var(--bg-base);
  --bg-sidebar: var(--bg-raised);
  --bg-muted: var(--bg-hover);
  --text-main: var(--text-primary);
  --border-color: var(--border);
  --primary-light: var(--accent-dim);
  --success-light: var(--success-dim);
  --warning-light: var(--warning-dim);
  --danger-light: var(--danger-dim);
  --radius-card: var(--radius-lg);
  --radius-input: var(--radius-md);

  color-scheme: light;
}

/* Subtle noise texture for depth */

/* Thin decorative line across top */

/* Hero typography — confident, dark, refined */

@keyframes lightSweep {
  0% { background-position: 100% 0; }
  50% { background-position: 0% 0; }
  100% { background-position: 100% 0; }
}

/* CTA buttons — crisp, elevated, medical-grade */

/* Orbs — extremely subtle warm ambient glow */

/* Badge inner elements — override inline colors */

/* Separator line in badge */

/* Indicator dot */

/* Tooltip — clean white with refined shadow */

/* Core surfaces */

/* Cards — force white with border shadow */

/* All divs with dark inline backgrounds — use a universal subtle override */

/* Inputs */

/* Tables */

/* Log form */

/* Daily log modal */

/* Scrollbar */

/* Buttons */

/* ─── Size Scale — zoom scales everything (px, borders, spacing) ─── */

[data-size="small"] #root { zoom: 0.88; }

[data-size="medium"] #root { zoom: 1; }

[data-size="large"] #root { zoom: 1.15; }

/* ─── RESET ─── */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100vw;
}

#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── APP SHELL ─── */

.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-viewport {
  flex: 1;
  overflow-y: auto;
  padding: 0 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ─── TOP BAR — floating pill capsule host band ─── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  background: #f4f4f4;
  padding: 14px 20px;
  /* viewport-fit=cover lets content extend into the top safe area; keep the
     sticky bar clear of the notch in installed-PWA/standalone mode. env() is
     0 on non-notched devices, so this is a no-op there. */
  padding-top: max(14px, env(safe-area-inset-top));
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 220ms ease;
}

/* Floating pill capsule: brand + nav + cta.
   Visibly centered in the host band — NOT flex: 1. The capsule
   takes its content width up to 1040px max; utilities float right
   via absolute positioning so they don't push the capsule off-center.
   Width raised from 920→1040 so longer translated tab labels (es: "Panel
   del Médico", ht: "Pòtal Pasyan…") still fit alongside the demo CTA. */

.topbar-capsule {
  width: 100%;
  max-width: 1040px;
  height: 62px;
  display: flex;
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 0 8px 0 16px;
  gap: 4px;
  /* min-width:0 lets the centered .topbar-nav shrink instead of pushing
     the CTA outside the capsule when translated labels are longer. */
  min-width: 0;
}

/* Right zone inside the capsule (CTA + signout). flex-shrink:0 keeps the
   CTA at its intrinsic width so the centered nav is what gives ground when
   space is tight. */

.topbar-capsule-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
  padding-right: 4px;
}

/* Utilities cluster: floats right of the centered capsule via
   absolute positioning so it doesn't push the capsule off-center.
   On narrow screens (≤768px) the mobile drawer hides this cluster. */

.topbar-utilities {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  min-width: 0;
  flex-shrink: 0;
}

.topbar-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  /* min-width:0 + overflow:hidden lets the nav shrink instead of pushing the
     CTA out of the capsule when long translated labels (es/ht/ko) inflate
     tab widths. Individual tabs ellipsize via .topbar-tab > span below. */
  min-width: 0;
  overflow: hidden;
}

/* scrolled: subtle capsule-shadow bump — host band stays #f4f4f4 */

.topbar--scrolled .topbar-capsule {
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.10);
}

/* Back button — floats on the left edge of the topbar host band,
   OUTSIDE the centered capsule. Sibling of .topbar-capsule (not a
   child) so it doesn't consume the capsule's 920px width budget,
   which would push the Try Demo CTA past the capsule's right edge
   on non-landing routes. */

.topbar-back {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #ffffff;
  color: #555;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  z-index: 1;
}

.topbar-back:hover {
  background: rgba(11, 122, 95, 0.08);
  border-color: var(--accent);
  color: var(--accent);
}

.topbar-left {
  display: flex;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.topbar-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-brand-text {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  /* The brand is two long tokens ("Piyush's" + "GDMTcare"); never let it
     wrap inside the fixed-height pill. nowrap + ellipsis (with min-width:0
     on the flex ancestors) keeps it on one line and degrades gracefully
     only on extreme-narrow viewports instead of breaking the capsule. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  margin: 0 20px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.topbar-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #5a5f72;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  /* Allow tabs to shrink and ellipsize when translated labels push the row
     past the capsule width. min-width:0 is required for the inner span's
     text-overflow:ellipsis to take effect. */
  min-width: 0;
  flex-shrink: 1;
  transition:
    background 220ms cubic-bezier(0.4, 0, 0.2, 1),
    color 220ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 220ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-tab > span {
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.topbar-tab svg {
  flex-shrink: 0;
  opacity: 0.72;
  transition: opacity 220ms cubic-bezier(0.4, 0, 0.2, 1),
    color 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover: visibly teal-tinted background + AA-darkened text + tiny zoom.
   Color upgrade per user feedback ("not just dull grey"); contrast
   verified by a11y review at AA 6.56:1. */

.topbar-tab:hover {
  background: linear-gradient(180deg, rgba(15, 100, 112, 0.10) 0%, rgba(15, 100, 112, 0.22) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    inset 0 -1px 0 rgba(15, 100, 112, 0.10),
    0 2px 8px rgba(11, 122, 95, 0.10);
  color: #0B5849;
  transform: scale(1.04);
}

.topbar-tab:hover svg {
  opacity: 1;
  color: #0B5849;
}

/* Focus ring: 3px + inner white halo so it's distinct on tinted pills.
   A11y review: 2px outline gets lost when the pill itself is teal-tinted. */

.topbar-tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px #fff;
}

/* Active tab — lighter tint than hover (so hover reads more colored
   per user feedback). Rail + weight + dark text differentiate active.
   Contrast verified by a11y review at AA 9.87:1. */

.topbar-tab.active {
  background: linear-gradient(180deg, rgba(15, 100, 112, 0.08) 0%, rgba(15, 100, 112, 0.20) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(15, 100, 112, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 3px 10px rgba(11, 122, 95, 0.14);
  color: #064234;
  font-weight: 700;
}

.topbar-tab.active svg {
  opacity: 1;
  color: #064234;
}

/* Active + hover: matches hover bg (0.16) so the zoom + color shift
   feels symmetric with non-active tabs. Text stays #064234 for AA on
   the deeper fill (verified 8.95:1). */

.topbar-tab.active:hover {
  background: linear-gradient(180deg, rgba(15, 100, 112, 0.12) 0%, rgba(15, 100, 112, 0.26) 100%);
  box-shadow:
    inset 0 0 0 1px rgba(15, 100, 112, 0.30),
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 4px 14px rgba(11, 122, 95, 0.18);
  transform: scale(1.04);
}

/* Accent rail under active tab — refined to fit inside capsule */

.topbar-tab.active::after {
  content: '';
  position: absolute;
  left: 28%;
  right: 28%;
  bottom: -14px;
  height: 2px;
  border-radius: 1px;
  background: #0B7A5F;
  opacity: 0.7;
  animation: topbarRailIn 220ms ease-out;
}

@keyframes topbarRailIn {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 0.7; }
}

.topbar-signout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.topbar-signout:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.04);
}

/* ─── Primary Demo CTA in topbar (solid teal pill) ─── */

.topbar-demo-wrap {
  display: flex;
  align-items: center;
  margin-right: 2px;
}

.nav-demo-cta {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(
    180deg,
    #0F7E68 0%,
    var(--accent) 55%,
    #095943 100%
  );
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.012em;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    background 220ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 6px 18px rgba(11, 122, 95, 0.28),
    0 1px 2px rgba(0, 0, 0, 0.06);
}

.nav-demo-cta > * {
  position: relative;
  z-index: 2;
}

/* Hover: bg-darken only.
   A11y review removed the outer halo here — users with low vision
   conflate it with the :focus-visible ring. The darker teal alone is
   enough hover signal; the ring is reserved for keyboard focus. */

.nav-demo-cta:hover {
  background: #075c47;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.18) inset,
    0 8px 22px rgba(11, 122, 95, 0.32);
}

/* Focus ring reserved for keyboard navigation, distinct from hover */

.nav-demo-cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.nav-demo-cta:hover svg {
  transform: translateX(3px);
}

.nav-demo-cta svg {
  transition: transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-demo-cta:active {
  background: #064f3d;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-demo-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.nav-demo-cta--compact {
  padding: 7px 14px;
  font-size: 12px;
}

/* ─── Hamburger button (mobile only) ─── */

.topbar-hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.topbar-hamburger:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.18);
}

.topbar-hamburger:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── Skip link (WCAG 2.4.1 Bypass Blocks) ─── */

.skip-link {
  position: absolute;
  left: 8px;
  top: -64px;
  z-index: 500;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.16s ease;
}

.skip-link:focus {
  top: 8px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Skip-target sits below the sticky topbar when focused. tabindex=-1 makes it
   focusable for the skip-link; suppress the outline so jumping doesn't draw a
   full-width box around all content (focus then proceeds to the first control). */

#main-content { scroll-margin-top: 84px; }

#main-content:focus { outline: none; }

/* Settings gear: clear the 44px touch target on phones (inline width:34
   needs !important to override). */

@media (pointer: coarse) {
  .topbar-gear { width: 44px !important; height: 44px !important; }
}

/* ─── Mobile nav drawer ─── */

/* Keyframes for CSS-only drawer open animation (replaces framer-motion). */

@keyframes nav-drawer-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes nav-drawer-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer-backdrop--animate,
  .nav-drawer--animate {
    animation: none !important;
  }
}

.nav-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 36, 0.42);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 600;
}

.nav-drawer-backdrop--animate {
  animation: nav-drawer-backdrop-in 0.18s ease both;
}

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(86vw, 320px);
  background: var(--bg-raised);
  z-index: 700;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12);
  border-left: 1px solid var(--border);
}

.nav-drawer--animate {
  animation: nav-drawer-slide-in 0.26s cubic-bezier(0.32, 0.72, 0, 1) both;
}

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.nav-drawer__brand {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.nav-drawer__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-drawer__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 4px;
  gap: 2px;
}

.nav-drawer__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-drawer__item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-drawer__item.is-active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.nav-drawer__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-muted);
  flex-shrink: 0;
}

.nav-drawer__item.is-active .nav-drawer__icon {
  background: var(--accent);
  color: #fff;
}

.nav-drawer__cta-wrap {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.nav-drawer__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.nav-drawer__cta:hover {
  background: var(--accent-hover, #096b53);
  transform: translateY(-1px);
}

/* Language picker — lives in the drawer on mobile (hidden in the topbar
   below 768px). Two-column grid of locale buttons. */

.nav-drawer__lang {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.nav-drawer__lang-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.nav-drawer__lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.nav-drawer__lang-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.nav-drawer__lang-btn:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
  border-color: rgba(0, 0, 0, 0.18);
}

.nav-drawer__lang-btn.is-active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
}

.nav-drawer__lang-flag {
  font-size: 16px;
  line-height: 1;
}

.nav-drawer__lang-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-drawer__footer {
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.nav-drawer__signout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.nav-drawer__signout:hover {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.04);
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — screens < 768px
   ═══════════════════════════════════════════════════════════════ */

/* ─── Narrow desktop (768–1023px): reduce capsule padding, tighten tabs ─── */

@media (max-width: 1023px) and (min-width: 769px) {
  .topbar {
    padding: 10px 14px;
    gap: 8px;
  }
  .topbar-capsule {
    padding: 0 6px 0 12px;
  }
  .topbar-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ─── Reduced-motion: kill all transitions/animations across the topbar ─── */

@media (prefers-reduced-motion: reduce) {
  .topbar,
  .topbar-capsule,
  .topbar-tab,
  .topbar-tab svg,
  .nav-demo-cta,
  .nav-demo-cta svg {
    transition: none !important;
  }
  .topbar-tab:hover,
  .topbar-tab.active:hover {
    transform: none !important;
  }
  .topbar-tab.active::after {
    animation: none !important;
  }
}

/* ─── Narrow desktop / tablet (769–1199px): tighten tab padding so the
   capsule content fits inside its 920px cap. Without this, the new
   9/18 padding pushes total content to ~934px and tabs would crowd or
   wrap. Layout-fit review flagged this; fallback adds horizontal-only
   padding compression while keeping vertical breathing room. ─── */

@media (min-width: 769px) and (max-width: 1199px) {
  .topbar-tab {
    padding-left: 12px;
    padding-right: 12px;
  }
}

/* ─── Mobile topbar: hamburger replaces the inline nav ─── */

@media (max-width: 768px) {
  .topbar {
    padding: 8px 10px;
    padding-top: max(8px, env(safe-area-inset-top));
    gap: 6px;
    min-height: 56px;
  }
  /* Collapse the capsule to just brand, hide nav and CTA inside it */
  .topbar-capsule {
    height: 40px;
    padding: 0 10px;
    flex: 1;
    gap: 0;
    max-width: none;
    margin: 0;
  }
  .topbar-brand-text {
    font-size: 15px;
  }
  .topbar-brand-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  /* Let the brand give ground (then ellipsize) instead of colliding with
     the utilities — base .topbar-left is flex-shrink:0 for the desktop
     centered layout, which must be relaxed here. */
  .topbar-left { flex-shrink: 1; min-width: 0; }
  .topbar-brand { min-width: 0; }
  /* Take the utilities cluster OUT of absolute positioning on mobile so
     flexbox reserves its width and the pill shrinks beside it — no magic
     padding, no overlap. Pill (flex:1) + icon cluster now sit in one row. */
  .topbar-utilities {
    position: static;
    transform: none;
    right: auto;
    top: auto;
    margin-left: 8px;
    flex-shrink: 0;
  }
  /* Thin the cluster: language picker moves into the drawer; the AI status
     pill collapses to its dot (label hidden) so the full brand name fits. */
  .topbar-lang-desktop { display: none; }
  .topbar-ai-label { display: none; }
  /* Desktop nav + signout + demo CTA hidden — all live in the drawer */
  .topbar-nav { display: none; }
  .topbar-signout { display: none; }
  .topbar-demo-wrap { display: none; }
  .topbar-capsule-right { display: none; }
  /* Floating back button hidden on mobile — capsule is full-width here
     so the absolute back button would overlap; drawer covers back nav. */
  .topbar-back { display: none; }
  /* Show the hamburger trigger */
  .topbar-hamburger { display: inline-flex; }
  .topbar-utilities { gap: 4px; }
}

/* Very narrow phones (≤360px, e.g. iPhone SE): also drop the AI status dot —
   the least-essential utility — so the full "Piyush's GDMTcare" stays on one
   line at full size instead of ellipsizing. AI status is still available on
   wider phones and in the desktop bar. */

@media (max-width: 360px) {
  /* !important overrides the inline display:flex on the AIStatusDot root. */
  .topbar-ai { display: none !important; }
}

/* ─── App viewport: reduce padding on mobile ─── */

@media (max-width: 768px) {
  .app-viewport {
    padding: 0 12px 40px;
  }
}

@media (max-width: 480px) {
  .app-viewport {
    padding: 0 8px 32px;
  }
}

/* ─── Cards: full-bleed on small screens ─── */

@media (max-width: 480px) {
  .card {
    border-radius: 12px;
  }
}

/* ─── Patient tabs: horizontal scroll on mobile ─── */

@media (max-width: 768px) {
  .patient-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }
  .patient-tabs::-webkit-scrollbar { display: none; }
  .patient-tab {
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
}

/* ─── Dash subtabs: scroll on mobile ─── */

@media (max-width: 768px) {
  .dash-subtabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-subtabs::-webkit-scrollbar { display: none; }
  .dash-subtab {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
}

/* ─── Admin sidebar: collapsible on mobile ─── */

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column !important;
  }
  .admin-sidebar {
    position: static !important;
    width: 100% !important;
    max-height: none !important;
    overflow: visible !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 8px !important;
  }
  .admin-sidebar nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
  }
  .admin-sidebar nav button {
    font-size: 11px !important;
    padding: 6px 10px !important;
  }
  .admin-sidebar nav .sidebar-section-label {
    display: none !important;
  }
  .admin-main {
    padding: 12px !important;
  }
}

/* ─── Forms: full width on mobile ─── */

@media (max-width: 768px) {
  .input-control {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
  }
  select.input-control {
    font-size: 16px !important;
  }
}

/* ─── General grid fixes ─── */

@media (max-width: 640px) {
  [style*="grid-template-columns: repeat(auto-fill"] {
    grid-template-columns: 1fr !important;
  }
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Login page: responsive ─── */

@media (max-width: 480px) {
  .login-card {
    padding: 32px 20px !important;
  }
}

/* ─── Typography scale on mobile ─── */

@media (max-width: 480px) {
  h1 { font-size: 24px !important; }
  h2 { font-size: 20px !important; }
  h3 { font-size: 16px !important; }
}

/* ─── LANDING — Antigravity style ─── */

/* Landing wraps .landing + .demo-section; break out of .app-viewport padding */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.5;
  }
}

/* ─── PAGE SECTION HEADER ─── */

.section-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.section-sub {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ─── TAG / PILL ─── */

.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 20px;
  transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  animation: fadeUp 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) both;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin: 0;
}

/* ─── HERO BANNER ─── */

.hero-banner {
  background: radial-gradient(120% 120% at 50% 10%, rgba(99, 130, 255, 0.12) 0%, rgba(10, 14, 26, 0.9) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 60px 52px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 80px rgba(99, 130, 255, 0.05), var(--shadow-md);
  backdrop-filter: var(--glass-blur);
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -150px;
  right: -150px;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 130, 255, 0.15) 0%, transparent 60%);
  filter: blur(40px);
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -150px;
  left: -100px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.1) 0%, transparent 60%);
  filter: blur(40px);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin: 0 0 14px;
  line-height: 1.1;
}

/* ─── INPUTS ─── */

.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.input-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all 0.18s;
  appearance: none;
}

.input-control:focus {
  border-color: var(--accent);
  background: var(--bg-hover);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.input-control::placeholder {
  color: var(--text-muted);
}

select.input-control {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636d8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}

select.input-control option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

/* ─── BUTTONS ─── */

.btn-primary {
  width: 100%;
  padding: 13px 24px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  padding: 9px 18px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* ─── GRIDS ─── */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* ─── TYPOGRAPHY ─── */

.text-p {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 10px;
}

.value-large {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ─── SCROLLBAR ─── */

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ─── ANIMATIONS ─── */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.tag-blue {
  background: var(--accent-dim);
  color: var(--accent);
}

.tag-green {
  background: var(--success-dim);
  color: var(--success);
}

.tag-yellow {
  background: var(--warning-dim);
  color: var(--warning);
}

.tag-red {
  background: var(--danger-dim);
  color: var(--danger);
}

.tag-purple {
  background: var(--purple-dim);
  color: var(--purple);
}

/* ─── ADMIN LAYOUT (now sub-tabs inside MainLayout) ─── */

.table-header {
  display: grid;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  gap: 12px;
}

.table-row {
  display: grid;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.table-row:last-child {
  border-bottom: none;
}

.table-cell-mobile-label {
  display: none;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ─── UTILITIES ─── */

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.gap-sm {
  gap: 8px;
}

.gap-md {
  gap: 16px;
}

.gap-lg {
  gap: 24px;
}

/* ─── GLASS UTILITY ─── */

.glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
}

/* ─── TOAST ─── */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: fadeUp 0.2s ease;
}

.toast-success {
  background: var(--success-dim);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: var(--success);
}

.toast-error {
  background: var(--danger-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--danger);
}

/* ─── BADGE / PILL STATUS ─── */

.score-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ─── SQUARE ICON BUTTON ─── */

.btn-square {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.btn-square:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ─── TEXT BUTTON ─── */

.btn-text {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.btn-text:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ─── PATIENT PORTAL — DOSE PROGRESS ─── */

.dose-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dose-bar-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dose-bar-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  overflow: hidden;
}

.dose-bar-fill {
  height: 100%;
  border-radius: 10px;
}

/* ─── PATIENT PORTAL — PILLAR GRID ─── */

.pillar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pillar-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.log-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  margin-bottom: 8px;
}

.log-helper {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.5;
}

.log-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.log-form-grid-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.log-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.log-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.log-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

.log-input:focus {
  border-color: var(--accent);
}

.log-input::placeholder {
  color: var(--text-muted);
}

select.log-input {
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23636d8c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px;
  padding-right: 36px;
}

select.log-input option {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.log-field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.log-target-hint {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.log-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.log-save-btn {
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  background: #e8eaed;
  color: #121317;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.log-save-btn:hover {
  background: #fff;
}

.log-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.log-saved {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success);
}

/* Medication pillar log grid */

.pillar-log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pillar-log-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.pillar-log-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* Checkbox grid */

.log-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.log-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.12s;
}

.log-checkbox:hover {
  background: rgba(255, 255, 255, 0.04);
}

.log-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.card { background: var(--bg-card); border-color: var(--border); box-shadow: var(--shadow-sm); }

/* Inputs */

.input-control { background: var(--bg-input); color: var(--text-primary); border-color: var(--border); }

select option { background: var(--bg-raised); color: var(--text-primary); }

/* Settings panel and modals */

button { color: inherit; }

/* Admin sidebar text fix */

/* Route rails own their materials; do not force every aside opaque. */

footer { border-color: var(--border) !important; color: var(--text-muted) !important; }

/* Patient portal tabs */

.table-header { background: var(--bg-surface) !important; }

.table-row { border-color: var(--border) !important; }

/* Dash subtabs */

.dash-subtab { color: var(--text-muted); }

.dash-subtab.active { background: var(--accent-dim); color: var(--accent); }

.dash-subtabs { background: var(--bg-surface); border-color: var(--border); }

/* Log inputs */

.log-input { background: var(--bg-input); color: var(--text-primary); border-color: var(--border); }

.log-save-btn { background: var(--accent); color: #fff; }

.log-save-btn:hover { background: var(--accent-hover); }

.pillar-log-card { background: var(--bg-surface); border-color: var(--border); }

.dose-bar-track { background: rgba(0,0,0,0.06); }

/* Landing-route CSS animation library (replaces framer-motion on entry chunk). */

/* ════════════════════════════════════════════════════════════════════════════
   Landing-route animation library — pure CSS replacement for framer-motion.
   Replaces the ~40KB gzip vendor-motion chunk on the landing entry path.

   Provides:
     - .fade-in            : opacity 0 → 1
     - .slide-up           : translateY(16px) → 0 + fade
     - .slide-up-stagger   : applies slide-up + per-child delay (1..12)
     - .scroll-reveal      : starts hidden, animates when `.is-revealed`
                             is added by useScrollReveal()
     - .hover-lift         : transform on hover (replaces whileHover)
     - .cta-bounce         : pulsing call-to-action emphasis

   prefers-reduced-motion: reduce — all keyframe + transition motion is
   disabled at the bottom of this file so animations never block users
   who opt out.
   ════════════════════════════════════════════════════════════════════════════ */

/* ─── Keyframes ───────────────────────────────────────────────────────────── */

@keyframes ll-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes ll-slide-up {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ll-slide-up-sm {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ll-slide-up-lg {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ll-slide-in-left {
  from { opacity: 0; transform: translate3d(-8px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ll-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -8px, 0); }
}

@keyframes ll-heartbeat {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

@keyframes ll-bento-fade-in {
  from { opacity: 0; transform: translate3d(0, 16px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes ll-watch-face-in {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes ll-progress-bar {
  from { width: 0%; }
  to   { width: 100%; }
}

@keyframes ll-ecg-draw {
  0%   { stroke-dashoffset: 200; opacity: 0; }
  20%  { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes ll-ring-1 {
  from { stroke-dashoffset: 251; }
  to   { stroke-dashoffset: 50; }
}

@keyframes ll-ring-2 {
  from { stroke-dashoffset: 176; }
  to   { stroke-dashoffset: 40; }
}

/* ─── Always-on-mount animations ─────────────────────────────────────────── */

.fade-in {
  animation: ll-fade-in 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-up {
  animation: ll-slide-up 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-up-sm {
  animation: ll-slide-up-sm 350ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-up-lg {
  animation: ll-slide-up-lg 600ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.slide-in-left {
  animation: ll-slide-in-left 450ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger children with `.slide-up-stagger` parent — replaces framer-motion's
   `staggerChildren`. Each direct child fades up sequentially. Bento-grid in
   the landing page uses this to introduce 9-12 tiles. */

.slide-up-stagger > * {
  animation: ll-bento-fade-in 550ms cubic-bezier(0.16, 1, 0.3, 1) both;
  /* container fade-in: itself starts at opacity 0 and fades in 100ms before
     its children's first frame, mirroring framer's `delayChildren: 0.1`. */
}

.slide-up-stagger > *:nth-child(1)  { animation-delay: 100ms; }

.slide-up-stagger > *:nth-child(2)  { animation-delay: 170ms; }

.slide-up-stagger > *:nth-child(3)  { animation-delay: 240ms; }

.slide-up-stagger > *:nth-child(4)  { animation-delay: 310ms; }

.slide-up-stagger > *:nth-child(5)  { animation-delay: 380ms; }

.slide-up-stagger > *:nth-child(6)  { animation-delay: 450ms; }

.slide-up-stagger > *:nth-child(7)  { animation-delay: 520ms; }

.slide-up-stagger > *:nth-child(8)  { animation-delay: 590ms; }

.slide-up-stagger > *:nth-child(9)  { animation-delay: 660ms; }

.slide-up-stagger > *:nth-child(10) { animation-delay: 730ms; }

.slide-up-stagger > *:nth-child(11) { animation-delay: 800ms; }

.slide-up-stagger > *:nth-child(12) { animation-delay: 870ms; }

/* ─── Scroll-triggered reveal ─────────────────────────────────────────────
   Replaces framer-motion's `whileInView` API. Pair every `.scroll-reveal`
   element with `data-reveal` so useScrollReveal() can wire an
   IntersectionObserver to it. The class toggles to `.is-revealed` once
   the element scrolls into the viewport, and the transition plays. */

.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.scroll-reveal.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Variant: slide in from the left edge (used by category labels). */

.scroll-reveal-left {
  opacity: 0;
  transform: translate3d(-8px, 0, 0);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-left.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Variant: larger slide for the regulatory architecture card. */

.scroll-reveal-lg {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-lg.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* Per-child stagger inside a revealed container. Use `.scroll-reveal` on the
   parent and `.scroll-reveal-stagger > *` on the child collection — children
   inherit the parent's reveal trigger but each has its own `transition-delay`. */

.scroll-reveal-stagger > * {
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: opacity 500ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal-stagger.is-revealed > *:nth-child(1)  { opacity: 1; transform: none; transition-delay: 0ms; }

.scroll-reveal-stagger.is-revealed > *:nth-child(2)  { opacity: 1; transform: none; transition-delay: 80ms; }

.scroll-reveal-stagger.is-revealed > *:nth-child(3)  { opacity: 1; transform: none; transition-delay: 160ms; }

.scroll-reveal-stagger.is-revealed > *:nth-child(4)  { opacity: 1; transform: none; transition-delay: 240ms; }

.scroll-reveal-stagger.is-revealed > *:nth-child(5)  { opacity: 1; transform: none; transition-delay: 320ms; }

.scroll-reveal-stagger.is-revealed > *:nth-child(6)  { opacity: 1; transform: none; transition-delay: 400ms; }

/* ─── Hover state (replaces framer-motion's `whileHover`) ─────────────────── */

.hover-lift {
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-lift:hover {
  transform: translate3d(0, -2px, 0);
}

.cta-bounce:hover {
  animation: ll-fade-in 220ms ease-out both;
}

/* ─── Cross-fade slide deck (replaces AnimatePresence in ClinicalParadoxBento) ── */

/* The slide stack uses position: absolute to layer panels. The currently
   visible panel gets `.cp-slide-active`, prior panels get `.cp-slide-exit`
   for a single tick (we just toggle on key change to retrigger animation). */

.cp-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  /* Animation runs once when the slide mounts (key change forces remount). */
  animation: ll-slide-up-sm 350ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: none;
}

.cp-slide.cp-slide-active {
  pointer-events: auto;
}

/* Sub element delayed reveal inside an active slide — used for the headline
   sub-line (delay 600ms) and body (delay 1000ms). */

.cp-sub  { animation: ll-slide-up-sm 400ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both; }

.cp-body { animation: ll-slide-up-sm 400ms cubic-bezier(0.16, 1, 0.3, 1) 1000ms both; }

/* Slide progress bar (replaces motion.div with width 0% → 100%) — duration
   set inline via CSS variable to match the SLIDE_MS constant. */

.cp-progress-fill {
  position: absolute;
  inset: 0;
  background: var(--cp-progress-color, #b91c1c);
  width: 0%;
  animation: ll-progress-bar var(--cp-progress-duration, 12s) linear forwards;
}

/* ─── AppleWatch face transitions (replaces AnimatePresence in LandingShared) ── */

.aw-face {
  /* New face mounts each time React re-renders with a different `key` — the
     keyframe plays once on mount and we don't need a separate exit phase. */
  animation: ll-watch-face-in 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 4px 2px;
}

.aw-float {
  animation: ll-float 4s ease-in-out infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aw-heart {
  animation: ll-heartbeat 800ms ease-in-out infinite;
  display: inline-block;
  line-height: 0;
}

.aw-ecg {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: ll-ecg-draw 2s linear infinite;
}

.aw-ring-outer {
  stroke-dasharray: 251;
  stroke-dashoffset: 251;
  animation: ll-ring-1 2s ease-out forwards;
}

.aw-ring-inner {
  stroke-dasharray: 176;
  stroke-dashoffset: 176;
  animation: ll-ring-2 2s ease-out 0.5s forwards;
}

/* ─── prefers-reduced-motion: reduce ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .slide-up,
  .slide-up-sm,
  .slide-up-lg,
  .slide-in-left,
  .slide-up-stagger > *,
  .scroll-reveal,
  .scroll-reveal-left,
  .scroll-reveal-lg,
  .scroll-reveal-stagger > *,
  .cp-slide,
  .cp-sub,
  .cp-body,
  .aw-face,
  .aw-float,
  .aw-heart,
  .aw-ecg,
  .aw-ring-outer,
  .aw-ring-inner,
  .cp-progress-fill {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }

  .hover-lift {
    transition: none !important;
  }
  .hover-lift:hover {
    transform: none !important;
  }
}

.landing-wrap {
  margin: 0 -40px -80px;
  padding: 0;
}

.landing {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  overflow: hidden;
  background: var(--bg-base);
}

.landing-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.landing-orb-ai-1 {
  width: 400px;
  height: 200px;
  top: 10%;
  left: 5%;
  background: radial-gradient(ellipse,
    rgba(99, 130, 255, 0.28) 0%,
    rgba(167, 139, 250, 0.15) 35%,
    transparent 70%);
  animation: aiBreath1 5s ease-in-out infinite;
  filter: blur(50px);
  border-radius: 50%;
  transform: rotate(-35deg);
}

.landing-orb-ai-2 {
  width: 500px;
  height: 250px;
  bottom: 8%;
  right: 5%;
  background: radial-gradient(ellipse,
    rgba(167, 139, 250, 0.4) 0%,
    rgba(45, 212, 191, 0.2) 30%,
    rgba(99, 130, 255, 0.08) 55%,
    transparent 75%);
  animation: aiBreath2 6s ease-in-out infinite;
  filter: blur(45px);
  border-radius: 50%;
  transform: rotate(35deg);
}

@keyframes aiBreath1 {
  0%, 100% {
    transform: rotate(-35deg) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: rotate(-35deg) scale(1.25);
    opacity: 1;
  }
}

@keyframes aiBreath2 {
  0%, 100% {
    transform: rotate(35deg) scale(1.1);
    opacity: 0.7;
  }
  50% {
    transform: rotate(35deg) scale(0.85);
    opacity: 1;
  }
}

/* Pu.ri-AI hover tooltip */

.puri-ai-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  width: 320px;
  padding: 18px 20px;
  margin-top: 0;
  background: rgba(14, 18, 32, 0.6);
  border: 1px solid rgba(192, 180, 220, 0.1);
  border-radius: 14px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  pointer-events: none;
  z-index: 100;
}

/* Invisible bridge between badge and tooltip to prevent hover gap */

.puri-ai-tooltip::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.puri-ai-badge-wrap:hover .puri-ai-tooltip,
.puri-ai-tooltip:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.puri-tooltip-item:hover {
  background: rgba(192, 180, 220, 0.1);
  border-left-color: rgba(192, 180, 220, 0.3);
}

.puri-tooltip-item:hover .puri-tooltip-flyout,
.puri-tooltip-flyout:hover {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(0) !important;
  pointer-events: auto !important;
}

.puri-ai-badge-wrap:hover .puri-ai-badge {
  background: linear-gradient(135deg, rgba(22,18,40,0.95), rgba(35,28,60,0.95));
  border-color: rgba(192, 180, 220, 0.35);
  box-shadow: 0 0 30px rgba(192, 180, 220, 0.1), 0 0 60px rgba(99, 130, 255, 0.06), inset 0 1px 0 rgba(255,255,255,0.08);
}

/* Static breathing star particles */

.landing-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-sparkle {
  animation: starBreathe 5s ease-in-out infinite;
  opacity: 0;
}

.landing-sparkle::before,
.landing-sparkle::after {
  content: '';
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1px;
}

/* Vertical spike */

.landing-sparkle::before {
  width: 1px;
  height: 8px;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
}

/* Horizontal spike */

.landing-sparkle::after {
  width: 8px;
  height: 1px;
  left: -3px;
  top: 50%;
  transform: translateY(-50%);
}

@keyframes starBreathe {
  0%, 100% {
    opacity: 0;
    transform: scale(0.3);
  }
  40% {
    opacity: 0.7;
    transform: scale(1);
  }
  60% {
    opacity: 0.5;
    transform: scale(0.8);
  }
  80% {
    opacity: 0.2;
    transform: scale(0.5);
  }
}

@keyframes aiPulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(99, 130, 255, 0.4);
    opacity: 1;
  }
  50% {
    box-shadow: 0 0 14px rgba(99, 130, 255, 0.7), 0 0 28px rgba(167, 139, 250, 0.3);
    opacity: 0.85;
  }
}

/* AI status dot — subtle breathing pulse */

@keyframes aiDotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Pulsing glow for onboarding skip banner */

.landing-split {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  width: 100%;
  max-width: 1100px;
  padding: 0 48px;
  margin: 0 auto;
}

.landing-left {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.landing-right {
  flex-shrink: 0;
}

/* EKG — full width background behind hero */

.landing-ecg-bg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

/* Hero heading — with EKG-synced color sweep + heartbeat pulse */

.hero-heading {
  font-family: var(--font-heading);
  font-size: 72px;
  font-weight: 450;
  letter-spacing: -1.44px;
  line-height: 1.0;
  color: #c0c4d0;
  margin: 0;
  text-align: center;
  position: relative;
  animation: heartbeat 1.4s ease-in-out infinite;
}

@keyframes heartbeat {
  0% {
    transform: scale(1);
  }

  12% {
    transform: scale(1.025);
  }

  20% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.015);
  }

  36% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }
}

.hero-text-gradient {
  background: linear-gradient(90deg,
      #c0c4d0 0%,
      #e8eaf0 5%,
      #a8b4f8 8%,
      #c1a8f8 10%,
      #a8b4f8 12%,
      #e8eaf0 15%,
      #c0c4d0 20%);
  background-size: 600% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: ecgSweep 10s linear infinite;
}

@keyframes ecgSweep {
  0% {
    background-position: 150% 0;
  }

  100% {
    background-position: -150% 0;
  }
}

/* Tagline — Antigravity subtitle style */

.hero-tagline {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: #9aa0a6;
  margin: 20px 0 0;
  letter-spacing: -0.2px;
  line-height: 1.5;
}

/* CTA buttons — Antigravity pill style */

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.cta-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 450;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(183, 191, 217, 0.08);
  color: #e8eaed;
}

.cta-btn svg {
  flex-shrink: 0;
}

.cta-btn:hover {
  background: rgba(183, 191, 217, 0.14);
  border-color: rgba(255, 255, 255, 0.12);
}

/* Primary CTA — dark pill (Antigravity uses dark-on-light, we invert) */

.cta-primary {
  background: #e8eaed;
  border-color: #e8eaed;
  color: #121317;
  font-weight: 500;
}

.cta-primary:hover {
  background: #ffffff;
  border-color: #ffffff;
  color: #121317;
  box-shadow: 0 2px 12px rgba(232, 234, 237, 0.15);
}

@media (max-width: 768px) {
  .hero-heading {
    font-size: 40px;
    letter-spacing: -0.8px;
  }

  .hero-tagline {
    font-size: 15px;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .topbar {
    padding: 0 16px;
  }

  .landing-wrap {
    margin: 0 -24px -60px;
  }
}

/* ═══════════════════════════════════════════════════════════
   DAILY LOG ANIMATED DEMO — Landing page feature showcase
   12s loop: Weight(0-3.5) → Symptoms(3.5-7) → Meds(7-9.5) → Result(9.5-12)
   ═══════════════════════════════════════════════════════════ */

/* Demo — sits inside .landing-right */

.demo-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.demo-caption {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* When the DailyLogDemo lives inside the bento tile, hide its redundant
   in-component caption (badge + "Try It Now" button). The whole tile
   is click-through to onStart, so the duplicate CTA isn't needed. */

.bento-tile.tile-phone .demo-caption { display: none; }

.bento-tile.tile-phone .demo-inline  { gap: 0; }

/* Kill the 24 px white padding that was framing the phone and hide the
   redundant top-left label — the phone visual itself communicates the
   "60-second check-in" context (its screens cycle through the daily log
   steps). Phone now sits flush to the tile edges, no white margin.
   Higher-specificity selector + !important so this wins over the
   generic .landing-light .bento-tile { padding } rules later in the
   cascade and over the !important mobile rule at the bottom of the file. */

.landing-light .bento-tile.tile-phone,
.bento-tile.tile-phone { padding: 0 !important; }

.landing-light .bento-tile.tile-phone .ll-label,
.bento-tile.tile-phone .ll-label { display: none !important; }

.demo-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(99, 130, 255, 0.2);
  letter-spacing: 0.3px;
}

.demo-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border-radius: 9999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
}

.demo-cta:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 24px var(--accent-glow);
  transform: translateY(-1px);
}

/* ─── iPhone 17 Pro — Cosmic Orange Photorealistic Mockup ─── */

/*
  Architecture:
  .demo-phone-wrap      — outer shell: drop shadow + perspective context
    .demo-phone         — titanium frame body (5px wide rail, multi-gradient)
      ::before          — chamfer highlight ring (bright specular on angled edge)
      ::after           — inner bezel + screen glass plane
      .demo-phone-screen — OLED display surface
        ::before        — glass reflection catch-light (top-left diagonal)
        ::after         — OLED inner vignette
      .demo-phone-notch  — Dynamic Island
      buttons…          — actual 3D protruding elements
*/

/* Outer wrapper — needed for overflow:visible shadow since the phone uses overflow:visible */

.demo-phone-wrap {
  position: relative;
  display: inline-block;
}

/*
  STRUCTURAL APPROACH (fresh eyes):
  The phone body IS the titanium frame. Its background = the matte satin titanium rail face.
  Real Cosmic Orange titanium (matte satin brushed) rail face: warm dark amber-brown, ~#8c4510 to #b05820
  The polished chamfer is a 2px wide beveled strip at the outermost edge — very bright.
  Light source: upper-left studio. So:
    • Upper-left chamfer: near white-gold (#ffd090)
    • Lower-right chamfer: near rail color (#904010) — almost invisible against dark rail

  Z-stack inside .demo-phone (position:relative, z-index:0):
    ::before (z:-1) — chamfer highlight ring (1.5px beyond body)
    body            — rail face (matte, dark)
    ::after (z:1)   — inner screen black + screen glass on top (painted from outside in)
    .demo-phone-screen (z:2) — the OLED screen itself
*/

.demo-phone {
  width: 210px;
  min-width: 210px;
  height: 440px;           /* 2.095:1 Pro ratio (149.6×71.5mm), fits in 492px usable tile height */
  border-radius: 38px;

  /*
    RAIL FACE — matte satin titanium, much darker than chamfer.
    Real phone rail face color is a deep warm brown-orange:
    left edge ~#b06028, right edge ~#904018 (slightly shadowed from single light source)
  */
  background:
    /* Upper-left warm catchlight on the rail face itself */
    radial-gradient(ellipse 42% 26% at 13% 7%,
      rgba(220, 130, 70, 0.45) 0%,
      transparent 55%
    ),
    /* Main rail face: real Cosmic Orange titanium — peachy-orange, not burnt umber.
       Left=lit, right=slightly shadowed. Brighter base lets chamfer pop without going gold. */
    linear-gradient(95deg,
      #d87538 0%,
      #cc6a30 28%,
      #c0612a 52%,
      #b35624 76%,
      #a64c1e 100%
    );

  position: relative;
  z-index: 0;
  overflow: visible;
  /* filter:drop-shadow paints AFTER overflow clipping, so it won't be clipped
     by the parent tile's overflow:hidden — unlike box-shadow which would be. */
  /* Subtle inner-shadow on the top rail edge adds perceived heft */
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.35);
  filter:
    drop-shadow(0 2px 4px rgba(0,0,0,0.68))
    drop-shadow(0 10px 28px rgba(0,0,0,0.52))
    drop-shadow(0 28px 60px rgba(0,0,0,0.30))
    drop-shadow(0 4px 18px rgba(135, 58, 14, 0.24));
}

/*
  CHAMFER HIGHLIGHT RING
  This is the brightest element — the polished bevel edge visible as a thin bright strip.
  Top-left: near-gold (#ffd090), bottom-right: dark amber (#8e4012)
  Only 1.5px wider than the body on each side — thin physical chamfer.
*/

.demo-phone::before {
  content: '';
  position: absolute;
  inset: -2px;   /* 2px chamfer strip — halved from original 4px */
  border-radius: 40px;
  /*
    Chamfer conic — `from 315deg` places 0deg color at the upper-left of the ring.
    In CSS conic, `from N deg` shifts the starting angle, so the first color stop
    appears at angle N from 12-o'clock (North). 315deg = upper-left direction.
    Going clockwise: upper-left bright → top → right → bottom-right darkest → bottom → left → back.
    Specular brightened to #ffe0b0 and shadow deepened to #6a3010 for stronger depth contrast.
  */
  background: conic-gradient(
    from 315deg at 50% 50%,
    #ff9450 0deg,      /* upper-left specular — bright warm highlight */
    #f5853c 12deg,
    #ec7c2e 30deg,
    #e89048 55deg,
    #d87838 78deg,
    #c06028 102deg,
    #a85020 126deg,
    #8e4018 148deg,
    #6a3010 168deg,    /* darkest opposite corner — deeper than before for contrast */
    #7a3814 192deg,
    #9a4a1e 218deg,
    #b55c28 244deg,
    #cc7030 268deg,
    #e08846 292deg,
    #e87234 312deg,
    #f5853c 334deg,
    #ff9450 360deg
  );
  z-index: -1;
  pointer-events: none;
}

/*
  INNER BLACK FRAME — the sub-1px black ring between rail and OLED screen.
  On iPhone 17 Pro, this bezel is almost invisible — the screen fills nearly the whole front.
  We use 5px inset to give ~3.5px visible rail after chamfer eats 1.5px.
*/

.demo-phone::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 35px;
  background: #06060a;
  z-index: 0;
  pointer-events: none;
}

/* ── Buttons — physical titanium side rails ──
   Buttons are same Cosmic Orange titanium alloy as the frame.
   They sit proud of the rail face by ~4px (visible side depth).
   Each button's outward-facing surface catches light matching the frame.
   Right side = slightly shadowed rail dark; Left side = slightly lit rail.
*/

/* Power button — right side, upper position */

.demo-phone-side-btn {
  position: absolute;
  right: -2px;
  top: 116px;
  width: 4px;
  height: 62px;
  background: linear-gradient(180deg,
    rgba(220,130,70,0.85) 0px,
    rgba(220,130,70,0.85) 1.5px,
    #b35624 1.5px,
    #a64c1e 55%,
    #9a4418 100%
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 3px rgba(0,0,0,0.5);
  z-index: 7;
}

.demo-phone-side-btn::before,
.demo-phone-side-btn::after { content: none; }

/* Camera Control button — right side, below Power */

.demo-phone-camera-btn {
  position: absolute;
  right: -2px;
  top: 191px;
  width: 4px;
  height: 26px;
  background: linear-gradient(180deg,
    rgba(215,125,65,0.80) 0px,
    rgba(215,125,65,0.80) 1.5px,
    #ad521e 1.5px,
    #9a4418 100%
  );
  border-radius: 0 2px 2px 0;
  box-shadow: 1px 0 2px rgba(0,0,0,0.46);
  z-index: 7;
}

/* Volume buttons — left side (lit side) */

.demo-phone-vol-up,
.demo-phone-vol-down {
  position: absolute;
  left: -2px;
  width: 4px;
  height: 33px;
  background: linear-gradient(180deg,
    rgba(225,135,75,0.85) 0px,
    rgba(225,135,75,0.85) 1.5px,
    #c46428 1.5px,
    #b35624 55%,
    #a64c1e 100%
  );
  border-radius: 2px 0 0 2px;
  box-shadow: -1px 0 3px rgba(0,0,0,0.45);
  z-index: 7;
}

.demo-phone-vol-up  { top: 108px; }

.demo-phone-vol-down { top: 145px; }

.demo-phone-vol-up::before,
.demo-phone-vol-up::after,
.demo-phone-vol-down::before,
.demo-phone-vol-down::after { content: none; }

/* Action button — left side, above volume */

.demo-phone-action-btn {
  position: absolute;
  left: -2px;
  top: 71px;
  width: 4px;
  height: 29px;
  background: linear-gradient(180deg,
    rgba(225,135,75,0.85) 0px,
    rgba(225,135,75,0.85) 1.5px,
    #c46428 1.5px,
    #b35624 100%
  );
  border-radius: 2px 0 0 2px;
  box-shadow: -1px 0 3px rgba(0,0,0,0.45);
  z-index: 7;
}

.demo-phone-action-btn::before,
.demo-phone-action-btn::after { content: none; }

/* ── Dynamic Island ── */

.demo-phone-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 78px;
  height: 22px;
  border-radius: 13px;
  /* True black pill — deeper than screen black for contrast */
  background: #000;
  z-index: 12;
  /* Subtle pill border catches ambient light on the island edge */
  box-shadow:
    0 0 0 0.5px rgba(255,255,255,0.06),
    0 2px 8px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Front camera lens — right side of Dynamic Island */

.demo-phone-notch::before {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  /* Realistic camera lens: deep center, purple-blue iridescent coating ring */
  background:
    radial-gradient(circle at 35% 35%,
      rgba(80,60,200,0.25) 0%,    /* lens coating specular */
      #0d0d18 25%,                 /* deep lens center */
      #050508 55%,                 /* darkest center */
      #0d0d18 70%,                 /* inner barrel */
      transparent 100%
    );
  box-shadow:
    0 0 0 1.5px rgba(255,255,255,0.12),   /* lens ring bezel */
    0 0 0 2.5px rgba(80,60,180,0.15),     /* iridescent coating halo */
    inset 0 0 3px rgba(60,80,255,0.20);   /* lens interior blue cast */
}

/* Sensor cluster — left side of Dynamic Island */

.demo-phone-notch::after {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #0a0a12;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    inset 0 0 2px rgba(100,150,255,0.12);
}

/* ── OLED Screen ── */

.demo-phone-screen {
  position: absolute;
  /*
    3px (rail) + 1px (inner black bezel) = 4px total inset.
    This gives a barely-visible 1px near-black ring between rail and screen — realistic.
  */
  inset: 4px;
  overflow: hidden;
  border-radius: 33.5px;
  background: #0c0c0f;
  z-index: 2;   /* above ::after (inner black frame) */
}

/* Glass reflection — diagonal catch-light from upper-left studio lamp on the front glass */

.demo-phone-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 33px;
  /*
    Simulates the glass surface highlight:
    - A bright diagonal streak at upper-left (strongest)
    - Fades to invisible by mid-screen
    - Very subtle: real phones have this under direct light but it's understated
  */
  background:
    linear-gradient(
      128deg,
      rgba(255, 255, 255, 0.055) 0%,
      rgba(255, 255, 255, 0.025) 20%,
      transparent 45%
    );
  pointer-events: none;
  z-index: 20;
}

/* OLED depth vignette — corners/edges slightly darker, punchy black center */

.demo-phone-screen::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 36px;
  box-shadow:
    inset 0 0 20px rgba(0,0,0,0.55),
    inset 0 0 0 1px rgba(255,255,255,0.03);  /* micro edge glow */
  pointer-events: none;
  z-index: 19;
}

/* ─── Frames — stacked, opacity-animated ─── */

/* 5 frames over 15s: Intro(0-3s) Weight(3-6) Symptoms(6-9) Meds(9-11.5) Result(11.5-15) */

.demo-frame {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;          /* center content vertically — no dead bottom space */
  gap: 10px;
  /* top padding clears Dynamic Island (island bottom: ~32px from screen top).
     44px gives 18px breathing room above first content element. */
  padding: 44px 16px 32px;
  opacity: 0;
  pointer-events: none;
  animation-duration: 15s;
  animation-iteration-count: infinite;
  animation-timing-function: ease;
}

.demo-frame-intro {
  animation-name: demoFrameIntro;
  gap: 12px;                      /* roomier spacing for the sparse intro layout */
}

.demo-frame-weight {
  animation-name: demoFrame1;
  gap: 14px;                      /* weight num + slider + delta — extra breathing room */
}

.demo-frame-symptoms {
  animation-name: demoFrame2;
  gap: 8px;                       /* 7 items (label + 3×row+slider): tighter gap distributes evenly */
}

.demo-frame-meds {
  animation-name: demoFrame3;
  gap: 12px;                      /* 4 items (label + 3 med rows) — comfortable spacing */
}

.demo-frame-result {
  animation-name: demoFrame4;
  animation-timing-function: ease-out;
  gap: 14px;                      /* 4 items spread across height */
}

/* Intro: 0%–18% (0–2.7s) */

@media (max-width: 768px) {
  .landing-split {
    flex-direction: column;
    gap: 32px;
    padding: 0 20px;
  }

  .landing-left {
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .demo-phone {
    width: 200px;
    min-width: 200px;
    height: 420px;
  }
}

/* ─── END DAILY LOG DEMO ─── */

/* ─── TOP NAVIGATION BAR (kept for standalone pages) ─── */

.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 26, 0.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 10px 32px;
  min-height: 60px;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  opacity: 0.75;
  transition: all 0.2s ease;
}

.nav-link:hover {
  opacity: 1;
  color: var(--accent) !important;
  transform: translateY(-1px);
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 20px;
  flex-shrink: 0;
  text-decoration: none;
}

.topnav-brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.topnav-title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.topnav-divider {
  width: 1px;
  height: 20px;
  background: var(--border-strong);
  margin: 0 10px;
  flex-shrink: 0;
  display: none;
}

.topnav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 300px;
  flex-wrap: wrap;
}

.topnav-group-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 10px;
  flex-shrink: 0;
  display: none;
}

.topnav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.topnav-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.topnav-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.topnav-tab.active svg {
  color: var(--accent);
}

.topnav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.topnav-action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.topnav-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.topnav-action-btn.accent {
  background: var(--accent-dim);
  border-color: var(--accent-glow);
  color: var(--accent);
}

.topnav-action-btn.accent:hover {
  background: rgba(99, 130, 255, 0.2);
  color: var(--accent-hover);
}

/* ─── MAIN CONTENT ─── */

.app-main {
  flex: 1;
  overflow-y: auto;
}

.page-container {
  padding: 40px 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* ─── CARDS ─── */

@media (max-width: 1024px) {
  .app-viewport {
    padding: 24px 24px 60px;
  }

  .landing-hero {
    padding: 48px 0 32px;
  }
}

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
    overflow-y: auto;
  }

  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    padding: 12px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }

  .admin-sidebar::-webkit-scrollbar {
    display: none;
  }

  .admin-sidebar-group {
    display: none;
  }

  .admin-sidebar button {
    white-space: nowrap;
    width: auto;
    padding: 8px 16px;
    flex-shrink: 0;
  }

  .admin-main {
    flex: none;
    overflow-y: visible;
    padding: 20px 16px 48px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  /* Responsive data table */
  .table-header {
    display: none !important;
  }

  .table-row {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-card);
    padding: 16px !important;
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid var(--border) !important;
    gap: 8px !important;
  }

  .table-cell-mobile-label {
    display: inline-block;
    width: 90px;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
  }
}

/* ─── FORM ─── */

@media (max-width: 768px) {

  .log-form-grid,
  .log-form-grid-3,
  .pillar-log-grid,
  .log-checkbox-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── DAILY LOG MODAL ─── */

.landing-wrap {
  position: relative;
  display: block;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0a0e1a;
  padding-top: 40px;
}

.landing-ecg-bg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 85px;
  gap: 20px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 40px;
  position: relative;
  z-index: 10;
}

.bento-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s, box-shadow 0.35s;
  box-shadow: var(--shadow-sm);
}

.bento-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: var(--shadow-lg);
}

/* Granular Grid Utils */

.col-1  { grid-column: span 1; }

.col-2  { grid-column: span 2; }

.col-3  { grid-column: span 3; }

.col-4  { grid-column: span 4; }

.col-5  { grid-column: span 5; }

.col-6  { grid-column: span 6; }

.col-7  { grid-column: span 7; }

.col-8  { grid-column: span 8; }

.col-9  { grid-column: span 9; }

.col-12 { grid-column: span 12; }

.row-2 { grid-row: span 2; }

.row-3 { grid-row: span 3; }

.row-4 { grid-row: span 4; }

.row-5 { grid-row: span 5; }

.row-6 { grid-row: span 6; }

.sparkline-container {
  height: 40px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.spark-bar {
  flex: 1;
  background: rgba(45, 212, 168, 0.15);
  border-radius: 2px;
  transition: height 1s ease;
}

.spark-bar.active {
  background: #2dd4a8;
}

.bento-stat {
  font-size: 56px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
  letter-spacing: -2px;
  line-height: 1;
}

/* ─── Apple Watch Ultra — Realistic Titanium Mockup ─── */

.css-watch-ultra-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.css-watch-ultra {
  position: relative;
  width: 136px;
  height: 165px;
  /* Natural titanium body — brushed metal gradient */
  background: linear-gradient(
    155deg,
    #c8c8ca 0%,    /* bright titanium edge */
    #a8a8ab 12%,   /* brushed highlight */
    #8e8e92 30%,   /* mid titanium */
    #76767a 50%,   /* dark face */
    #8e8e92 70%,   /* return */
    #a8a8ab 88%,   /* highlight */
    #c8c8ca 100%   /* bright edge */
  );
  border-radius: 40px;
  padding: 5px;
  box-shadow:
    0 25px 50px rgba(0,0,0,0.7),
    0 8px 20px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.15),
    inset 0 1px 1px rgba(255,255,255,0.4),
    inset 0 -1px 1px rgba(0,0,0,0.2);
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flat sapphire crystal edge */

.css-watch-ultra::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 36px;
  border: 1px solid rgba(255,255,255,0.08);
  pointer-events: none;
  z-index: 5;
}

.css-watch-ultra-screen {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 34px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border: 1px solid rgba(0,0,0,0.9);
  box-shadow:
    inset 0 0 12px rgba(0,0,0,0.95),
    inset 0 1px 2px rgba(0,0,0,0.8);
}

/* Screen reflection */

.watch-reflection {
  position: absolute;
  top: -20%;
  left: -20%;
  width: 80%;
  height: 60%;
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, transparent 60%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
}

/* Crown guard — raised titanium piece on right */

.ultra-crown-guard {
  position: absolute;
  right: -6px;
  top: 35px;
  width: 14px;
  height: 85px;
  background: linear-gradient(180deg, #b0b0b4 0%, #8e8e92 30%, #76767a 50%, #8e8e92 70%, #b0b0b4 100%);
  border-radius: 8px;
  box-shadow:
    3px 0 6px rgba(0,0,0,0.4),
    inset -1px 0 1px rgba(255,255,255,0.2),
    inset 1px 0 1px rgba(0,0,0,0.2);
  z-index: 5;
}

/* Digital Crown — recessed rotating dial */

.ultra-crown {
  position: absolute;
  right: -10px;
  top: 48px;
  width: 10px;
  height: 34px;
  background: linear-gradient(180deg, #5a5a5e 0%, #3a3a3e 50%, #5a5a5e 100%);
  border-radius: 0 6px 6px 0;
  z-index: 6;
  box-shadow:
    2px 0 4px rgba(0,0,0,0.5),
    inset 0 0 4px rgba(0,0,0,0.6);
  /* Knurled texture lines */
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,0.08) 0px,
    rgba(255,255,255,0.08) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* Action Button — International Orange (Apple's signature) */

.ultra-action-button {
  position: absolute;
  left: -5px;
  top: 52px;
  width: 7px;
  height: 28px;
  background: linear-gradient(180deg, #ff6b3d 0%, #e5512e 40%, #cc4420 70%, #ff6b3d 100%);
  border-radius: 4px 0 0 4px;
  box-shadow:
    -3px 0 6px rgba(0,0,0,0.4),
    inset 1px 0 1px rgba(255,255,255,0.25),
    0 0 8px rgba(255,100,60,0.15);
  z-index: 6;
}

/* Watch band — Alpine Loop style */

.css-watch-band-ultra {
  position: absolute;
  width: 88px;
  height: 500px;
  background: linear-gradient(180deg,
    #2c2c30 0%, #1c1c20 15%,
    #1a1a1e 40%, #1a1a1e 60%,
    #1c1c20 85%, #2c2c30 100%
  );
  border-radius: 16px;
  z-index: 1;
  /* Woven texture */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.02) 0px,
    rgba(255,255,255,0.02) 1px,
    transparent 1px,
    transparent 4px
  );
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

/* Band lugs — titanium connectors */

.css-watch-band-ultra::before,
.css-watch-band-ultra::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 8px;
  background: linear-gradient(90deg, #8e8e92, #a8a8ab, #8e8e92);
  border-radius: 4px;
}

.css-watch-band-ultra::before { top: 200px; }

.css-watch-band-ultra::after { bottom: 200px; }

.hero-tagline {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  color: #9aa0a6;
  margin: 20px 0 0;
  letter-spacing: -0.2px;
  line-height: 1.5;
}

.landing-footer {
  padding: 60px 40px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  z-index: 10;
  border-top: 1px solid rgba(255,255,255,0.03);
}

@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  /* Grid is now 6 cols — clamp the new col-7/8/9 spans so they don't
     overflow. They become full-width on tablet, which stacks the Row 2
     check-in tile above the Clinical Brief tile cleanly. */
  .col-7, .col-8, .col-9 { grid-column: span 6; }
}

@media (max-width: 768px) {
  .bento-grid,
  .landing-light .bento-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    padding: 16px !important;
    gap: 12px !important;
  }
  /* Force all tiles to single column on mobile */
  .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-12,
  .landing-light .col-1, .landing-light .col-2, .landing-light .col-3,
  .landing-light .col-4, .landing-light .col-5, .landing-light .col-6,
  .landing-light .col-7, .landing-light .col-8, .landing-light .col-9, .landing-light .col-12 {
    grid-column: span 1 !important;
  }
  .row-2, .row-3, .row-4, .row-5, .row-6,
  .landing-light .row-2, .landing-light .row-3,
  .landing-light .row-4, .landing-light .row-5,
  .landing-light .row-6 {
    grid-row: span 1 !important;
  }
  .bento-tile,
  .landing-light .bento-tile {
    min-height: auto !important;
    padding: 20px !important;
  }
  .bento-stat {
    font-size: 36px !important;
  }
  .hero-heading { font-size: 32px !important; }
  .hero-sub { font-size: 14px !important; }

  /* Phone mockup: smaller on mobile */
  .demo-phone {
    width: 180px !important;
    min-width: 180px !important;
    height: 320px !important;
  }
  /* Watch tile: constrain height */
  .tile-watch {
    max-height: 300px !important;
  }
}

@media (max-width: 480px) {
  .bento-grid,
  .landing-light .bento-grid {
    padding: 10px !important;
    gap: 10px !important;
  }
  .bento-tile,
  .landing-light .bento-tile {
    padding: 16px !important;
  }
  .bento-stat {
    font-size: 28px !important;
  }
  .hero-heading { font-size: 26px !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   LANDING PAGE — Clinical Editorial Theme
   .landing-light scoping ensures zero conflicts with dark theme
   ═══════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─── */

.landing-light {
  --l-bg: #F7F6F3;
  --l-card: #FFFFFF;
  --l-card-dark: #0e1117;
  --l-text: #1a1d2e;
  --l-text-sec: #5a5f72;
  --l-text-muted: #6b7080;  /* darkened from #8c91a3 (2.9:1) to clear WCAG AA 4.5:1 on cream/white */
  --l-accent: #0B7A5F;
  --l-accent-soft: rgba(11, 122, 95, 0.06);
  --l-accent-border: rgba(11, 122, 95, 0.12);
  --l-amber: #b45309;
  --l-amber-soft: rgba(180, 83, 9, 0.07);
  --l-rose: #be123c;
  --l-rose-soft: rgba(190, 18, 60, 0.06);
  --l-border: rgba(0, 0, 0, 0.06);
  --l-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --l-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.07);
  --l-radius: 20px;
}

/* ─── Page wrapper ─── */

.landing-light.landing-wrap {
  background: var(--l-bg);
  padding-top: 32px;
  padding-bottom: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.landing-light .landing-ecg-bg { display: none; }

/* ─── Grid ─── */

.landing-light .bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 80px;
  gap: 14px;
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 32px 36px;
  position: relative;
  z-index: 10;
}

/* ─── Base tile ─── */

.landing-light .bento-tile {
  background: var(--l-card);
  border: 1px solid var(--l-border);
  border-radius: var(--l-radius);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
  box-shadow: var(--l-shadow);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.landing-light .bento-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--l-shadow-hover);
  border-color: rgba(0, 0, 0, 0.08);
}

/* ─── Column / row spans ─── */

.landing-light .col-1  { grid-column: span 1; }

.landing-light .col-2  { grid-column: span 2; }

.landing-light .col-3  { grid-column: span 3; }

.landing-light .col-4  { grid-column: span 4; }

.landing-light .col-5  { grid-column: span 5; }

.landing-light .col-6  { grid-column: span 6; }

.landing-light .col-12 { grid-column: span 12; }

.landing-light .row-1 { grid-row: span 1; }

.landing-light .row-2 { grid-row: span 2; }

.landing-light .row-3 { grid-row: span 3; }

.landing-light .row-4 { grid-row: span 4; }

.landing-light .row-5 { grid-row: span 5; }

/* ─── Tile variants ─── */

.landing-light .tile-phone {
  background: var(--l-card-dark);
  border-color: rgba(255, 255, 255, 0.04);
}

.landing-light .tile-phone:hover { border-color: rgba(255, 255, 255, 0.08); }

.landing-light .tile-accent {
  background: var(--l-accent-soft);
  border-color: var(--l-accent-border);
}

.landing-light .tile-watch {
  background: var(--l-card);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px 16px;
}

.landing-light .tile-hero { padding: 36px 36px 28px; }

.landing-light .tile-devices { padding: 20px 28px; }

.landing-light .tile-safety { padding: 20px 28px; }

/* ─── Typography — Editorial ─── */

.ll-label {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--l-accent); margin-bottom: 12px;
}

/* Hero eyebrow row: the 2022 guideline label + the "GDMT optimization from
   home" pill, side by side above the hero title. */

.ll-hero-eyebrow {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 12px;
}

.ll-hero-pill {
  display: inline-flex; align-items: center;
  padding: 4px 12px; background: var(--l-accent-soft);
  border: 1px solid var(--l-accent-border); border-radius: 9999px;
  font-family: var(--font-body);
  font-size: 10px; font-weight: 800; color: var(--l-accent);
  letter-spacing: 1.4px; text-transform: uppercase; white-space: nowrap;
}

.ll-label-ondark {
  font-family: var(--font-body);
  font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4); margin-bottom: 4px;
}

.ll-hero-title {
  font-family: 'Newsreader', 'Georgia', serif;
  font-size: 46px; font-weight: 500; line-height: 1.08;
  color: var(--l-text); margin: 0 0 16px; letter-spacing: -0.5px;
}

.ll-hero-sub {
  font-family: var(--font-body);
  font-size: 16px; font-weight: 400;
  color: var(--l-text-sec); line-height: 1.6; margin: 0 0 28px;
}

.ll-hero-footnote {
  font-size: 12px; color: var(--l-text-muted); font-weight: 500;
  padding-top: 16px; border-top: 1px solid var(--l-border); margin-top: auto;
}

.ll-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 30px; background: var(--l-accent); color: white;
  border: none; border-radius: 9999px;
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease; letter-spacing: 0.2px;
}

.ll-cta:hover {
  background: #096B53;
  box-shadow: 0 4px 20px rgba(11, 122, 95, 0.25);
  transform: translateY(-1px);
}

.ll-tile-title {
  font-family: var(--font-body);
  font-size: 20px; font-weight: 700; color: var(--l-text);
  margin: 10px 0 8px; line-height: 1.25; letter-spacing: -0.3px;
}

.ll-desc {
  font-family: var(--font-body);
  font-size: 14px; color: var(--l-text-sec); line-height: 1.55; margin: 4px 0 0;
}

.ll-desc-muted {
  font-family: var(--font-body);
  font-size: 12px; color: var(--l-text-muted); margin: 4px 0 0; line-height: 1.4;
}

/* ─── Icon circles ─── */

.ll-icon-circle {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--l-accent-soft); border: 1px solid var(--l-accent-border);
  color: var(--l-accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.ll-icon-amber { background: var(--l-amber-soft); border-color: rgba(180,83,9,0.12); color: var(--l-amber); }

.ll-icon-rose { background: var(--l-rose-soft); border-color: rgba(190,18,60,0.1); color: var(--l-rose); }

/* ─── Feature lists ─── */

.ll-features { display: flex; flex-direction: column; gap: 7px; margin: 8px 0 auto; }

.ll-features span {
  font-size: 13px; color: var(--l-text-sec); padding-left: 16px;
  position: relative; line-height: 1.4;
}

.ll-features span::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--l-accent); opacity: 0.35;
}

/* ─── Citation pills ─── */

.ll-citation {
  display: inline-flex; align-items: center;
  padding: 5px 12px; background: var(--l-accent-soft);
  border: 1px solid var(--l-accent-border); border-radius: 9999px;
  font-size: 11px; font-weight: 600; color: var(--l-accent);
  margin-top: auto; align-self: flex-start; letter-spacing: 0.2px;
}

/* ─── Watch tile (light context) ─── */

.ll-watch-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; background: var(--l-accent-soft);
  border: 1px solid var(--l-accent-border); border-radius: 9999px;
  font-size: 9px; font-weight: 800; color: var(--l-accent);
  letter-spacing: 1.8px; text-transform: uppercase; margin-bottom: 6px;
}

.ll-watch-footer {
  text-align: center; font-size: 11px; color: var(--l-text-muted);
  font-weight: 600; margin-top: 6px; letter-spacing: 0.3px;
}

/* ─── Intelligence stat tile ─── */

/* Unique to the "9 Clinician-Facing CDS Displays" tile (LandingPage / LandingPage3D).
   Sized to fit a col-4 row-3 (~268px) bento tile without overflow clipping. */

.ll-intel-stat { display: flex; align-items: baseline; gap: 4px; margin-bottom: 0; flex-wrap: nowrap; }

.ll-intel-num {
  font-family: var(--font-heading); font-size: 30px; font-weight: 800;
  color: var(--l-accent); line-height: 1; letter-spacing: -1px;
}

.ll-intel-sub { font-size: 12px; font-weight: 600; color: var(--l-text-muted); white-space: nowrap; }

.ll-intel-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; margin-top: auto; }

.ll-intel-cats span { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--l-text-sec); white-space: nowrap; }

.ll-intel-cats svg { color: var(--l-accent); opacity: 0.6; }

/* Scope tighter padding + spacing to ONLY the CDS intel tile (anchor: .ll-intel-stat).
   Tuned to survive 110-125% browser zoom + 16px row-3 fixed-height bento cell. */

.landing-light .bento-tile:has(.ll-intel-stat) { padding: 16px !important; }

.bento-tile:has(.ll-intel-stat) .ll-label { margin-bottom: 2px !important; font-size: 10px !important; letter-spacing: 1.6px !important; }

.bento-tile:has(.ll-intel-stat) .ll-desc { font-size: 11.5px !important; line-height: 1.35 !important; margin-top: 0 !important; }

.bento-tile:has(.ll-intel-stat) .ll-intel-cats { gap: 4px 8px !important; padding-top: 0 !important; }

.bento-tile:has(.ll-intel-stat) .ll-intel-cats span { font-size: 10.5px !important; gap: 5px !important; }

/* Bottom stats row inside the CDS tile: tighten so 2-line labels (e.g. "CURES ACT CRITERIA")
   fit fully above the tile's rounded bottom border, even at 125% zoom. */

.bento-tile:has(.ll-intel-stat) .ll-intel-cats + div {
  margin-top: 6px !important;
  padding-top: 6px !important;
  gap: 6px !important;
}

.bento-tile:has(.ll-intel-stat) .ll-intel-cats + div > div > div:first-child {
  font-size: 15px !important;
}

.bento-tile:has(.ll-intel-stat) .ll-intel-cats + div > div > div:last-child {
  font-size: 7.5px !important;
  line-height: 1.1 !important;
  letter-spacing: 0.03em !important;
  margin-top: 2px !important;
}

/* ─── 4-Pillar GDMT grid ─── */

.ll-pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; flex: 1; align-content: center; margin-top: 4px; }

.ll-pillar {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; background: var(--l-accent-soft);
  border-radius: 12px; border: 1px solid var(--l-accent-border);
}

.ll-pillar-name { font-size: 14px; font-weight: 700; color: var(--l-text); letter-spacing: -0.2px; }

.ll-pillar-trial { font-size: 11px; font-weight: 600; color: var(--l-accent); letter-spacing: 0.3px; }

/* ─── AI example card ─── */

.ll-ai-card {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; background: #fff;
  border-radius: 12px; border: 1px solid var(--l-border); margin: 10px 0 auto;
}

.ll-ai-text { font-size: 13px; font-weight: 600; color: var(--l-text); flex: 1; line-height: 1.35; }

.ll-ai-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--l-accent); padding: 4px 10px; background: var(--l-accent-soft);
  border: 1px solid var(--l-accent-border); border-radius: 8px; flex-shrink: 0;
}

/* ─── Device row ─── */

.ll-device-icon { font-size: 22px; flex-shrink: 0; }

.ll-device-list { font-size: 13px; font-weight: 600; color: var(--l-text-sec); letter-spacing: 0.2px; margin-bottom: 2px; }

/* ─── Safety tile ─── */

.ll-safety-icon { color: var(--l-accent); flex-shrink: 0; }

.ll-safety-title { font-size: 14px; font-weight: 700; color: var(--l-text); margin-bottom: 2px; }

/* ─── Page footer ─── */

.ll-footer {
  text-align: center; padding: 48px 40px 40px;
  font-size: 11px; color: var(--l-text-muted);
  letter-spacing: 0.3px; line-height: 1.7;
  border-top: 1px solid rgba(0,0,0,0.04);
  max-width: 1380px; margin: 0 auto;
}

.ll-footer-links {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2px 4px;
  font-size: 12px;
}

.ll-foot-link {
  color: var(--l-text, #1a1d2e);
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: none;
  border: none;
  font: inherit;
  letter-spacing: 0.3px;
  cursor: pointer;
}

.ll-foot-sep { color: var(--l-text-muted); opacity: 0.5; }

@media (hover: hover) {
  .ll-foot-link:hover { color: var(--l-accent, #0B7A5F); background: rgba(11,122,95,0.06); }
}

/* Touch: 44px targets, drop the dot separators, let links wrap into a grid. */

@media (pointer: coarse) {
  .ll-foot-link {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
  }
  .ll-foot-sep { display: none; }
  .ll-footer-links { gap: 4px 8px; }
}

/* ─── Demo overrides for light landing ─── */

.landing-light .tile-phone .demo-badge {
  background: rgba(11,122,95,0.15); color: #34d399;
  border-color: rgba(11,122,95,0.25);
}

.landing-light .tile-phone .demo-cta { background: var(--l-accent); }

.landing-light .tile-phone .demo-cta:hover {
  background: #096B53; box-shadow: 0 4px 16px rgba(11,122,95,0.3);
}

/* ─── Responsive ─── */

@media (max-width: 1200px) {
  .ll-hero-title { font-size: 38px; }
  .landing-light .bento-grid { gap: 12px; padding: 24px 24px; }
}

@media (max-width: 1024px) {
  .landing-light .bento-grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: auto; }
  .landing-light .col-3 { grid-column: span 3; }
  .landing-light .col-4 { grid-column: span 3; }
  .landing-light .col-5 { grid-column: span 6; }
  .landing-light .tile-hero { min-height: 340px; }
  .landing-light .tile-phone { min-height: 500px; }
  .landing-light .tile-watch { min-height: 400px; }
}

@media (max-width: 768px) {
  /* Tighten the dead space above the hero on phones (desktop keeps 32px). */
  .landing-light.landing-wrap { padding-top: 10px; }
  .landing-light .bento-grid {
    grid-template-columns: 1fr !important;
    grid-auto-rows: auto !important;
    padding: 12px !important;
    gap: 10px !important;
  }
  /* Force everything to single column, single row */
  .landing-light .col-1, .landing-light .col-2, .landing-light .col-3,
  .landing-light .col-4, .landing-light .col-5, .landing-light .col-6,
  .landing-light .col-12 {
    grid-column: span 1 !important;
  }
  .landing-light .row-1, .landing-light .row-2, .landing-light .row-3,
  .landing-light .row-4, .landing-light .row-5 {
    grid-row: span 1 !important;
  }
  .landing-light .bento-tile {
    min-height: auto !important;
    padding: 20px !important;
  }
  .landing-light .tile-phone {
    min-height: 400px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .landing-light .tile-watch {
    min-height: 280px !important;
    max-height: 320px !important;
  }
  .landing-light .tile-hero {
    min-height: auto !important;
    padding: 24px 20px !important;
  }
  .ll-hero-title { font-size: 28px !important; letter-spacing: -0.5px !important; }
  .ll-hero-sub { font-size: 14px !important; }
  .ll-hero-footnote { font-size: 11px !important; }
  .ll-intel-num { font-size: 36px !important; }
  .ll-cta {
    width: 100% !important;
    justify-content: center !important;
  }
  .ll-pillar-grid { grid-template-columns: 1fr !important; }
  .ll-footer { padding: 32px 16px !important; }
}

@media (max-width: 480px) {
  .ll-hero-title { font-size: 24px !important; }
  .ll-intel-num { font-size: 28px !important; }
  .landing-light .bento-tile { padding: 16px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   LANDING PAGE REFINEMENTS — v2
   ═══════════════════════════════════════════════════════════════ */

/* ─── Navbar: Light mode when landing visible ─── */

:has(.landing-light) .topbar {
  background: var(--l-bg, #F7F6F3);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

:has(.landing-light) .topbar-brand-icon { background: #0B7A5F; }

:has(.landing-light) .topbar-brand-text { color: #1a1d2e; }

:has(.landing-light) .topbar-divider { background: rgba(0, 0, 0, 0.08); }

:has(.landing-light) .topbar-tab { color: #6b7394; }

:has(.landing-light) .topbar-tab:hover { color: #1a1d2e; background: rgba(0, 0, 0, 0.04); }

:has(.landing-light) .topbar-tab.active { color: #0B7A5F; background: rgba(11, 122, 95, 0.07); }

:has(.landing-light) .topbar-signout { color: #6b7394; border-color: rgba(0, 0, 0, 0.1); }

:has(.landing-light) .topbar-signout:hover { color: #be123c; border-color: rgba(190, 18, 60, 0.2); background: rgba(190, 18, 60, 0.04); }

:has(.landing-light) .topbar-right svg { color: #6b7394; }

:has(.landing-light) .app-viewport { background: #F7F6F3 !important; }

/* ─── Watch tile: overflow visible ─── */

.landing-light .tile-watch { overflow: hidden; }

.landing-light .tile-watch .css-watch-ultra-wrapper { position: relative; z-index: 2; }

/* ─── Category dots ─── */

.ll-cat { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--l-text-sec, #5a5f72); }

.ll-cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ─── Pillar color bar ─── */

.ll-pillar-bar { width: 4px; height: 100%; border-radius: 2px; position: absolute; left: 0; top: 0; opacity: 0.7; }

.ll-pillar { position: relative; padding-left: 16px !important; }

/* ─── Refined card shadows ─── */

.landing-light .bento-tile {
  box-shadow: 0 0 0 1px rgba(0,0,0,0.03), 0 1px 2px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.02);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Lift only on real hover devices; touch screens get :active feedback instead
   (a hover lift on touch "sticks" until the next tap elsewhere). */

@media (hover: hover) {
  .landing-light .bento-tile:hover {
    box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.03), 0 12px 40px rgba(0,0,0,0.06);
    transform: translateY(-2px);
  }
}

@media (hover: none) {
  .landing-light .scanner-tile:active,
  .landing-light .tile-phone:active { transform: scale(0.99); transition: transform 0.1s ease; }
}

/* Phone tile: white with outline */

.landing-light .tile-phone {
  background: var(--l-card);
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.02);
}

.landing-light .tile-phone:hover { border-color: rgba(0, 0, 0, 0.12); }

/* Accent tiles: teal glow on hover */

.landing-light .tile-accent:hover {
  border-color: rgba(11,122,95,0.18);
  box-shadow: 0 0 0 1px rgba(11,122,95,0.06), 0 4px 8px rgba(0,0,0,0.03), 0 12px 40px rgba(11,122,95,0.06);
}

/* ─── Subtle page texture ─── */

.landing-light.landing-wrap {
  background: radial-gradient(circle at 1px 1px, rgba(0,0,0,0.015) 1px, transparent 0) 0 0 / 32px 32px, #F7F6F3;
}

/* ─── Hero refinements ─── */

.ll-label { font-size: 10.5px; letter-spacing: 2.2px; }

.ll-cta { padding: 14px 32px; font-size: 14.5px; box-shadow: 0 2px 8px rgba(11,122,95,0.15); }

.ll-cta:hover { box-shadow: 0 4px 20px rgba(11,122,95,0.25); }

.ll-tile-title { font-size: 19px; font-weight: 720; letter-spacing: -0.4px; }

.ll-citation { font-size: 10.5px; letter-spacing: 0.3px; padding: 4px 11px; margin-top: 16px; }

.ll-intel-cats { gap: 8px; padding-top: 8px; }

.ll-intel-cats span { font-size: 12.5px; gap: 7px; }

/* ─── Pillar grid refined ─── */

.ll-pillar { padding: 13px 15px; border-radius: 11px; transition: all 0.2s; }

.ll-pillar:hover { background: rgba(11,122,95,0.1); border-color: rgba(11,122,95,0.18); }

.ll-pillar-name { font-size: 13.5px; font-weight: 720; }

.ll-ai-card { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }

/* ─── Footer tiles vertical center ─── */

.landing-light .tile-devices, .landing-light .tile-safety { justify-content: center; }

.ll-footer { padding: 56px 40px 48px; font-size: 10.5px; letter-spacing: 0.5px; }

.ll-watch-footer { font-size: 10.5px; letter-spacing: 0.5px; }

.ll-watch-pill { font-size: 8.5px; letter-spacing: 2px; padding: 5px 16px; }

.ll-features span { font-size: 13.5px; line-height: 1.45; }

.ll-features span::before { width: 4px; height: 4px; top: 7px; opacity: 0.5; }

/* ─── Demo overrides for white phone tile ─── */

.landing-light .tile-phone .demo-badge {
  background: rgba(11,122,95,0.08); color: #0B7A5F; border-color: rgba(11,122,95,0.15);
}

.landing-light .tile-phone .demo-cta { background: #0B7A5F; }

.landing-light .tile-phone .demo-cta:hover { background: #096B53; box-shadow: 0 4px 16px rgba(11,122,95,0.2); }

/* ─── Citation links ─── */

a.ll-citation { text-decoration: none; transition: all 0.2s; }

a.ll-citation:hover { background: rgba(11,122,95,0.12); border-color: rgba(11,122,95,0.2); transform: translateY(-1px); }

a.ll-pillar { transition: all 0.2s; }

a.ll-pillar:hover .ll-pillar-trial { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════
   FEATURE SHOWCASE + AI HERO
   ═══════════════════════════════════════════════════════════════ */

.ll-showcase { max-width: 1380px; margin: 0 auto; padding: 8px 36px 60px; position: relative; z-index: 10; }

/* ─── AI Hero — dark contrast section ─── */

.ll-ai-hero {
  border-radius: 24px;
  background: linear-gradient(135deg, #0a0f1c 0%, #111827 50%, #0f172a 100%);
  padding: 56px 52px; margin-bottom: 56px;
  position: relative; overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 24px 48px rgba(0,0,0,0.12);
}

.ll-ai-hero::before {
  content: ''; position: absolute; top: -40%; right: -10%; width: 50%; height: 120%;
  background: radial-gradient(ellipse at center, rgba(11,122,95,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.ll-ai-hero-inner { display: flex; gap: 56px; align-items: flex-start; position: relative; z-index: 1; }

.ll-ai-left { flex: 1; min-width: 0; }

.ll-ai-badge-pill {
  display: inline-flex; padding: 6px 16px; border-radius: 9999px;
  background: rgba(11,122,95,0.12); border: 1px solid rgba(11,122,95,0.2);
  font-size: 10px; font-weight: 700; letter-spacing: 2px; color: #34d399; margin-bottom: 20px;
}

.ll-ai-heading { font-family: 'Newsreader', Georgia, serif; font-size: 52px; font-weight: 500; color: #f0f2f5; margin: 0 0 16px; letter-spacing: -1px; line-height: 1; }

.ll-ai-subheading { font-size: 16px; color: rgba(255,255,255,0.55); line-height: 1.65; margin: 0 0 36px; max-width: 440px; }

.ll-ai-stats { display: flex; align-items: center; gap: 28px; }

.ll-ai-stat-item { display: flex; flex-direction: column; gap: 2px; }

.ll-ai-stat-num { font-family: var(--font-heading); font-size: 32px; font-weight: 800; color: #f0f2f5; letter-spacing: -1px; line-height: 1; }

.ll-ai-stat-label { font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.35); letter-spacing: 0.3px; }

.ll-ai-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.08); }

.ll-ai-right { flex: 0 0 440px; display: flex; flex-direction: column; gap: 12px; }

.ll-ai-step-card {
  padding: 18px 20px; border-radius: 16px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  transition: all 0.4s ease; opacity: 0.35;
}

.ll-ai-step-card.active { opacity: 1; background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }

.ll-ai-step-card.done { opacity: 0.6; }

.ll-ai-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.4); flex-shrink: 0; transition: all 0.3s;
}

.ll-ai-step-card.active .ll-ai-step-dot { background: rgba(11,122,95,0.2); border-color: rgba(11,122,95,0.4); color: #34d399; }

.ll-ai-step-card.done .ll-ai-step-dot { background: rgba(11,122,95,0.15); border-color: rgba(11,122,95,0.3); color: #34d399; }

.ll-ai-accepted {
  align-self: flex-end; padding: 8px 20px;
  background: rgba(11,122,95,0.15); border: 1px solid rgba(11,122,95,0.25);
  border-radius: 9999px; font-size: 13px; font-weight: 700; color: #34d399; letter-spacing: 0.3px;
}

/* ─── Section header ─── */

.ll-showcase-header { text-align: center; margin-bottom: 48px; }

.ll-showcase-title { font-family: 'Newsreader', Georgia, serif; font-size: 36px; font-weight: 500; color: #1a1d2e; margin: 0 0 10px; letter-spacing: -0.5px; }

.ll-showcase-sub { font-size: 15px; color: #8c91a3; margin: 0; }

/* ─── Category labels ─── */

.ll-showcase-category { margin-bottom: 40px; }

.ll-showcase-cat-label {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase; margin-bottom: 16px; padding-left: 2px;
}

.ll-showcase-cat-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.ll-showcase-cat-count { margin-left: auto; font-size: 11px; font-weight: 600; color: #8c91a3; letter-spacing: 0; }

/* ─── Card grid — 2 per row ─── */

.ll-showcase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ─── Feature cards ─── */

.ll-feat-card {
  background: rgba(255,255,255,0.50);
  /* backdrop-filter removed: the card sits on opaque cream, so the blur of a
     uniform background produced zero visible effect while costing a GPU layer. */
  border: 1px solid rgba(255,255,255,0.6); border-top-color: rgba(255,255,255,0.8);
  border-radius: 20px; padding: 28px 28px 24px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative; overflow: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 0 0.5px rgba(0,0,0,0.03), 0 1px 3px rgba(0,0,0,0.02), 0 6px 20px rgba(0,0,0,0.03), inset 0 1px 0 rgba(255,255,255,0.45);
}

.ll-feat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 45%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  pointer-events: none; z-index: 0; border-radius: 20px 20px 0 0;
}

.ll-feat-card > * { position: relative; z-index: 1; }

@media (hover: hover) {
  .ll-feat-card:hover {
    background: rgba(255,255,255,0.68); transform: translateY(-2px);
    box-shadow: 0 0 0 0.5px rgba(0,0,0,0.03), 0 4px 8px rgba(0,0,0,0.03), 0 14px 40px rgba(0,0,0,0.06), inset 0 1px 0 rgba(255,255,255,0.5);
  }
}

.ll-feat-graphic { width: 120px; height: 48px; margin-bottom: 12px; }

.ll-feat-svg { width: 100%; height: 100%; display: block; }

.ll-feat-title { font-family: var(--font-body); font-size: 18px; font-weight: 700; color: #1a1d2e; margin: 0; line-height: 1.25; letter-spacing: -0.3px; }

.ll-feat-desc { font-size: 14px; color: #6b7394; margin: 6px 0 0; line-height: 1.55; }

.ll-feat-outcome {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 14px;
  padding: 12px 14px; background: rgba(0,0,0,0.02); border-radius: 12px; border: 1px solid rgba(0,0,0,0.04);
}

.ll-feat-outcome svg { flex-shrink: 0; margin-top: 1px; }

.ll-feat-outcome span { font-size: 13px; font-weight: 600; color: #1a1d2e; line-height: 1.45; }

.ll-feat-cite {
  display: inline-block; font-size: 11px; font-weight: 600; color: #8c91a3;
  margin-top: 10px; padding: 4px 10px; background: rgba(0,0,0,0.03);
  border-radius: 7px; align-self: flex-start; letter-spacing: 0.2px;
}

a.ll-feat-cite { text-decoration: none; color: #0B7A5F; transition: all 0.2s; }

a.ll-feat-cite:hover { background: rgba(11,122,95,0.08); color: #096B53; }

/* ─── SVG animations ─── */

.ll-wave-line { stroke-dasharray: 300; stroke-dashoffset: 300; animation: ll-draw-wave 3s ease-out forwards, ll-wave-loop 4s ease-in-out 3s infinite; }

@keyframes ll-draw-wave { to { stroke-dashoffset: 0; } }

@keyframes ll-wave-loop { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

.ll-trend-draw { stroke-dasharray: 160; stroke-dashoffset: 160; animation: ll-draw-trend 2s ease-out forwards; }

@keyframes ll-draw-trend { to { stroke-dashoffset: 0; } }

.ll-pulse-draw { stroke-dasharray: 350; stroke-dashoffset: 350; animation: ll-draw-pulse 2.5s linear forwards, ll-pulse-loop 3s linear 2.5s infinite; }

@keyframes ll-draw-pulse { to { stroke-dashoffset: 0; } }

@keyframes ll-pulse-loop { 0% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -350; } }

/* ─── Responsive ─── */

@media (max-width: 1024px) { .ll-ai-hero-inner { flex-direction: column; gap: 36px; } .ll-ai-right { flex: 1; width: 100%; } .ll-ai-hero { padding: 40px 32px; } }

@media (max-width: 768px) {
  .ll-showcase { padding: 8px 16px 32px; }
  .ll-showcase-grid { grid-template-columns: 1fr; gap: 12px; }
  .ll-ai-hero { padding: 32px 24px; margin-bottom: 32px; }
  .ll-ai-heading { font-size: 38px; }
  /* Drop the 38px step-card indent on phones so the dose recommendation
     doesn't overflow the overflow:hidden hero. */
  .ll-ai-rec { margin-left: 0 !important; }
  .ll-ai-stats { flex-wrap: wrap; gap: 20px; }
  .ll-showcase-title { font-size: 28px; }
  /* Tighten the tall stacked showcase on phones — content unchanged, just
     less air between the header, each category, and each card. */
  .ll-showcase-header { margin-bottom: 28px; }
  .ll-showcase-category { margin-bottom: 24px; }
  .ll-feat-card { padding: 20px 20px 18px; }
}

/* Regulatory section is all inline-styled for desktop; reclaim its oversized
   top margin + side padding on phones (inline styles need !important here). */

@media (max-width: 768px) {
  .ll-reg {
    margin-top: 36px !important;
    padding: 24px 18px !important;
  }
}

/* Touch devices: every tappable reference link clears the 44px target floor. */

@media (pointer: coarse) {
  .ll-pillar { min-height: 48px; }
  .ll-citation,
  a.ll-citation,
  .ll-feat-cite,
  a.ll-feat-cite {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL LIGHT THEME OVERRIDES
   Catches any remaining hardcoded dark-theme colors
   ═══════════════════════════════════════════════════════════════ */

/* Scrollbar — light */

::-webkit-scrollbar-track { background: var(--bg-surface); }

::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }

/* Cards and surfaces */

/* ════════════════════════════════════════════════════════════════════
   3D LIMB EDEMA SCANNER — Row 1 bento tile
   Photorealistic forearm photo + three pulsing CSS circumference bands
   over the wrist + a 2 px teal laser line that sweeps top→bottom every
   4 s. Pure CSS animations — no JS, no textures beyond the static photo.
   ════════════════════════════════════════════════════════════════════ */

/* Outer tile: block layout — overlays are absolute-positioned over the video */

.bento-tile.scanner-tile {
  position: relative;
  overflow: hidden;
  background: #000;
  display: block;
}

/* Video fills the entire tile absolutely */

.bento-tile.scanner-tile .scanner-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl); /* matches .bento-tile border-radius (24px) */
  pointer-events: none;
  opacity: 0;
  animation: scanner-video-fade-in 600ms ease-out 200ms forwards;
  transition: transform 300ms ease-in-out, filter 300ms ease-in-out;
  z-index: 1;
}

.bento-tile.scanner-tile:hover .scanner-video {
  transform: scale(1.02);
  filter: saturate(1.1);
}

@keyframes scanner-video-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Shared overlay base — title and CTA bands sit above the video */

.bento-tile.scanner-tile .scanner-overlay {
  position: absolute;
  left: 0;
  right: 0;
  padding: 14px 18px;
  pointer-events: none;
  z-index: 2;
  display: flex;
  align-items: center;
  color: #fff;
}

/* Top overlay — title */

.bento-tile.scanner-tile .scanner-overlay-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  min-height: 56px;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0) 100%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  padding-top: 18px;
  padding-bottom: 24px;
}

/* Bottom overlay — CTA */

.bento-tile.scanner-tile .scanner-overlay-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.50) 50%, rgba(0,0,0,0) 100%);
  padding-top: 28px;
  padding-bottom: 20px;
}

/* Title — premium bold treatment over video; layered shadow for crisp separation */

.bento-tile.scanner-tile .scanner-title {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #fff;
  /* hard 1px edge · soft dark drop · faint cyan glow tied to scanner rings */
  text-shadow:
    0 1px 0 rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.6),
    0 0 14px rgba(94,234,212,0.18);
}

/* CTA pill — frosted glass with strong presence over the video */

.bento-tile.scanner-tile .scanner-cta {
  display: inline-block;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.85);
  color: #0a1f1c;
  padding: 11px 22px;
  border-radius: 999px;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  letter-spacing: 0.005em;
  text-shadow: none;
  pointer-events: auto;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.25),
    0 8px 24px rgba(0,0,0,0.30),
    0 0 0 1px rgba(255,255,255,0.4) inset;
  transition: transform 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

/* Whole-card hover lifts the CTA — affords clickability for the entire tile. */

.bento-tile.scanner-tile:hover .scanner-cta {
  background: rgba(255,255,255,1);
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0,0,0,0.3),
    0 12px 32px rgba(0,0,0,0.35),
    0 0 0 1px rgba(94,234,212,0.5) inset;
}

.bento-tile.scanner-tile:active .scanner-cta { transform: translateY(0); }

/* Keyboard focus ring on the card itself (since it's now role="link" tabIndex=0). */

.bento-tile.scanner-tile:focus-visible {
  outline: 3px solid #0f766e;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .bento-tile.scanner-tile .scanner-video {
    animation: none;
    opacity: 1;
  }
  .bento-tile.scanner-tile .scanner-overlay {
    transition: none;
  }
}

@keyframes demoSkipPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11,122,95,0); }
  50% { box-shadow: 0 0 0 6px rgba(11,122,95,0.12); }
}

/* Two-column split: hero left, demo right */

@keyframes demoFrameIntro {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  2% {
    opacity: 1;
    transform: scale(1);
  }

  16% {
    opacity: 1;
    transform: scale(1);
  }

  19% {
    opacity: 0;
    transform: scale(1.02);
  }

  100% {
    opacity: 0;
  }
}

/* Weight: 20%–38% (3–5.7s) */

@keyframes demoFrame1 {
  0% {
    opacity: 0;
  }

  20% {
    opacity: 0;
    transform: translateY(12px);
  }

  23% {
    opacity: 1;
    transform: translateY(0);
  }

  36% {
    opacity: 1;
    transform: translateY(0);
  }

  39% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 0;
  }
}

/* Symptoms: 40%–58% (6–8.7s) */

@keyframes demoFrame2 {
  0% {
    opacity: 0;
  }

  40% {
    opacity: 0;
    transform: translateY(12px);
  }

  43% {
    opacity: 1;
    transform: translateY(0);
  }

  56% {
    opacity: 1;
    transform: translateY(0);
  }

  59% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 0;
  }
}

/* Meds: 60%–75% (9–11.25s) */

@keyframes demoFrame3 {
  0% {
    opacity: 0;
  }

  60% {
    opacity: 0;
    transform: translateY(12px);
  }

  63% {
    opacity: 1;
    transform: translateY(0);
  }

  73% {
    opacity: 1;
    transform: translateY(0);
  }

  76% {
    opacity: 0;
    transform: translateY(-8px);
  }

  100% {
    opacity: 0;
  }
}

/* Result: 77%–96% (11.5–14.4s) */

@keyframes demoFrame4 {
  0% {
    opacity: 0;
  }

  77% {
    opacity: 0;
    transform: scale(0.95);
  }

  80% {
    opacity: 1;
    transform: scale(1);
  }

  93% {
    opacity: 1;
  }

  96% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* ─── Intro frame styles ─── */

.demo-intro-icon {
  font-size: 32px;
  animation: demoIntroIconPulse 15s ease infinite;
}

@keyframes demoIntroIconPulse {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }

  3% {
    transform: scale(1.1);
    opacity: 1;
  }

  5% {
    transform: scale(1);
  }

  16% {
    transform: scale(1);
    opacity: 1;
  }

  19% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.demo-intro-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: #f5f5f7;
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.3px;
}

.demo-intro-sub {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(245, 245, 247, 0.65);
  text-align: center;
}

.demo-intro-ring {
  width: 68px;
  height: 68px;
}

.demo-anim-intro-ring {
  animation: demoIntroRing 15s ease infinite;
}

@keyframes demoIntroRing {
  0% {
    stroke-dashoffset: 213.6;
  }

  3% {
    stroke-dashoffset: 213.6;
  }

  16% {
    stroke-dashoffset: 0;
  }

  19% {
    stroke-dashoffset: 0;
  }

  100% {
    stroke-dashoffset: 213.6;
  }
}

.demo-intro-timer {
  font-size: 18px;
}

/* ─── Step label ─── */

.demo-step-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0;
}

/* ─── Weight step ─── */

.demo-weight-display {
  text-align: center;
  margin-bottom: 0;
}

.demo-weight-num {
  font-family: var(--font-heading);
  font-size: 52px;
  font-weight: 800;
  color: #f5f5f7;
  animation: demoCountUp 15s ease infinite;
}

@keyframes demoCountUp {
  0% {
    opacity: 0;
  }

  23% {
    opacity: 0.3;
  }

  26% {
    opacity: 1;
  }

  36% {
    opacity: 1;
  }

  39% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.demo-weight-unit {
  font-family: var(--font-body);
  font-size: 20px;
  color: rgba(245, 245, 247, 0.65);
  margin-left: 4px;
}

.demo-delta {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  color: #fbbf24;
  margin-top: 0;
  animation: demoFadeIn 15s ease infinite;
}

@keyframes demoFadeIn {
  0% {
    opacity: 0;
  }

  28% {
    opacity: 0;
  }

  32% {
    opacity: 1;
  }

  36% {
    opacity: 1;
  }

  39% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

/* ─── Slider tracks ─── */

.demo-slider-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0;
  overflow: visible;
}

.demo-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 3px;
  width: 0%;
}

.demo-slider-thumb {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  left: 0%;
}

/* Weight slider anim */

.demo-anim-weight-fill {
  background: var(--accent);
  animation: demoSlide 15s ease infinite;
}

.demo-anim-weight-thumb {
  background: var(--accent);
  border: 2px solid #fff;
  animation: demoSlideThumb 15s ease infinite;
}

@keyframes demoSlide {
  0% {
    width: 0%;
  }

  22% {
    width: 15%;
  }

  30% {
    width: 62%;
  }

  36% {
    width: 62%;
  }

  39% {
    width: 0%;
  }

  100% {
    width: 0%;
  }
}

@keyframes demoSlideThumb {
  0% {
    left: 0%;
  }

  22% {
    left: 15%;
  }

  30% {
    left: 62%;
  }

  36% {
    left: 62%;
  }

  39% {
    left: 0%;
  }

  100% {
    left: 0%;
  }
}

/* ─── Symptom rows ─── */

.demo-sym-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.demo-sym-q {
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(245, 245, 247, 0.82);
}

.demo-sym-icon {
  font-size: 16px;
}

.demo-track-green .demo-slider-fill {
  background: var(--success);
}

.demo-track-green .demo-slider-thumb {
  background: var(--success);
  border: 2px solid #fff;
}

/* Staggered symptom slider animations */

.demo-anim-sym1-fill {
  animation: demoSym1 15s ease infinite;
}

.demo-anim-sym1-thumb {
  animation: demoSym1Thumb 15s ease infinite;
}

.demo-anim-sym2-fill {
  animation: demoSym2 15s ease infinite;
}

.demo-anim-sym2-thumb {
  animation: demoSym2Thumb 15s ease infinite;
}

.demo-anim-sym3-fill {
  animation: demoSym3 15s ease infinite;
}

.demo-anim-sym3-thumb {
  animation: demoSym3Thumb 15s ease infinite;
}

@keyframes demoSym1 {
  0% {
    width: 0;
  }

  41% {
    width: 0;
  }

  45% {
    width: 18%;
  }

  56% {
    width: 18%;
  }

  59% {
    width: 0;
  }

  100% {
    width: 0;
  }
}

@keyframes demoSym1Thumb {
  0% {
    left: 0;
  }

  41% {
    left: 0;
  }

  45% {
    left: 18%;
  }

  56% {
    left: 18%;
  }

  59% {
    left: 0;
  }

  100% {
    left: 0;
  }
}

@keyframes demoSym2 {
  0% {
    width: 0;
  }

  44% {
    width: 0;
  }

  48% {
    width: 12%;
  }

  56% {
    width: 12%;
  }

  59% {
    width: 0;
  }

  100% {
    width: 0;
  }
}

@keyframes demoSym2Thumb {
  0% {
    left: 0;
  }

  44% {
    left: 0;
  }

  48% {
    left: 12%;
  }

  56% {
    left: 12%;
  }

  59% {
    left: 0;
  }

  100% {
    left: 0;
  }
}

@keyframes demoSym3 {
  0% {
    width: 0;
  }

  47% {
    width: 0;
  }

  51% {
    width: 22%;
  }

  56% {
    width: 22%;
  }

  59% {
    width: 0;
  }

  100% {
    width: 0;
  }
}

@keyframes demoSym3Thumb {
  0% {
    left: 0;
  }

  47% {
    left: 0;
  }

  51% {
    left: 22%;
  }

  56% {
    left: 22%;
  }

  59% {
    left: 0;
  }

  100% {
    left: 0;
  }
}

/* ─── Medication checklist ─── */

.demo-med-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  margin-bottom: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--font-body);
  font-size: 13px;
  color: #f5f5f7;
  opacity: 0;
  transform: translateX(-8px);
}

.demo-anim-med1 {
  animation: demoMed1 15s ease infinite;
}

.demo-anim-med2 {
  animation: demoMed2 15s ease infinite;
}

.demo-anim-med3 {
  animation: demoMed3 15s ease infinite;
}

@keyframes demoMed1 {
  0% {
    opacity: 0;
  }

  61% {
    opacity: 0;
    transform: translateX(-8px);
  }

  64% {
    opacity: 1;
    transform: translateX(0);
  }

  73% {
    opacity: 1;
  }

  76% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes demoMed2 {
  0% {
    opacity: 0;
  }

  63% {
    opacity: 0;
    transform: translateX(-8px);
  }

  66% {
    opacity: 1;
    transform: translateX(0);
  }

  73% {
    opacity: 1;
  }

  76% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

@keyframes demoMed3 {
  0% {
    opacity: 0;
  }

  65% {
    opacity: 0;
    transform: translateX(-8px);
  }

  68% {
    opacity: 1;
    transform: translateX(0);
  }

  73% {
    opacity: 1;
  }

  76% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.demo-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(245, 245, 247, 0.45);
  position: relative;
  flex-shrink: 0;
}

.demo-checkbox.demo-checked {
  background: var(--success);
  border-color: var(--success);
}

.demo-checkbox.demo-checked::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ─── Result / zone ─── */

.demo-frame-result {
  align-items: center;
  justify-content: center;
  /* gap is controlled by the per-frame override in landing.css */
}

.demo-zone-badge {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: #34d399;
  animation: demoPop 15s ease infinite;
}

@keyframes demoPop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }

  77% {
    transform: scale(0.8);
    opacity: 0;
  }

  81% {
    transform: scale(1.1);
    opacity: 1;
  }

  84% {
    transform: scale(1);
  }

  93% {
    transform: scale(1);
    opacity: 1;
  }

  96% {
    opacity: 0;
  }

  100% {
    opacity: 0;
  }
}

.demo-zone-msg {
  font-family: var(--font-body);
  font-size: 14px;
  color: rgba(245, 245, 247, 0.72);
}

.demo-timer-ring {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0;
}

.demo-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.demo-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 4;
}

.demo-ring-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
}

.demo-anim-ring {
  animation: demoRing 15s ease infinite;
}

@keyframes demoRing {
  0% {
    stroke-dashoffset: 213.6;
  }

  78% {
    stroke-dashoffset: 213.6;
  }

  90% {
    stroke-dashoffset: 0;
  }

  93% {
    stroke-dashoffset: 0;
  }

  96% {
    stroke-dashoffset: 213.6;
  }

  100% {
    stroke-dashoffset: 213.6;
  }
}

.demo-timer-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: #34d399;
}

.demo-streak {
  font-family: var(--font-body);
  font-size: 14px;
  color: #fbbf24;
  font-weight: 600;
}

/* ─── Responsive ─── */

.dlog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.dlog-modal {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  min-height: 420px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dlog-close {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 10;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  cursor: pointer;
  z-index: 2;
}

.dlog-close:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.04);
}

/* Progress */

.dlog-progress {
  padding: 20px 24px 0;
}

.dlog-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 8px;
  font-family: var(--font-body);
}

.dlog-progress-track {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  overflow: hidden;
}

.dlog-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Step content */

.dlog-step {
  flex: 1;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
}

.dlog-step-title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.dlog-step-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 24px;
}

/* Weight input */

.dlog-weight-input-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 12px;
}

/* Weight slider */

.dlog-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  cursor: pointer;
}

.dlog-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-raised);
  box-shadow: 0 0 12px var(--accent-glow);
  cursor: grab;
}

.dlog-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg-raised);
  cursor: grab;
}

.dlog-nudge-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.dlog-nudge-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.dlog-delta {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  margin: 0 0 8px;
}

.dlog-same-btn {
  display: block;
  margin: 8px auto 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-family: var(--font-body);
}

/* Buttons */

.dlog-next-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  margin-top: auto;
  border: none;
  border-radius: 12px;
  background: #e8eaed;
  color: #121317;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.dlog-next-btn:hover {
  background: #fff;
}

.dlog-next-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.dlog-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.dlog-back-btn:hover {
  color: var(--text-primary);
}

.dlog-btn-row {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.dlog-btn-row .dlog-next-btn {
  flex: 1;
}

/* Symptoms */

.dlog-symptoms-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.dlog-symptom-q {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 8px;
}

/* Symptom slider */

.dlog-symptom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--success) 0%, var(--warning) 50%, var(--danger) 100%);
  opacity: 0.3;
  outline: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.dlog-symptom-slider:hover {
  opacity: 0.5;
}

.dlog-symptom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slider-color, var(--text-muted));
  border: 3px solid var(--bg-raised);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
  cursor: grab;
}

.dlog-symptom-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slider-color, var(--text-muted));
  border: 3px solid var(--bg-raised);
  cursor: grab;
}

/* Medications — drill-down UI (class → drug → dose) */

/* Selected meds summary pills */

.dlog-selected-meds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.dlog-selected-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid;
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.dlog-pill-x {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
}

.dlog-pill-x:hover {
  color: var(--danger);
}

/* Class list buttons */

.dlog-class-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  max-height: 340px;
  overflow-y: auto;
}

.dlog-class-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  transition: all 0.12s;
}

.dlog-class-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.dlog-class-btn.selected {
  background: rgba(255, 255, 255, 0.04);
}

.dlog-class-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dlog-class-label {
  flex: 1;
  font-weight: 600;
}

/* Drill-down back link + header */

.dlog-drillback {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
}

.dlog-drillback:hover {
  text-decoration: underline;
}

.dlog-drill-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}

/* Dose list — big tap targets */

.dlog-dose-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.dlog-dose-btn {
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.12s;
}

.dlog-dose-btn:hover {
  border-color: inherit;
  background: rgba(255, 255, 255, 0.05);
}

/* Pu.ri-AI Animations */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.spin {
  animation: spin 1s linear infinite;
}

/* ─── RESTORED HIGH-FIDELITY BENTO GRID (Hardware Mockups) ─── */

.dlog-overlay { background: rgba(0,0,0,0.25); }

.dlog-modal { background: var(--bg-raised); border-color: var(--border); box-shadow: var(--shadow-lg); }

.dlog-close { background: rgba(0,0,0,0.05); color: var(--text-muted); }

.dlog-progress-track { background: rgba(0,0,0,0.06); }

.dlog-next-btn { background: var(--accent); color: #fff; }

.dlog-next-btn:hover { background: var(--accent-hover); }

.dlog-back-btn { border-color: var(--border); color: var(--text-muted); }

.dlog-class-btn { border-color: var(--border); color: var(--text-primary); }

.dlog-dose-btn { border-color: var(--border); color: var(--text-primary); }

/* Table */

/* admin.css + patient.css are loaded lazily by their route components
   (AdminDashboard.jsx and PatientPortal.jsx import them directly), so
   the landing-route CSS bundle doesn't ship them. */

/* ═══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE — comprehensive mobile overrides
   Imported last so these rules win over component defaults.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Admin Layout — Mobile Hamburger + Slide-over ─── */

@media (max-width: 768px) {
  /* Show hamburger button */
  .admin-hamburger {
    display: flex !important;
  }
  /* Show backdrop when sidebar open */
  .admin-sidebar-backdrop {
    display: block !important;
  }
  /* Show close button in sidebar */
  .sidebar-close-btn {
    display: block !important;
  }
  /* Sidebar: fixed left slide-over */
  .admin-sidebar-panel {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 260px !important;
    height: 100vh !important;
    z-index: 600 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15) !important;
    padding-top: 20px !important;
  }
  /* When sidebar is open (triggered by adjacent backdrop existing) */
  .admin-sidebar-backdrop + .admin-sidebar-panel,
  .admin-sidebar-backdrop ~ .admin-sidebar-panel {
    transform: translateX(0) !important;
  }
  /* Main wrapper — full width */
  .admin-wrapper {
    margin: 0 !important;
    width: 100% !important;
  }
  /* Main content — full width with padding for hamburger */
  .admin-main-content {
    max-height: none !important;
    padding: 10px 8px 40px !important;
    overflow-x: hidden !important;
    width: 100% !important;
  }
  /* Admin headings */
  .admin-main-content h1 { font-size: 18px !important; }
  .admin-main-content h2 { font-size: 16px !important; }
  .admin-main-content h3 { font-size: 14px !important; }
  /* Grids — single column */
  .admin-main-content div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
  }
  /* KPI cards — keep 2 columns */
  .admin-main-content div[style*="minmax(140px"],
  .admin-main-content div[style*="minmax(130px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  /* Cards compact */
  .admin-main-content .card {
    padding: 12px !important;
    margin-bottom: 8px !important;
  }
  /* Flex wrapping for buttons/toggles */
  .admin-main-content div[style*="display: flex"][style*="gap: 8"] {
    flex-wrap: wrap !important;
  }
  /* Action Center header row */
  .admin-main-content div[style*="flexWrap: 'wrap'"] {
    gap: 6px !important;
  }
  /* Patient cards in directory — reduce padding */
  .admin-main-content div[style*="padding: '16px 22px'"],
  .admin-main-content div[style*="padding: '14px 18px'"] {
    padding: 10px 12px !important;
  }
  /* Word break for long text */
  .admin-main-content {
    word-break: break-word !important;
  }
}

/* ─── Patient Portal ─── */

@media (max-width: 768px) {
  .patient-tabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap !important;
    gap: 3px !important;
    padding-bottom: 8px !important;
    margin-bottom: 16px !important;
  }
  .patient-tabs::-webkit-scrollbar { display: none; }
  .patient-tab {
    font-size: 11px !important;
    padding: 7px 10px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    gap: 4px !important;
    border-radius: 20px !important;
  }
  .patient-tab svg {
    width: 12px !important;
    height: 12px !important;
  }
  .dash-subtabs {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100% !important;
    padding: 3px !important;
    margin-bottom: 12px !important;
  }
  .dash-subtabs::-webkit-scrollbar { display: none; }
  .dash-subtab {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    font-size: 11px !important;
    padding: 5px 10px !important;
  }
  /* Patient portal header — compact */
  .patient-tabs + div h1,
  div[style*="maxWidth: 1100"] h1 {
    font-size: 22px !important;
  }
  /* Wearable metrics grid — 2 columns instead of 5 */
  div[style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  /* Score badge and vitals row — stack */
  div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  /* Dose progress bars — full width */
  .dose-grid,
  .pillar-grid,
  .pillar-log-grid {
    grid-template-columns: 1fr !important;
  }
  /* Onboarding buttons — stack on mobile */
  div[style*="flexWrap: 'wrap'"],
  div[style*="flex-wrap: wrap"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  /* Log Today button in patient tabs — full width below tabs */
  .patient-tabs button[style*="marginLeft: auto"] {
    margin-left: 0 !important;
    margin-top: 4px !important;
    flex-shrink: 0 !important;
  }
}

/* ─── Cards ─── */

@media (max-width: 768px) {
  .card {
    padding: 16px !important;
    margin-bottom: 12px !important;
    border-radius: 12px !important;
  }
  .card:hover {
    transform: none !important; /* Disable hover lift on touch */
  }
}

/* ─── Inline style grid overrides ─── */

@media (max-width: 640px) {
  /* Force 2-column grids with inline styles to single column */
  div[style*="grid-template-columns: repeat(auto-fill"],
  div[style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
  /* Two-column layouts to stack */
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: minmax"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Forms & Inputs ─── */

@media (max-width: 768px) {
  .input-control,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS auto-zoom */
  }
  /* Full width buttons on mobile */
  .btn-primary,
  button[type="submit"] {
    width: 100% !important;
  }
}

/* ─── Login Page ─── */

@media (max-width: 480px) {
  .card[style*="padding: 48"] {
    padding: 28px 20px !important;
  }
}

/* ─── Clinical Tool ─── */

@media (max-width: 768px) {
  /* Step indicators */
  div[style*="display: flex"][style*="gap: 8px"] > div[style*="borderRadius: 50%"] {
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
  }
}

/* ─── Action Center ─── */

@media (max-width: 768px) {
  /* KPI cards row */
  div[style*="grid-template-columns: repeat(auto-fit, minmax(140px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  div[style*="grid-template-columns: repeat(auto-fit, minmax(130px"] {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
  /* Worklist items */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(300px"] {
    grid-template-columns: 1fr !important;
  }
  /* Display cards */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(230px"] {
    grid-template-columns: 1fr !important;
  }
  /* Pillar action cards */
  div[style*="grid-template-columns: repeat(auto-fill, minmax(280px"],
  div[style*="grid-template-columns: repeat(auto-fill, minmax(340px"] {
    grid-template-columns: 1fr !important;
  }
  /* Quick actions */
  div[style*="grid-template-columns: repeat(auto-fit, minmax(260px"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(auto-fit, minmax(100px"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Two-column panel layout to stack */
  div[style*="grid-template-columns: minmax(260px, 300px) minmax(0, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Modals ─── */

/* Default mobile behavior: dialogs are centered cards sized to their content
   (each modal styles itself). To opt into fullscreen on mobile, add the
   `modal--fullscreen-mobile` class to the dialog element. */

@media (max-width: 768px) {
  div[role="dialog"].modal--fullscreen-mobile {
    max-width: 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
    padding: 18px 16px env(safe-area-inset-bottom) !important;
  }
  div[role="presentation"] {
    padding: 0 !important;
  }
}

/* ─── Wearable Insights ─── */

@media (max-width: 640px) {
  /* Metric cards in wearable section */
  div[style*="grid-template-columns: repeat(5"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }
}

/* ─── Presentation / Slides ─── */

@media (max-width: 768px) {
  .slide {
    padding: 24px 16px !important;
  }
  .stat-huge {
    font-size: 48px !important;
  }
  .stat-big {
    font-size: 32px !important;
  }
  .two-col,
  .two-col-wide {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  .card-grid-2,
  .card-grid-3,
  .card-grid-4 {
    grid-template-columns: 1fr !important;
  }
  .flow {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .flow-arrow {
    transform: rotate(90deg);
    text-align: center;
    padding: 4px 0 !important;
  }
  .evidence-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }
}

/* ─── Text overflow prevention ─── */

@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
  }
  * {
    max-width: 100vw;
  }
  /* Prevent horizontal scroll from any element */
  .app-shell,
  .app-viewport,
  .admin-layout,
  .admin-main {
    overflow-x: hidden !important;
  }
}

/* ─── Touch-friendly tap targets ─── */

@media (max-width: 768px) {
  button, a, [role="button"] {
    min-height: 44px; /* Apple minimum touch target */
  }
}

/* ─── Clinical Brief / Paradox Card ─── */

/* Cards expand to fit their content on mobile (no height clamp). Body text
   is sized for comfortable reading on a phone. */

@media (max-width: 768px) {
  .clinical-brief-card {
    padding: 16px 16px 48px !important;
    min-height: auto !important;
    border-radius: 12px !important;
  }
  .clinical-brief-content {
    min-height: 280px !important;
  }
  /* Readable body typography */
  .clinical-brief-content h3 {
    font-size: 18px !important;
    line-height: 1.25 !important;
    margin-bottom: 8px !important;
  }
  .clinical-brief-content p,
  .clinical-brief-content li {
    font-size: 13.5px !important;
    line-height: 1.55 !important;
  }
  .clinical-brief-content p {
    margin-bottom: 8px !important;
  }
  /* Sub-headline (the bold slate line under the title) */
  .clinical-brief-content > div > div:nth-child(2) {
    font-size: 14.5px !important;
  }
  /* Meta row (LIVE pill / counter) — keep compact */
  .clinical-brief-card > div:first-child {
    margin-bottom: 10px !important;
  }
  /* Citation links */
  .clinical-brief-content a {
    font-size: 12px !important;
  }
  /* Safety-gates table */
  .clinical-brief-content table {
    font-size: 12.5px !important;
  }
  .clinical-brief-content td {
    padding: 7px 8px !important;
  }
  /* Nav bar — relative on mobile so it doesn't overlap content */
  .clinical-brief-nav {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    margin-top: 14px !important;
    padding: 0 !important;
    gap: 8px !important;
  }
  .clinical-brief-nav button {
    min-height: 32px !important;
  }
}

/* Extra small phones (SE, older Android) */

@media (max-width: 380px) {
  .clinical-brief-card {
    padding: 14px 14px 44px !important;
  }
  .clinical-brief-content h3 {
    font-size: 16px !important;
  }
  .clinical-brief-content p,
  .clinical-brief-content li {
    font-size: 13px !important;
  }
}

/* ─── Patient Auth — stack the two panels on mobile ─── */

@media (max-width: 768px) {
  /* The root is an inline display:flex row; force it to a column so the
     brand panel sits above a full-width form instead of crushing it. */
  .patient-auth-root {
    flex-direction: column !important;
  }
  .patient-auth-hero {
    flex: 0 0 auto !important;
    width: 100% !important;
    padding: 28px 24px !important;
    min-height: auto !important;
  }
  .patient-auth-hero h1 {
    font-size: 26px !important;
    margin-bottom: 10px !important;
  }
  .patient-auth-hero p {
    font-size: 13px !important;
    margin-bottom: 24px !important;
  }
  /* Hide the feature list on small phones to show login form faster */
  .patient-auth-hero > div > div:last-child {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .patient-auth-hero {
    padding: 20px 16px !important;
  }
  .patient-auth-hero h1 {
    font-size: 22px !important;
  }
}

/* ─── Nav bar scroll hint — fade edge to suggest swiping ─── */

@media (max-width: 768px) {
  .topbar-nav {
    mask-image: linear-gradient(to right, black 85%, transparent 100%) !important;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%) !important;
  }
}

/* ─── Daily Log Modal ─── */

/* On phones the modal is a centered card sized to its content with ~80px
   breathing room above and below. Internal padding/margins are also
   tightened so a short step (Weight) doesn't drag the modal out to the base
   420px floor it has on desktop. */

@media (max-width: 768px) {
  .dlog-modal {
    min-height: 0 !important;
    max-height: calc(100dvh - 160px) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .dlog-progress {
    padding: 10px 16px 0 !important;
  }
  .dlog-step {
    padding: 12px 16px 16px !important;
  }
  .dlog-step-title {
    font-size: 18px !important;
    margin: 0 0 2px !important;
  }
  .dlog-step-sub {
    font-size: 12px !important;
    margin: 0 0 10px !important;
  }
}

/* ─── Landing: iPhone tile (60s Check-in) ─── */

/* The tile wraps DailyLogDemo in a position:absolute container; with the
   global mobile rule applying min-height:auto the parent collapses and the
   demo phone has nowhere to render. Give the tile a fixed mobile height. */

@media (max-width: 768px) {
  .bento-tile.tile-phone,
  .landing-light .bento-tile.tile-phone {
    min-height: 380px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

@media (max-width: 480px) {
  .bento-tile.tile-phone,
  .landing-light .bento-tile.tile-phone {
    min-height: 360px !important;
  }
}

/* ─── Landing: 3D Limb Edema Scanner — spaced + breathable ─── */

/* The arm photo is absolutely positioned; on mobile it crowds the title and
   CTA. Give the tile real height, ease the arm scale, and pad header/footer. */

@media (max-width: 768px) {
  .bento-tile.scanner-tile,
  .landing-light .bento-tile.scanner-tile {
    min-height: 420px !important;
    padding: 0 !important;
  }
  .bento-tile.scanner-tile .scanner-header {
    padding: 22px 20px 14px !important;
  }
  .bento-tile.scanner-tile .scanner-title {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
  .bento-tile.scanner-tile .scanner-arm-photo {
    transform: translate(-50%, -50%) scale(0.85) rotate(-12deg) !important;
    max-width: 460px;
  }
  .bento-tile.scanner-tile .circumference-bands {
    transform: translate(-50%, -50%) rotateZ(-12deg) scale(0.95) !important;
  }
  .bento-tile.scanner-tile .scanner-footer {
    padding: 0 20px 22px !important;
  }
  .bento-tile.scanner-tile .scanner-cta {
    padding: 11px 22px !important;
    font-size: 13px !important;
  }
}

@media (max-width: 480px) {
  .bento-tile.scanner-tile,
  .landing-light .bento-tile.scanner-tile {
    min-height: 380px !important;
  }
  .bento-tile.scanner-tile .scanner-arm-photo {
    transform: translate(-50%, -50%) scale(0.78) rotate(-12deg) !important;
  }
}

/* ─── A11y heading-level fix (WCAG 1.3.1): preserve designed sizes after the
   semantic tag changes (scanner-title/ll-tile-title h3->h2, ll-feat-title
   h4->h3). These pins override base.css's bare h2/h3 font-size resets at
   <=480px so the visual sizing is unchanged. scanner-title is already pinned
   (18px) earlier in this file, so it needs no rule here. ─── */

@media (max-width: 480px) {
  .ll-tile-title { font-size: 19px !important; }
  .ll-feat-title { font-size: 18px !important; }
}

/* Must be last — overrides everything for mobile */

/* Shared editorial material system. Clinical/status colours stay semantic. */

:root {
  --bg-base: #e7eee8;
  --bg-raised: #fcfdfb;
  --bg-surface: #f1f5f0;
  --bg-card: #fff;
  --bg-input: #f6f8f4;
  --bg-hover: #e8eee7;
  --text-primary: #20362c;
  --text-secondary: #4e6258;
  --text-muted: #607367;
  --accent: #286248;
  --accent-hover: #1e4d38;
  --accent-dim: #edf4ec;
  --accent-glow: rgba(40,98,72,.12);
  --success-dim: #eef8f1;
  --warning-dim: #fff4e5;
  --danger-dim: #fff0ef;
  --purple-dim: #f3effb;
  --border: rgba(44,73,56,.14);
  --border-strong: rgba(44,73,56,.28);
  --glass-bg: rgba(255,255,255,.38);
  --glass-border: rgba(255,255,255,.82);
  --glass-blur: blur(24px) saturate(155%);
  --glass-shadow: 0 8px 28px rgba(47,74,56,.10), inset 0 1px 0 rgba(255,255,255,.90);
  --shadow-sm: 0 2px 5px rgba(38,63,46,.035);
  --shadow-md: 0 6px 22px rgba(38,63,46,.065);
  --shadow-lg: 0 18px 50px rgba(38,63,46,.10);
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: var(--font-body);
  --font-editorial: Georgia, 'Times New Roman', serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --header-height: 88px;
}

:root[data-glass="tinted"] { --glass-bg: rgba(238,245,235,.78); --glass-border: rgba(255,255,255,.95); }

:root[data-transparency="reduced"] { --glass-bg: #f6f9f3; --glass-border: #cddace; --glass-blur: none; }

@media (prefers-reduced-transparency: reduce) { :root, :root[data-glass], :root[data-glass][data-transparency] { --glass-bg: #f6f9f3; --glass-border: #cddace; --glass-blur: none; } }

@supports not (backdrop-filter: blur(1px)) { :root, :root[data-glass], :root[data-glass][data-transparency] { --glass-bg: #f6f9f3; --glass-blur: none; } }

body {
  width: 100%;
  background: linear-gradient(125deg, #e2ebe4 0%, #eef2e9 52%, #dde8df 100%);
  background-attachment: fixed;
  font-variant-numeric: tabular-nums;
}

.app-shell--editorial { min-height: 100dvh; }

.app-shell--editorial .app-viewport {
  overflow: visible;
  min-width: 0;
}

.app-shell--editorial .topbar {
  background: transparent;
  padding: max(16px, env(safe-area-inset-top)) 28px 8px;
  gap: 10px;
  width: 100%;
  isolation: isolate;
}

.app-shell--editorial .topbar-capsule {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  max-width: 1320px;
  height: 64px;
  padding: 8px 12px 8px 19px;
  gap: 14px;
  margin: 0 !important;
  border-radius: 22px;
}

.app-shell--editorial .topbar--scrolled .topbar-capsule { box-shadow: 0 10px 30px rgba(38,65,45,.16), inset 0 1px 0 #fff; }

.app-shell--editorial .topbar-brand { text-decoration: none; gap: 9px; white-space: nowrap; color: var(--text-primary); }

.app-shell--editorial .topbar-brand-text { font: 650 15px/1.2 var(--font-body); letter-spacing: -.025em; }

.app-shell--editorial .topbar-brand-icon { width: 29px; height: 29px; background: var(--accent); border-radius: 9px; box-shadow: none; }

.app-shell--editorial .topbar-nav { flex: 1; justify-content: center; gap: 3px; min-width: 0; }

.app-shell--editorial .topbar-tab { padding: 10px 11px; border-radius: 11px; font: 550 12px/1.2 var(--font-body); gap: 6px; white-space: nowrap; }

.app-shell--editorial .topbar-tab.active { background: rgba(255,255,255,.80); color: var(--accent); box-shadow: 0 1px 4px rgba(38,65,45,.05); }

.app-shell--editorial .topbar-tab:hover { background: rgba(255,255,255,.65); }

.app-shell--editorial .topbar-utilities { position: static; transform: none; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.app-shell--editorial .topbar-capsule-right { margin-left: 0; padding-right: 0; }

.app-shell--editorial .nav-demo-cta { background: var(--accent); box-shadow: none; border-radius: 11px; font-weight: 600; }

.app-shell--editorial .nav-demo-cta:hover { background: var(--accent-hover); transform: none; box-shadow: none; }

.app-shell--editorial .topbar-back { position: static; flex-shrink: 0; background: var(--glass-bg); backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); color: var(--text-primary); box-shadow: var(--shadow-sm); }

.app-shell--editorial .topbar-hamburger { display: none; background: rgba(255,255,255,.6); border: 1px solid var(--glass-border); border-radius: 10px; width: 36px; height: 36px; }

.app-shell--editorial .glass-popover { background: var(--glass-bg) !important; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border) !important; box-shadow: var(--glass-shadow) !important; color: var(--text-primary); max-height: calc(100dvh - 100px); overflow-y: auto; }

.appearance-fieldset { border: 0; padding: 0; margin: 0 0 18px; }

.appearance-fieldset legend { font-size: 12px; font-weight: 600; margin-bottom: 9px; }

.appearance-segment { display: flex; gap: 4px; border: 1px solid var(--border); background: rgba(255,255,255,.5); border-radius: 10px; padding: 3px; }

.appearance-segment button { width: 50%; border: 0; border-radius: 7px; padding: 8px; cursor: pointer; font: 550 12px var(--font-body); color: var(--text-secondary); background: transparent; }

.appearance-segment button[aria-pressed="true"] { background: #fff; box-shadow: var(--shadow-sm); color: var(--accent); }

.appearance-check { display: flex; align-items: center; gap: 9px; font-size: 12px; margin-top: 12px; cursor: pointer; line-height: 1.5; }

.appearance-check input { accent-color: var(--accent); width: 16px; height: 16px; }

.app-shell--editorial .card { backdrop-filter: none; -webkit-backdrop-filter: none; }

.app-shell--editorial .card:hover { transform: none; box-shadow: var(--shadow-sm); }

.app-shell--editorial .btn-primary { background: var(--accent); color: #fff; box-shadow: none; border-radius: 10px; font-weight: 600; }

.app-shell--editorial .btn-primary:hover { background: var(--accent-hover); transform: none; box-shadow: var(--shadow-sm); }

.app-shell--editorial .btn-secondary { background: #fff; font-weight: 550; border-radius: 10px; }

.app-shell--editorial :is(input, select, textarea) { font-family: var(--font-body); }

.app-shell--editorial :is(button, a, input, select, textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.app-shell--editorial .nav-drawer { background: var(--glass-bg) !important; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border: 1px solid var(--glass-border); border-radius: 22px 0 0 22px; box-shadow: var(--glass-shadow); max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }

.app-shell--editorial .nav-drawer__brand { font-family: var(--font-body); }

.app-shell--editorial .nav-drawer__item.is-active { background: #fff; color: var(--accent); }

.app-shell--editorial .site-footer { background: transparent; border-top: 1px solid var(--border); }

@media (max-width: 1380px) { .app-shell--editorial .topbar-ai { display: none !important; } }

@media (max-width: 1180px) {
  .app-shell--editorial .topbar-nav { display: none; }
  .app-shell--editorial .topbar-hamburger { display: flex; align-items: center; justify-content: center; }
  .app-shell--editorial .topbar-capsule-right { margin-left: auto; }
}

@media (max-width: 700px) {
  :root { --header-height: 72px; }
  .app-shell--editorial .topbar { padding: max(10px, env(safe-area-inset-top)) 12px 4px; gap: 5px; }
  .app-shell--editorial .topbar-capsule { height: 58px; border-radius: 18px; padding: 7px 9px 7px 12px; gap: 6px; }
  .app-shell--editorial .topbar-brand-text { font-size: 14px; }
  .app-shell--editorial .topbar-brand-icon { width: 25px; height: 25px; }
  .app-shell--editorial .topbar-demo-wrap, .app-shell--editorial .topbar-lang-desktop { display: none; }
  .app-shell--editorial .topbar-utilities { margin-left: auto; gap: 4px; }
  .app-shell--editorial .topbar-capsule-right { margin-left: 0; }
  .app-shell--editorial .topbar-back { display: none; }
  .app-shell--editorial .topbar-signout { font-size: 11px; padding: 7px; }
}

@media (max-width: 360px) { .app-shell--editorial .topbar-brand-text { font-size: 12px; } .app-shell--editorial .topbar-brand-icon { display: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
/* Warm glass entry points. Credentials stay on an opaque, readable form face. */
html[data-site-theme="warm-glass"] .auth-page {
  --auth-danger: #a52a2a;
  width: 100%; min-width: 0; color: var(--text-primary);
  font-family: var(--font-body); line-height: 1.5;
}
html[data-site-theme="warm-glass"] .auth-page--patient {
  display: block; min-height: 0; padding: 32px 24px 64px; background: transparent;
}
html[data-site-theme="warm-glass"] .auth-page--provider { padding: 0 12px 32px; }
html[data-site-theme="warm-glass"] .auth-page > .auth-shell {
  width: 100%; min-width: 0; margin-inline: auto;
  background: var(--studio-ice-glass) !important;
  border: 1px solid var(--glass-border); border-radius: 16px;
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
}
.auth-page--patient .auth-shell {
  max-width: 960px; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}
.auth-page--provider .auth-shell { max-width: 400px; }
html[data-site-theme="warm-glass"] .auth-page .auth-aside {
  width: auto; min-width: 0; padding: 36px 32px;
  display: flex; flex-direction: column; gap: 28px;
  box-shadow: none; border-radius: 16px 0 0 16px;
}
.auth-page .auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.auth-page .auth-brand > span { min-width: 0; }
.auth-page .auth-icon, .auth-page .auth-feature-icon {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--accent-dim); color: var(--accent-hover);
}
.auth-page .auth-brand .auth-icon { background: var(--accent); color: var(--bg-card); }
.auth-page .auth-intro { margin-bottom: 24px; }
html[data-site-theme="warm-glass"] .auth-page :is(h1,h2) {
  color: var(--text-primary); font-family: var(--font-body) !important;
  font-size: 1.75rem !important; font-weight: 700 !important; line-height: 1.2;
  letter-spacing: -.025em; margin: 0 0 10px; text-wrap: balance;
}
.auth-page p { margin: 0; color: var(--text-secondary); }
.auth-page .auth-aside h1 { font-size: 2rem !important; }
.auth-page .auth-feature-list { display: grid; gap: 24px; margin: 0; padding: 0; list-style: none; }
.auth-page .auth-feature { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.auth-page .auth-feature p:first-child { color: var(--text-primary); font-weight: 600; margin-bottom: 4px; }
.auth-page .auth-feature p { font-size: .9375rem; }
.auth-page .auth-form-panel { min-width: 0; padding: 36px 32px; background: var(--bg-card); border-radius: 16px; }
.auth-page--patient .auth-form-panel { border-radius: 0 16px 16px 0; }
.auth-page .auth-form-panel > .auth-icon { margin-bottom: 20px; }
.auth-page .auth-form { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.auth-page .auth-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.auth-page .auth-field > label { font-size: .9375rem; font-weight: 600; color: var(--text-primary); }
.auth-page .auth-input-wrap { position: relative; min-width: 0; }
.auth-page .auth-input-wrap > svg {
  position: absolute; left: 14px; top: 16px; color: var(--text-secondary); pointer-events: none;
}
.auth-page .auth-input-wrap > input {
  box-sizing: border-box; display: block; width: 100%; min-width: 0; max-width: 100%;
  min-height: 48px; height: auto; margin: 0; padding: 12px 14px 12px 42px;
  border: 1px solid var(--text-muted); border-radius: 9px;
  background: var(--bg-input); color: var(--text-primary);
  font: inherit; font-size: 1rem !important; line-height: 1.4;
}
.auth-page .auth-input-wrap > input::placeholder { color: var(--text-secondary); opacity: 1; }
.auth-page .auth-input-wrap > input[aria-invalid="true"] { border-color: var(--auth-danger); }
.auth-page .auth-input-wrap > input:disabled { opacity: .7; cursor: wait; }
.auth-page :is(.auth-primary,.auth-secondary,.auth-home,.auth-mode-switch > button) {
  min-width: 44px; min-height: 48px; padding: 12px 16px; border-radius: 9px;
  font: inherit; font-weight: 600; line-height: 1.4; text-align: center;
  white-space: normal; text-decoration: none; cursor: pointer;
  display: inline-flex; gap: 8px; align-items: center; justify-content: center;
  transition: background-color .18s ease-out, color .18s ease-out;
}
.auth-page :is(.auth-primary,.auth-secondary) { width: 100%; }
.auth-page .auth-primary { background: var(--accent); color: #fffdf8; border: 1px solid var(--accent); }
.auth-page .auth-primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.auth-page .auth-secondary { background: var(--accent-dim); color: var(--accent-hover); border: 1px solid var(--accent); }
.auth-page .auth-secondary:hover:not(:disabled) { background: var(--bg-hover); }
.auth-page :is(.auth-primary,.auth-secondary,.auth-mode-switch > button):disabled { cursor: wait; opacity: .7; }
.auth-page .auth-home { margin-top: 16px; color: var(--accent-hover); background: transparent; border: 1px solid transparent; }
.auth-page .auth-home:hover { background: var(--bg-hover); }
.auth-page .auth-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 14px;
  background: var(--danger-light); color: var(--auth-danger); border: 1px solid currentColor;
  border-radius: 9px; margin-bottom: 20px; font-size: .9375rem; overflow-wrap: anywhere;
}
.auth-page .auth-error > svg { flex-shrink: 0; margin-top: 3px; }
.auth-page .auth-note { margin-top: 16px; font-size: .875rem; color: var(--text-secondary); }
.auth-page .auth-demo { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.auth-page .auth-demo > p:first-child { margin-bottom: 12px; color: var(--text-primary); font-weight: 600; }
.auth-page .auth-mode-switch {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 4px;
  padding: 4px; margin-bottom: 28px; border: 1px solid var(--border-strong);
  border-radius: 12px; background: var(--bg-surface);
}
.auth-page .auth-mode-switch > button { padding-inline: 8px; color: var(--text-secondary); background: transparent; border: 1px solid transparent; }
.auth-page .auth-mode-switch > button[aria-pressed="true"] { background: var(--bg-card); border-color: var(--accent); color: var(--accent-hover); }
.auth-page :is(input,button,a):focus-visible { outline: 3px solid var(--accent-hover); outline-offset: 3px; }
@media (max-width: 840px) {
  .auth-page--patient .auth-shell { grid-template-columns: minmax(0,1fr); max-width: 520px; }
  html[data-site-theme="warm-glass"] .auth-page .auth-aside { padding: 24px !important; gap: 18px; border-radius: 16px 16px 0 0; }
  html[data-site-theme="warm-glass"] .auth-page .auth-aside h1 { font-size: 1.5rem !important; margin-bottom: 10px !important; }
  html[data-site-theme="warm-glass"] .auth-page .auth-aside p { font-size: .9375rem !important; margin-bottom: 0 !important; }
  .auth-page .auth-feature-list { display: none; }
  .auth-page--patient .auth-form-panel { border-radius: 0 0 16px 16px; }
}
@media (max-width: 480px) {
  html[data-site-theme="warm-glass"] .auth-page--patient { padding: 20px 12px 40px; }
  .auth-page .auth-form-panel { padding: 24px 20px; }
  html[data-site-theme="warm-glass"] .auth-page .auth-aside { padding: 24px 20px !important; }
  html[data-site-theme="warm-glass"] .auth-page :is(h1,h2) { font-size: 1.5rem !important; }
}
@media (prefers-reduced-motion:reduce) { .auth-page :is(button,a) { transition: none; } }
html[data-site-theme="warm-glass"] .auth-page .auth-demo h2 { font-size: 1rem !important; letter-spacing: 0; }
.auth-page .auth-demo .auth-note { margin: 0 0 16px; }
.auth-page--provider .auth-form-panel { background: transparent; }
.auth-page .auth-brand { color: var(--text-primary); text-decoration: none; }
@media (max-width: 480px) {
  html[data-site-theme="warm-glass"] .auth-page--patient { padding-inline: 0; }
  html[data-site-theme="warm-glass"] .auth-page--provider { padding-inline: 0; }
  html[data-site-theme="warm-glass"] .auth-page .auth-aside h1 { font-size: 1.25rem !important; }
  .auth-page .auth-aside-copy > p { display: none; }
}
/* App's two classless auth-gate cards predate the shared material token. */
html[data-site-theme="warm-glass"] .app-viewport > main:not([class])[style*="backdrop-filter"] {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur) !important;
  -webkit-backdrop-filter: var(--glass-blur) !important;
}
html[data-site-theme="warm-glass"][data-transparency="reduced"] :is(.nav-drawer,.glass-popover) {
  background: var(--bg-card) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
@media (prefers-reduced-transparency:reduce) {
  html[data-site-theme="warm-glass"] .app-shell--editorial :is(.nav-drawer,.glass-popover) {
    background: var(--bg-card) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
}
@media (max-width: 360px) {
  .auth-page .auth-mode-switch { grid-template-columns: minmax(0,1fr); }
}
html[data-site-theme="warm-glass"][data-transparency="reduced"] .app-shell--editorial .auth-page :is(.auth-shell,.auth-aside),
html[data-site-theme="warm-glass"][data-transparency="reduced"] .app-viewport > main:not([class])[style*="backdrop-filter"] {
  background: var(--bg-card) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
@media (prefers-reduced-transparency:reduce) {
  :root[data-site-theme="warm-glass"] .app-shell--editorial .auth-page :is(.auth-shell,.auth-aside),
  :root[data-site-theme="warm-glass"] .app-viewport > main:not([class])[style*="backdrop-filter"] {
    background: var(--bg-card) !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
}
/* POCUS is an external educational workspace; existing in-app routes retain
   their buttons and active-state behavior. */
.pocus-nav-icon {
  display: block;
  flex-shrink: 0;
}
.topbar-pocus-mobile {
  display: none;
}
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule:has(.topbar-tab--pocus) {
  max-width: 1220px;
}
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab.topbar-tab--pocus,
html[data-site-theme="warm-glass"] .nav-drawer__item.nav-drawer__item--pocus {
  text-decoration: none;
  color: var(--accent-hover);
}
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab.topbar-tab--pocus {
  min-width: 76px;
  background: var(--accent-dim);
  font-weight: 600;
}
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab.topbar-tab--pocus:hover,
html[data-site-theme="warm-glass"] .nav-drawer__item.nav-drawer__item--pocus:hover {
  background: var(--bg-hover);
}
html[data-site-theme="warm-glass"] .app-shell--editorial :is(.topbar-tab--pocus, .topbar-pocus-mobile):focus-visible,
html[data-site-theme="warm-glass"] .nav-drawer__item--pocus:focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
}

@media (max-width: 1100px) and (min-width: 701px) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-nav:has(.topbar-tab--pocus) {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  /* Keep the existing two-row phone capsule. The direct POCUS shortcut gets
     the utility column's second row, near the menu, without competing with
     brand, demo/sign-out, hamburger or settings. Language remains in the
     existing drawer, which provides the complete language picker. */
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule:has(.topbar-pocus-mobile) {
    grid-template-areas: 'brand utilities' 'cta pocus';
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-pocus-mobile {
    grid-area: pocus;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: stretch;
    gap: 6px;
    min-height: var(--nav-target, 44px);
    min-width: var(--nav-target, 44px);
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: var(--bg-input);
    color: var(--accent-hover);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-pocus-mobile:hover {
    background: var(--accent-dim);
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule:has(.topbar-pocus-mobile) .topbar-lang-desktop {
    display: none;
  }
}
/* The provider and patient workspaces share materials; clinical meaning keeps
   its existing status/chart colours. Forms and data remain opaque. */
.editorial-provider,
.editorial-patient,
.dlog-overlay {
  --care-sheet: var(--bg-card, #fff);
  --care-glass: var(--glass-bg, rgba(248, 252, 249, .4));
  --care-glass-filter: var(--glass-blur, blur(24px) saturate(155%));
  --care-glass-border: var(--glass-border, rgba(255, 255, 255, .75));
  --care-glass-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 8px 26px rgba(36, 66, 50, .065);
  color: var(--text-primary);
  font-family: var(--font-body);
}
.editorial-provider .card,
.editorial-patient .card,
.editorial-provider .provider-modal-sheet,
.editorial-provider .provider-trend-sheet {
  background: var(--care-sheet);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border-color: var(--border);
  box-shadow: 0 4px 20px rgba(36, 66, 50, .035);
}
.editorial-provider .card:hover,
.editorial-patient .card:hover { transform: none; }
.editorial-provider .hero-banner {
  background: var(--care-sheet);
  border-color: var(--border);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.editorial-provider .hero-banner::before,
.editorial-provider .hero-banner::after { content: none; }
.editorial-provider :is(input, select, textarea),
.editorial-patient :is(input, select, textarea),
.dlog-overlay :is(input, select, textarea) {
  font-family: var(--font-body);
  color: var(--text-primary);
  accent-color: var(--accent);
}
.editorial-provider .input-control,
.editorial-patient .input-control {
  background: var(--bg-input);
  border-color: var(--border);
}
.editorial-provider :is(button, a, input, select, textarea, summary):focus-visible,
.editorial-patient :is(button, a, input, select, textarea, summary):focus-visible,
.dlog-overlay :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.editorial-provider :is(button, a), .editorial-patient :is(button, a), .dlog-overlay button {
  -webkit-tap-highlight-color: transparent;
}
/* Keep icon actions usable even when legacy inline widths are smaller. */
.editorial-provider button,
.editorial-patient button,
.dlog-overlay button {
  min-width: 44px;
  min-height: 44px;
}
.editorial-provider .provider-feature-help > div:first-child { gap: 12px; }
.editorial-patient summary { min-height: 44px; }
.editorial-patient .patient-device-insights {
  background: var(--accent-dim) !important;
  border-color: var(--border) !important;
}
.editorial-patient .patient-device-insights-header { flex-wrap: wrap; gap: 12px; }
.editorial-patient .patient-device-insights-heading { flex: 1 1 220px; flex-wrap: wrap; min-width: 0; }
.editorial-patient .patient-device-insights-badge { background: var(--accent-dim) !important; color: var(--accent-hover) !important; }
.editorial-patient .patient-device-insights-header > button { max-width: 100%; background: var(--accent) !important; }
@media (max-width: 600px) {
  .editorial-patient .patient-tabs { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible !important; }
  .editorial-patient .patient-tabs > button { width: 100%; min-width: 0; justify-content: center; white-space: normal; }
  .editorial-patient .patient-tabs > .patient-checkin-button { grid-column: 1 / -1; margin-left: 0 !important; }
}
.editorial-provider button:disabled, .editorial-patient button:disabled, .dlog-overlay button:disabled {
  cursor: not-allowed;
}
.editorial-provider .section-title,
.editorial-provider .provider-tab-content h1,
.editorial-provider .provider-tab-content h2,
.editorial-patient h1,
.editorial-patient .patient-log-hub h2 {
  font-family: var(--font-editorial, Georgia, 'Times New Roman', serif) !important;
  font-weight: 400 !important;
}
.editorial-provider .section-sub { color: var(--text-secondary); }
.editorial-provider .provider-tab-content h3 { font-family: var(--font-body) !important; }
.editorial-provider .provider-tab-content table { background: var(--care-sheet); }
.editorial-provider .provider-tab-content thead { background: var(--bg-surface); }
.editorial-provider .provider-tab-content th { text-align: left; font-family: var(--font-body); }
.editorial-provider .provider-tab-content td { font-variant-numeric: tabular-nums; }
.editorial-provider .recharts-wrapper, .editorial-patient .recharts-wrapper { background: var(--care-sheet); border-radius: 8px; }
.editorial-provider .recharts-default-tooltip, .editorial-patient .recharts-default-tooltip { background: var(--care-sheet) !important; border-color: var(--border) !important; border-radius: 10px; }
/* A navigation material, shared by provider subtabs and filter toolbars. */
.editorial-provider .provider-toolbar,
.editorial-provider .provider-subtabs {
  background: var(--care-glass) !important;
  border-color: var(--care-glass-border) !important;
  -webkit-backdrop-filter: var(--care-glass-filter);
  backdrop-filter: var(--care-glass-filter);
  box-shadow: var(--care-glass-shadow);
}
.editorial-provider .provider-subtabs > button:is([aria-pressed="true"], [aria-selected="true"]) {
  background: var(--care-sheet) !important;
  color: var(--accent) !important;
  box-shadow: 0 1px 6px rgba(36, 66, 50, .06);
}
.editorial-provider .provider-subtabs > button:is([aria-pressed="false"], [aria-selected="false"]) { background: transparent !important; color: var(--text-secondary) !important; }
.editorial-provider .provider-subtabs > button:hover { background: var(--bg-hover) !important; }
.editorial-provider .provider-feature-help {
  background: var(--care-sheet) !important;
  border: 1px solid var(--border) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}
.editorial-provider .provider-help-trigger {
  background: var(--care-glass) !important;
  color: var(--accent) !important;
  border: 1px solid var(--care-glass-border) !important;
  box-shadow: none !important;
}
.editorial-provider .provider-help-trigger svg { color: var(--accent); }
/* Dense inbox columns remain in their original order and widths. Narrow
   screens scroll this table rather than clipping actions or changing columns. */
@media (max-width: 768px) {
  .editorial-provider .provider-subtabs { overflow-x: auto !important; }
  .editorial-provider .provider-inbox-table { overflow-x: auto !important; }
  .editorial-provider .provider-inbox-table > * { min-width: 1000px; }
  .editorial-provider .provider-inbox-table-row { grid-template-columns: 32px 14px 160px 160px 160px 110px 60px 1fr 32px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .editorial-provider *, .editorial-patient *, .dlog-overlay * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .editorial-provider, .editorial-patient, .dlog-overlay {
    --care-glass: var(--bg-raised, #f5f8f4);
    --care-glass-filter: none;
  }
}
@media (max-width: 640px) {

  .dose-grid,
  .pillar-grid,
  .pillar-log-grid {
    grid-template-columns: 1fr;
  }
}
/* ─── PATIENT TABS ─── */
.patient-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--care-glass-border, var(--border));
  padding-bottom: 12px;
}
.patient-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border: none;
  border-radius: 24px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}
.patient-tab:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
}
.patient-tab.active {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 600;
}
/* Dashboard sub-tabs (Overview / Clinical / Charts / Visits) */
.dash-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--care-glass, var(--glass-bg));
  border-radius: 12px;
  border: 1px solid var(--border);
  width: fit-content;
}
.dash-subtab {
  padding: 7px 18px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.dash-subtab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}
.dash-subtab.active {
  background: var(--bg-card);
  color: var(--accent);
}
/* ─── PATIENT LOG FORMS ─── */
.patient-tab { color: var(--text-muted); }
.patient-tab.active { background: var(--bg-card); color: var(--accent); }
/* Daily log modal */
/* Original patient geometry; glass is applied to existing tab chrome. */
.editorial-patient { min-width: 0; }
.patient-page-header { margin-bottom: 32px; display: flex; align-items: flex-end; justify-content: space-between; }
.patient-page-title { font-size: 32px; margin: 0; letter-spacing: -1px; }
.patient-header-updates { width: 100%; max-width: 720px; min-width: 0; }
.editorial-patient .patient-tabs,
.editorial-patient .dash-subtabs {
  background: var(--care-glass, var(--glass-bg));
  -webkit-backdrop-filter: var(--care-glass-filter, var(--glass-blur));
  backdrop-filter: var(--care-glass-filter, var(--glass-blur));
  box-shadow: var(--care-glass-shadow);
}
.editorial-patient .patient-checkin-button:hover,
.editorial-patient .patient-start-button:hover { background: var(--accent-hover) !important; }
.patient-onboarding-sheet { background: var(--bg-card); border: 1px solid var(--border); border-radius: 20px; }
.editorial-patient .patient-log-hub { width: 100%; }
.editorial-patient .patient-log-section-trigger:hover { background: var(--bg-hover) !important; }
.editorial-patient .patient-log-section-form { background: var(--bg-card); }
/* Existing 440px three-step sheet. A viewport cap keeps long forms reachable;
   existing mobile.css retains the baseline mobile padding and height rules. */
.dlog-overlay { background: rgba(30, 50, 39, .28) !important; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); overscroll-behavior: contain; }
.dlog-overlay .dlog-modal { background: var(--bg-card) !important; border-color: var(--border); max-width: 440px; max-height: calc(100dvh - 40px); min-height: min(420px, calc(100dvh - 40px)); overflow-y: auto; box-shadow: 0 18px 64px rgba(24, 43, 31, .17); }
.dlog-overlay .dlog-close { background: var(--bg-surface); color: var(--text-secondary); }
.dlog-overlay .dlog-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.dlog-overlay .dlog-progress-track { background: var(--border); }
.dlog-overlay .dlog-step-title { font-family: var(--font-editorial, Georgia, serif); font-weight: 400; }
.dlog-overlay .dlog-step-sub { color: var(--text-secondary); }
.dlog-overlay .dlog-next-btn { background: var(--accent); color: #fff; }
.dlog-overlay .dlog-back-btn { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }
.dlog-overlay .dlog-nudge-btn { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.dlog-overlay .dlog-nudge-btn:hover, .dlog-overlay .dlog-back-btn:hover { background: var(--bg-hover); }
.dlog-overlay .dlog-symptom-group { background: var(--bg-card); border-color: var(--border); }
.dlog-overlay .dlog-class-btn, .dlog-overlay .dlog-dose-btn { background: var(--bg-card); border-color: var(--border); color: var(--text-primary); }
.dlog-overlay .dlog-class-btn:hover, .dlog-overlay .dlog-class-btn.selected, .dlog-overlay .dlog-dose-btn:hover { background: var(--bg-surface); }
.dlog-overlay .dlog-selected-pill { background: var(--bg-surface); color: var(--text-primary); }
.dlog-overlay .dlog-save-error { background: var(--bg-card) !important; color: var(--danger) !important; border: 1px solid var(--danger) !important; }
.dlog-overlay .dlog-chip-field, .dlog-overlay .dlog-chip-dropdown { background: var(--bg-input) !important; border-color: var(--border) !important; }
.dlog-overlay .dlog-chip-dropdown { background: var(--bg-card) !important; }
.dlog-overlay input[type="number"], .dlog-overlay input[type="text"] { background: var(--bg-input) !important; color: var(--text-primary); }
/* Baseline header has three flex siblings. Stack only on narrow screens to
   prevent the welcome text and real update banners from clipping each other. */
@media (max-width: 768px) {
  .patient-page-header { flex-direction: column; align-items: stretch; gap: 18px; }
  .editorial-patient .patient-checkin-button { flex-shrink: 0; white-space: nowrap; }
}
@media (prefers-reduced-transparency: reduce) {
  .dlog-overlay { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(30, 50, 39, .45) !important; }
}
/* Approved warm modern material system, shared across every site surface.
   Clinical status colours, chart series and data remain semantic and opaque. */
html[data-site-theme="warm-glass"] {
  color-scheme: light;
  --bg-base: #eee0cc;
  --bg-raised: #fffdf8;
  --bg-surface: #f6ede1;
  --bg-card: #fffdf8;
  --bg-input: #fffaf2;
  --bg-hover: #f0e2cf;
  --text-primary: #30291f;
  --text-secondary: #594a37;
  --text-muted: #66543f;
  --accent: #985334;
  --accent-hover: #74401f;
  --accent-dim: #f2dfcd;
  --accent-glow: rgba(152,83,52,.12);
  --success: #0f7555;
  --warning: #b15806;
  --border: #d7c6ae;
  --border-strong: #baa184;
  --glass-bg: rgba(255,248,236,.64);
  --glass-border: rgba(255,255,255,.96);
  --glass-blur: blur(48px) saturate(130%);
  --glass-shadow: inset 0 1px 0 #fff, 0 6px 18px rgba(104,68,35,.065);
  --shadow-sm: 0 2px 5px rgba(73,52,32,.04);
  --shadow-md: 0 5px 16px rgba(73,52,32,.07);
  --shadow-lg: 0 12px 32px rgba(73,52,32,.10);
  --font-body: 'Outfit','Avenir Next','Segoe UI',sans-serif;
  --font-heading: var(--font-body);
  --font-editorial: var(--font-body);
  --radius-lg: 16px;
  --radius-xl: 16px;
  --studio-ice-field: linear-gradient(124deg,#fffaf0 0%,#f0e2cf 31%,#d7b999 57%,#f6eadb 83%,#e9d5bc 100%);
  --studio-ice-glass: linear-gradient(142deg,rgba(255,252,245,.66),rgba(255,247,234,.46) 49%,rgba(241,222,201,.52));
  --studio-ice-blur: var(--glass-blur);
  --studio-ice-edge: var(--glass-border);
  --studio-ice-shadow: var(--glass-shadow);
}
html[data-site-theme="warm-glass"] body {
  background: var(--studio-ice-field);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
}
html[data-site-theme="warm-glass"] .app-shell--editorial,
html[data-site-theme="warm-glass"] .app-viewport { background: transparent; }
html[data-site-theme="warm-glass"] .app-shell--editorial .app-viewport { padding-top: var(--header-height) !important; }
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule { margin: 0 !important; }
/* Evidence pages scroll with the document. Hidden horizontal overflow also
   computes vertical overflow to auto, trapping native sticky story panels in
   non-scrolling ancestors. Clip only the horizontal axis on these routes. */
html[data-site-theme="warm-glass"].whyv2-active body,
html[data-site-theme="warm-glass"].whyv2-active .app-shell--editorial {
  overflow-x: clip !important;
  overflow-y: visible;
}
html[data-site-theme="warm-glass"] .topbar-brand-icon,
html[data-site-theme="warm-glass"] .nav-demo-cta,
html[data-site-theme="warm-glass"] .nav-drawer__cta { background: var(--accent); color: #fffaf5; }
html[data-site-theme="warm-glass"] .topbar-tab { color: var(--text-secondary); }
html[data-site-theme="warm-glass"] .topbar-tab.active { background: var(--accent-dim); color: var(--accent-hover); }
html[data-site-theme="warm-glass"] .topbar-tab.active::after { background: var(--accent); }
html[data-site-theme="warm-glass"] :is(.topbar-gear,.topbar-hamburger,.topbar-back) { background: #fffaf2 !important; border-color: var(--border) !important; color: var(--text-secondary); }
html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-back { position: absolute; left: 6px; top: 26px; width: var(--nav-target, 44px); height: var(--nav-target, 44px); }
html[data-site-theme="warm-glass"] :is(.glass-popover,.nav-drawer) { background: rgba(255,250,242,.93) !important; backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); border-color: var(--glass-border) !important; }
html[data-site-theme="warm-glass"] :is(.editorial-public,.bento-theme-public,.editorial-clinical,.editorial-provider,.editorial-patient,.bento-theme-auth) { font-family: var(--font-body); color: var(--text-primary); }
html[data-site-theme="warm-glass"] :is(.editorial-clinical,.editorial-provider,.editorial-patient) :is(h1,h2,h3) { font-family: var(--font-body) !important; }
html[data-site-theme="warm-glass"] .app-shell--editorial :is(.bento-theme-public,.bento-theme-auth,.bento-theme-home,.bento-theme-evidence) :is(h1,h2,h3,h4,.md-title,.cc-title,.sv-title,.section-title,.fp-funnel-title) { font-family: var(--font-body) !important; }
html[data-site-theme="warm-glass"] .patient-auth-root.bento-theme-auth .patient-auth-hero { background: var(--studio-ice-glass) !important; color: var(--text-primary) !important; border-color: var(--glass-border) !important; }
html[data-site-theme="warm-glass"] .patient-auth-hero :is(h1,h2,p) { color: var(--text-primary) !important; }
html[data-site-theme="warm-glass"] .patient-auth-hero .hero-badge { background: var(--bg-card) !important; color: var(--accent-hover) !important; }
html[data-site-theme="warm-glass"] :is(.editorial-provider,.editorial-patient,.dlog-overlay) { --care-sheet: var(--bg-card); --care-glass: var(--glass-bg); --care-glass-filter: var(--glass-blur); --care-glass-shadow: var(--glass-shadow); }
html[data-site-theme="warm-glass"] body :is(.why-plain,.why-v2-og,.why-v2-root.bento-theme-evidence,.why-v2-root.bento-theme-evidence .roadmap-section) {
  --bg: transparent;
  --bg-surface: #fffdf8;
  --bg-deep: #3e2d22;
  --text-primary: #30291f;
  --text-secondary: #594a37;
  --text-tertiary: #66543f;
  --text-muted: #66543f;
  --accent: #985334;
  --accent-soft: #f2dfcd;
  --accent-strong: #74401f;
  --accent-glow: rgba(152,83,52,.12);
  --border: #d7c6ae;
  --border-strong: #baa184;
  --on-accent: #fffaf5;
  --on-accent-muted: #f1ddc9;
  --bg-deep-text: #fffaf5;
  --bg-deep-text-muted: #e6d3bf;
  --bg-deep-text-accent: #ecc29f;
}
html[data-site-theme="warm-glass"] .clinical-paradox-wrap { --accent: #985334; }
/* A transparent page field cannot serve as inverse text on selected controls. */
html[data-site-theme="warm-glass"] .why-v2-root .sv-tier-btn.active { color: #fffdf8; }
html[data-site-theme="warm-glass"] .why-root.bento-theme-evidence-footer {
  --why-ink-dark: #3e2d22;
  --why-ink-light: #fffdf8;
  --why-text-dark: #30291f;
  --why-text-mute: #66543f;
  --why-on-dark: #fffaf5;
  --why-mute-dark: #e6d3bf;
  --why-accent: #985334;
  --why-accent-soft: #f2dfcd;
  --why-line-dark: #8c7462;
  --why-line-light: #d7c6ae;
  --why-font-display: var(--font-body);
}
html[data-site-theme="warm-glass"] .why-root.bento-theme-evidence-footer .why-cta:hover { background: rgba(152,83,52,.18); }
html[data-site-theme="warm-glass"] .why-root.bento-theme-evidence-footer .why-cta--primary:hover { background: #74401f; filter: none; }
html[data-site-theme="warm-glass"] body .why-v2-root.bento-theme-evidence .npled-section { --accent:#985334; --accent-soft:#f2dfcd; --accent-glow:rgba(152,83,52,.12); --map-canvas:#f6ede1; --land:#d4b99d; --land-stroke:#ab8665; --land-shadow:rgba(104,68,35,.08); --water-grid:rgba(104,68,35,.045); }
html[data-site-theme="warm-glass"] .provider-portal-access-control:focus-within { outline:3px solid var(--accent-hover); outline-offset:3px; }
html[data-site-theme="warm-glass"] .dlog-drill-header { color:var(--text-primary) !important; }
html[data-site-theme="warm-glass"] :is(input,textarea,select) { accent-color: var(--accent); }
html[data-site-theme="warm-glass"] :is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid var(--accent-hover); outline-offset: 3px; }
html[data-site-theme="warm-glass"] :is(.editorial-provider,.editorial-patient,.editorial-clinical) :is(input,select,textarea,table,.card,.glass-card) { backdrop-filter: none; -webkit-backdrop-filter: none; }
html[data-site-theme="warm-glass"] .public-page-footer { border-color: var(--border); color: var(--text-secondary); }
html[data-site-theme="warm-glass"][data-glass="tinted"] { --glass-bg:rgba(246,231,211,.84); --studio-ice-glass:linear-gradient(142deg,rgba(255,250,240,.92),rgba(250,237,217,.84) 49%,rgba(239,217,191,.88)); --studio-ice-hero:linear-gradient(142deg,rgba(255,249,238,.94),rgba(250,237,217,.88)); }
html[data-site-theme="warm-glass"][data-transparency="reduced"] { --glass-bg: #fffdf8; --glass-blur: none; --studio-ice-blur: none; --studio-ice-glass: #fffdf8; --studio-ice-hero: #fffdf8; }
@media(max-width:700px) {
  /* Opening evidence stays in natural flow when the device cards stack. */
  html[data-site-theme="warm-glass"] .why-v2-root .md-scroll-wrap {
    height: auto !important;
    min-height: 0 !important;
  }
  html[data-site-theme="warm-glass"] .why-v2-root .md-section {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 100svh !important;
    max-height: none !important;
    justify-content: flex-start;
    overflow: visible;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-back { display: none; }
  html[data-site-theme="warm-glass"] .app-shell--editorial .app-viewport { padding-top: var(--header-height) !important; }
  html[data-site-theme="warm-glass"] .clinical-wizard-sheet { padding: 24px !important; }
  html[data-site-theme="warm-glass"] .clinical-clear-form { position: static !important; display: flex; width: fit-content; margin: 0 0 22px auto; min-height: 40px; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence :is(.md-title,.cc-title,.sv-title,.section-title,.fp-funnel-title) { font-size: clamp(30px,8.5vw,44px) !important; line-height: 1.12; overflow-wrap: anywhere; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .md-grid { grid-template-columns:minmax(0,1fr); }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .md-card { min-width:0; max-width:100%; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .md-chips { flex-wrap:wrap; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .md-chip { white-space:normal; overflow-wrap:anywhere; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .mev-tl-header { padding-inline:16px; }
  html[data-site-theme="warm-glass"] .bento-theme-evidence .mev-tl-section { width:100%; max-width:100%; margin-inline:0; left:auto; right:auto; }
  html[data-site-theme="warm-glass"][data-size="large"] { --header-height:calc(142px + max(8px,env(safe-area-inset-top))); }
  html[data-site-theme="warm-glass"][data-size="large"] .app-shell--editorial .topbar-capsule { grid-template-rows:56px var(--nav-target, 44px); row-gap:10px; min-height:132px; }
  html[data-site-theme="warm-glass"][data-size="large"] .app-shell--editorial .topbar-brand-text { white-space:normal; font-size:12px; line-height:1.15; }
  html[data-site-theme="warm-glass"][data-size="large"] :is(.why-v2-root,.why-root) { width:100%; max-width:100%; margin-inline:0; left:auto; right:auto; transform:none; }
}
@media(prefers-reduced-transparency:reduce) {
  html[data-site-theme="warm-glass"] { --glass-bg:#fffdf8; --glass-blur:none; --studio-ice-blur:none; --studio-ice-glass:#fffdf8; --studio-ice-hero:#fffdf8; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  html[data-site-theme="warm-glass"] { --glass-bg:#fffdf8; --glass-blur:none; --studio-ice-glass:#fffdf8; --studio-ice-hero:#fffdf8; }
}
/* One floating capsule for the existing brand, routes, demo and utilities.
   Desktop keeps all routes visible; phone keeps the native drawer control. */
html[data-site-theme="warm-glass"] {
  --nav-target: 44px;
  --header-height: calc(var(--nav-target) + 32px + max(16px, env(safe-area-inset-top)));
}

/* The small-text preference scales #root to .88; keep targets 44px on screen. */
html[data-site-theme="warm-glass"][data-size="small"] {
  --nav-target: 50px;
}

html[data-site-theme="warm-glass"][data-size="large"] {
  --header-height: calc(var(--nav-target) + 42px + max(16px, env(safe-area-inset-top)));
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  padding: max(16px, env(safe-area-inset-top)) 40px 8px;
  gap: 10px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .app-viewport:has(.cg-studio-home) {
  padding-top: var(--header-height);
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: 'brand nav cta utilities';
  align-items: center;
  width: 100%;
  max-width: 1120px;
  height: auto;
  min-height: calc(var(--nav-target) + 22px);
  padding: 10px 12px 10px 16px;
  gap: 12px;
  border-radius: 20px;
  background: var(--studio-ice-glass, rgba(255, 250, 242, .72)) !important;
  border-color: var(--studio-ice-edge, rgba(255, 255, 255, .96)) !important;
  backdrop-filter: var(--studio-ice-blur, blur(40px) saturate(130%)) !important;
  -webkit-backdrop-filter: var(--studio-ice-blur, blur(40px) saturate(130%)) !important;
  box-shadow: var(--studio-ice-shadow, inset 0 1px 0 #fff, 0 8px 24px #71533212) !important;
  overflow: visible;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-left {
  grid-area: brand;
  min-width: 0;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand {
  gap: 8px;
  min-width: 0;
  min-height: var(--nav-target);
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand-text {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand-icon {
  display: flex;
  flex-shrink: 0;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-nav {
  grid-area: nav;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 2px;
  overflow: visible;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab {
  justify-content: center;
  min-height: var(--nav-target);
  min-width: var(--nav-target);
  padding: 10px 9px;
  font-size: 13px;
  line-height: 1.25;
  gap: 6px;
  white-space: normal;
  border-radius: 10px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab > span {
  white-space: normal;
  text-wrap: balance;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.25;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab > svg {
  width: 16px;
  height: 16px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule-right {
  grid-area: cta;
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: 0;
  padding-right: 0;
  gap: 6px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-demo-wrap {
  display: flex;
  margin: 0;
  min-width: 0;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .nav-demo-cta {
  min-height: var(--nav-target);
  min-width: var(--nav-target);
  padding: 10px 13px;
  gap: 8px;
  font-size: 13px;
  border-radius: 10px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-utilities {
  grid-area: utilities;
  position: static;
  transform: none;
  display: flex;
  align-items: center;
  min-width: 0;
  margin-left: 0;
  gap: 6px;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-lang-desktop {
  display: block;
  min-width: 0;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-lang-desktop > div > button {
  height: var(--nav-target) !important;
  min-width: var(--nav-target);
  padding-inline: 9px !important;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-hamburger {
  display: none;
}

html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-gear {
  width: var(--nav-target) !important;
  height: var(--nav-target) !important;
  flex-shrink: 0;
}

@media (max-width: 1100px) and (min-width: 701px) {
  html[data-site-theme="warm-glass"] {
    --header-height: calc(var(--nav-target) + var(--nav-target) + 46px + max(16px, env(safe-area-inset-top)));
  }
  html[data-site-theme="warm-glass"][data-size="large"] {
    --header-height: calc(var(--nav-target) + var(--nav-target) + 46px + max(16px, env(safe-area-inset-top)));
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: 'brand cta utilities' 'nav nav nav';
    min-height: calc(var(--nav-target) + var(--nav-target) + 36px);
    row-gap: 6px;
    column-gap: 12px;
    padding: 10px 14px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-tab {
    min-height: var(--nav-target);
    padding-block: 9px;
  }
}

@media (min-width: 951px) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar:has(.topbar-back) {
    padding-left: calc(var(--nav-target) + 12px);
  }
}

@media (max-width: 1024px) and (min-width: 701px) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar {
    padding-inline: 24px;
  }
}

@media (max-width: 700px) {
  html[data-site-theme="warm-glass"] {
    --header-height: calc(var(--nav-target) + var(--nav-target) + 36px + max(8px, env(safe-area-inset-top)));
  }
  html[data-site-theme="warm-glass"][data-size="large"] {
    --header-height: calc(142px + max(8px, env(safe-area-inset-top)));
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar {
    padding: max(8px, env(safe-area-inset-top)) 16px 6px;
    gap: 6px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: 'brand utilities' 'cta utilities';
    grid-template-rows: var(--nav-target) var(--nav-target);
    min-height: calc(var(--nav-target) + var(--nav-target) + 28px);
    padding: 10px 12px;
    row-gap: 6px;
    column-gap: 8px;
    border-radius: 18px;
    flex: none;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand-text {
    font-size: 14px;
    white-space: normal;
    line-height: 1.15;
    overflow: visible;
    text-overflow: clip;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand-icon {
    width: 25px;
    height: 25px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-nav {
    display: none;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule-right {
    align-self: center;
    justify-self: start;
    max-width: 100%;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-demo-wrap {
    display: flex;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .nav-demo-cta {
    min-height: var(--nav-target);
    padding: 9px 12px;
    max-width: 100%;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-signout {
    display: inline-flex;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-utilities {
    align-self: start;
    padding-top: 2px;
    gap: 6px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-hamburger {
    display: flex;
    width: var(--nav-target);
    height: var(--nav-target);
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-lang-desktop {
    position: absolute;
    right: 12px;
    bottom: 10px;
    display: block;
    max-width: 110px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-lang-desktop > div > button {
    height: var(--nav-target) !important;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .glass-popover {
    max-height: calc(100dvh - var(--header-height) - 16px);
  }
}

html[data-site-theme="warm-glass"] .app-shell--editorial :is(.topbar-signout, .glass-popover button),
html[data-site-theme="warm-glass"] :is(.nav-drawer__close, .nav-drawer__item, .nav-drawer__cta, .nav-drawer__lang-btn, .nav-drawer__signout) {
  min-width: var(--nav-target);
  min-height: var(--nav-target);
}

html[data-site-theme="warm-glass"] .nav-drawer__close {
  width: var(--nav-target);
  height: var(--nav-target);
}

html[data-site-theme="warm-glass"] :is(.ll-footer-links, .wl-footer nav) {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
}

html[data-site-theme="warm-glass"] :is(.ll-footer-links, .wl-footer nav) > :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--nav-target);
  min-height: var(--nav-target);
  padding-inline: 8px;
}

html[data-site-theme="warm-glass"] .why-footer__link {
  display: inline-flex;
  align-items: center;
  min-width: var(--nav-target);
  min-height: var(--nav-target);
}

html[data-site-theme="warm-glass"] .app-shell--editorial .clinical-clear-form {
  min-width: var(--nav-target);
  min-height: var(--nav-target);
}

html[data-site-theme="warm-glass"] #main-content :is(main, [role="main"]) {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

html[data-site-theme="warm-glass"] #main-content :is(main, [role="main"]):focus {
  outline: none;
}

@media (max-width: 360px) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand-text {
    font-size: 13px;
  }
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-brand {
    gap: 6px;
  }
}

html[data-site-theme="warm-glass"][data-transparency="reduced"] .app-shell--editorial .topbar-capsule {
  background: #fffaf2 !important;
  border-color: #d7c6b1 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

@media (prefers-reduced-transparency: reduce) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule {
    background: #fffaf2 !important;
    border-color: #d7c6b1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar-capsule {
    background: #fffaf2 !important;
    border-color: #d7c6b1 !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-site-theme="warm-glass"] .app-shell--editorial .topbar :is(button, a) {
    transition: none !important;
  }
}

/* Anchor destinations clear the full floating capsule at every breakpoint. */
html[data-site-theme="warm-glass"] .cg-studio-home #capabilities {
  scroll-margin-top: calc(var(--header-height) - 52px);
}
html[data-site-theme="warm-glass"] .cg-studio-home #device-connections,
html[data-site-theme="warm-glass"] .cg-studio-home #clinical-scope,
html[data-site-theme="warm-glass"] .cg-studio-home #therapy-framework {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

@media(max-width:700px) {
  html[data-site-theme="warm-glass"] .cg-studio-home #capabilities {
    scroll-margin-top: calc(var(--header-height) - 32px);
  }
}
/* Quiet ice ledger: translucent workspace chrome, stable clinical content.
   Scoped to genuine provider/patient components; public routes stay unchanged. */
html[data-site-theme="warm-glass"] .ice-ledger-workspace {
  --ledger-glass: rgba(255, 253, 248, .54);
  --ledger-filter: blur(44px) saturate(135%);
  --ledger-sheet: #fffdf8;
  --ledger-line: rgba(143, 110, 81, .18);
  --ledger-ink: #30291f;
  --ledger-secondary: #594a37;
  --ledger-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 12px 32px rgba(76, 49, 27, .065);
  --ledger-radius: 18px;
  --care-sheet: var(--ledger-sheet);
  --care-glass: var(--ledger-glass);
  --care-glass-filter: var(--ledger-filter);
  --care-glass-border: rgba(255, 255, 255, .94);
  --care-glass-shadow: var(--ledger-shadow);
  position: relative;
  color: var(--ledger-ink);
  font-family: var(--font-body);
  font-variant-numeric: tabular-nums;
}

/* A painted page field avoids a stacking context around fixed dialogs. */
html[data-site-theme="warm-glass"] body:has(.ice-ledger-workspace) {
  background-image:
    radial-gradient(ellipse at 68% 18%, rgba(255, 255, 255, .70), transparent 55%),
    radial-gradient(ellipse at 8% 65%, rgba(247, 237, 222, .82), transparent 48%),
    var(--studio-ice-field);
}

.ice-ledger-workspace .ledger-glass {
  background: linear-gradient(132deg, rgba(255, 255, 255, .38), rgba(255, 250, 242, .08) 46%, rgba(255, 255, 255, .24)), var(--ledger-glass);
  -webkit-backdrop-filter: var(--ledger-filter);
  backdrop-filter: var(--ledger-filter);
  border: 1px solid var(--care-glass-border);
  box-shadow: var(--ledger-shadow);
  border-radius: var(--ledger-radius);
}

.ice-ledger-workspace :is(h1, h2, h3, h4) {
  letter-spacing: -.025em;
  text-wrap: balance;
}
.ice-ledger-workspace p { text-wrap: pretty; }
.ice-ledger-workspace :is(button, input, select, textarea) {
  font-family: var(--font-body);
}
.ice-ledger-workspace :is(input, select, textarea) {
  font-variant-numeric: tabular-nums;
}
.ice-ledger-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) {
  min-height: 44px !important;
}
.ice-ledger-workspace .input-control {
  background: var(--bg-input);
  box-shadow: inset 0 1px 2px rgba(76, 49, 27, .025);
  border-radius: 9px;
}
.ice-ledger-workspace :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--accent-hover);
  outline-offset: 3px;
}
.ice-ledger-workspace :is(button, a) {
  transition: background-color 160ms ease-out, border-color 160ms ease-out, box-shadow 160ms ease-out;
}
.ice-ledger-workspace :is(button, a, input, select, textarea) { touch-action: manipulation; }
.ice-ledger-workspace .card:hover { transform: none; }
.ice-ledger-workspace :is(.recharts-wrapper, .recharts-default-tooltip, table) {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* Existing OS and in-app transparency preferences keep their meanings. */
html[data-site-theme="warm-glass"][data-glass="tinted"] .ice-ledger-workspace {
  --ledger-glass: rgba(255, 248, 237, .82);
}
html[data-site-theme="warm-glass"][data-glass="reduced"] .ice-ledger-workspace,
html[data-site-theme="warm-glass"][data-transparency="reduced"] .ice-ledger-workspace,
.reduced-transparency .ice-ledger-workspace {
  --ledger-glass: #fffdf8;
  --ledger-filter: none;
}
@media (prefers-reduced-transparency: reduce) {
  html[data-site-theme="warm-glass"] .ice-ledger-workspace {
    --ledger-glass: #fffdf8;
    --ledger-filter: none;
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  html[data-site-theme="warm-glass"] .ice-ledger-workspace {
    --ledger-glass: #fffdf8;
    --ledger-filter: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ice-ledger-workspace *, .ice-ledger-workspace *::before, .ice-ledger-workspace *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (max-width: 768px) {
  /* Native mobile text fields retain readable text without focus zoom. */
  .ice-ledger-workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) {
    font-size: 16px !important;
  }
}
/* One visual layer, never a layout/pseudo-element change to a real control. */
.gdmt-silver-sweep {
  position: fixed;
  inset: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  pointer-events: none !important;
  overflow: hidden;
  contain: strict;
  box-sizing: border-box;
}
.gdmt-silver-sweep::backdrop { background: transparent; pointer-events: none; }
.gdmt-silver-sweep__band {
  position: absolute;
  inset: -100% -35%;
  background: linear-gradient(112deg, transparent 36%, rgb(227 237 239 / 0) 42%, rgb(227 237 239 / var(--silver-face-alpha, .05)) 50%, rgb(227 237 239 / 0) 59%, transparent 64%);
  transform: translateX(-90%);
  animation: gdmt-silver-pass 460ms cubic-bezier(.2,.65,.25,1) both;
  pointer-events: none;
}
.gdmt-silver-sweep::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(112deg, transparent 30%, rgb(239 247 250 / .85) 50%, transparent 70%) 150% 0 / 250% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gdmt-silver-edge 460ms cubic-bezier(.2,.65,.25,1) both;
  pointer-events: none;
}
@keyframes gdmt-silver-pass {
  0% { transform: translateX(-90%); opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { transform: translateX(90%); opacity: 0; }
}
@keyframes gdmt-silver-edge {
  0% { background-position: 150% 0; opacity: 0; }
  10%, 90% { opacity: 1; }
  100% { background-position: -50% 0; opacity: 0; }
}
.gdmt-silver-sweep[data-mode="static"] .gdmt-silver-sweep__band {
  animation: none;
  transform: none;
  opacity: 1;
}
.gdmt-silver-sweep[data-mode="static"]::after { animation: none; background-position: 50% 0; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .gdmt-silver-sweep__band { animation: none !important; transform: none !important; opacity: 1; }
  .gdmt-silver-sweep::after { animation: none !important; background-position: 50% 0; opacity: 1; }
}
html[data-motion="off"] .gdmt-silver-sweep__band { animation: none !important; transform: none !important; opacity: 1; }
html[data-motion="off"] .gdmt-silver-sweep::after { animation: none !important; background-position: 50% 0; opacity: 1; }
html[data-transparency="reduced"] .gdmt-silver-sweep__band { opacity: 0; }
@media (prefers-reduced-transparency: reduce) { .gdmt-silver-sweep__band { opacity: 0; } }
