/* ==========================================================================
   Doctor My Number — Marketing Website Design System
   Calm, modern, trustworthy healthcare aesthetic.
   Palette: deep medical teal, soft mint, white, charcoal.
   ========================================================================== */

:root {
    --teal-900: #0b3d33;
    --teal-800: #0d5345;
    --teal-700: #0f766e;
    --teal-600: #128370;
    --teal-500: #14a085;
    --mint-100: #ecfdf5;
    --mint-200: #d1fae5;
    --mint-300: #a7f3d0;
    --ink: #1c2420;
    --ink-soft: #3d4a45;
    --muted: #64716c;
    --line: #e3ebe8;
    --bg: #ffffff;
    --bg-soft: #f6faf8;
    --bg-mint: #f0f9f4;
    --accent: #d97706;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-sm: 0 1px 2px rgba(11, 61, 51, .06);
    --shadow-md: 0 6px 24px -8px rgba(11, 61, 51, .14);
    --shadow-lg: 0 20px 48px -16px rgba(11, 61, 51, .20);
    --font: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', 'Noto Sans Devanagari', system-ui, sans-serif;
    --max: 1140px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

/* Safety net: clip any accidental overflow without creating a scroll
   container (unlike overflow-x: hidden, clip keeps position: sticky
   working). The layout itself must not overflow — this is a last resort. */
html, body { overflow-x: clip; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: inline-block; max-width: 100%; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--teal-500);
    outline-offset: 2px;
    border-radius: 4px;
}

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--teal-800); color: #fff; padding: 10px 18px;
    border-radius: 0 0 8px 0; z-index: 200; font-weight: 600;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ─── Buttons ──────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 13px 26px; border-radius: 10px;
    font-weight: 600; font-size: .98rem; font-family: var(--font);
    cursor: pointer; border: 0; text-decoration: none !important;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
    min-height: 48px;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--teal-700); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-800); color: #fff; box-shadow: var(--shadow-md); }
