/**
 * Threvix Health — premium visual layer
 * Load after page inline <style>. Expects :root vars from inline (medical-teal, charcoal, etc.)
 *
 * Brand palette: Alabaster #EAEAEA / Periwinkle #CBC5EA / Vintage Lavender #73628A /
 * Twilight Indigo #313D5A / Jet #183642 — primary action uses Twilight Indigo.
 * Legacy names map to these. Neutrals (--th-on-brand) are for legible text on solid brand fills.
 */

:root {
  --th-surface: #EAEAEA;
  --th-surface-elevated: rgba(255, 255, 255, 0.97);
  --th-ring-focus: rgba(49, 61, 90, 0.35);
  --th-shadow-sm: 0 2px 10px rgba(24, 54, 66, 0.08);
  --th-shadow-md: 0 12px 40px rgba(24, 54, 66, 0.12);
  --th-shadow-lg: 0 28px 72px rgba(24, 54, 66, 0.16);
  --th-radius-card: 22px;
  --th-radius-pill: 9999px;

  --th-brand: #313D5A;
  --th-brand-emphasis: #313D5A;
  --th-on-brand: #FFFFFF;

  /* Back-compat (single source: --th-brand / --th-brand-emphasis) */
  --th-accent-burgundy: var(--th-brand);
  --th-accent-burgundy-mid: var(--th-brand-emphasis);

  /* Solid brand rows (dropdown / nav lists) — same hex, light text */
  --th-burgundy-fill-hover: var(--th-brand);
  --th-burgundy-fill-current: var(--th-brand-emphasis);
}

#page-scroll {
  background: var(--bg-primary, #eaeaea);
  /* Main scroll container — smooth anchor jumps (html/body alone does not apply here) */
  scroll-behavior: smooth;
}

body.threvix-signup {
  background: #eaeaea;
}

/* ── Nav: light frosted at hero; stronger frosted when scrolled / dropdown ── */
.nav-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  box-sizing: border-box;
  padding: 1.5rem 2rem;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    box-shadow 0.35s ease;
}

@media (min-width: 768px) {
  .nav-fixed {
    padding: 2rem 4rem;
  }
}

/* Pages that use the full site header (not index): clear space under fixed bar */
body.threvix-with-global-nav .feature-page-main {
  padding-top: 5.75rem;
}

@media (min-width: 768px) {
  body.threvix-with-global-nav .feature-page-main {
    padding-top: 6.75rem;
  }
}

body.threvix-signup.threvix-with-global-nav .page-wrap {
  padding-top: 6.5rem;
}

/*
 * Top of page (before scroll): stable stack — no mix-blend-mode.
 * difference + WebGL canvas recomposited every frame → random black flashes in the bar.
 */
/* Top of page: same bar whether Features is hovered/open or not — no background swap */
#mainNav:not(.nav-scrolled) {
  mix-blend-mode: normal !important;
  color: var(--charcoal, #183642) !important;
  background: #eaeaea !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

/*
 * Scrolled bar: same solid fill as top (no frosted / blur).
 */
#mainNav.nav-scrolled {
  mix-blend-mode: normal !important;
  color: var(--charcoal, #183642) !important;
  background: #eaeaea !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--th-shadow-sm);
}

#mainNav:is(.nav-scrolled, :has(.nav-dropdown-wrap:hover), :has(.nav-dropdown-wrap:focus-within), :has(.nav-dropdown-open)) .hamburger span {
  background: var(--charcoal, #183642) !important;
}

#mainNav:is(.nav-scrolled, :has(.nav-dropdown-wrap:hover), :has(.nav-dropdown-wrap:focus-within), :has(.nav-dropdown-open)) .lang-toggle-btn.lang-inactive {
  opacity: 0.55;
  color: var(--charcoal);
}

#mainNav:is(.nav-scrolled, :has(.nav-dropdown-wrap:hover), :has(.nav-dropdown-wrap:focus-within), :has(.nav-dropdown-open)) .lang-toggle-btn.lang-active {
  background: var(--medical-teal, #313D5A) !important;
  color: #fff !important;
}

#mainNav:is(.nav-scrolled, :has(.nav-dropdown-wrap:hover), :has(.nav-dropdown-wrap:focus-within), :has(.nav-dropdown-open)) a.nav-home-link {
  color: inherit;
}

