/* Core site styles for layout, typography, and components. */

:root {
  color-scheme: light;
  --font-sans:
    ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  /* Brand (from logo) */
  --brand-primary: #102d68;
  --brand-secondary: #468e6e;
  --brand-accent: #2b5e6b;

  /* Theme-aware UI tokens */
  --bg: #f7f3eb;
  --surface: rgba(255, 251, 245, 0.84);
  --surface-solid: #fffdf8;
  --surface-2: #f3ece1;
  --surface-3: #e9e0d2;

  --primary: var(--brand-primary);
  --secondary: var(--brand-secondary);
  --accent: var(--brand-accent);

  --text: #10213a;
  --text-muted: #42506a;
  --text-subtle: #69758a;

  --border: rgba(11, 18, 32, 0.12);
  --border-strong: rgba(11, 18, 32, 0.2);
  --shadow: 0 24px 60px -46px rgba(2, 6, 23, 0.35);
  --shadow-2: 0 14px 30px -18px rgba(2, 6, 23, 0.18);

  --primary-soft: rgba(16, 45, 104, 0.08);
  --secondary-soft: rgba(70, 142, 110, 0.12);
  --secondary-border-soft: rgba(70, 142, 110, 0.25);
  --secondary-border: rgba(70, 142, 110, 0.45);
  --secondary-border-strong: rgba(70, 142, 110, 0.75);
  --secondary-line: rgba(70, 142, 110, 0.35);
  --secondary-ring: rgba(70, 142, 110, 0.1);
  --highlight-bg: rgba(70, 142, 110, 0.2);
  --highlight-bg-strong: rgba(70, 142, 110, 0.5);

  --danger: #d92d20;

  --section-spacing: 120px;
  --nav-offset: 120px;

  /* Hero glow tints */
  --hero-glow-1: rgba(16, 45, 104, 0.08);
  --hero-glow-2: rgba(242, 191, 94, 0.12);

  /* Panels / code surfaces */
  --panel-bg: rgba(11, 18, 32, 0.04);
  --panel-bg-strong: rgba(11, 18, 32, 0.07);

  --focus-ring: 0 0 0 4px rgba(70, 142, 110, 0.2);

  --on-primary: #ffffff;
  --on-secondary: #ffffff;
  --device-frame-glow: 0 0 0 0 rgba(0, 0, 0, 0);
  --logo-backplate: transparent;
  --logo-backplate-border: transparent;
  --logo-blue: var(--brand-primary);
  --logo-green: var(--brand-secondary);

  --app-bg: var(--bg);
  --app-panel-bg: var(--surface-solid);
  --bubble-doctor-bg: var(--primary);
  --bubble-doctor-text: var(--on-primary);
  --bubble-patient-bg: var(--surface-2);
  --bubble-patient-text: var(--text);
  --bubble-patient-border: var(--border);

  --summary-item-bg: var(--surface-2);
  --summary-item-border: var(--border);
  --summary-highlight-bg: var(--surface-2);
  --summary-highlight-border: var(--border-strong);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0b0f18;
  --surface: rgba(17, 24, 39, 0.82);
  --surface-solid: #111827;
  --surface-2: #162033;
  --surface-3: #1b2842;

  --primary: #8fb5ff;
  --secondary: #7cd0a6;
  --accent: #7ab1c6;

  --text: #e7edf7;
  --text-muted: #b3c0d6;
  --text-subtle: #90a0b8;

  --border: rgba(231, 237, 247, 0.14);
  --border-strong: rgba(231, 237, 247, 0.22);
  --shadow: 0 24px 60px -46px rgba(2, 6, 23, 0.85);
  --shadow-2: 0 16px 36px -20px rgba(2, 6, 23, 0.6);

  --primary-soft: rgba(143, 181, 255, 0.12);
  --secondary-soft: rgba(124, 208, 166, 0.14);
  --secondary-border-soft: rgba(124, 208, 166, 0.25);
  --secondary-border: rgba(124, 208, 166, 0.45);
  --secondary-border-strong: rgba(124, 208, 166, 0.75);
  --secondary-line: rgba(124, 208, 166, 0.35);
  --secondary-ring: rgba(124, 208, 166, 0.1);
  --highlight-bg: rgba(124, 208, 166, 0.2);
  --highlight-bg-strong: rgba(124, 208, 166, 0.45);

  --hero-glow-1: rgba(143, 181, 255, 0.18);
  --hero-glow-2: rgba(124, 208, 166, 0.14);

  --panel-bg: rgba(255, 255, 255, 0.04);
  --panel-bg-strong: rgba(255, 255, 255, 0.07);

  --focus-ring: 0 0 0 4px rgba(124, 208, 166, 0.25);

  --on-primary: #0b1120;
  --on-secondary: #0b1120;
  --device-frame-glow: 0 0 50px rgba(143, 181, 255, 0.25);
  --logo-backplate: rgba(17, 24, 39, 0.78);
  --logo-backplate-border: rgba(143, 181, 255, 0.22);
  --logo-blue: #3b7cbf;
  --logo-green: #1a926c;

  --app-bg: var(--surface-solid);
  --app-panel-bg: var(--surface-2);
  --bubble-doctor-bg: linear-gradient(
    135deg,
    rgba(143, 181, 255, 0.96),
    rgba(124, 208, 166, 0.92)
  );
  --bubble-doctor-text: var(--on-primary);
  --bubble-patient-bg: var(--surface-3);
  --bubble-patient-text: var(--text);
  --bubble-patient-border: var(--border);

  --summary-item-bg: var(--surface-3);
  --summary-item-border: var(--border);
  --summary-highlight-bg: rgba(143, 181, 255, 0.16);
  --summary-highlight-border: rgba(143, 181, 255, 0.38);
}

