/* Meditag — shared stylesheet
 *
 * SPACING SYSTEM — 4pt grid
 * ─────────────────────────────────────────────────────────────────────────────
 * Two fluid tokens drive all container-level spacing.
 * Everything else uses the fixed scale (--sp-N = N × 4px).
 *
 *   --gutter      Horizontal padding for every container (nav, section-wrap,
 *                 prose, footer). Scales from 16px on narrow phones to 24px
 *                 at ≥480px. Keeps content/nav gutters perfectly aligned.
 *                 Formula: clamp(16px, 5vw, 24px)
 *                   320px → 16px  |  375px → 18.75px  |  480px+ → 24px
 *
 *   --section-py  Vertical padding for every <section>. Reduces on mobile so
 *                 content is denser on small screens.
 *                 Formula: clamp(48px, 8vw, 72px)
 *                   375px → 48px  |  600px → 48px  |  900px+ → 72px
 *
 * Fixed scale (do NOT use raw pixels for layout spacing):
 *   --sp-1  =  4px    --sp-5  = 20px    --sp-10 = 40px
 *   --sp-2  =  8px    --sp-6  = 24px    --sp-12 = 48px
 *   --sp-3  = 12px    --sp-7  = 28px    --sp-16 = 64px
 *   --sp-4  = 16px    --sp-8  = 32px    --sp-18 = 72px
 *                                        --sp-20 = 80px
 */

:root {
  /* colours */
  --primary: #1A4070;
  --primary-dark: #12305a;
  --text: #1a1a2e;
  --text-muted: #64748b;
  --bg: #ffffff;
  --surface: #f1f5f9;
  --border: #e2e8f0;
  --green: #15803d;
  /* semantic tokens that must not follow --text in dark mode */
  --footer-bg: #1a1a2e;
  --store-btn-bg: #1a1a2e;
  --store-btn-hover: #2d2d45;
  --radius: 12px;
  --max-w: 900px;

  /* fluid spacing tokens */
  --gutter:     clamp(16px, 5vw, 24px);
  --section-py: clamp(48px, 8vw, 72px);

  /* fixed 4pt scale */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;
  --sp-18: 72px;
  --sp-20: 80px;
}

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

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── layout ── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

/* ── nav ── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--gutter);
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.logo img {
  height: 30px;
  width: auto;
  display: block;
}
/* wordmark dark/light switching — default: show light, hide dark */
.wordmark-dark  { display: none; }
.wordmark-light { display: block; }

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch a {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color 0.15s, background 0.15s;
}

.lang-switch a:hover,
.lang-switch a.active {
  color: var(--primary);
  background: var(--surface);
}

/* ── hero ── */
.hero {
  padding-block: var(--section-py);
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
}

.hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 40px;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--store-btn-bg);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s, transform 0.1s;
  min-height: 56px;
}

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

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

.store-btn-label { display: flex; flex-direction: column; line-height: 1.2; }
.store-btn-sub { font-size: 0.7rem; font-weight: 400; opacity: 0.8; }

/* ── section shared ── */
section { padding-block: var(--section-py); }
section:nth-child(even) { background: var(--surface); }

.section-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.section-label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.4rem, 3.5vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: clamp(var(--sp-6), 5vw, var(--sp-10));
  color: var(--text);
}

/* ── steps ── */
.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: start;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

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

/* ── story ── */
.story-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-10);
}

.story-card blockquote {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 28px;
  font-style: normal;
}

.story-card blockquote p + p { margin-top: 16px; }

.founder {
  display: flex;
  align-items: center;
  gap: 16px;
}

.founder-photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
}

.founder-photo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

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

/* ── trust ── */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.trust-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-7);
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
}

.trust-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-icon svg { color: var(--primary); }

.trust-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

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

/* ── download bottom ── */
section.download-section {
  text-align: center;
  background: var(--primary) !important;
  padding-block: var(--section-py);
}

.download-section h2 { color: #fff; margin-bottom: 8px; }
.download-section p { color: rgba(255,255,255,0.92); margin-bottom: 36px; font-size: 1rem; }

.download-section .store-btn {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.4);
}

.download-section .store-btn:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }

/* ── footer ── */
footer {
  background: var(--footer-bg);
  color: rgba(255,255,255,0.75);
  padding: var(--sp-10) var(--gutter);
  font-size: 0.9rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}
.footer-logo img {
  height: 26px;
  width: auto;
  display: block;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.footer-links a:hover { color: #fff; }

.footer-copy { color: rgba(255,255,255,0.7); font-size: 0.85rem; }

/* ── privacy page ── */
.prose {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: var(--sp-12) var(--gutter) var(--sp-20);
}

.prose h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.prose .updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 48px;
}

.prose h2 {
  font-size: 1.15rem;
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose p { margin-bottom: 16px; color: var(--text); }

.prose ul,
.prose ol {
  padding-left: 1.5rem;
  margin-bottom: 16px;
  color: var(--text);
}

.prose ol { list-style: decimal; }
.prose ul { list-style: disc; }

.prose ul li,
.prose ol li {
  margin-bottom: 8px;
  padding-left: 0.25rem;
  line-height: 1.65;
}

.prose h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.prose a { color: var(--primary); }

/* ── provider nav link ── */
.nav-links {
  display: flex;
  gap: 4px;
}

.nav-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  letter-spacing: 0.01em;
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: var(--surface);
}

/* preview nav items (e.g. "Connect" — page exists but not yet promoted).
   Previously used opacity:0.55 which dropped contrast to ~2:1 (WCAG fail).
   Now: keep text-muted color (AA-compliant 4.79:1) + slightly smaller font
   for visual de-emphasis, without sacrificing legibility. */
.nav-link-preview {
  font-size: 0.78rem;
  font-style: italic;
}

/* ── provider hero ── */
.provider-hero {
  /* layout-only: max-width/padding come from .section-wrap in HTML */
}

.provider-hero h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  color: var(--text);
}

/* ── CTA buttons ── */
.provider-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, border-color 0.15s;
  min-height: 52px;
  border: 2px solid transparent;
}

.pill-btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pill-btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
}

.pill-btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.pill-btn-outline:hover {
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  transform: translateY(-1px);
}

/* ── flow steps (Spitex) ── */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.flow-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-6);
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  flex: 1;
}

.flow-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.flow-step p {
  font-size: 0.92rem;
  color: var(--text);
  line-height: 1.55;
}

/* ── regulatory callout (neutral) ── */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-7) var(--sp-8);
}

.info-box p {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* ── FAQ accordion ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  padding: var(--sp-5) var(--sp-6);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  background: var(--bg);
}

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

.faq-q::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  line-height: 1;
}

details[open] > .faq-q::after { content: '\2212'; }

.faq-a {
  padding: 0 var(--sp-6) var(--sp-5);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  background: var(--bg);
}

/* ── provider recommend section ── */
section.recommend-section {
  text-align: center;
  background: var(--primary) !important;
  padding-block: var(--section-py);
}

.recommend-section h2 { color: #fff; margin-bottom: 12px; }
.recommend-section .section-label { color: rgba(255,255,255,0.9); }
.recommend-section .recommend-sub {
  color: rgba(255,255,255,0.92);
  font-size: 1rem;
  margin-bottom: 36px;
}

.recommend-section .provider-cta-row {
  justify-content: center;
}

.recommend-section .pill-btn-primary {
  background: #fff;
  color: var(--primary);
  border-color: #fff;
}

.recommend-section .pill-btn-primary:hover {
  background: rgba(255,255,255,0.9);
  border-color: rgba(255,255,255,0.9);
}

.recommend-section .pill-btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.recommend-section .pill-btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.9);
}