.btn-secondary { background: #fff; color: var(--teal-800); border: 1.5px solid var(--teal-700); }
.btn-secondary:hover { background: var(--mint-100); }
.btn-ghost { background: transparent; color: var(--teal-800); }
.btn-ghost:hover { background: var(--mint-100); }
.btn-lg { padding: 16px 34px; font-size: 1.05rem; }
.btn-block { width: 100%; }

/* ─── Navbar ───────────────────────────────────────────────────────────── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.navbar-inner { display: flex; align-items: center; gap: 8px; height: 68px; min-width: 0; }
.navbar-inner > * { min-width: 0; }
.navbar-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--font-display);
    font-weight: 800; font-size: 1.1rem; color: var(--teal-800);
    letter-spacing: -.01em; flex: 0 1 auto; min-width: 0;
}
.navbar-brand:hover { text-decoration: none; }
.navbar-brand svg { color: var(--teal-700); flex-shrink: 0; }
/* On extremely narrow phones the brand text may ellipsize — that is a
   graceful last resort, never a reason to clip the language selector or
   the hamburger button off-screen. */
.navbar-brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar-links {
    display: flex; gap: 2px; list-style: none; margin: 0; padding: 0;
    flex: 1; justify-content: center; min-width: 0;
}
.navbar-links a {
    display: block; padding: 8px 7px; border-radius: 8px;
    color: var(--ink-soft); font-weight: 500; font-size: .9rem;
    white-space: nowrap;
}
.navbar-links a:hover { color: var(--teal-800); background: var(--mint-100); text-decoration: none; }
.navbar-links a.active { color: var(--teal-800); background: var(--mint-100); }
.navbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.navbar-actions .btn { padding: 10px 14px; font-size: .9rem; min-height: 42px; white-space: nowrap; }

/* W8.1 — language selector (public header + mobile drawer). */
.lang-switch { display: inline-flex; align-items: center; }
.lang-select {
    font: inherit; font-size: .9rem; font-weight: 600; color: var(--teal-800);
    background: #fff; border: 1.5px solid var(--line); border-radius: 8px;
    padding: 9px 10px; min-height: 42px; cursor: pointer;
}
.lang-select:hover { border-color: var(--teal-500); }
.lang-select:focus-visible { outline: 3px solid var(--teal-500); outline-offset: 2px; }

/* W8.1 — "Staff & partners" sign-in menu: a <details> dropdown so it
   works without JS and stays keyboard/screen-reader friendly.
   Desktop only — on smaller screens the drawer carries these links. */
.nav-menu { position: relative; }
.nav-menu > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 12px; min-height: 42px; border-radius: 10px;
    color: var(--teal-800); font-weight: 600; font-size: .9rem;
    border: 1.5px solid var(--line); background: #fff;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover { background: var(--mint-100); }
.nav-menu > summary .caret { transition: transform .15s ease; }
.nav-menu[open] > summary .caret { transform: rotate(180deg); }
.nav-menu-list {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 120;
    min-width: 220px; list-style: none; margin: 0; padding: 6px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px;
    box-shadow: var(--shadow-lg);
}
.nav-menu-list a {
    display: flex; flex-direction: column; gap: 1px; padding: 9px 12px;
    border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .92rem;
}
.nav-menu-list a:hover { background: var(--mint-100); text-decoration: none; }
.nav-menu-list a small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.nav-menu-sep { border-top: 1px solid var(--line); margin: 4px 0; }
.navbar-toggle {
    display: none; background: none; border: 0; padding: 10px;
    cursor: pointer; color: var(--teal-800); border-radius: 8px;
    flex-shrink: 0; min-width: 44px; min-height: 44px;
}
.navbar-toggle:hover { background: var(--mint-100); }
.navbar-toggle svg { display: block; margin: 0 auto; }

/* ─── Mobile navigation drawer ─────────────────────────────────────────── */
/* Right-side sheet + scrim. `hidden` keeps it out of the tree until JS
   opens it; the .open classes drive the slide/fade transition. */
.nav-scrim {
    position: fixed; inset: 0; z-index: 140;
    background: rgba(11, 61, 51, .45);
    opacity: 0; transition: opacity .24s ease;
}
.nav-scrim.open { opacity: 1; }
.nav-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
    width: min(88vw, 360px);
    display: flex; flex-direction: column;
    background: #fff; box-shadow: var(--shadow-lg);
    transform: translateX(102%);
    transition: transform .24s ease;
}
.nav-drawer.open { transform: translateX(0); }
.nav-drawer-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}
.nav-drawer-title {
    font-family: var(--font-display); font-weight: 800; font-size: 1.05rem;
    color: var(--teal-800);
}
.nav-drawer-close {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 44px; height: 44px; border: 0; border-radius: 10px;
    background: transparent; color: var(--teal-800); cursor: pointer;
}
.nav-drawer-close:hover { background: var(--mint-100); }
.nav-drawer-body {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 8px 20px calc(28px + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}
.nav-group { padding: 14px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line); }
.nav-group-label {
    display: block; font-size: .75rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--muted); padding: 0 4px; margin-bottom: 8px;
}
.nav-drawer-link {
    display: flex; align-items: center; min-height: 44px;
    padding: 10px 12px; border-radius: 10px;
    color: var(--ink); font-weight: 600; font-size: 1rem;
}
.nav-drawer-link:hover { background: var(--mint-100); color: var(--teal-800); text-decoration: none; }
.nav-drawer-link[aria-current="page"] { background: var(--mint-100); color: var(--teal-800); }
.nav-group .btn-block { width: 100%; }
.nav-group .btn-block + .btn-block,
.nav-group .btn-block + form { margin-top: 10px; }
.nav-staff-item { display: flex; align-items: stretch; gap: 8px; margin-bottom: 8px; }
.nav-staff-item:last-child { margin-bottom: 0; }
.nav-staff-link {
    flex: 1; display: flex; align-items: center; min-height: 48px; min-width: 0;
    padding: 10px 14px; border-radius: 10px;
    border: 1.5px solid var(--line); color: var(--ink);
    font-weight: 600; font-size: .95rem; background: #fff;
}
.nav-staff-link:hover { border-color: var(--teal-500); background: var(--mint-100); text-decoration: none; }
.nav-staff-register {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    padding: 0 14px; border-radius: 10px; white-space: nowrap;
    color: var(--teal-700); font-weight: 700; font-size: .85rem;
    border: 1.5px solid var(--mint-200); background: var(--mint-100);
}
.nav-staff-register:hover { background: var(--mint-200); text-decoration: none; }
.nav-drawer-lang .lang-switch,
.nav-drawer-lang .lang-select { width: 100%; }

/* Scroll lock while the drawer is open. */
body.nav-locked { overflow: hidden; }

@media (max-width: 1200px) {
    /* The desktop link list is replaced by the drawer — it is never a
       dropdown again, so no absolute positioning or clipping can occur. */
    .navbar-links { display: none; }
    .navbar-toggle { display: block; }
    .navbar-actions .btn { display: none; }
    /* Staff/partner sign-in lives inside the drawer on small screens. */
    .navbar-actions .nav-menu { display: none; }
}