:root[data-theme="light"] {
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;

    --bg: #0b0f18;
    --surface: rgba(17, 24, 39, 0.82);
    --surface-solid: #111827;
    --surface-2: #162033;
    --surface-3: #1b2842;

    --primary: #8fb5ff;
    --secondary: #7cd0a6;
    --accent: #7ab1c6;

    --text: #e7edf7;
    --text-muted: #b3c0d6;
    --text-subtle: #90a0b8;

    --border: rgba(231, 237, 247, 0.14);
    --border-strong: rgba(231, 237, 247, 0.22);
    --shadow: 0 24px 60px -46px rgba(2, 6, 23, 0.85);
    --shadow-2: 0 16px 36px -20px rgba(2, 6, 23, 0.6);

    --primary-soft: rgba(143, 181, 255, 0.12);
    --secondary-soft: rgba(124, 208, 166, 0.14);
    --secondary-border-soft: rgba(124, 208, 166, 0.25);
    --secondary-border: rgba(124, 208, 166, 0.45);
    --secondary-border-strong: rgba(124, 208, 166, 0.75);
    --secondary-line: rgba(124, 208, 166, 0.35);
    --secondary-ring: rgba(124, 208, 166, 0.1);
    --highlight-bg: rgba(124, 208, 166, 0.2);
    --highlight-bg-strong: rgba(124, 208, 166, 0.45);

    --hero-glow-1: rgba(143, 181, 255, 0.18);
    --hero-glow-2: rgba(124, 208, 166, 0.14);

    --panel-bg: rgba(255, 255, 255, 0.04);
    --panel-bg-strong: rgba(255, 255, 255, 0.07);

    --focus-ring: 0 0 0 4px rgba(124, 208, 166, 0.25);

    --on-primary: #0b1120;
    --on-secondary: #0b1120;
    --device-frame-glow: 0 0 50px rgba(143, 181, 255, 0.25);
    --logo-backplate: rgba(17, 24, 39, 0.78);
    --logo-backplate-border: rgba(143, 181, 255, 0.22);
    --logo-blue: #3b7cbf;
    --logo-green: #1a926c;

    --app-bg: var(--surface-solid);
    --app-panel-bg: var(--surface-2);
    --bubble-doctor-bg: linear-gradient(
      135deg,
      rgba(143, 181, 255, 0.96),
      rgba(124, 208, 166, 0.92)
    );
    --bubble-doctor-text: var(--on-primary);
    --bubble-patient-bg: var(--surface-3);
    --bubble-patient-text: var(--text);
    --bubble-patient-border: var(--border);

    --summary-item-bg: var(--surface-3);
    --summary-item-border: var(--border);
    --summary-highlight-bg: rgba(143, 181, 255, 0.16);
    --summary-highlight-border: rgba(143, 181, 255, 0.38);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.6;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}
section[id] {
  scroll-margin-top: var(--nav-offset);
}

/* --- Nav --- */
.pill-nav {
  position: fixed;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 94%;
  max-width: 1200px;

  background: var(--surface);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);

  padding: 1.1rem 1.6rem;
  border-radius: 30px;
  border: 1px solid var(--border);

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

  z-index: 100;
  box-shadow:
    var(--shadow-2),
    inset 0 0 0 1px var(--border);
}

.panel-tabs {
  padding-left: 10px;
}

:root[data-theme="dark"] .pill-nav {
  background: var(--logo-backplate);
  border-color: var(--logo-backplate-border);
}

:root[data-theme="dark"] .app-header {
  background: var(--logo-backplate);
  border-bottom-color: var(--logo-backplate-border);
}

:root[data-theme="dark"] .site-footer {
  background: var(--logo-backplate);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pill-nav {
    background: var(--logo-backplate);
    border-color: var(--logo-backplate-border);
  }

  :root:not([data-theme="light"]) .app-header {
    background: var(--logo-backplate);
    border-bottom-color: var(--logo-backplate-border);
  }

  :root:not([data-theme="light"]) .site-footer {
    background: var(--logo-backplate);
  }
}

.theme-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-2);
  z-index: 120;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--secondary-border);
  box-shadow: 0 16px 34px -22px rgba(2, 6, 23, 0.55);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.theme-toggle i {
  font-size: 0.95rem;
}

.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
  position: relative;
  z-index: 1;
}

.logo-bar {
  /* No background/border - logo sits directly on glass nav */
  padding: 0;
  position: relative;
  z-index: 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex: 1;
  text-align: center;
}

:root[data-theme="dark"] .logo-img {
  filter: drop-shadow(0 0 12px rgba(150, 182, 255, 0.22))
    drop-shadow(0 0 22px rgba(127, 217, 178, 0.14));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-img {
    filter: drop-shadow(0 0 12px rgba(150, 182, 255, 0.22))
      drop-shadow(0 0 22px rgba(127, 217, 178, 0.14));
  }
}

.gestalt-logo-svg .logo-blue {
  fill: var(--logo-blue);
  transition: fill 0.3s ease;
}
.gestalt-logo-svg .logo-green {
  fill: var(--logo-green);
  transition: fill 0.3s ease;
}

:root[data-theme="dark"] .gestalt-logo-svg {
  filter: drop-shadow(0 0 8px rgba(143, 181, 255, 0.18))
    drop-shadow(0 0 16px rgba(124, 208, 166, 0.12));
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gestalt-logo-svg {
    filter: drop-shadow(0 0 8px rgba(143, 181, 255, 0.18))
      drop-shadow(0 0 16px rgba(124, 208, 166, 0.12));
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 1.17rem;
  font-weight: 650;
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.btn-login {
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary);
}

:root[data-theme="dark"] .btn-login {
  color: var(--text);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-login {
    color: var(--text);
  }
}

.btn-signup {
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 750;
  font-size: 1.17rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.btn-signup:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
  background: var(--accent);
}

.nav-links a.btn-signup,
.nav-links a.btn-signup:hover {
  color: var(--on-primary);
}

.pill-nav--draft {
  max-width: 980px;
  gap: 1rem;
}

.pill-nav--draft .nav-tagline {
  flex: 1;
  min-width: 220px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
}

/* --- Hero --- */
.hero {
  padding: 184px 0 56px;
  position: relative;
  text-align: center;
}

.hero-simple {
  max-width: 760px;
  margin: 0 auto;
}

.hero--draft {
  padding-bottom: 48px;
}

.home-main {
  position: relative;
  z-index: 0;
}

.home-main::before {
  content: "";
  position: absolute;
  top: 40px;
  left: 0;
  right: 0;
  height: 100%;
  background:
    radial-gradient(circle at 50% 30%, var(--hero-glow-1), transparent 15%),
    radial-gradient(circle at 70% 18%, var(--hero-glow-2), transparent 15%);
  z-index: -1;
  filter: blur(10px);
  pointer-events: none;
}

.status-pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-strong);
}