/* Nav wordmark — regular weight to pair with the thin logo mark */
.brand-text {
  font-weight: 400;
}

#mainNav:is(.nav-scrolled, :has(.nav-dropdown-wrap:hover), :has(.nav-dropdown-wrap:focus-within), :has(.nav-dropdown-open)) .nav-main-cell--links a.nav-main-link {
  color: inherit;
}

/* Main marketing nav: logo | centered links | lang + mobile menu */
.nav-main-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem 1rem;
}

@media (max-width: 767px) {
  .nav-main-bar {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

.nav-main-cell--brand {
  justify-self: start;
  min-width: 0;
}

.nav-main-cell--links {
  justify-content: center;
  gap: clamp(0.75rem, 2.2vw, 2rem);
}

.nav-main-cell--end {
  justify-self: end;
  min-width: 0;
}

/* Nav link hover: underline bar + teal when scrolled */
.nav-main-cell--links .nav-main-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-bottom: 6px;
  margin-bottom: -2px;
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-main-cell--links .nav-main-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

#mainNav .nav-main-cell--links .nav-main-link::after {
  background: var(--th-accent-burgundy, #313D5A);
}

.nav-main-cell--links .nav-main-link:hover::after,
.nav-main-cell--links .nav-main-link:focus-visible::after,
.nav-dropdown-wrap:hover .nav-dropdown-trigger.nav-main-link::after,
.nav-dropdown-wrap:focus-within .nav-dropdown-trigger.nav-main-link::after,
.nav-dropdown-wrap.nav-dropdown-open .nav-dropdown-trigger.nav-main-link::after {
  transform: scaleX(1);
}

#mainNav .nav-main-cell--links .nav-main-link:hover,
#mainNav .nav-main-cell--links .nav-main-link:focus-visible,
#mainNav .nav-dropdown-wrap:hover .nav-dropdown-trigger.nav-main-link,
#mainNav .nav-dropdown-wrap:focus-within .nav-dropdown-trigger.nav-main-link {
  color: var(--th-accent-burgundy, #313D5A);
}

@media (prefers-reduced-motion: reduce) {
  .nav-main-cell--links .nav-main-link::after {
    transition: none;
  }
}

/* Lang toggle pill — subtle border on light frosted bar (all states) */
#mainNav div.rounded-full.border.overflow-hidden {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Signup: always frosted bar (matches scrolled marketing nav) */
.nav-signup-frosted {
  mix-blend-mode: normal !important;
  color: var(--charcoal, #183642) !important;
  background: #eaeaea !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: var(--th-shadow-sm);
}

.nav-signup-frosted .nav-logo {
  background-color: var(--charcoal);
}

.nav-signup-frosted div.rounded-full.border.overflow-hidden {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Focus rings */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--medical-teal, #313D5A);
  outline-offset: 2px;
}

.billing-btn:focus-visible {
  outline-offset: 3px;
}

.lang-toggle-btn:focus-visible {
  outline-offset: 2px;
}

/* Softer hero canvas */
#canvas-wrapper.visible {
  opacity: 0.18 !important;
}

/* Compliance — plain typography (no chips, bubbles, or shapes) */
.compliance-text-line {
  display: block;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.5;
  margin: 0;
}

.hero-compliance-badges .compliance-text-line {
  color: var(--medical-teal, #313d5a);
  font-weight: 600;
  letter-spacing: 0.05em;
  opacity: 0.95;
}

@media (min-width: 768px) {
  .hero-compliance-badges .compliance-text-line {
    font-size: 0.875rem;
  }
}

.compliance-badges .compliance-text-line {
  color: var(--text-muted, #6b7280);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ── Hero CTAs ── */
.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.btn-ghost-enterprise {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.25rem;
  background: transparent;
  color: var(--charcoal);
  border: 1px solid rgba(0, 0, 0, 0.15);
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
  font-family: "Inter", sans-serif;
}

.btn-ghost-enterprise:hover {
  border-color: var(--medical-teal, #313D5A);
  color: var(--medical-teal);
  transform: translateY(-2px);
}

/* ── Capability cards (editorial / luxury tech) ── */
.solution-card.feature-cap-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--th-radius-card) !important;
  background: rgba(249, 250, 251, 0.94) !important;
  border: 1px solid rgba(100, 116, 139, 0.22) !important;
  box-shadow:
    0 48px 64px -20px rgba(24, 54, 66, 0.07),
    0 24px 40px -16px rgba(24, 54, 66, 0.05);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.45s ease,
    border-color 0.35s ease,
    background 0.35s ease;
}

.solution-card.feature-cap-card::before {
  display: none;
  content: none;
}

.solution-card.feature-cap-card:hover {
  transform: scale(1.02);
  background: rgba(249, 250, 251, 0.99) !important;
  border-color: rgba(71, 85, 105, 0.32) !important;
  box-shadow:
    0 56px 72px -18px rgba(24, 54, 66, 0.08),
    0 32px 48px -12px rgba(24, 54, 66, 0.06);
}

.feature-cap-title {
  font-family: "Playfair Display", "Instrument Serif", Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--charcoal, #183642);
}

.feature-cap-desc {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #4b5563;
}

.feature-cap-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.feature-cap-kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

/* “In-scene” line — editorial pull-quote */
.feature-cap-scene {
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: italic;
  color: rgba(71, 85, 105, 0.9);
  line-height: 1.55;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.feature-cap-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: none;
  background: transparent;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  flex-shrink: 0;
}

.feature-cap-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.22);
  flex-shrink: 0;
}

.feature-cap-live.is-live {
  color: #64748b;
  background: transparent;
}

.feature-cap-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  align-self: flex-start;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--medical-teal, #313d5a);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.feature-cap-link:hover {
  color: var(--charcoal, #183642);
}

.feature-cap-link__arrow {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-cap-link:hover .feature-cap-link__arrow {
  transform: translateX(4px);
}

.feature-cap-tag {
  margin-top: auto;
  padding-top: 1.25rem;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--medical-teal, #313d5a);
}

/* Home — #features: kicker rule + heading bar (solid blocks, not borders) */
#features .max-w-4xl.mx-auto.text-center > span:first-of-type {
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem !important;
  display: inline-block;
  position: relative;
}

#features .max-w-4xl.mx-auto.text-center > span:first-of-type::after {
  content: "";
  display: block;
  height: 3px;
  margin-top: 0.65rem;
  background: var(--th-accent-burgundy);
  border-radius: 2px;
}

#features .max-w-4xl.mx-auto.text-center h2.serif::after {
  content: "";
  display: block;
  width: min(7rem, 38vw);
  height: 3px;
  margin: 1rem auto 0;
  border-radius: 2px;
  background: var(--th-accent-burgundy);
}