/* Desktop header compaction — desktop only. Patient Login is the one
   primary action; Get Started remains in the hero, footer and drawer. */
@media (min-width: 1201px) {
    .navbar-actions > a.btn-secondary { display: none; }
    .navbar-links a { padding: 8px 5px; font-size: .85rem; }
    .navbar-actions .btn { padding: 10px 12px; }
    .navbar-brand { font-size: 1.05rem; }
    .lang-select { padding: 8px 8px; font-size: .86rem; }
}

/* Phones: tighter container + smaller brand/select so all three header
   controls stay fully inside the viewport at 320px. */
@media (max-width: 560px) {
    .container { padding: 0 16px; }
    .container-narrow { padding: 0 16px; }
    .navbar-brand { gap: 7px; font-size: .98rem; }
    .navbar-brand svg { width: 26px; height: 26px; }
    .navbar-actions { gap: 6px; }
    .lang-select { padding: 8px 7px; font-size: .82rem; min-height: 40px; }
}

@media (max-width: 380px) {
    .container { padding: 0 12px; }
    .container-narrow { padding: 0 12px; }
    /* At ≤380px the brand steps down one size so the full
       "Doctor My Number" name still fits beside the language
       selector + toggle — measured, not ellipsized. */
    .navbar-brand { font-size: .85rem; gap: 6px; }
    .navbar-brand svg { width: 24px; height: 24px; }
    .lang-select { padding: 7px 6px; font-size: .8rem; }
}