.hero .status-pill {
  margin-bottom: 1rem;
}

.mobile-hero-pill {
  display: none;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 800;
  letter-spacing: -2.6px;
  margin-bottom: 1.25rem;
  color: var(--primary);
  line-height: 1.05;
}

h2,
h3,
h4 {
  line-height: 1.2;
  color: var(--primary);
}

.gradient-text {
  background-image: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 1rem;
  font-size: 1.1rem;
}

.hero .subtitle:last-of-type {
  margin: 0 auto 1.75rem;
}

/* CTA group */
.cta-group {
  display: flex;
  justify-content: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}

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

.demo-section {
  padding-bottom: var(--section-spacing);
}

.demo-section .app-demo {
  margin: 0 auto;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 999px;
  padding: 1rem 2.25rem;
  font-weight: 750;
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn-secondary:hover {
  background: var(--secondary-soft);
  transform: translateY(-1px);
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.nav-links a:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.section-kicker {
  display: inline-block;
  margin-bottom: 0.8rem;
  color: var(--secondary);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* --- Page layout (contact/login) --- */
.page-hero {
  text-align: center;
  padding: 180px 0 60px;
  position: relative;
}

.page-hero h1 {
  margin-bottom: 1rem;
}

.page-subtitle {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.page-subtitle-sub {
  color: var(--text-subtle);
  font-size: 0.9rem;
  margin-top: 0.75rem;
  font-weight: 600;
}

.page-section {
  padding: 2rem 0 6rem;
}

.page-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  max-width: 720px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.page-card h2 {
  margin-bottom: 0.75rem;
  font-size: 1.6rem;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* --- Pricing --- */
.pricing-section {
  padding: 0 0 var(--section-spacing);
}

.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 2.5rem;
  position: relative;
}

.pricing-toggle-btn {
  padding: 0.6rem 1.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.pricing-toggle-btn.is-active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.pricing-toggle-btn:not(.is-active):hover {
  border-color: var(--secondary-border);
  color: var(--text);
}

.pricing-toggle-badge {
  position: absolute;
  right: calc(50% - 175px);
  top: -10px;
  background: var(--secondary);
  color: var(--on-secondary);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.pricing-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.25rem;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  position: relative;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.pricing-card-featured {
  border-color: var(--secondary-border-strong);
  box-shadow:
    var(--shadow),
    0 0 0 1px var(--secondary-border-soft);
}

.pricing-card-featured:hover {
  border-color: var(--secondary-border-strong);
}

.pricing-card-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--secondary);
  color: var(--on-secondary);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 1rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pricing-card-header h3 {
  font-size: 1.35rem;
  margin-bottom: 0.25rem;
  color: var(--primary);
}

.pricing-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.pricing-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.pricing-standard {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-subtle);
  text-decoration: line-through;
}

.pricing-amount {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -1px;
  line-height: 1;
}

.pricing-interval {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-subtle);
}

.pricing-billed {
  font-size: 0.82rem;
  color: var(--text-subtle);
  margin-bottom: 1.5rem;
  min-height: 1.3em;
}

.pricing-cta {
  width: 100%;
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.pricing-features li i {
  flex-shrink: 0;
  margin-top: 0.35rem;
  font-size: 0.8rem;
}

.pricing-features .included {
  color: var(--text);
}

.pricing-features .included i {
  color: var(--secondary);
}

.pricing-features .included.highlight {
  font-weight: 700;
}

.pricing-features .excluded {
  color: var(--text-subtle);
  opacity: 0.6;
}

.pricing-features .excluded i {
  color: var(--text-subtle);
}

.pricing-plus-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0;
}

.pricing-plus-divider::before,
.pricing-plus-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.pricing-plus-divider span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--secondary);
  line-height: 1;
}

.pricing-note {
  text-align: center;
  color: var(--text-subtle);
  font-size: 0.85rem;
  margin-top: 2rem;
}

.pricing-faq {
  padding: 0 0 var(--section-spacing);
}

.pricing-faq h2 {
  text-align: center;
  margin-bottom: 2rem;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  .pricing-card-featured {
    order: -1;
  }
}

/* --- Cost contrast --- */
.cost-contrast {
  padding: 0 0 var(--section-spacing);
}

.cost-contrast h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.8rem;
  color: var(--primary);
}

.contrast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.contrast-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contrast-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.contrast-icon {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.contrast-cost .contrast-icon {
  color: #dc2626;
}

.contrast-value {
  border-color: var(--secondary-border-strong);
  box-shadow: var(--shadow), 0 0 0 1px var(--secondary-border-soft);
}

.contrast-value .contrast-icon {
  color: var(--secondary);
}

.contrast-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.contrast-figure {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.contrast-cost .contrast-figure {
  color: #dc2626;
}

.contrast-value .contrast-figure {
  color: var(--secondary);
}

.contrast-detail {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* --- Social proof --- */
.social-proof {
  padding: 0 0 var(--section-spacing);
}

.social-proof h2 {
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.8rem;
  color: var(--primary);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem;
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
}

.testimonial-quote {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.testimonial-uni {
  font-size: 0.8rem;
  color: var(--text-subtle);
  font-weight: 600;
}

/* --- Cohort teaser --- */
.cohort-teaser {
  padding: 0 0 var(--section-spacing);
}

.cohort-teaser .container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cohort-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(135deg, var(--primary-soft), var(--secondary-soft));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2rem 2.5rem;
}

.cohort-icon {
  font-size: 1.8rem;
  color: var(--secondary);
  flex-shrink: 0;
}

.cohort-copy h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.cohort-copy p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cohort-badge {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--secondary);
  border: 1px solid var(--secondary-border-soft);
}

@media (max-width: 900px) {
  .contrast-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .cohort-card {
    flex-direction: column;
    text-align: center;
    padding: 2rem 1.5rem;
  }
}

/* --- Media kit --- */
.media-kit .page-hero {
  padding-bottom: 40px;
}

.kit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.kit-card {
  display: grid;
  gap: 1.25rem;
}

.kit-card h2 {
  font-size: 1.6rem;
}

.kit-assets {
  display: grid;
  gap: 1rem;
}

.kit-asset {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.kit-logo {
  width: 100%;
  max-width: 140px;
}

.kit-asset-meta {
  display: grid;
  gap: 0.4rem;
}

.kit-asset-meta span {
  font-weight: 650;
  color: var(--text);
}

.kit-asset-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.kit-link {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 650;
}

.kit-link:hover {
  color: var(--primary);
}

.kit-summary {
  display: grid;
  gap: 0.5rem;
}

.kit-summary + .kit-summary {
  margin-top: 0.5rem;
}

.kit-section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.kit-section-title h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.kit-section-title p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

.kit-bios-section {
  padding-top: 0;
}

.media-kit .profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* --- How it works --- */
.how-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.how-copy h2 {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.how-copy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.how-demo {
  margin: 0;
  max-width: none;
}

.demo-title {
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text-muted);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.section-header p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.compare-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.compare-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.compare-list li::before {
  content: "\2022";
  color: var(--secondary);
  font-weight: 700;
  margin-top: 0.1rem;
}

.highlight-card {
  border-color: var(--secondary-border);
  background: linear-gradient(
    135deg,
    var(--primary-soft),
    var(--secondary-soft)
  );
}

.partner-logo-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.partner-logo-row:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 999px;
}

.partner-logo {
  height: 32px;
  width: auto;
  display: block;
}

.partner-name {
  font-weight: 650;
  color: var(--text);
  font-size: 0.95rem;
}

.partner-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: var(--secondary-soft);
  color: var(--primary);
  font-weight: 650;
  font-size: 0.75rem;
  border: 1px solid var(--secondary-border-soft);
  margin-bottom: 0.75rem;
}

.partnership-card .partner-pill {
  margin-bottom: 1rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
}

.form-label {
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--text);
}

.form-input,
.form-textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  background: var(--surface-solid);
  color: var(--text);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--secondary);
  box-shadow: var(--focus-ring);
}