/* ── focus / a11y ── */
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 0;
  top: 0;
  padding: 12px 18px;
  background: var(--primary);
  color: var(--on-primary, #fff);
  font-weight: 600;
  z-index: 1000;
  transform: translateY(-120%);
  transition: transform 0.15s ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

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

/* ── responsive ── */
@media (min-width: 600px) {
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .steps { gap: 40px; }
  .flow-steps { flex-direction: row; align-items: stretch; }
  .flow-step { flex-direction: column; gap: 12px; }
  .flow-step-num { margin-top: 0; }
}

@media (min-width: 720px) {
  .trust-grid { grid-template-columns: 1fr 1fr 1fr; }
  /* 4-card grids switch to 2×2 — avoids orphaned card in 3-col layout */
  .trust-grid:has(> :nth-child(4)) { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .store-btn { width: 100%; justify-content: center; }
  .story-card { padding: var(--sp-7) var(--sp-5); }
}

/* ── hamburger / mobile nav ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  border-radius: 6px;
  line-height: 1;
  flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--surface); }

@media (max-width: 900px) {
  nav {
    flex-wrap: nowrap;
    position: relative;
    padding: var(--sp-3) var(--gutter);
    gap: var(--sp-1);
  }
  .logo {
    flex: 1;
    min-width: 0;
  }
  .logo img {
    height: 26px;
  }
  .nav-hamburger { display: flex; align-items: center; }
  .lang-switch { gap: var(--sp-1); flex-shrink: 0; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    flex-direction: column;
    padding: var(--sp-2) var(--gutter) var(--sp-3);
    z-index: 200;
    gap: var(--sp-1);
  }
  .nav-links.nav-open { display: flex; }
  .nav-link { padding: var(--sp-3) 14px; font-size: 0.9rem; border-radius: 8px; min-height: 48px; display: flex; align-items: center; }
  .lang-switch a { padding: var(--sp-1) var(--sp-2); font-size: 0.85rem; min-height: 48px; display: inline-flex; align-items: center; }
}

/* ── store badges (official image buttons) ── */
.store-badge-link {
  display: inline-flex;
  transition: opacity 0.15s, transform 0.1s;
  border-radius: 7px;
  overflow: hidden;
}
.store-badge-link:hover { opacity: 0.85; transform: translateY(-2px); }
.store-badge { height: 48px; width: auto; display: block; }

/* ── hero layout with phone mockup ── */
.hero-layout {
  display: flex;
  align-items: center;
  gap: var(--sp-10);
  max-width: var(--max-w);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
.hero-text { flex: 1; min-width: 0; }

.hero-fine-print {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-top: -16px;
  margin-bottom: 40px;
  line-height: 1.6;
}
.hero-phone {
  flex-shrink: 0;
  width: auto;
  display: none;
}
@media (min-width: 600px) {
  .hero-phone { display: block; }
}
.phone-frame {
  width: 240px;
  border-radius: 36px;
  border: 6px solid #1a1a2e;
  box-shadow: 0 4px 8px rgba(0,0,0,.15), 0 24px 48px rgba(0,0,0,.18);
  background: #1a1a2e;
  overflow: hidden;
  flex-shrink: 0;
}
.phone-frame-inner {
  border-radius: 30px;
  overflow: hidden;
  line-height: 0;
}
.phone-screen {
  width: 100%;
  display: block;
}

/* ── dark mode ── */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --green: #4ade80;
  --footer-bg: #020617;
  --store-btn-bg: #334155;
  --store-btn-hover: #475569;
}}

[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-dark: #3b82f6;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --bg: #0f172a;
  --surface: #1e293b;
  --border: #334155;
  --green: #4ade80;
  --footer-bg: #020617;
  --store-btn-bg: #334155;
  --store-btn-hover: #475569;
}

/* wordmark dark mode — swap to white variant */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  .wordmark-light { display: none; }
  .wordmark-dark  { display: block; }
}}
[data-theme="dark"] .wordmark-light { display: none; }
[data-theme="dark"] .wordmark-dark  { display: block; }

/* ── connect page ── */
.connect-scope {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
}
.connect-scope code {
  font-family: "SF Mono", "Fira Mono", monospace;
  font-size: 0.82rem;
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 4px;
}
.connect-scope p { color: var(--text); font-size: 0.93rem; line-height: 1.7; margin-bottom: 12px; }
.connect-scope p:last-child { margin-bottom: 0; }
.system-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.system-tag {
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
}
.pilot-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.pilot-num {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--primary);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pilot-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.pilot-card p  { font-size: 0.9rem; color: var(--text-muted); }
.pricing-highlight { font-size: 1.15rem; font-weight: 700; color: var(--primary); }
.disclaimer { font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; font-style: italic; }