/* ── Featured pricing tier ── */
.plan-card-featured {
  box-shadow:
    var(--th-shadow-md),
    0 0 0 1px rgba(49, 61, 90, 0.35),
    0 0 48px rgba(49, 61, 90, 0.15);
}

@media (min-width: 768px) {
  .plan-card-featured {
    transform: translateY(-6px);
  }
}

@media (max-width: 767px) {
  .plan-card-featured {
    transform: none;
  }
}

/* ── Tables ── */
.table-scroll-wrap {
  position: relative;
}

.table-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 1px;
  width: 36px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #eaeaea);
  opacity: 0;
  transition: opacity 0.25s ease;
  border-radius: 0 var(--th-radius-card) var(--th-radius-card) 0;
}

@media (max-width: 640px) {
  .table-scroll-wrap::after {
    opacity: 1;
  }
}

.section-container.bg-white .table-scroll-wrap::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.98));
}

.table-scroll-inner {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--th-radius-card);
}

.pricing-table {
  min-width: 540px;
}

.pricing-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eaeaea !important;
}

.pricing-table thead th.featured-col {
  background: var(--medical-teal) !important;
  color: #fff;
}

.pricing-table tbody tr:nth-child(even) td {
  background: rgba(0, 0, 0, 0.03);
}

.billing-toggle:focus-within {
  box-shadow: 0 0 0 2px var(--th-ring-focus);
}

/* ── FAQ (subscriptions) ── */
.sub-faq-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
}

.sub-faq-header .sub-faq-header-title {
  flex: 1;
  min-width: 0;
}

.sub-faq-header:hover .sub-faq-header-title,
.sub-faq-header:focus-visible .sub-faq-header-title {
  color: var(--medical-teal);
}

.sub-faq-item {
  transition: background 0.2s ease;
}

.sub-faq-item:hover {
  background: rgba(0, 0, 0, 0.04);
}

.faq-header:hover h3 {
  color: var(--medical-teal);
}