.form-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

/* --- Bento + Cards --- */
.bento-section {
  padding-bottom: 5rem;
}
.bento-section h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.25rem;
  color: var(--primary);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.25rem;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: var(--shadow);
  position: relative;
}

:root[data-theme="dark"] .card {
  background: var(--surface-solid);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card {
    background: var(--surface-solid);
  }
}

.card:hover {
  border-color: var(--secondary-border);
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
}

.card h3 i {
  color: var(--secondary);
}

.card p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Puzzle motif */
.puzzle-grid .card::before,
.puzzle-grid .card::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 8px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
}

.puzzle-grid .card::before {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}
.puzzle-grid .card::after {
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
}
.puzzle-grid .card:first-child::after {
  display: none;
}
.puzzle-grid .card:last-child::before {
  display: none;
}

/* --- About --- */
.about-section {
  padding-bottom: var(--section-spacing);
}
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: center;
}

.about-grid--draft {
  grid-template-columns: 1fr;
}

.about-copy h2 {
  font-size: 2.35rem;
  margin-bottom: 1rem;
  color: var(--text);
}
.about-copy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}
.about-cards {
  display: grid;
  gap: 1.25rem;
}
.about-card {
  padding: 2rem;
}

.team-block {
  margin-top: 3rem;
}
.team-photo-card {
  margin-bottom: 1.5rem;
  overflow: hidden;
  padding: 0;
}
.team-photo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
  object-position: center top;
}
.team-title {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.team-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.profile-card {
  text-decoration: none;
  color: inherit;
  padding: 1.6rem;
  display: block;
  min-height: 100%;
}

.profile-card--photo {
  overflow: hidden;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 16px;
  margin-bottom: 1rem;
  background: var(--surface-2);
}

.profile-card:hover {
  border-color: var(--secondary-border);
  transform: translateY(-6px);
}

.profile-meta h4 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}
.profile-role {
  color: var(--secondary);
  font-weight: 750;
  margin-bottom: 0.4rem;
}
.profile-bio {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
}
.profile-link {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 650;
  text-decoration: none;
}
.profile-link:hover {
  color: var(--primary);
}

/* --- How It Works --- */
.how-it-works-section {
  padding-bottom: var(--section-spacing);
}
.how-it-works-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}
.how-it-works-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.how-it-works-card {
  padding: 1.6rem;
}
.how-it-works-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.how-it-works-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Profile Photos --- */
.profile-photo {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px 8px 0 0;
  margin: -1.6rem -1.6rem 1.2rem -1.6rem;
  width: calc(100% + 3.2rem);
}

/* --- Knowledge Graph --- */
.knowledge-section {
  padding-bottom: var(--section-spacing);
}

.knowledge-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.knowledge-copy h2 {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.knowledge-copy p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.knowledge-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.knowledge-stack {
  display: grid;
  gap: 1.25rem;
}

.knowledge-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.knowledge-badge {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 650;
  border: 1px solid var(--border-strong);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
}

.how-steps-section {
  padding-bottom: var(--section-spacing);
}

.how-steps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.how-step-card {
  height: 100%;
}

.how-step-card h3 {
  margin-bottom: 0.9rem;
}

.how-step-card--wide {
  grid-column: 1 / -1;
}

/* --- FAQ --- */
.faq-section {
  padding-bottom: var(--section-spacing);
}

.faq-section h2 {
  text-align: center;
  font-size: 2.1rem;
  margin-bottom: 2.5rem;
}

.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 0;
}