/* ── coming-soon badge ── */
.badge-coming-soon {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #1a1a1a;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-roadmap {
  display: inline-block;
  margin-left: 10px;
  background: var(--primary);
  color: var(--on-primary, #fff);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ── theme toggle button ── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  padding: 0;
}

.theme-toggle:hover { background: var(--surface); color: var(--text); }

.theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-sun { display: block; }
[data-theme="dark"] .theme-icon-moon { display: none; }

@media (max-width: 560px) {
  .theme-toggle { width: 44px; height: 44px; }
}

/* ── comparison table (Medisafe alternative pages) ── */
.comparison-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.comparison-table thead th {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--surface);
}

.comparison-table .col-meditag {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.comparison-table thead .col-meditag {
  color: var(--primary);
}

.comparison-table tbody tr:last-child td {
  border-bottom: none;
}

@media (max-width: 640px) {
  .comparison-table th,
  .comparison-table td { padding: 10px 12px; }
  .comparison-table { font-size: 0.88rem; }
}

/* ── CSP-safe ports of former inline style="" attributes (#111 CSP follow-up) ──
   The site CSP is `style-src 'self'` (no 'unsafe-inline'), so inline style
   attributes were stripped by the browser — same root cause as the inline-script
   P0. Each class below reproduces one former inline declaration verbatim.
   `!important` preserves the override precedence inline styles had over the
   component rules they sat on (e.g. `.download-section p` colour). */

/* disabled store badge (iOS "coming soon") + its positioning wrapper */
.store-badge-link.is-disabled { opacity: 0.5 !important; pointer-events: none !important; }
.badge-wrap { position: relative !important; display: inline-block !important; }

/* spacing utilities */
.u-mt-8  { margin-top: 8px !important; }
.u-mt-12 { margin-top: 12px !important; }
.u-mt-16 { margin-top: 16px !important; }
.u-mt-1r { margin-top: 1rem !important; }
.u-mt-2r { margin-top: 2rem !important; }
.u-mb-075r { margin: 0 0 0.75rem !important; }

/* layout / surface utilities */
.u-bg-surface { background: var(--surface) !important; }
.u-bg-green   { background: var(--green) !important; }
.u-bg-text-1  { background: var(--text) !important; font-size: 1rem !important; }
.u-border-b   { border-bottom: 1px solid var(--border) !important; }
.u-maxw-640   { max-width: 640px !important; }
.u-justify-center      { justify-content: center !important; }
.u-justify-center-mt0  { justify-content: center !important; margin-top: 0 !important; }
.u-justify-center-mb28 { justify-content: center !important; margin-top: 0 !important; margin-bottom: 28px !important; }
.u-hr   { margin: 48px 0 !important; border: none !important; border-top: 1px solid var(--border) !important; }
.u-card { background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: 10px !important; padding: 18px 22px !important; margin: 20px 0 28px !important; }
.u-list-tight { margin: 0 !important; padding-left: 20px !important; line-height: 1.8 !important; }
.u-quote { border-left: 3px solid var(--primary) !important; padding-left: 1.25rem !important; margin: 0 !important; color: var(--text-muted) !important; }

/* text / colour utilities */
.u-text-primary { color: var(--primary) !important; }
.u-text-white90 { color: rgba(255,255,255,0.9) !important; }
.u-white88-sm   { color: rgba(255,255,255,0.88) !important; font-size: 0.85rem !important; margin-bottom: 20px !important; }
.u-label-strong { font-weight: 700 !important; margin: 0 0 10px !important; font-size: 0.95rem !important; }
.u-footnote { margin-top: 2rem !important; font-size: 0.85rem !important; color: #666 !important; }
.u-lead-560 { color: var(--text-muted) !important; max-width: 560px !important; margin-bottom: 32px !important; }
.u-lead-620 { color: var(--text-muted) !important; font-size: 1rem !important; margin-bottom: 40px !important; max-width: 620px !important; }
.u-lead-620-mb8 { color: var(--text-muted) !important; font-size: 1rem !important; margin-bottom: 8px !important; max-width: 620px !important; }
.u-note-580 { color: var(--text-muted) !important; max-width: 580px !important; margin-top: 12px !important; font-size: 0.9rem !important; }
.u-muted-580-mb0 { color: var(--text-muted) !important; max-width: 580px !important; margin-bottom: 0 !important; }