/* Launch banner polish */
.launch-banner {
  border-radius: var(--th-radius-card);
  box-shadow: var(--th-shadow-md);
}

.value-card {
  border-radius: var(--th-radius-card) !important;
  box-shadow: var(--th-shadow-sm);
}

.value-card:hover {
  box-shadow: var(--th-shadow-md);
}

/* Sign-up page — flat neutrals + one accent (inline signup.html) */
.threvix-signup .signup-intro,
.threvix-signup .signup-card {
  border-radius: var(--th-radius-card) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  border-color: #e5e7eb !important;
  background: #ffffff !important;
}

/* Sign-up profession — custom dropdown (matches contact form behavior; Threvix tokens) */
body.threvix-signup .signup-form .custom-select {
  position: relative;
  width: 100%;
  z-index: 2;
}

body.threvix-signup .signup-form .custom-select.open {
  z-index: 50;
}

body.threvix-signup .signup-form .custom-select-trigger {
  width: 100%;
  padding: 1rem 2.75rem 1rem 1.15rem;
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 18px;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  color: #9ca3af;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
  position: relative;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

body.threvix-signup .signup-form .custom-select-trigger.has-value {
  color: var(--charcoal, #111827);
}

body.threvix-signup .signup-form .custom-select-trigger:focus {
  outline: none;
  border-color: var(--medical-teal, #313d5a);
}

body.threvix-signup .signup-form .custom-select-trigger:focus-visible {
  outline: 2px solid var(--medical-teal, #313d5a);
  outline-offset: 2px;
}

body.threvix-signup .signup-form .custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--medical-teal, #313d5a);
  transition: transform 0.2s ease;
}

body.threvix-signup .signup-form .custom-select.open .custom-select-trigger::after {
  transform: translateY(-50%) rotate(180deg);
}

body.threvix-signup .signup-form .custom-select-trigger:hover {
  border-color: #bfc4cc;
}

body.threvix-signup .signup-form .custom-select.open .custom-select-trigger {
  border-color: var(--medical-teal, #313d5a);
}

body.threvix-signup .signup-form .custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(49, 61, 90, 0.22);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  z-index: 50;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

body.threvix-signup .signup-form .custom-select.open .custom-select-options {
  max-height: 280px;
  overflow-y: auto;
  opacity: 1;
}

body.threvix-signup .signup-form .custom-select-options::-webkit-scrollbar {
  width: 6px;
}

body.threvix-signup .signup-form .custom-select-options::-webkit-scrollbar-track {
  background: transparent;
}

body.threvix-signup .signup-form .custom-select-options::-webkit-scrollbar-thumb {
  background: var(--medical-teal, #313d5a);
  border-radius: 3px;
}

body.threvix-signup .signup-form .custom-select-option {
  padding: 0.7rem 1.15rem;
  font-size: 14px;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--charcoal, #111827);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

body.threvix-signup .signup-form .custom-select-option:hover {
  background: rgba(49, 61, 90, 0.08);
  color: var(--medical-teal, #313d5a);
}

body.threvix-signup .signup-form .custom-select-option.selected {
  background: var(--medical-teal, #313d5a);
  color: #ffffff;
}

.threvix-signup .success-popup {
  border-radius: var(--th-radius-card);
  box-shadow: var(--th-shadow-lg);
}

/* ── Feature detail pages ── */
body.threvix-feature-page {
  background: #eaeaea;
}

.feature-page-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 5rem;
}

@media (min-width: 768px) {
  .feature-page-main {
    padding: 3.5rem 2rem 6rem;
  }
}

.feature-prose .eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--medical-teal, #313D5A);
  margin-bottom: 1rem;
  display: block;
  padding-left: 0.85rem;
  position: relative;
  border: none;
}

.feature-prose .eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  bottom: 0.1em;
  width: 3px;
  background: var(--th-accent-burgundy);
  border-radius: 2px;
}

.feature-prose h1 {
  font-family: "Instrument Serif", serif;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  color: var(--charcoal, #183642);
}

.feature-prose .lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--text-muted, #6B7280);
  font-weight: 300;
  margin-bottom: 2.5rem;
}

.feature-prose h2 {
  font-family: "Instrument Serif", serif;
  font-size: 1.65rem;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.02em;
  color: var(--charcoal, #183642);
}

.feature-prose h2::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.65rem;
  border-radius: 2px;
  background: var(--th-accent-burgundy);
}

.feature-prose p {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-muted, #6B7280);
  font-weight: 300;
  margin: 0 0 1.25rem;
}

.feature-prose ul {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--text-muted, #6B7280);
  font-weight: 300;
  line-height: 1.75;
}

.feature-prose li {
  margin-bottom: 0.5rem;
}

.feature-prose .callout {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(49, 61, 90, 0.07);
  border-left: 3px solid var(--medical-teal, #313D5A);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--charcoal, #183642);
}

.feature-prose .cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
  position: relative;
  border-top: none;
}

.feature-prose .cta-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--th-accent-burgundy-mid);
  border-radius: 1px;
}

/* Match index/Enterprise hero primary CTA (.btn-primary) */
.feature-prose .btn-teal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 3rem;
  background: var(--medical-teal, #313D5A);
  color: #fff;
  text-decoration: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 0;
  border: 1px solid var(--medical-teal, #313D5A);
  cursor: pointer;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .feature-prose .btn-teal {
    padding: 1.75rem 3.5rem;
    font-size: 12px;
  }
}

.feature-prose .btn-teal:hover {
  background: var(--th-accent-burgundy, #313D5A) !important;
  border-color: var(--th-accent-burgundy, #313D5A) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

/* Match hero secondary (.btn-ghost-enterprise) */
.feature-prose .btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 2.25rem;
  border: 1px solid rgba(0, 0, 0, 0.15);
  color: var(--charcoal, #183642);
  text-decoration: none;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: border-color 0.35s ease, color 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-prose .btn-ghost:hover {
  border-color: var(--medical-teal, #313D5A);
  color: var(--medical-teal, #313D5A);
  transform: translateY(-2px);
}

.feature-related {
  margin-top: 3rem;
  padding: 1.75rem;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--th-radius-card);
  box-shadow: var(--th-shadow-sm);
}

.feature-related h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--medical-teal, #313D5A);
  margin: 0 0 1rem;
}

.feature-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-related li {
  margin-bottom: 0.65rem;
}

.feature-related a {
  color: var(--text-muted, #6B7280);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.feature-related a:hover {
  color: var(--medical-teal, #313D5A);
}

.feature-top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
}

.feature-top-nav .nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.feature-top-nav .nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.feature-top-nav .nav-links > a {
  color: #6B7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.feature-top-nav .nav-links > a:hover {
  color: var(--medical-teal, #313D5A);
}

/* Features dropdown (index desktop + shared) */
.nav-dropdown-wrap {
  position: relative;
  z-index: 2;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.nav-dropdown-trigger:hover {
  opacity: 0.5;
}

/* Index main nav: match link weight; keep full opacity (underline handles hover) */
#mainNav .nav-main-cell--links .nav-dropdown-trigger.nav-main-link {
  font-weight: 500;
}

#mainNav .nav-main-cell--links .nav-dropdown-trigger.nav-main-link:hover {
  opacity: 1;
}

.nav-dropdown-chev {
  font-size: 7px;
  opacity: 0.75;
  transition: transform 0.2s ease;
}

.nav-dropdown-wrap:hover .nav-dropdown-chev,
.nav-dropdown-wrap.nav-dropdown-open .nav-dropdown-chev,
.nav-dropdown-wrap:focus-within .nav-dropdown-chev {
  transform: rotate(180deg);
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateZ(0) translateX(-50%);
  min-width: 288px;
  padding: 8px;
  /* Opaque paint — must not inherit parent backdrop-filter compositing */
  background-color: #FFFFFF !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px;
  box-shadow: var(--th-shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 6000;
  mix-blend-mode: normal !important;
  isolation: isolate;
  contain: paint;
  -webkit-font-smoothing: antialiased;
}

.nav-dropdown-wrap:hover .nav-dropdown-panel,
.nav-dropdown-wrap:focus-within .nav-dropdown-panel,
.nav-dropdown-wrap.nav-dropdown-open .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-dropdown-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--charcoal, #183642) !important;
  text-decoration: none !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.15s ease, color 0.15s ease;
  position: relative;
}

.nav-dropdown-panel a:hover {
  background: var(--th-burgundy-fill-hover) !important;
  color: var(--th-on-brand) !important;
}

.nav-dropdown-panel a.nav-dd-current {
  background: var(--th-burgundy-fill-current) !important;
  color: var(--th-on-brand) !important;
}

.nav-dropdown-panel a.nav-dd-current::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 3px 3px 0;
}

.nav-dropdown-panel hr {
  border: none;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 8px 10px;
  opacity: 1;
}

/* Mobile menu: Features submenu */
.mobile-menu .mobile-nav-details summary {
  list-style: none;
  cursor: pointer;
  font-size: inherit;
  font-weight: inherit;
}

.mobile-menu .mobile-nav-details summary::-webkit-details-marker {
  display: none;
}

.mobile-menu .mobile-nav-details summary::after {
  content: " ▾";
  font-size: 0.55em;
  opacity: 0.55;
  vertical-align: middle;
}

.mobile-menu .mobile-nav-details[open] summary::after {
  content: " ▴";
}

.mobile-menu .mobile-features-sub {
  margin-top: 1rem;
  padding-left: 1rem;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.mobile-menu .mobile-features-sub::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--th-accent-burgundy);
  border-radius: 0 3px 3px 0;
}

.mobile-menu .mobile-features-sub a {
  opacity: 1;
  transform: none;
  transition: color 0.3s ease;
}

/* Feature subnav: <details> for Features */
.feature-nav-details {
  position: relative;
}

.feature-nav-details > summary {
  list-style: none;
  cursor: pointer;
  color: #6B7280;
  transition: color 0.2s ease;
}

.feature-nav-details > summary::-webkit-details-marker {
  display: none;
}

.feature-nav-details > summary::after {
  content: " ▾";
  font-size: 0.65em;
  opacity: 0.6;
}

.feature-nav-details[open] > summary::after {
  content: " ▴";
}

.feature-nav-details > summary:hover {
  color: var(--medical-teal, #313D5A);
}

.feature-nav-panel {
  margin-top: 0.75rem;
  padding: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--th-shadow-sm);
}

@media (min-width: 768px) {
  .feature-nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 10px;
    min-width: 280px;
    padding: 10px;
    z-index: 50;
  }
}

.feature-nav-panel a {
  padding: 10px 14px;
  color: #6B7280 !important;
  text-decoration: none !important;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.feature-nav-panel a:hover {
  background: rgba(49, 61, 90, 0.07);
  color: var(--medical-teal, #313D5A) !important;
}

.feature-nav-panel a.nav-dd-current {
  background: rgba(49, 61, 90, 0.1);
  color: var(--medical-teal, #313D5A) !important;
}

.feature-nav-panel hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  margin: 6px 0;
}

/* ── Mobile menu + hamburger (shared with index + subpages) ── */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  background: #eaeaea;
  z-index: 1100;
  padding: 6rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s ease,
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.3s ease;
}

.mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu.active a:nth-child(1) {
  transition-delay: 0.1s;
}
.mobile-menu.active a:nth-child(2) {
  transition-delay: 0.2s;
}
.mobile-menu.active a:nth-child(3) {
  transition-delay: 0.3s;
}
.mobile-menu.active a:nth-child(4) {
  transition-delay: 0.4s;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  z-index: 1200;
  padding: 8px;
  margin: -8px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--charcoal, #183642);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 767px) {
  .hamburger {
    display: flex;
  }
}

#mainNav .nav-main-link.nav-main-link--current {
  color: var(--th-accent-burgundy, #313D5A);
}

/* Compliance page — solid bars (not border-color strokes) */
.compliance-toc {
  position: relative;
  border-top: none !important;
  border-bottom: none !important;
  padding-top: 1.25rem !important;
  padding-bottom: 1.25rem !important;
}

.compliance-toc::before,
.compliance-toc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--th-accent-burgundy-mid);
  border-radius: 1px;
}

.compliance-toc::before {
  top: 0;
}

.compliance-toc::after {
  bottom: 0;
}

@media (prefers-reduced-motion: reduce) {
  .fade-in-up:not(.visible) {
    opacity: 1 !important;
    transform: none !important;
  }

  .fade-in-up {
    transition: none !important;
  }

  .solution-card,
  .feature-cap-card,
  .value-card,
  .plan-card-featured {
    transition: none !important;
    transform: none !important;
  }

  .solution-card:hover,
  .feature-cap-card:hover,
  .value-card:hover {
    transform: none !important;
  }
}