.faq-item summary {
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  margin-top: 0.75rem;
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.faq-item a {
  color: var(--secondary);
  text-decoration: underline;
}

/* --- Investors + Media --- */
.resources-section {
  padding-bottom: var(--section-spacing);
}

.resources-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.resources-header h2 {
  font-size: 2.1rem;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.resources-header p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.resource-card {
  display: grid;
  gap: 1.2rem;
}

.resource-card h3 {
  margin-bottom: 0;
}

.resource-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.resource-cta {
  text-decoration: none;
  color: var(--primary);
  font-weight: 650;
  border: 1px solid var(--border-strong);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--primary-soft);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.resource-cta:hover {
  background: var(--secondary-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.resource-cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* --- Footer --- */
.site-footer {
  padding: 4rem 0 5rem;
}
.footer-inner {
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.5fr 1.7fr;
  gap: 1.75rem;
  align-items: center;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.65rem;
  margin-top: 0.6rem;
  font-family: "Syncopate", "Futura", "Avant Garde Gothic", sans-serif;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: lowercase;
}
.footer-brand .logo-bar {
  display: inline-flex;
  align-self: flex-start;
}

.footer-bars {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  justify-content: center;
}
.footer-bars .bar {
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
}
.footer-bars .bar-1 {
  width: 48px;
  opacity: 0.9;
}
.footer-bars .bar-2 {
  width: 80px;
  background: var(--secondary);
  opacity: 0.85;
}
.footer-bars .bar-3 {
  width: 60px;
  background: var(--accent);
  opacity: 0.8;
}

.footer-links {
  display: flex;
  gap: 0.95rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.footer-links a,
.footer-links button {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 650;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.footer-links a:hover,
.footer-links button:hover {
  color: var(--primary);
}

.footer-links a:focus-visible,
.footer-links button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 999px;
}

.footer-legal {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* --- Modals --- */
.modal {
  border: none;
  border-radius: 18px;
  padding: 0;
  width: min(720px, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  overflow: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.modal-body {
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.modal-body details {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
}

.modal-body summary {
  font-weight: 650;
  cursor: pointer;
}

.modal-body p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* --- Scroll reveal --- */
.scroll-reveal {
  opacity: 1;
  transform: none;
}
.scroll-reveal.reveal {
  opacity: 1;
  transform: none;
}

/* --- Demo / Graph (single, consistent block) --- */
.demo-box {
  max-width: 820px;
  margin: 4rem auto 6rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
}

.demo-header {
  background: var(--panel-bg);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.45;
}

.demo-content {
  padding: 0;
}

.graph-layout {
  display: flex;
  flex-direction: column;
}

.graph-visual {
  position: relative;
  height: 340px;
  background: radial-gradient(
    circle at center,
    var(--primary-soft),
    transparent 60%
  );
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

/* Connecting Lines */
.graph-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.graph-lines line {
  stroke: var(--secondary-line);
  stroke-width: 2px;
  stroke-dasharray: 8 8;
  animation: flowLines 1.4s linear infinite;
}

@keyframes flowLines {
  to {
    stroke-dashoffset: -16;
  }
}

/* Nodes */
.node {
  position: absolute;
  width: 86px;
  height: 86px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(2, 6, 23, 0.18);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
  z-index: 2;
  transform: translate(-50%, -50%);
}

.node i {
  font-size: 1.35rem;
  margin-bottom: 6px;
  color: var(--text-muted);
  transition: 0.2s;
}
.node span {
  font-size: 0.7rem;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.node-center {
  width: 100px;
  height: 100px;
}

/* Positions (match SVG + HTML classes) */
.node-center {
  top: 50%;
  left: 50%;
}
.node-history {
  top: 25%;
  left: 18%;
}
.node-flags {
  top: 25%;
  left: 82%;
}
.node-diff {
  top: 85%;
  left: 50%;
}

.node:hover {
  transform: translate(-50%, -50%) scale(1.08);
  border-color: var(--secondary-border);
  /* background: var(--secondary-soft); */
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.22);
}

.node.active {
  border-color: var(--secondary-border-strong);
  background: var(--primary-soft);
  box-shadow: 0 0 0 6px var(--secondary-ring);
  transform: translate(-50%, -50%) scale(1.12);
}

.node.active i {
  color: var(--secondary);
}
.node.active span {
  color: var(--text);
}

/* Output */
.graph-output {
  padding: 2rem;
  background: var(--panel-bg-strong);
}

.output-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 1rem;
  font-weight: 750;
}

.output-text {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  min-height: 80px;
}

.highlight {
  color: var(--text);
  font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 170px 0 80px;
  }
  .hero .cta-group {
    justify-content: center;
  }
  .page-hero {
    padding: 160px 0 50px;
  }
  .page-card {
    padding: 2rem;
  }
  .bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }
  .puzzle-grid .card::before,
  .puzzle-grid .card::after {
    display: none;
  }
  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .how-steps-grid {
    grid-template-columns: 1fr;
  }
  .how-step-card--wide {
    grid-column: auto;
  }
  .team-title {
    text-align: center;
  }
  .team-photo {
    max-height: none;
  }
  .how-it-works-grid {
    grid-template-columns: 1fr;
  }
  .profile-grid {
    grid-template-columns: 1fr;
  }
  .media-kit .profile-grid {
    grid-template-columns: 1fr;
  }
  .profile-card {
    text-align: left;
  }
  .knowledge-grid {
    grid-template-columns: 1fr;
  }
  .knowledge-copy {
    text-align: center;
  }
  .knowledge-stack {
    text-align: left;
  }
  .knowledge-actions {
    justify-content: center;
  }
  .knowledge-badges {
    justify-content: center;
  }
  .partner-logo-row {
    justify-content: center;
  }
  .how-layout {
    grid-template-columns: 1fr;
  }
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .kit-grid {
    grid-template-columns: 1fr;
  }
  .kit-asset {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .kit-logo {
    margin: 0 auto;
  }
  .kit-asset-links {
    justify-content: center;
  }
  .logo-img {
    height: 30px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  :root {
    --nav-offset: 96px;
  }

  .pill-nav {
    top: 1rem;
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
    gap: 0.65rem;
  }

  .logo {
    width: 100%;
    justify-content: center;
  }

  .pill-nav--draft .nav-tagline {
    width: 100%;
    order: 2;
    text-align: center;
    font-size: 0.78rem;
  }

  .pill-nav--draft .nav-links {
    order: 3;
  }

  .nav-links {
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    gap: 0.9rem;
  }

  .nav-tagline {
    display: none;
  }
  .nav-links a {
    font-size: 0.82rem;
  }
  .btn-login {
    padding: 0.45rem 0.85rem;
  }
  .btn-signup {
    display: none;
  }
}

@media (max-width: 600px) {
  .graph-visual {
    height: 280px;
  }
  .node-center {
    width: 82px;
    height: 82px;
  }
  .node {
    width: 66px;
    height: 66px;
  }
  .node i {
    font-size: 1.1rem;
  }
  .node span {
    font-size: 0.6rem;
  }

  /* Bring nodes closer on narrow screens */
  .node-history {
    left: 15%;
    top: 20%;
  }
  .node-flags {
    left: 85%;
    top: 20%;
  }
}

/* ===========================================
   INTERACTIVE APP DEMO
   =========================================== */

.app-demo {
  max-width: 900px;
  margin: 3rem auto 5rem;
}

.demo-modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.demo-mode-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.45rem 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.demo-mode-btn:hover {
  border-color: var(--border-strong);
  color: var(--primary);
}

.demo-mode-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-strong);
}

.device-frame {
  background: var(--surface-solid);
  border-radius: 32px;
  border: 1px solid var(--border);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--border-strong),
    var(--device-frame-glow);
  overflow: hidden;
  position: relative;
}

.question-callout {
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--surface-solid);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.55rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 650;
  text-align: center;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translate(-50%, -50%) translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  pointer-events: none;
  z-index: 20;
}

.question-callout.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
}

.question-callout__content {
  white-space: nowrap;
}

.question-callout__arrow {
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  width: 70px;
  height: 52px;
  display: block;
  background: url("../resources/marker-arrow-red.png") center/contain no-repeat;
  filter: drop-shadow(0 10px 16px rgba(2, 6, 23, 0.25));
  transform: translateX(-50%);
}

.app-screen.mcq-screen {
  display: none;
}

.app-demo[data-demo-mode="mcq"] .demo-screen {
  display: none;
}

.app-demo[data-demo-mode="mcq"] .app-screen.mcq-screen {
  display: flex;
}

.app-demo[data-demo-mode="mcq"] .demo-scenarios,
.app-demo[data-demo-mode="mcq"] .demo-controls,
.app-demo[data-demo-mode="mcq"] .demo-caption--clinical,
.app-demo[data-demo-mode="mcq"] .question-callout {
  display: none;
}

.app-demo[data-demo-mode="clinical"] .demo-caption--mcq {
  display: none;
}

.mcq-header-right {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.mcq-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--secondary-soft);
  border: 1px solid var(--secondary-border-soft);
  color: var(--secondary);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.mcq-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.4px;
}

.mcq-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.1rem 1.4rem;
  display: grid;
  gap: 1.1rem;
}

.mcq-intro h3 {
  margin-bottom: 0.35rem;
  font-size: 1.05rem;
}

.mcq-intro p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.mcq-list {
  display: grid;
  gap: 0.9rem;
}

.mcq-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem;
  display: grid;
  gap: 0.65rem;
  box-shadow: var(--shadow-2);
}

.mcq-question {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.mcq-options {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.mcq-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  text-align: left;
  font-family: inherit;
  appearance: none;
  padding: 0.45rem 0.6rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.mcq-option:not(.is-disabled):hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
}

.mcq-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.mcq-option.is-correct {
  border-color: var(--secondary-border);
  background: var(--secondary-soft);
}

.mcq-option.is-wrong {
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.08);
  color: #b91c1c;
}

.mcq-option.is-disabled {
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: none;
  opacity: 0.85;
}

.mcq-option-text {
  flex: 1;
}

.mcq-indicator {
  margin-left: auto;
  font-weight: 800;
  color: var(--secondary);
}

.mcq-option.is-wrong .mcq-indicator {
  color: #b91c1c;
}

.mcq-rationale {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: none;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.mcq-rationale.is-visible,
.mcq-card.is-answered .mcq-rationale {
  display: flex;
}

.mcq-rel {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
}

.mcq-report-score {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
}

.mcq-report-subtitle {
  margin-top: 0.4rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.mcq-report-list {
  margin: 0.4rem 0 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text);
}

.mcq-report-question {
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.mcq-report-answer {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.device-notch {
  width: 120px;
  height: 28px;
  background: var(--app-bg);
  border-radius: 0 0 16px 16px;
  margin: 0 auto;
  position: relative;
  z-index: 10;
  border: 1px solid var(--border);
  border-top: none;
}

.app-screen {
  background: var(--app-bg);
  min-height: 700px;
  height: 78vh;
  max-height: 860px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* App Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1.25rem;
  background: var(--app-panel-bg);
  border-bottom: 1px solid var(--border);
}

.app-logo-img {
  height: 28px;
  width: auto;
}

.recording-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(220, 38, 38, 0.1);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.recording-indicator.active {
  opacity: 1;
}

.demo-mobile-hint {
  display: none;
}

.rec-dot {
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse-red 1.5s ease-in-out infinite;
}

@keyframes pulse-red {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.9);
  }
}

.rec-text {
  font-size: 0.75rem;
  font-weight: 700;
  color: #dc2626;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* App Content Layout */
.app-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  flex: 1;
  min-height: 400px;
}

/* Transcript Panel */
.transcript-panel {
  background: var(--app-panel-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.transcript-header {
  padding: 0.6rem 0.85rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.transcript-header i {
  color: var(--secondary);
}

.transcript-messages {
  flex: 1;
  padding: 0.85rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Message Bubbles */
.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: messageIn 0.4s ease-out;
}

@keyframes messageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.doctor {
  align-self: flex-end;
}

.message.patient {
  align-self: flex-start;
}

.message-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  padding: 0 8px;
}

.message.doctor .message-label {
  color: var(--primary);
  text-align: right;
}

.message.patient .message-label {
  color: var(--secondary);
}

.message-bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.4;
}

.message.doctor .message-bubble {
  background: var(--bubble-doctor-bg);
  color: var(--bubble-doctor-text);
  border-bottom-right-radius: 4px;
}

.message.patient .message-bubble {
  background: var(--bubble-patient-bg);
  color: var(--bubble-patient-text);
  border: 1px solid var(--bubble-patient-border);
  border-bottom-left-radius: 4px;
}

/* Highlighted clinical terms */
.clinical-term {
  background: var(--highlight-bg);
  color: var(--text);
  padding: 1px 4px;
  border-radius: 4px;
  font-weight: 600;
  border-bottom: 2px solid var(--secondary);
  animation: highlightPulse 0.6s ease-out;
}

@keyframes highlightPulse {
  0% {
    background: var(--highlight-bg-strong);
  }
  100% {
    background: var(--highlight-bg);
  }
}

/* Clinical Panel */
.clinical-panel {
  background: var(--app-panel-bg);
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.panel-section {
  border-bottom: 1px solid var(--border);
}

.panel-section:last-child {
  border-bottom: none;
}

.panel-header {
  padding: 0.5rem 0.85rem;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.panel-header i {
  color: var(--secondary);
  font-size: 0.85rem;
}

.panel-toggle {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.panel-toggle i {
  transition: transform 0.2s ease;
}

.panel-toggle:hover {
  background: var(--primary-soft);
  border-color: var(--border-strong);
  color: var(--primary);
}

.panel-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.transcript-panel.is-collapsed .panel-toggle i,
.panel-section.is-collapsed .panel-toggle i {
  transform: rotate(180deg);
}

.transcript-panel.is-collapsed .transcript-messages {
  display: none;
}

.panel-section.is-collapsed > :not(.panel-header) {
  display: none;
}

#questions-section.is-coach-target {
  box-shadow:
    0 0 0 2px rgba(251, 191, 36, 0.35),
    0 18px 40px -32px rgba(251, 191, 36, 0.6);
  border-radius: 12px;
}

#questions-section.is-coach-target .panel-header {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}

#questions-section.is-coach-target .question-prompts {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.panel-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.panel-tab.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-strong);
}

.panel-tab:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.panel-tab:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.panel-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.panel-tab-content.is-active {
  display: block;
}

.session-footer {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  justify-content: center;
}

.session-btn {
  border: 1px solid var(--border-strong);
  background: var(--primary);
  color: var(--on-primary);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.session-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2);
}

.session-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.session-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.summary-items {
  padding: 0.6rem;
  display: grid;
  gap: 0.5rem;
}

.summary-item {
  background: var(--summary-item-bg);
  border: 1px solid var(--summary-item-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.summary-item.summary-highlight {
  background: var(--summary-highlight-bg);
  border-color: var(--summary-highlight-border);
  font-weight: 700;
  color: var(--primary);
}

.summary-item.summary-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Patient Profile */
.profile-items {
  padding: 0.65rem;
  display: grid;
  gap: 0.5rem;
}

.profile-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.profile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem;
  background: var(--surface-2);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

.profile-item .label {
  color: var(--text-muted);
  font-weight: 600;
}

.profile-item .value {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* History Items */
.history-items,
.medical-history-items,
.medication-items {
  padding: 0.6rem;
  min-height: 60px;
  display: grid;
  gap: 0.45rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.6rem;
  background: var(--primary-soft);
  border-radius: 8px;
  margin-bottom: 0;
  font-size: 0.82rem;
  animation: slideIn 0.3s ease-out;
}

.history-item.is-stacked {
  align-items: flex-start;
}

.history-item.has-note {
  flex-wrap: wrap;
  align-items: flex-start;
}

.history-item__content {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.history-item__meta {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

.history-item.modifier {
  margin-left: 1.25rem;
  background: var(--primary-soft);
  border-left: 2px solid var(--border-strong);
}

.history-item.modifier .label {
  font-weight: 600;
}

.history-item.negated {
  margin-left: 0;
  background: var(--primary-soft);
  border-left: none;
}

.history-item.negated i {
  color: #dc2626;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.history-item i {
  color: var(--primary);
  font-size: 0.75rem;
}

.history-item .label {
  color: var(--text-muted);
  font-weight: 600;
}

.history-item .value {
  color: var(--text);
  font-weight: 700;
}

.history-item__note {
  flex-basis: 100%;
  margin-left: 1.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.findings-subsection {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.findings-subsection-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0.15rem 0;
}

.findings-subsection-header i {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.findings-subsection-content {
  display: grid;
  gap: 0.35rem;
}

.history-section {
  display: grid;
  gap: 0.35rem;
}

.history-section__title {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0 0.2rem;
}

.history-section__items {
  display: grid;
  gap: 0.35rem;
}

.history-group {
  display: grid;
  gap: 0.4rem;
}

.history-group + .history-group {
  margin-top: 0.65rem;
}

.history-group__header {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

.history-group__items {
  display: grid;
  gap: 0.4rem;
}

.medication-details {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.medication-note {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.medication-effect {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.45rem;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
}

.medication-effect__label {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

.medication-effect__term {
  font-weight: 700;
  color: var(--text);
}

.medication-effect.is-match {
  border-color: var(--secondary-border);
  background: var(--secondary-soft);
}

/* Differential List */
.differential-list {
  padding: 0.75rem;
  min-height: 80px;
}

.diff-item {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.6rem;
  background: var(--surface-2);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  animation: slideIn 0.3s ease-out;
}

.diff-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.diff-item-header--clickable {
  cursor: pointer;
}

.diff-item-header--clickable:hover {
  opacity: 0.85;
}

.diff-expand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 0.6rem;
  width: 14px;
  transition: transform 0.2s ease;
}

.diff-item-details {
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.4rem;
  margin-top: 0.4rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem;
  overflow: hidden;
}

.diff-item.is-expanded .diff-item-details {
  display: flex;
}

.diff-item.is-expanded {
  background: var(--surface-1);
}

.diff-item.is-expanded.red-flag {
  background: rgba(220, 38, 38, 0.1);
}

.diff-detail-row {
  display: flex;
  gap: 0.4rem;
  line-height: 1.4;
}

.diff-detail-label {
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 55px;
}

.diff-detail-value {
  color: var(--text);
  font-weight: 500;
}

.diff-item.highlight {
  border-color: var(--border-strong);
  background: var(--primary-soft);
  box-shadow: var(--shadow-2);
}

.diff-item.red-flag.highlight {
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: 0 14px 28px -22px rgba(220, 38, 38, 0.4);
}

.diff-item.red-flag {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.25);
}

.diff-item.red-flag .diff-name {
  color: #dc2626;
}

.diff-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.diff-name i {
  font-size: 0.7rem;
}

.diff-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

.diff-badge.red-flag {
  background: rgba(220, 38, 38, 0.15);
  color: #dc2626;
}

.diff-badge.likely {
  background: var(--secondary-soft);
  color: var(--secondary);
}

/* Question Prompts */
.question-prompts {
  padding: 0.75rem;
}

.question-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 0.6rem;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.78rem;
  color: var(--text);
  animation: slideIn 0.3s ease-out;
}

.question-text {
  flex: 1;
}

.question-answer {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface-2);
}

.question-answer:empty {
  display: none;
}

.question-item.answered {
  opacity: 0.65;
}

.question-item.answered .question-text {
  text-decoration: line-through;
}

.question-item i {
  color: #f59e0b;
}

.question-item.is-choice {
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.question-item.is-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.15);
}

.question-item.is-choice.is-selected {
  border-color: var(--border-strong);
  background: var(--primary-soft);
}

.question-item.is-choice.is-disabled {
  cursor: not-allowed;
  opacity: 0.5;
  pointer-events: none;
}

/* Empty States */
.empty-state {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  padding: 0.5rem;
}

/* Demo Controls */
.demo-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
}

.demo-scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.demo-scenarios + .demo-controls {
  border-top: none;
}

.scenario-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scenario-btn:hover {
  border-color: var(--border-strong);
  color: var(--primary);
}

.scenario-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-strong);
}

.demo-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.demo-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.demo-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--border-strong);
}

.demo-btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.demo-btn-primary:hover {
  background: var(--primary);
  color: var(--on-primary);
  transform: scale(1.05);
}

.demo-progress {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 999px;
  transition: width 0.3s ease;
}

.demo-caption {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ===========================================
   WAITLIST SECTION
   =========================================== */

.waitlist-section {
  padding: 4rem 0 6rem;
}

.waitlist-card {
  background: linear-gradient(
    135deg,
    var(--primary-soft),
    var(--secondary-soft)
  );
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 3.5rem;
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.waitlist-card h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.waitlist-card > p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  font-size: 1.05rem;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 440px;
  margin: 0 auto 1rem;
}

.waitlist-input {
  flex: 1;
  padding: 1rem 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.waitlist-input:focus {
  border-color: var(--secondary);
  box-shadow: var(--focus-ring);
}

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

.waitlist-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Responsive for demo */
@media (max-width: 768px) {
  .pill-nav--draft .nav-tagline {
    display: none;
  }

  .mobile-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .app-screen {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .app-content {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem;
    background: transparent;
    overflow: visible;
  }

  .demo-mobile-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    text-transform: uppercase;
  }

  .transcript-panel,
  .clinical-panel {
    min-height: clamp(520px, 75vh, 720px);
    max-height: clamp(520px, 75vh, 720px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow-2);
  }

  .clinical-panel {
    border-top: 1px solid var(--border);
  }

  .device-frame {
    border-radius: 24px;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .waitlist-card {
    padding: 2.5rem 1.5rem;
  }
}

@media (max-width: 480px) {
  :root {
    --nav-offset: 84px;
  }

  .app-screen {
    min-height: 0;
    max-height: none;
  }

  .transcript-panel,
  .clinical-panel {
    min-height: clamp(480px, 72vh, 660px);
    max-height: clamp(480px, 72vh, 660px);
  }

  .hero {
    padding: 150px 0 70px;
  }
  .app-header {
    padding: 0.5rem 1rem;
  }
  .profile-row {
    grid-template-columns: 1fr;
  }

  .app-logo-img {
    height: 22px;
  }

  .message-bubble {
    font-size: 0.8rem;
  }

  .panel-header {
    font-size: 0.7rem;
  }

  .theme-toggle {
    right: 1rem;
    bottom: 1rem;
  }
}

@media print {
  body.media-kit {
    background: #ffffff;
    color: #000000;
  }

  body.media-kit .mesh-bg,
  body.media-kit .pill-nav,
  body.media-kit .site-footer,
  body.media-kit .page-actions,
  body.media-kit .modal {
    display: none;
  }

  body.media-kit .page-hero {
    padding: 0 0 1.5rem;
  }

  body.media-kit .page-section {
    padding: 0 0 2rem;
  }

  body.media-kit .card {
    box-shadow: none;
  }

  body.media-kit .kit-card,
  body.media-kit .profile-card {
    break-inside: avoid;
  }

  body.media-kit a {
    color: #000000;
    text-decoration: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .message,
  .history-item,
  .diff-item,
  .question-item,
  .clinical-term,
  .rec-dot,
  .graph-lines line {
    animation: none;
  }

  .demo-btn,
  .btn-primary,
  .btn-secondary,
  .card,
  .progress-bar {
    transition: none;
  }
}

/* --- Subscribe Page --- */
.subscribe-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
  align-items: start;
}

.subscribe-card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.subscribe-plan-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 1rem;
}

.subscribe-plan-badge.badge-pro {
  background: var(--secondary-soft);
  color: var(--secondary);
}

.subscribe-plan-badge.badge-standard {
  background: var(--primary-soft);
  color: var(--primary);
}

.subscribe-card h2 {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.subscribe-plan-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.subscribe-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem;
  margin-bottom: 0.25rem;
}

.subscribe-price-amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.subscribe-price-interval {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 600;
}

.subscribe-price-note {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-bottom: 1.75rem;
}

.subscribe-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
}

.subscribe-features li {
  padding: 0.45rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.subscribe-features li i {
  color: var(--secondary);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.subscribe-cta-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.subscribe-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem;
  font-size: 1.05rem;
}

.subscribe-cta-alt {
  font-size: 0.95rem;
  padding: 0.85rem;
}

.subscribe-fine-print {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.subscribe-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 1rem;
}

.subscribe-reassurance {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.reassurance-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.reassurance-item > i {
  font-size: 1.25rem;
  color: var(--secondary);
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.reassurance-item strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.reassurance-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
}

.subscribe-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.subscribe-back:hover {
  color: var(--primary);
}

/* Outline variant for non-featured CTA */
.pricing-cta-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border-strong);
}

.pricing-cta-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

@media (max-width: 768px) {
  .subscribe-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .subscribe-card {
    padding: 2rem 1.5rem;
  }
}

/* --- Legal Pages (Terms, Privacy) --- */
.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 120px 1.5rem 4rem;
}

.legal-page h1 {
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.legal-page .legal-date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
}

.legal-page h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.legal-page h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.legal-page p {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.legal-page ul,
.legal-page ol {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  font-size: 0.95rem;
}

.legal-page li {
  margin-bottom: 0.35rem;
}

.legal-page a {
  color: var(--secondary);
  text-decoration: underline;
}

.legal-page .legal-notice {
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.legal-page .legal-notice p {
  margin-bottom: 0.5rem;
}

.legal-page .legal-notice p:last-child {
  margin-bottom: 0;
}

.legal-page .legal-commitment {
  background: var(--secondary-soft);
  border-left: 3px solid var(--secondary);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}

.legal-page .legal-commitment ul {
  margin-bottom: 0;
}

.legal-page .legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.legal-page .legal-back:hover {
  color: var(--text);
}