/* ─── Sections ─────────────────────────────────────────────────────────── */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-alt { background: var(--bg-soft); }
.section-mint { background: var(--bg-mint); }
.section-dark { background: var(--teal-900); color: #e8f3ef; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .section-sub { color: #b7d5cc; }

.section-head { max-width: 680px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin: 0 0 48px; text-align: left; }
.eyebrow {
    display: inline-block; font-size: .78rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--teal-700); background: var(--mint-100);
    padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.section-dark .eyebrow { background: rgba(20, 160, 133, .18); color: var(--mint-300); }

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; color: var(--ink); font-weight: 800; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 700; }
.section-sub { font-size: 1.08rem; color: var(--muted); margin: 16px 0 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hero { padding: 76px 0 92px; background: linear-gradient(180deg, var(--bg-mint) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin: 0 0 32px; max-width: 520px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-trust {
    margin-top: 28px; font-size: .92rem; color: var(--muted);
    display: flex; align-items: center; gap: 8px;
}
.hero-trust svg { color: var(--teal-600); flex-shrink: 0; }

/* Phone mockup — illustrative */
.mockup {
    max-width: 340px; margin: 0 auto; background: #fff;
    border: 1px solid var(--line); border-radius: 28px;
    padding: 14px; box-shadow: var(--shadow-lg);
}
.mockup-screen { background: var(--bg-soft); border-radius: 18px; padding: 20px 16px; }
.mockup-title { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.mockup-doc { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.mockup-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--mint-200); color: var(--teal-800); display: grid; place-items: center; font-weight: 800; font-size: .9rem; flex-shrink: 0; }
.mockup-doc-name { font-weight: 700; font-size: .92rem; color: var(--ink); }
.mockup-doc-sub { font-size: .78rem; color: var(--muted); }
.mockup-token { background: var(--teal-800); color: #fff; border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 12px; }
.mockup-token-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.mockup-token-no { font-size: 2.4rem; font-weight: 800; line-height: 1.1; }
.mockup-row { display: flex; justify-content: space-between; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .85rem; margin-bottom: 8px; }
.mockup-row b { color: var(--teal-800); }
.mockup-note { text-align: center; font-size: .74rem; color: var(--muted); margin-top: 14px; font-style: italic; }

/* ─── Cards / grids ────────────────────────────────────────────────────── */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow-sm);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card h3 { margin: 0 0 10px; }
.card p { margin: 0; color: var(--muted); font-size: .95rem; }
.card-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--mint-100); color: var(--teal-700);
    display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg { width: 24px; height: 24px; }
.card-dark { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
.card-dark h3 { color: #fff; }
.card-dark p { color: #b7d5cc; }
.card-dark .card-icon { background: rgba(20,160,133,.2); color: var(--mint-300); }

/* Steps */
.step { position: relative; padding-left: 0; text-align: center; }
.step-num {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--teal-700); color: #fff; font-weight: 800; font-size: 1.3rem;
    display: grid; place-items: center; margin: 0 auto 18px;
    box-shadow: 0 0 0 8px var(--mint-100);
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .95rem; margin: 0; }

/* Feature list */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.checklist svg { flex-shrink: 0; color: var(--teal-600); margin-top: 3px; }
.checklist b { color: var(--ink); }

/* FAQ */
.faq-item { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; background: #fff; overflow: hidden; }
.faq-item summary {
    padding: 18px 22px; font-weight: 600; cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    color: var(--ink); font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: ''; width: 10px; height: 10px; flex-shrink: 0;
    border-right: 2px solid var(--teal-700); border-bottom: 2px solid var(--teal-700);
    transform: rotate(45deg); transition: transform .2s ease; margin-top: -4px;
}
.faq-item[open] summary::after { transform: rotate(-135deg); margin-top: 2px; }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--muted); font-size: .95rem; }
.faq-item .faq-body p { margin: 0 0 10px; }
.faq-item .faq-body p:last-child { margin-bottom: 0; }

/* Trust band */
.trust-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.trust-item { text-align: center; padding: 24px 16px; }
.trust-item svg { color: var(--teal-600); margin-bottom: 12px; }
.trust-item h4 { font-size: .98rem; margin: 0 0 6px; font-weight: 700; }
.trust-item p { font-size: .85rem; color: var(--muted); margin: 0; }

/* Product-flow mockups — lightweight CSS-only panels illustrating the
   real patient flow (Batch Q). Purely illustrative; no live data. */
.pmock-row {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px; max-width: 980px; margin: 0 auto; align-items: stretch;
}
.pmock {
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 20px; box-shadow: var(--shadow-md);
}
.pmock-head {
    font-size: .74rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--teal-700); margin-bottom: 14px;
}
.pmock-card {
    background: var(--bg-soft); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px; margin-bottom: 10px;
    font-size: .88rem; color: var(--ink);
}
.pmock-card b { display: block; font-weight: 700; }
.pmock-card span { color: var(--muted); font-size: .82rem; }
.pmock-dim { opacity: .72; }
.pmock-token {
    background: var(--teal-800); color: #fff; border-radius: 12px;
    padding: 14px; text-align: center; font-size: .9rem; margin-bottom: 10px;
}
.pmock-token b { font-size: 1.5rem; }
.pmock-note {
    text-align: center; color: var(--muted); font-size: .82rem;
    font-style: italic; margin-top: 20px;
}
@media (max-width: 900px) {
    .pmock-row { grid-template-columns: 1fr; max-width: 420px; }
}

/* Audience split cards (Batch Q) */
.audience-card { display: flex; flex-direction: column; }
.audience-card p { flex: 1; margin-bottom: 20px; }
.audience-card .btn { align-self: flex-start; }

/* CTA band */
.cta-band {
    background: var(--teal-800); border-radius: 20px; padding: 56px 48px;
    text-align: center; color: #fff; box-shadow: var(--shadow-lg);
}
.cta-band h2 { color: #fff; margin-bottom: 12px; }
.cta-band p { color: #b7d5cc; max-width: 480px; margin: 0 auto 28px; }
.cta-band .btn-primary { background: #fff; color: var(--teal-800); }
.cta-band .btn-primary:hover { background: var(--mint-200); }
.cta-band .btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.cta-band .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Page hero (inner pages) */
.page-hero { padding: 64px 0 48px; background: var(--bg-mint); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.page-hero .lead { margin-top: 14px; max-width: 640px; }

/* Legal / prose pages */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.4rem; margin: 40px 0 14px; }
.prose h3 { font-size: 1.1rem; margin: 28px 0 10px; }
.prose p { color: var(--ink-soft); margin: 0 0 14px; }
.prose ul, .prose ol { color: var(--ink-soft); padding-left: 24px; margin: 0 0 14px; }
.prose li { margin-bottom: 8px; }
.prose .updated { font-size: .88rem; color: var(--muted); margin-top: 0; }
.placeholder-note {
    background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
    border-radius: var(--radius-sm); padding: 12px 16px; font-size: .88rem; margin: 16px 0;
}
mark { background: var(--mint-200); padding: 0 4px; border-radius: 3px; }

/* Help hub */
.help-topic { display: flex; gap: 16px; align-items: flex-start; }
.help-topic .card-icon { margin-bottom: 0; }
.help-topic h3 { margin-bottom: 4px; }
.help-topic p { font-size: .92rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-method { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-method:last-child { border-bottom: 0; }
.contact-method .card-icon { margin-bottom: 0; flex-shrink: 0; }
.contact-method h3 { margin: 0 0 4px; font-size: 1.02rem; }
.contact-method p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Tables (policy pages). display:block + overflow lets a wide table
   scroll inside its container on phones instead of pushing the page
   wider than the viewport. */
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .92rem; }
@media (max-width: 700px) {
    .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
.data-table th, .data-table td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); }
.data-table th { background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.data-table td { color: var(--ink-soft); }

/* Footer */
.footer { background: var(--teal-900); color: #b7d5cc; padding: 64px 0 28px; }
.footer a { color: #b7d5cc; font-size: .92rem; }
.footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(5, 1fr); gap: 36px; margin-bottom: 44px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; margin-bottom: 14px; }
.footer-brand svg { color: var(--mint-300); }
.footer p { font-size: .88rem; margin: 0; }
.footer-col h5 { color: #fff; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-size: .85rem;
}

/* Error page */
.error-page { text-align: center; padding: 100px 0; }
.error-page .error-code { font-size: 5rem; font-weight: 800; color: var(--mint-300); line-height: 1; }
.error-page h1 { font-size: 1.8rem; margin: 12px 0; }
.error-page p { color: var(--muted); margin-bottom: 28px; }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .trust-list { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; gap: 48px; }
    .hero { padding: 52px 0 72px; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-band { padding: 44px 28px; }
    .section { padding: 64px 0; }
}
@media (max-width: 560px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .trust-list { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .footer-bottom { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
    .cta-actions .btn { width: 100%; }
    .section-head { margin-bottom: 40px; }
}

/* ─── Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ─── Print (legal pages) ──────────────────────────────────────────────── */
@media print {
    .navbar, .footer, .cta-band, .hero-cta, .skip-link { display: none !important; }
    body { font-size: 11pt; }
    .section, .page-hero { padding: 12px 0; }
    a { color: #000; text-decoration: underline; }
}

/* ─── Clinic discovery (Batch P.1) ─────────────────────────────────────── */
/* Additive primitives for the clinic search/filter component — built on
   the existing tokens (.card, .btn, .grid). Nothing above is modified. */

/* `hidden` must win over the flex containers below — author display
   rules otherwise defeat the UA's [hidden]{display:none}. */
[hidden] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.discovery-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 28px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.field-grow { flex: 1 1 220px; }

.field label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.field input,
.field select {
    font-family: var(--font);
    font-size: .95rem;
    color: var(--ink);
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 44px; /* comfortable mobile touch target */
}

.field input:focus-visible,
.field select:focus-visible,
.pagination .btn:focus-visible,
.field-actions .btn:focus-visible {
    outline: 3px solid var(--mint-300);
    outline-offset: 1px;
}

.field input:disabled,
.field select:disabled {
    background: var(--bg-soft);
    color: var(--muted);
}

.field-error {
    font-size: .8rem;
    color: #b3261e;
    margin: 0;
}

.field-actions { justify-content: flex-end; }

.discovery-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 28px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: var(--bg-soft);
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
}

.spin {
    width: 20px;
    height: 20px;
    border: 3px solid var(--mint-200);
    border-top-color: var(--teal-700);
    border-radius: 50%;
    animation: cd-spin .8s linear infinite;
    flex-shrink: 0;
}

@keyframes cd-spin { to { transform: rotate(360deg); } }

.discovery-card h3 { font-size: 1.05rem; }

.clinic-meta {
    color: var(--ink-soft);
    font-size: .88rem;
    margin: 6px 0;
}

.clinic-meta-sub { color: var(--muted); }

.discovery-card .btn { margin-top: 10px; }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.page-indicator {
    font-size: .9rem;
    color: var(--muted);
    font-weight: 600;
}

@media (max-width: 900px) {
    .discovery-controls { gap: 10px; }
    .field { min-width: 140px; flex: 1 1 40%; }
    .field-actions { flex: 1 1 100%; justify-content: flex-start; }
}

@media (max-width: 560px) {
    .field { flex: 1 1 100%; }
    .pagination { flex-wrap: wrap; }
}

/* ─── Nearby discovery (Batch P.3) ─────────────────────────────────────── */
.nearby-note {
    flex: 1 1 100%;
    font-size: .8rem;
    color: var(--muted);
    margin: 0;
}

.nearby-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: var(--bg-mint);
    border: 1px solid var(--mint-200);
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--teal-800);
}

.distance-badge {
    display: inline-block;
    font-size: .85rem;
    font-weight: 700;
    color: var(--teal-700);
    background: var(--mint-100);
    border-radius: 999px;
    padding: 4px 12px;
    margin: 4px 0;
}

/* ─── Doctor panel (Batch P.4) ─────────────────────────────────────────── */
.card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.doctor-panel-head {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.doctor-panel-head h3 { margin: 0; font-size: 1.3rem; color: var(--teal-900); }
