/* ==========================================================================
   DentCare — site.css (public website, Day 4; Day 5 contact/reviews/legal; Day 6–7 booking;
   Day 8 manage appointment + cards shared with the patient portal; Day 15 /demo; Day 16 smile gallery, blog, FAQ)
   Loaded after base.css on public pages only. The admin panel is not affected.

   Design
   - Type: Lexend (self-hosted, SIL OFL — see /assets/fonts/OFL.txt), a typeface designed to
     make reading easier; patients of every age read prices and timings here.
   - Colour: brand teal (base.css) + deep teal panels, cool "enamel" white sections,
     marigold only for the main call to action on dark backgrounds.
   - Signature: the hero's dental arch with FDI tooth numbers (views/site/partials/arch.php).

   Layout rules (Pages doc §2): mobile first, every section full width with fluid gutters;
   wider screens get more columns or side panels, never empty side bands.
   Breakpoints: 480 · 640 · 768 · 1024 · 1280 · 1440 · 1920 · 2400.
   ========================================================================== */

/* ---------- Fonts ---------- */
/* Lexend: Latin letters + one tiny file with just the ₹ sign (cut from Lexend's latin-ext set). */
@font-face {
    font-family: "Lexend";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/lexend-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Lexend";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/lexend-rupee-wght-normal.woff2") format("woff2");
    unicode-range: U+20B9;
}

/* ---------- Tokens ---------- */
:root {
    --font-site: "Lexend", var(--font-sans);
    --enamel: #f2f7f6;
    --enamel-2: #e6f0ee;
    --card-line: #d9e6e3;
    --deep: #0b3b37;
    --deep-2: #0f4a45;
    --night: #072a27;
    --mint-on-dark: #9fe6d6;
    --text-on-dark: #d3efe9;
    --marigold: #f4b740;
    --marigold-hover: #f7c766;
    --marigold-ink: #2d1f00;
    --open: #16a34a;
    --wait: #d97706;
    --shut: #dc2626;
    --header-h: 72px;
    --site-text: clamp(1rem, 0.2vw + 0.95rem, 1.0938rem);
    --shadow-float: 0 18px 40px -22px rgba(7, 42, 39, 0.55);
}
:root.is-scrolled { --header-h: 62px; }
html { scroll-padding-top: calc(var(--header-h) + 16px); }

body.site {
    font-family: var(--font-site);
    font-size: var(--site-text);
    line-height: 1.6;
    background: #ffffff;
    color: var(--ink);
}
/* :where() keeps these at element strength, so a class like .quickbook__title can still set its own size */
:where(body.site) :is(h1, h2, h3) { letter-spacing: -0.025em; }
:where(body.site) :is(h1, h2) { text-wrap: balance; }
:where(body.site) h1 { font-weight: 700; line-height: 1.08; }
:where(body.site) h2 { font-weight: 700; font-size: clamp(1.55rem, 1.3vw + 1.1rem, 2.45rem); line-height: 1.15; }
:where(body.site) h3 { font-weight: 600; font-size: clamp(1.1rem, 0.35vw + 1rem, 1.28rem); line-height: 1.3; letter-spacing: -0.01em; }
:where(body.site) p { text-wrap: pretty; }
body.site main:focus { outline: none; }
body.site .alert__text p { margin: 0; }
body.site .alert__text p + p { margin-top: 6px; }

/* Colour families for service tiles without a photo */
.tone-mint  { --tone-bg: #e1f4ee; --tone-ink: #0f766e; }
.tone-sky   { --tone-bg: #e4effb; --tone-ink: #1d5fa8; }
.tone-lilac { --tone-bg: #eee9fb; --tone-ink: #6a3fbd; }
.tone-peach { --tone-bg: #fdede1; --tone-ink: #b0501a; }
.tone-sand  { --tone-bg: #f5efdc; --tone-ink: #876812; }
.tone-rose  { --tone-bg: #fae8ed; --tone-ink: #ad2a51; }

/* ---------- Buttons on the site ---------- */
body.site .btn { font-weight: 700; }
body.site .btn-sm { min-height: 44px; padding: 0 var(--space-4); font-size: 0.95rem; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-accent { background: var(--marigold); color: var(--marigold-ink); }
.btn-accent:hover { background: var(--marigold-hover); color: var(--marigold-ink); }
.btn-on-dark { background: transparent; color: #ffffff; border-color: rgba(211, 239, 233, 0.45); }
.btn-on-dark:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: #ffffff; }
.link-btn {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none;
    color: var(--brand-700); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.link-btn:hover { color: var(--brand-800); }

/* Focus ring that shows on dark panels too */
.infobar :focus-visible, .cta-band :focus-visible, .site-footer :focus-visible, .hero-panel :focus-visible {
    box-shadow: 0 0 0 3px var(--marigold);
}

/* ---------- Status line (open / break / closed) ---------- */
.status { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; color: var(--ink-2); }
.status__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--subtle); box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.16); }
.status--open .status__dot { background: var(--open); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18); }
.status--break .status__dot, .status--later .status__dot { background: var(--wait); box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.18); }
.status--closed .status__dot { background: var(--shut); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15); }
.status--on-dark { color: var(--text-on-dark); }
.status--on-dark.status--open .status__dot, .infobar .status--open .status__dot { background: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.2); }
.status--on-dark.status--closed .status__dot, .infobar .status--closed .status__dot { background: #f87171; }

/* ---------- Demo bar (dismissible on the public site) ---------- */
.demo-bar--dismissible { position: relative; padding-right: 56px; }
.demo-bar__close {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--radius-sm);
    background: transparent; color: #e2e8f0;
}
.demo-bar__close:hover { background: rgba(255, 255, 255, 0.1); }

/* ---------- Info bar (G2, md and up) ---------- */
.infobar { display: none; }
@media (min-width: 768px) {
    .infobar {
        display: flex; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-6);
        padding: 0 var(--gutter); background: var(--deep); color: var(--text-on-dark); font-size: 0.92rem;
    }
    .infobar__status { color: #ffffff; font-weight: 600; min-height: 44px; }
    .infobar__today { display: none; color: var(--mint-on-dark); font-weight: 500; padding-left: var(--space-3); border-left: 1px solid rgba(159, 230, 214, 0.3); }
    .infobar__links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 var(--space-5); list-style: none; margin: 0; padding: 0; }
    .infobar__links a, .infobar__links li > span { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text-on-dark); text-decoration: none; }
    .infobar__links a:hover { color: #ffffff; text-decoration: underline; }
    .infobar .icon { color: var(--mint-on-dark); width: 1.1em; height: 1.1em; }
}
@media (min-width: 1280px) { .infobar__today { display: inline; } }

/* ---------- Header (G3) ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: var(--space-4);
    min-height: var(--header-h); padding: 0 var(--gutter);
    background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
    transition: min-height 200ms var(--ease), box-shadow 200ms var(--ease);
}
:root.is-scrolled .site-header { box-shadow: 0 10px 24px -20px rgba(7, 42, 39, 0.5); }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--deep); text-decoration: none; font-weight: 700; font-size: 1.08rem; line-height: 1.15; }
.brand:hover { color: var(--deep); }
.brand__mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-700); color: #ffffff; }
.brand__mark .icon { width: 24px; height: 24px; }
.brand__logo { flex: none; width: auto; height: 40px; max-width: 120px; object-fit: contain; }
.brand__name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brand--light, .brand--light:hover { color: #ffffff; }
.brand--light .brand__mark { background: var(--brand-600); }

.site-nav { display: none; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; flex: none; }
.site-header__book { padding: 0 16px; }
.site-header__book-long, .site-header__login { display: none; }
.site-burger {
    display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--card-line); border-radius: 12px;
    color: var(--ink); text-decoration: none; background: #ffffff;
}
.site-burger:hover { background: var(--enamel); color: var(--ink); }
@media (max-width: 379.98px) {
    .site-header { gap: var(--space-2); }
    .site-header__book .icon { display: none; }
}

@media (min-width: 1024px) {
    .site-nav { display: block; margin-left: var(--space-5); }
    .site-burger { display: none; }
    .site-header__book-long { display: inline; }
    .site-header__book-short { display: none; }
    .site-header__login {
        display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 10px;
        color: var(--ink-2); font-weight: 600; text-decoration: none;
    }
    .site-header__login:hover { background: var(--enamel); color: var(--brand-800); }
}
/* Day 15 fix — large browser text (e.g. 24 px) on a 1024–1344 px screen: the full menu no longer pushes "Book appointment" past
   the edge; the button says "Book". An em query: with the normal 16 px text 56em is 896 px, so nothing changes there. */
@media (min-width: 1024px) and (max-width: 56em) {
    .site-header__book-long { display: none; }
    .site-header__book-short { display: inline; }
}

.site-nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav__link {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 10px;
    color: var(--ink-2); font-weight: 700; text-decoration: none;
}
.site-nav__link:hover { background: var(--enamel); color: var(--brand-800); }
.site-nav__link.is-active { color: var(--brand-800); box-shadow: inset 0 -3px 0 var(--brand-600); border-radius: 10px 10px 0 0; }

/* Services dropdown (lg+): opens on hover, or with the arrow button (keyboard / touch) */
.nav-dd { position: relative; display: flex; align-items: center; }
.nav-dd > .site-nav__link { padding-right: 4px; }
.nav-dd__toggle {
    display: grid; place-items: center; width: 32px; height: 44px; padding: 0; border: 0; border-radius: 8px;
    background: transparent; color: var(--muted);
}
.nav-dd__toggle:hover { background: var(--enamel); color: var(--ink); }
.nav-dd__toggle .icon { transition: transform 150ms var(--ease); }
.nav-dd.is-open .nav-dd__toggle .icon { transform: rotate(180deg); }
.nav-dd__panel {
    position: absolute; top: calc(100% + 10px); left: -16px; z-index: 60;
    display: grid; gap: var(--space-5); width: 340px;
    padding: var(--space-5); border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff;
    box-shadow: 0 30px 60px -30px rgba(7, 42, 39, 0.45);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity 150ms var(--ease), transform 150ms var(--ease), visibility 0s linear 150ms;
}
.nav-dd__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.nav-dd:hover .nav-dd__panel, .nav-dd.is-open .nav-dd__panel {
    visibility: visible; opacity: 1; transform: none; transition-delay: 0s;
}
.nav-dd.is-closed:not(.is-open) .nav-dd__panel { visibility: hidden; opacity: 0; }
.nav-dd__title { margin: 0 0 var(--space-2); font-size: 0.85rem; font-weight: 700; color: var(--subtle); }
.nav-dd__cats, .nav-dd__popular { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nav-dd__cats a {
    display: flex; align-items: center; gap: var(--space-3); min-height: 48px; padding: 4px 8px; border-radius: 12px;
    color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav-dd__cats a:hover, .nav-dd__popular a:hover { background: var(--enamel); color: var(--brand-800); }
.nav-dd__name { flex: 1; min-width: 0; }
.nav-dd__count { flex: none; min-width: 26px; padding: 0 8px; border-radius: 999px; background: var(--enamel); color: var(--muted); font-size: 0.8rem; text-align: center; }
.nav-dd__col--popular { display: none; }
@media (min-width: 1280px) {
    .nav-dd__panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); width: 700px; }
    .nav-dd__col--popular { display: block; padding-left: var(--space-5); border-left: 1px solid var(--line); }
}
.nav-dd__popular a { display: grid; gap: 0; min-height: 48px; padding: 6px 10px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav-dd__popular small { color: var(--subtle); font-weight: 500; }
.nav-dd__all { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: var(--space-2); padding: 0 10px; font-weight: 700; }

/* Icon tiles (categories, groups, reasons) */
.tile { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--tone-bg, var(--enamel)); color: var(--tone-ink, var(--brand-700)); }
.tile .icon { width: 22px; height: 22px; }
.tile--sm { width: 36px; height: 36px; border-radius: 10px; }
.tile--sm .icon { width: 20px; height: 20px; }

/* ---------- Mobile drawer (G4, below lg) ---------- */
.drawer { position: fixed; inset: 0; z-index: 80; visibility: hidden; pointer-events: none; transition: visibility 0s linear 250ms; }
.drawer:target, .drawer.is-open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.drawer__backdrop { position: absolute; inset: 0; background: rgba(4, 26, 24, 0.55); opacity: 0; transition: opacity 250ms var(--ease); }
.drawer:target .drawer__backdrop, .drawer.is-open .drawer__backdrop { opacity: 1; }
.drawer__panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 88vw);
    display: flex; flex-direction: column; gap: var(--space-5);
    padding: var(--space-3) var(--space-5) calc(var(--space-6) + env(safe-area-inset-bottom));
    overflow-y: auto; overscroll-behavior: contain; background: #ffffff;
    transform: translateX(100%); transition: transform 250ms var(--ease);
}
.drawer:target .drawer__panel, .drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 60px; }
.drawer__close { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
.drawer__close:hover { background: var(--enamel); color: var(--ink); }
.drawer__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.drawer__nav a {
    display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: 0 12px; border-radius: 12px;
    color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.1rem;
}
.drawer__nav a .icon { color: var(--brand-700); }
.drawer__nav a:hover, .drawer__nav a.is-active { background: var(--enamel); color: var(--brand-800); }
.drawer__info { display: grid; gap: var(--space-2); padding: var(--space-4); border-radius: 16px; background: var(--enamel); }
.drawer__today { margin: 0; color: var(--muted); font-size: 0.95rem; }
.drawer__contact { list-style: none; margin: 0; padding: 0; display: grid; }
.drawer__contact a { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--brand-800); font-weight: 700; text-decoration: none; }
.drawer__login { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }
body.drawer-open { overflow: hidden; }
@media (min-width: 1024px) { .drawer { display: none; } }

/* ---------- Flash messages ---------- */
.site-flash { padding: var(--space-4) var(--gutter) 0; }

/* ---------- Section heads ---------- */
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); margin-bottom: clamp(24px, 3vw, 40px); }
.section-head h2 { margin: 0; }
.section-head p { margin: 8px 0 0; color: var(--muted); max-width: 62ch; }

/* ==========================================================================
   Home (PUB-01)
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
    display: grid; gap: var(--space-5);
    padding: clamp(16px, 3vw, 48px) var(--gutter) clamp(40px, 5vw, 64px);
    background: linear-gradient(180deg, var(--enamel) 0%, #ffffff 100%);
}
.hero__visual { order: -1; display: grid; gap: var(--space-3); min-width: 0; }
.hero__text { min-width: 0; }
.hero__where { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--space-3); color: var(--brand-800); font-weight: 700; }
.hero__where .icon { color: var(--brand-600); }
.hero h1 { margin: 0; font-size: clamp(2.15rem, 3.1vw + 1.2rem, 4.4rem); color: var(--deep); max-width: 18ch; }
.hero__lead { margin: var(--space-4) 0 0; font-size: clamp(1.08rem, 0.45vw + 0.98rem, 1.3rem); color: var(--muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-6); }
.hero__actions .btn { flex: 1 1 100%; }
.hero__wa { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--brand-800); font-weight: 700; }
@media (min-width: 480px) { .hero__actions .btn { flex: 0 0 auto; } .hero__wa { flex-basis: 100%; } }
.hero__trust {
    display: flex; align-items: center; gap: 10px;
    margin: var(--space-6) 0 0; padding: var(--space-5) 0 0; border-top: 1px solid var(--card-line); color: var(--muted);
}
.hero__trust .icon { color: var(--marigold); fill: var(--marigold); }
.hero__trust strong { color: var(--deep); font-size: 1.1em; }

/* The panel: arch artwork or the clinic photo */
.hero-panel {
    position: relative; isolation: isolate; margin: 0; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 24px;
    background:
        radial-gradient(90% 70% at 50% 8%, rgba(20, 184, 166, 0.32), transparent 70%),
        radial-gradient(60% 50% at 90% 100%, rgba(244, 183, 64, 0.12), transparent 70%),
        var(--deep);
}
.hero-panel--photo { background: var(--deep); }
.hero-panel__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-panel--photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 42, 39, 0.05) 50%, rgba(7, 42, 39, 0.45) 100%); }
.hero-panel__caption { display: none; }
@media (min-width: 768px) { .hero-panel { aspect-ratio: 21 / 9; } }

.arch { position: absolute; left: 50%; top: 50%; width: auto; height: 92%; max-width: 92%; transform: translate(-50%, -48%); overflow: visible; }
.arch__midline { stroke: rgba(159, 230, 214, 0.35); stroke-width: 1.5; stroke-dasharray: 4 6; fill: none; }
.arch__tooth rect { fill: rgba(204, 251, 241, 0.07); stroke: #8ee6d3; stroke-width: 2.2; }
.arch__tooth text { fill: #7fd8c4; font-family: var(--font-site); font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }
.arch__tooth.is-marked rect { fill: var(--marigold); stroke: var(--marigold); }
.arch__tooth.is-marked text { fill: var(--marigold); }
.arch__tooth { animation: tooth-in 520ms var(--ease) both; }
.arch__tooth.t-d1 { animation-delay: 60ms; }
.arch__tooth.t-d2 { animation-delay: 120ms; }
.arch__tooth.t-d3 { animation-delay: 180ms; }
.arch__tooth.t-d4 { animation-delay: 240ms; }
.arch__tooth.t-d5 { animation-delay: 300ms; }
.arch__tooth.t-d6 { animation-delay: 360ms; }
.arch__tooth.t-d7 { animation-delay: 420ms; }
.arch__tooth.t-d8 { animation-delay: 480ms; }
@keyframes tooth-in { from { opacity: 0; } to { opacity: 1; } }

/* Floating cards over the panel. Phones: only the status, as a slim line under the panel. */
.hero-cards { display: grid; gap: var(--space-3); }
.hero-card--team { display: none !important; }
@media (max-width: 767.98px) {
    .hero-card--status { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; padding: 10px 14px; }
    .hero-card--status .hero-card__sub { padding-left: 0; }
}
.hero-card {
    display: grid; gap: 2px; align-content: center; min-width: 0; padding: 12px 14px; border-radius: 16px;
    background: #ffffff; border: 1px solid var(--card-line); font-size: 0.92rem; line-height: 1.35;
}
.hero-card p { margin: 0; }
.hero-card .status { gap: 8px; }
.hero-card__sub { color: var(--muted); padding-left: 18px; }
.hero-card--team { display: flex; align-items: center; gap: var(--space-3); }
.hero-card--team p { display: grid; min-width: 0; }
.hero-card--team strong { color: var(--deep); }
.hero-card--team span { color: var(--muted); }
.avatar-stack { display: flex; flex: none; list-style: none; margin: 0; padding: 0; }
.avatar-stack li { position: relative; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; border: 2px solid #ffffff; background: var(--enamel); }
.avatar-stack li + li { margin-left: -10px; }
.avatar-stack .doc-photo { width: 100%; height: 100%; object-fit: cover; }
.avatar-stack .doc-mono__initials { width: 100%; background: transparent; font-size: 12px; }
@media (min-width: 768px) {
    .hero__visual { position: relative; display: block; }
    .hero-cards { position: absolute; inset: 0; display: block; pointer-events: none; }
    .hero-card { position: absolute; pointer-events: auto; max-width: min(320px, calc(100% - 32px)); border: 0; box-shadow: var(--shadow-float); }
    .hero-card--status { left: 16px; top: 16px; }
    .hero-card--team { right: 16px; bottom: 16px; }
}

@media (min-width: 1024px) {
    .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-bottom: 104px; min-height: min(80vh, 780px); }
    .hero__visual { order: 0; height: 100%; }
    .hero-panel { aspect-ratio: auto; height: 100%; min-height: 500px; border-radius: 28px; }
    .hero-card--team { display: flex !important; }
    .hero-panel__caption { position: absolute; left: 24px; bottom: 22px; max-width: 30ch; margin: 0; color: var(--mint-on-dark); font-size: 0.9rem; }
    .hero-panel--photo .hero-panel__caption { display: none; }
    .hero-card--status { left: 24px; top: 24px; }
    .hero-card--team { right: 24px; bottom: 24px; }
    .arch { height: 78%; transform: translate(-50%, -54%); }
}
@media (min-width: 1280px) { .hero-panel__caption { display: block; } }
@media (min-width: 1440px) { .hero { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); } }
@media (min-width: 1920px) { .hero { min-height: 820px; } .hero-panel { min-height: 620px; } }

/* ---------- Quick booking bar ---------- */
.quickbook { position: relative; z-index: 2; padding: 0 var(--gutter); }
.quickbook__form {
    display: grid; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--card-line); border-radius: 20px;
    background: #ffffff; box-shadow: 0 30px 60px -44px rgba(7, 42, 39, 0.6);
}
.quickbook__title { margin: 0; font-size: 1.2rem; color: var(--deep); }
.quickbook__field { display: grid; gap: 6px; min-width: 0; }
.quickbook__go { min-height: 48px; }
@media (min-width: 768px) {
    .quickbook__form { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto; align-items: end; }
    .quickbook__title { grid-column: 1 / -1; }
}
@media (min-width: 1024px) {
    .quickbook { margin-top: -68px; }
    .quickbook__form { grid-template-columns: auto minmax(0, 1.6fr) minmax(0, 1fr) auto; padding: var(--space-4) var(--space-5); }
    .quickbook__title { grid-column: auto; align-self: center; max-width: 9ch; line-height: 1.2; }
}

/* ---------- Highlights ---------- */
.highlights { padding: clamp(32px, 4vw, 56px) var(--gutter) 0; }
.highlights__list {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; list-style: none; margin: 0; padding: 0;
    overflow: hidden; border: 1px solid var(--card-line); border-radius: 20px; background: var(--card-line);
}
.highlight { display: grid; gap: 2px; align-content: start; padding: var(--space-5); background: #ffffff; }
.highlight__icon .icon { width: 26px; height: 26px; color: var(--brand-600); }
.highlight__value { margin-top: var(--space-2); font-size: clamp(1.8rem, 1.6vw + 1.2rem, 2.8rem); font-weight: 700; line-height: 1.05; color: var(--deep); font-variant-numeric: tabular-nums; }
.highlight__label { color: var(--muted); }

/* ---------- Service cards ---------- */
.svc-grid {
    --min: 280px; --cols: 6;
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--min), (100% - (var(--cols) - 1) * var(--gap)) / var(--cols))), 1fr));
}
/* Home shows exactly 8: rows always full (1 → 2 → 4 → 8 across) */
.svc-grid--home { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .svc-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .svc-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 2400px) { .svc-grid--home { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

.svc-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; }
.svc-card[hidden] { display: none; }
.svc-card__media { position: relative; display: grid; place-items: center; aspect-ratio: 2 / 1; overflow: hidden; background: var(--tone-bg); color: var(--tone-ink); }
@media (min-width: 600px) { .svc-card__media { aspect-ratio: 16 / 10; } }
.svc-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.svc-card__media::before { content: ""; position: absolute; width: 46%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.6); }
.svc-card__media:has(img)::before { display: none; }
.svc-card__icon { position: relative; display: grid; }
.svc-card__icon .icon { width: 56px; height: 56px; stroke-width: 1.6; }
.svc-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 18px 20px; }
.svc-card__cat { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--brand-700); }
.svc-card__title { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.svc-card__title a { color: var(--ink); text-decoration: none; }
.svc-card__title a:hover { color: var(--brand-800); text-decoration: underline; }
.svc-card__desc { margin: 0; color: var(--muted); font-size: 0.96rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.svc-card__price { margin: auto 0 0; padding-top: 4px; font-size: 1.12rem; font-weight: 700; color: var(--deep); font-variant-numeric: tabular-nums; }
.svc-card__actions { display: flex; gap: var(--space-2); }
.svc-card__actions .btn { flex: 1; }

.facts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: 0.92rem; color: var(--ink-2); }
.facts > div { display: flex; align-items: center; gap: 6px; }
.facts dt { display: flex; color: var(--brand-600); }
.facts dd { margin: 0; }

/* ---------- Why choose us ---------- */
.why { display: grid; gap: var(--space-6); background: var(--enamel); }
.why__intro h2 { margin: 0; }
.why__intro p { margin: var(--space-3) 0 var(--space-5); color: var(--muted); max-width: 46ch; }
.why__list { display: grid; gap: var(--space-6) var(--gap); list-style: none; margin: 0; padding: 0; }
.reason { padding-top: var(--space-5); border-top: 2px solid var(--brand-200); }
.reason__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #ffffff; color: var(--brand-700); }
.reason__icon .icon { width: 22px; height: 22px; }
.reason h3 { margin: var(--space-4) 0 6px; }
.reason p { margin: 0; color: var(--muted); max-width: 52ch; }
@media (min-width: 640px) { .why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
    .why { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); align-items: start; }
    .why__intro { position: sticky; top: calc(var(--header-h) + 32px); }
}
@media (min-width: 1920px) { .why__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- Doctors on Home: a swipe row on phones, a grid from md ---------- */
.doc-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 82%); gap: var(--space-4);
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain;
}
@media (min-width: 768px) {
    .doc-row {
        grid-auto-flow: row; grid-auto-columns: auto; margin: 0; padding: 0; overflow: visible;
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: var(--gap);
    }
}

/* ---------- How a visit works ---------- */
.how h2 { margin: 0 0 clamp(24px, 3vw, 40px); }
.how__steps { display: grid; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.how__steps li { position: relative; }
.how__num { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--deep); color: #ffffff; font-weight: 700; font-size: 1.2rem; }
.how__steps h3 { margin: var(--space-4) 0 6px; }
.how__steps p { margin: 0; color: var(--muted); max-width: 44ch; }
@media (min-width: 768px) {
    .how__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
    .how__steps li:not(:last-child)::after {
        content: ""; position: absolute; top: 23px; left: 64px; right: 8px; height: 2px;
        background: repeating-linear-gradient(90deg, var(--brand-200) 0 8px, transparent 8px 14px);
    }
}

/* ---------- Timings and location ---------- */
.visit { display: grid; gap: var(--space-6); background: var(--enamel); }
.visit__hours h2 { margin: 0 0 var(--space-3); }
.visit__hours > .status { margin-bottom: var(--space-4); }
.hours-table { overflow: hidden; border: 1px solid var(--card-line); border-radius: 16px; background: #ffffff; border-collapse: separate; border-spacing: 0; }
.hours-table th, .hours-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.hours-table tr:last-child th, .hours-table tr:last-child td { border-bottom: 0; }
.hours-table th { font-weight: 600; white-space: nowrap; }
.hours-table td { text-align: right; font-variant-numeric: tabular-nums; }
.hours-table td.is-closed { color: var(--subtle); }
.hours-table tr.is-today th, .hours-table tr.is-today td { background: var(--brand-50); font-weight: 700; color: var(--deep); }
.hours-table .badge { margin-left: 6px; vertical-align: 2px; }
/* Narrow phones with large text: the "Today" badge may drop under the day name instead of widening the table */
@media (max-width: 479.98px) {
    .hours-table th, .hours-table td { padding: 10px 12px; }
    .hours-table th, .hours-table .nowrap { white-space: normal; }   /* breaks only when the line would not fit */
}
.holiday-note { display: flex; gap: 10px; align-items: flex-start; margin-top: var(--space-4); padding: 12px 14px; border-radius: 12px; background: #fff6e0; color: #6b4300; }
.holiday-note p { margin: 0; }
.holiday-note .icon { margin-top: 3px; }
.visit__map { min-width: 0; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--card-line); border-radius: 20px; background: var(--enamel-2); }
.visit__map iframe { display: block; width: 100%; height: 100%; border: 0; }
.visit__nomap { display: grid; place-items: center; align-content: center; gap: var(--space-2); height: 100%; padding: var(--space-5); text-align: center; color: var(--muted); }
.visit__nomap .icon { width: 36px; height: 36px; color: var(--brand-600); }
.visit__contact { align-self: start; padding: var(--space-5); border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; }
.visit__contact h3 { margin: 0 0 var(--space-2); }
.visit__contact address { font-style: normal; color: var(--ink-2); }
.contact-list { display: grid; list-style: none; margin: var(--space-3) 0 var(--space-4); padding: 0; }
.contact-list li { display: flex; align-items: center; gap: 10px; min-height: 44px; overflow-wrap: anywhere; }
.contact-list .icon { color: var(--brand-600); }
@media (min-width: 1024px) {
    .visit { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "hours map" "contact map"; }
    .visit__hours { grid-area: hours; }
    .visit__map { grid-area: map; aspect-ratio: auto; min-height: 460px; }
    .visit__contact { grid-area: contact; }
}
@media (min-width: 1920px) {
    .visit { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); grid-template-areas: "hours map contact"; align-items: stretch; }
    .visit__contact { align-self: stretch; }
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

/* ---------- Page header band (G5) ---------- */
.page-band {
    display: grid; gap: var(--space-5); padding: clamp(28px, 4vw, 64px) var(--gutter);
    background: var(--enamel); border-bottom: 1px solid var(--card-line);
}
.page-band h1 { margin: 0; font-size: clamp(2rem, 2.2vw + 1.35rem, 3.5rem); color: var(--deep); }
.page-band__intro { margin: var(--space-3) 0 0; max-width: 62ch; color: var(--muted); font-size: 1.1rem; }
.page-band__cta { display: none; }
@media (min-width: 1024px) {
    .page-band { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
    .page-band__cta {
        display: grid; gap: 10px; width: min(19em, 42vw); padding: var(--space-5);
        border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff;
    }
    .page-band__cta .status { font-size: 0.95rem; margin-bottom: 4px; }
}

body.site .crumbs { display: none; }
body.site .crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; list-style: none; margin: 0 0 var(--space-3); padding: 0; font-size: 0.92rem; color: var(--subtle); }
body.site .crumbs li + li::before { content: "/"; margin-right: 8px; color: #a7b4bf; }
body.site .crumbs a { color: var(--muted); }
body.site .crumbs [aria-current] { color: var(--ink-2); font-weight: 600; }
@media (min-width: 768px) { body.site .crumbs { display: block; } }

/* ---------- Services (PUB-02) ---------- */
.svc-browser { padding: 0 var(--gutter) var(--section-y); }
.filter-bar { display: grid; gap: var(--space-3); padding: var(--space-5) 0 var(--space-3); background: #ffffff; }
.chips {
    display: flex; gap: var(--space-2); list-style: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter);
    overflow-x: auto; scrollbar-width: none; scroll-padding: 0 var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
    flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--card-line); border-radius: 999px; background: #ffffff;
    color: var(--ink-2); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--brand-600); color: var(--brand-800); }
.chip.is-active { border-color: var(--deep); background: var(--deep); color: #ffffff; }
.chip__count { padding: 0 7px; border-radius: 999px; background: var(--enamel); color: var(--muted); font-size: 0.8rem; }
.chip.is-active .chip__count { background: rgba(255, 255, 255, 0.16); color: #ffffff; }
.chips--wrap { flex-wrap: wrap; justify-content: center; margin: 0; padding: 0; overflow: visible; }
.svc-search { display: flex; gap: var(--space-2); }
.svc-search__box { position: relative; flex: 1; min-width: 0; }
.svc-search__box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.svc-search__box .input { padding-left: 44px; }
.svc-count { margin: var(--space-2) 0 var(--space-6); color: var(--muted); }
.svc-groups { display: grid; gap: clamp(36px, 4vw, 64px); }
.svc-group[hidden] { display: none; }
.svc-group__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); }
.svc-group__head h2 { margin: 0; font-size: clamp(1.4rem, 1vw + 1.1rem, 1.9rem); }
.svc-group__count { color: var(--subtle); }
.svc-empty { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-7) var(--space-4); text-align: center; }
.svc-empty > .icon { width: 40px; height: 40px; color: var(--brand-600); }
.svc-empty h2 { margin: 0; font-size: 1.5rem; }
.svc-empty p { margin: 0; color: var(--muted); }
@media (min-width: 1024px) {
    .filter-bar { grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); align-items: center; }
    .chips { flex-wrap: wrap; margin: 0; padding: 0; overflow: visible; }
}
@media (min-width: 1440px) {
    .filter-bar {
        position: sticky; top: var(--header-h); z-index: 20;
        margin: 0 calc(-1 * var(--gutter)); padding: var(--space-3) var(--gutter); border-bottom: 1px solid var(--line);
        transition: top 200ms var(--ease);
    }
    .svc-count { margin-top: var(--space-5); }
}

.unsure {
    display: grid; gap: var(--space-5); margin: 0 var(--gutter) var(--section-y); padding: clamp(24px, 3vw, 48px);
    border: 1px solid var(--card-line); border-radius: 24px; background: var(--enamel);
}
.unsure h2 { margin: 0; }
.unsure p { margin: var(--space-2) 0 0; color: var(--muted); max-width: 62ch; }
@media (min-width: 1024px) { .unsure { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }

.empty-state { display: grid; justify-items: center; gap: var(--space-3); max-width: 560px; margin: 0 auto; padding: var(--space-7) var(--space-4); text-align: center; }
.empty-state > .icon { width: 44px; height: 44px; color: var(--brand-600); }
.empty-state h2 { margin: 0; font-size: 1.5rem; }
.empty-state p { margin: 0; color: var(--muted); }

/* ---------- Service detail (PUB-03) ---------- */
.svc-hero { display: grid; gap: var(--space-6); padding: clamp(20px, 3vw, 56px) var(--gutter) clamp(28px, 4vw, 64px); background: var(--enamel); }
.svc-hero h1 { margin: 0; font-size: clamp(2rem, 2.5vw + 1.25rem, 3.8rem); color: var(--deep); }
.svc-hero__lead { margin: var(--space-4) 0 0; max-width: 58ch; color: var(--muted); font-size: clamp(1.08rem, 0.4vw + 1rem, 1.25rem); }
.fact-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-5) 0 0; }
.fact-chips > div { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--card-line); border-radius: 999px; background: #ffffff; font-weight: 700; }
.fact-chips dt { display: flex; color: var(--brand-600); }
.fact-chips dd { margin: 0; }
.svc-hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.svc-hero__actions .btn { flex: 1 1 100%; }
@media (min-width: 480px) { .svc-hero__actions .btn { flex: 0 0 auto; } }
.svc-hero__media { display: none; }
.svc-hero__icon .icon { width: 120px; height: 120px; stroke-width: 1.2; }
@media (min-width: 1024px) {
    .svc-hero { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: stretch; }
    .svc-hero__media {
        position: relative; display: grid; place-items: center; min-height: 340px; overflow: hidden; border-radius: 28px;
        background: var(--tone-bg); color: var(--tone-ink);
    }
    .svc-hero__media::before { content: ""; position: absolute; width: min(60%, 320px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, 0.55); }
    .svc-hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
    .svc-hero__icon { position: relative; display: grid; }
}
@media (min-width: 1920px) { .svc-hero { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); } }

.svc-layout { display: grid; gap: var(--space-6); padding: clamp(32px, 4vw, 64px) var(--gutter); }
.svc-toc, .svc-rail { display: none; }
.svc-main { min-width: 0; }
.svc-section + .svc-section { margin-top: clamp(40px, 4vw, 64px); }
.svc-section h2 { margin: 0 0 var(--space-5); font-size: clamp(1.5rem, 1vw + 1.2rem, 2.1rem); }
.svc-section .prose p { margin: 0 0 1em; }
.svc-note { display: flex; gap: 10px; align-items: flex-start; max-width: 70ch; margin: var(--space-5) 0 0; color: var(--muted); }
.svc-note .icon { margin-top: 3px; color: var(--brand-600); }

.steps { display: grid; list-style: none; counter-reset: step; max-width: 70ch; margin: 0; padding: 0; }
.steps li { position: relative; min-height: 44px; padding: 4px 0 22px 56px; counter-increment: step; }
.steps li::before {
    content: counter(step); position: absolute; left: 0; top: 0; display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 50%; background: var(--deep); color: #ffffff; font-weight: 700;
}
.steps li::after { content: ""; position: absolute; left: 17px; top: 40px; bottom: 4px; width: 2px; background: var(--brand-200); }
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }

.doc-list { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.faq-list { display: grid; gap: var(--space-3); max-width: 80ch; }
.faq { border: 1px solid var(--card-line); border-radius: 16px; background: #ffffff; }
.faq[open] { border-color: var(--brand-200); }
.faq summary {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
    min-height: 56px; padding: 14px 20px; list-style: none; cursor: pointer; font-weight: 700;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand-800); }
.faq__chevron { flex: none; color: var(--brand-700); transition: transform 200ms var(--ease); }
.faq[open] .faq__chevron { transform: rotate(180deg); }
.faq__answer { padding: 0 20px 18px; color: var(--ink-2); }
.faq__answer p { margin: 0 0 0.75em; }
.faq__answer p:last-child { margin-bottom: 0; }

.rail-card { display: grid; gap: var(--space-4); padding: var(--space-5); border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; box-shadow: 0 28px 56px -44px rgba(7, 42, 39, 0.6); }
.rail-card__price { margin: 0; font-size: clamp(1.5rem, 0.8vw + 1.2rem, 2rem); font-weight: 700; line-height: 1.1; color: var(--deep); font-variant-numeric: tabular-nums; }
.rail-card__note { margin: -10px 0 0; color: var(--subtle); font-size: 0.92rem; }
.rail-card__facts { display: grid; margin: 0; }
.rail-card__facts > div { display: flex; justify-content: space-between; gap: var(--space-3); padding: 10px 0; border-top: 1px solid var(--line); }
.rail-card__facts dt { color: var(--muted); }
.rail-card__facts dd { margin: 0; font-weight: 700; text-align: right; }
.rail-card__contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.rail-card .status { font-size: 0.95rem; }

@media (min-width: 1024px) {
    .svc-layout { grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); align-items: start; gap: var(--space-7); }
    .svc-rail { display: block; position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1440px) {
    .svc-layout--toc { grid-template-columns: minmax(170px, 2fr) minmax(0, 7fr) minmax(300px, 3fr); }
    .svc-layout--toc .svc-toc { display: block; position: sticky; top: calc(var(--header-h) + 24px); }
}
/* 2xl: the text is capped at ~70 characters, so the content column splits in two instead of leaving a gap */
@media (min-width: 1920px) {
    .svc-layout--toc { grid-template-columns: minmax(170px, 1.4fr) minmax(0, 8fr) minmax(320px, 2.6fr); }
    .svc-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-7) clamp(40px, 3vw, 80px); align-items: start; }
    .svc-section + .svc-section { margin-top: 0; }
}
.svc-toc__title { margin: 0 0 var(--space-2); font-size: 0.9rem; font-weight: 700; color: var(--subtle); }
.svc-toc ol { display: grid; list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.svc-toc a { display: flex; align-items: center; min-height: 40px; margin-left: -2px; padding: 0 var(--space-4); border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; }
.svc-toc a:hover { color: var(--brand-800); }
.svc-toc a.is-current { border-left-color: var(--brand-600); color: var(--deep); }

.related { background: var(--enamel); }

/* Sticky bottom bar on phones and tablets (service detail) */
.bottom-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 44;
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--card-line); background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(8px);
    box-shadow: 0 -12px 30px -24px rgba(7, 42, 39, 0.5);
}
.bottom-bar__text { display: grid; margin: 0; line-height: 1.25; min-width: 0; }
.bottom-bar__text strong { color: var(--deep); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.bottom-bar__text span { color: var(--muted); font-size: 0.88rem; }
body.has-bottom-bar { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
    .bottom-bar { display: none; }
    body.has-bottom-bar { padding-bottom: 0; }
}

/* ---------- Doctor cards (Home, service page, Doctors page) ---------- */
.doc-card { container-type: inline-size; min-width: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; scroll-snap-align: start; }
.doc-card__layout { display: grid; height: 100%; }
.doc-card__photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--enamel); }
.doc-card--full .doc-card__photo { aspect-ratio: 1; max-height: 420px; }
.doc-photo { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.doc-mono { position: absolute; inset: 0; display: grid; place-items: center; container-type: size; }
.doc-mono__bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.doc-mono__initials {
    position: relative; display: grid; place-items: center; aspect-ratio: 1; width: min(62cqh, 46cqw);
    border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--deep);
    font-size: min(24cqh, 18cqw); font-weight: 700; letter-spacing: -0.02em; line-height: 1;
}
.doc-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: var(--space-5); }
.doc-card__name { margin: 0; font-size: 1.3rem; color: var(--deep); }
.doc-card--full .doc-card__name { font-size: clamp(1.35rem, 0.6vw + 1.15rem, 1.7rem); }
.doc-card__name a { color: inherit; text-decoration: none; }
.doc-card__name a:hover { color: var(--brand-800); text-decoration: underline; }
.doc-card__role { margin: 0; font-weight: 700; color: var(--brand-700); }
.doc-card__qual { margin: 0; color: var(--muted); font-size: 0.94rem; }
.doc-card__exp { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-weight: 700; color: var(--ink-2); }
.doc-card__exp .icon { color: var(--brand-600); }
.doc-card__label { display: block; margin-bottom: 6px; font-size: 0.85rem; font-weight: 700; color: var(--subtle); }
.doc-card__days { margin-top: 6px; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.day-chips li {
    min-width: 42px; padding: 3px 8px; border: 1px solid var(--brand-100); border-radius: 999px;
    background: var(--brand-50); color: var(--brand-800); font-size: 0.85rem; font-weight: 700; text-align: center;
}
.day-chips li.is-off { border: 1px dashed var(--line-strong); background: transparent; color: var(--subtle); font-weight: 600; } /* was #8b9aa7 — 2.9:1, axe (Day 13 checkpoint) */
.doc-card__hours { display: grid; gap: 2px; margin: var(--space-3) 0 0; font-size: 0.92rem; }
.doc-card__hours > div { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); }
.doc-card__hours dt { min-width: 8.5em; font-weight: 700; color: var(--ink-2); }
.doc-card__hours dd { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.doc-card__away { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--warning); font-weight: 700; font-size: 0.94rem; }
.doc-card__bio { margin-top: 6px; color: var(--ink-2); }
.doc-card__bio p { margin: 0 0 0.7em; }
.doc-card__bio p:last-child { margin-bottom: 0; }
.doc-card__bio.is-clamped { max-height: calc(1.6em * 4); overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.doc-card__treats { margin: 4px 0 0; font-size: 0.94rem; color: var(--muted); }
.doc-card__book { align-self: flex-start; margin-top: auto; }
.doc-card--compact .doc-card__body { gap: 6px; }
.doc-card--compact .doc-card__days { margin-top: 4px; }
.doc-card--compact .doc-card__book { margin-top: var(--space-3); }

@container (min-width: 420px) {
    .doc-card--compact .doc-card__layout { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto; align-items: start; }
    .doc-card--compact .doc-card__photo { width: 112px; aspect-ratio: 1; margin: var(--space-5) 0 0 var(--space-5); border-radius: 18px; }
    .doc-card--compact .doc-card__body { padding-left: var(--space-4); }
}
@container (min-width: 560px) {
    .doc-card--full .doc-card__layout { grid-template-columns: minmax(200px, 38%) minmax(0, 1fr); grid-template-rows: auto; }
    .doc-card--full .doc-card__photo { aspect-ratio: auto; max-height: none; height: 100%; min-height: 320px; }
    .doc-card--full .doc-card__body { padding: var(--space-6); }
}

.doctors-page { padding-top: clamp(28px, 4vw, 56px); }
.doc-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.doc-card__layout { grid-template-rows: auto 1fr; }
@media (min-width: 1920px) { .doc-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr)); } }

/* ==========================================================================
   Day 5 — Contact, testimonials, legal pages
   ========================================================================== */

/* ---------- Contact (PUB-10) ---------- */
.contact-cards { padding: clamp(24px, 3vw, 48px) var(--gutter) 0; }
.contact-cards__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.contact-cards__list > li { min-width: 0; }
.contact-card {
    display: grid; gap: var(--space-3); align-content: start; height: 100%; min-height: 44px; padding: var(--space-4);
    border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; color: var(--ink); text-decoration: none;
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.contact-card:hover { border-color: var(--brand-600); color: var(--ink); box-shadow: 0 20px 40px -32px rgba(7, 42, 39, 0.55); }
.contact-card__text { display: grid; gap: 2px; min-width: 0; }
.contact-card__label { font-size: 0.85rem; font-weight: 700; color: var(--brand-700); }
.contact-card__value { font-size: 1.05rem; line-height: 1.3; color: var(--deep); overflow-wrap: anywhere; }
.contact-card__note { font-size: 0.9rem; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 640px) { .contact-card { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-5); } }
@media (min-width: 1024px) { .contact-cards__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); } }

.contact { display: grid; gap: var(--gap); padding: clamp(24px, 3vw, 48px) var(--gutter) var(--section-y); }
.contact__form, .contact__map, .contact__hours { min-width: 0; }
.contact__form { container-type: inline-size; scroll-margin-top: calc(var(--header-h) + 16px); }
.contact-form, .contact-thanks {
    display: grid; gap: var(--space-5); padding: clamp(20px, 2.5vw, 36px);
    border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; box-shadow: 0 28px 56px -44px rgba(7, 42, 39, 0.6);
}
.contact-form__title { margin: 0; font-size: clamp(1.35rem, 0.8vw + 1.1rem, 1.75rem); color: var(--deep); }
.contact-form__intro { margin: 6px 0 0; color: var(--muted); }
.contact-form__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@container (min-width: 520px) {
    .contact-form__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .contact-form__fields > .field:first-child, .contact-form__fields > .span-all { grid-column: 1 / -1; }
}
.contact-form__foot { display: grid; gap: var(--space-3); justify-items: start; }
.contact-form__privacy { margin: 0; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 479.98px) { .contact-form__foot .btn { width: 100%; } }
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.contact-thanks { justify-items: start; align-content: start; gap: var(--space-4); }
.contact-thanks__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--success-bg); color: var(--success); }
.contact-thanks__icon .icon { width: 28px; height: 28px; stroke-width: 2.6; }
.contact-thanks h2 { margin: 0; font-size: clamp(1.4rem, 0.9vw + 1.1rem, 1.9rem); color: var(--deep); }
.contact-thanks p { margin: 0; }
.contact-thanks__sooner { margin-top: var(--space-2) !important; font-weight: 700; }
.contact-thanks__again { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }

.contact__map { display: flex; flex-direction: column; }
.contact-map { min-height: 0; overflow: hidden; aspect-ratio: 4 / 3; border: 1px solid var(--card-line); border-radius: 20px 20px 0 0; background: var(--enamel-2); }
.contact-map:last-child { border-radius: 20px; }
.contact-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.contact-map__bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-4);
    padding: var(--space-4); border: 1px solid var(--card-line); border-top: 0; border-radius: 0 0 20px 20px; background: #ffffff;
}
.contact-map__bar address { flex: 1 1 220px; min-width: 0; font-style: normal; color: var(--ink-2); }
.contact__hours h2 { margin: 0 0 var(--space-3); font-size: clamp(1.35rem, 0.8vw + 1.1rem, 1.75rem); }
.contact__hours > .status { margin-bottom: var(--space-4); }
.contact__hours .hours-table { width: 100%; }
.holiday-note__list { list-style: none; margin: 4px 0 0; padding: 0; }

@media (min-width: 1024px) {
    .contact { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); grid-template-areas: "form map" "form hours"; align-items: start; }
    .contact__form { grid-area: form; position: sticky; top: calc(var(--header-h) + 24px); }
    .contact__map { grid-area: map; }
    .contact__hours { grid-area: hours; }
    .contact-map { aspect-ratio: 16 / 10; }
}
@media (min-width: 1440px) {
    .contact { grid-template-columns: minmax(0, 4fr) minmax(0, 5fr) minmax(0, 3fr); grid-template-areas: "form map hours"; align-items: stretch; }
    .contact__form { position: static; }
    .contact-map { flex: 1; aspect-ratio: auto; min-height: 440px; }
    .contact__hours .hours-table th, .contact__hours .hours-table td { padding: 10px 12px; }
}

/* ---------- Review cards (Home row, /testimonials wall) ---------- */
.review-card {
    display: grid; gap: var(--space-4); align-content: start; min-width: 0; margin: 0 0 var(--gap); padding: var(--space-5);
    border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; break-inside: avoid;
}
.review-card__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--space-3); }
.review-card__stars { font-size: 1.05rem; }
.review-card__date { color: var(--subtle); font-size: 0.88rem; white-space: nowrap; }
.review-card__text { margin: 0; color: var(--ink-2); font-size: 1.01rem; line-height: 1.65; overflow-wrap: anywhere; }
.review-card__text p { margin: 0 0 0.7em; }
.review-card__text p:last-child { margin-bottom: 0; }
.review-card--clamp .review-card__text { display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.review-card__who { display: flex; align-items: center; gap: var(--space-3); margin: 0; }
.review-card__avatar {
    display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
    background: var(--tone-bg); color: var(--tone-ink); font-weight: 700; font-size: 0.95rem;
}
.review-card__name { display: grid; min-width: 0; line-height: 1.3; }
.review-card__name strong { color: var(--deep); }
.review-card__name span { color: var(--muted); font-size: 0.9rem; }
.review-card__tag {
    justify-self: start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 0 14px;
    border-radius: 999px; background: var(--enamel); color: var(--brand-800); font-size: 0.9rem; font-weight: 600; text-decoration: none;
}
.review-card__tag:hover { background: var(--enamel-2); color: var(--deep); text-decoration: underline; }
.review-card__tag .icon { color: var(--brand-600); }

/* Home: "What patients say" — a deep band; swipe row on phones, 2 → 3 → 4 → 5 across */
.home-reviews { background: radial-gradient(60% 90% at 0% 0%, rgba(20, 184, 166, 0.18), transparent 60%), var(--deep); color: var(--text-on-dark); }
.home-reviews h2 { color: #ffffff; }
.home-reviews .section-head p { color: var(--text-on-dark); }
.home-reviews__score { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.home-reviews__score .stars { font-size: 1.15rem; }
.home-reviews__score .stars__empty { fill: rgba(255, 255, 255, 0.14); stroke: rgba(255, 255, 255, 0.4); }
.home-reviews__score strong { color: #ffffff; }
.home-reviews .btn-secondary { background: transparent; color: #ffffff; border-color: rgba(211, 239, 233, 0.5); }
.home-reviews .btn-secondary:hover { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: #ffffff; }
.home-reviews :focus-visible { box-shadow: 0 0 0 3px var(--marigold); }
.home-reviews .review-card { border-color: transparent; box-shadow: 0 24px 48px -36px rgba(0, 0, 0, 0.6); }
.home-reviews .review-card :focus-visible { box-shadow: var(--focus); }
.review-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 84%); gap: var(--space-4);
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain;
}
.review-row > .review-card { margin: 0; scroll-snap-align: start; }
@media (min-width: 768px) {
    .review-row {
        grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--gap); margin: 0; padding: 0; overflow: visible;
    }
    .review-row > :nth-child(n+5) { display: none; }
}
@media (min-width: 1024px) {
    .review-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .review-row > :nth-child(n+4) { display: none; }
}
@media (min-width: 1440px) {
    .review-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .review-row > :nth-child(4) { display: grid; }
}
@media (min-width: 1920px) {
    .review-row { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .review-row > :nth-child(n+4) { display: grid; }
}

/* ---------- Testimonials page (PUB-06) ---------- */
.reviews-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; padding: clamp(24px, 3vw, 48px) var(--gutter) var(--section-y); }
.reviews-summary, .reviews-main { min-width: 0; }
.rating-card {
    display: grid; gap: var(--space-3); padding: clamp(20px, 2.5vw, 32px);
    border: 1px solid var(--card-line); border-radius: 20px; background: var(--enamel);
}
.rating-card__score { display: flex; align-items: baseline; gap: 8px; margin: 0; }
.rating-card__score strong { font-size: clamp(3rem, 2.4vw + 2.2rem, 4.2rem); line-height: 1; color: var(--deep); font-variant-numeric: tabular-nums; }
.rating-card__score span { color: var(--muted); font-weight: 600; }
.rating-card__stars { font-size: 1.5rem; }
.rating-card__count { margin: 0 0 var(--space-2); color: var(--muted); }
.rating-card .rating-bars { margin-bottom: var(--space-3); }
.rating-card .rating-bars meter, .rating-card .rating-bars meter::-webkit-meter-bar { background: #ffffff; }
.reviews-chips { margin-bottom: var(--space-5); }
.reviews-filter-note { margin: 0 0 var(--space-4); color: var(--muted); }
.review-wall { columns: 280px 5; column-gap: var(--gap); }
.site-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-5); }
.site-pager__info { color: var(--muted); }
@media (min-width: 1024px) {
    .reviews-page { grid-template-columns: minmax(280px, 3fr) minmax(0, 9fr); }
    .reviews-summary { position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1920px) { .reviews-page { grid-template-columns: minmax(340px, 2.2fr) minmax(0, 9.8fr); } }

/* ---------- Privacy + Terms (PUB-14, PUB-15) ---------- */
.legal { display: grid; gap: var(--space-6); padding: clamp(28px, 4vw, 64px) var(--gutter) var(--section-y); align-items: start; }
.legal-body, .legal-rail, .legal-toc-box { min-width: 0; }
.legal-toc { display: none; }
.legal-toc-box { border: 1px solid var(--card-line); border-radius: 16px; background: var(--enamel); }
.legal-toc-box summary {
    display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 18px; cursor: pointer; list-style: none; font-weight: 700; color: var(--deep);
}
.legal-toc-box summary::-webkit-details-marker { display: none; }
.legal-toc-box ol { margin: 0; padding: 0 18px 14px 44px; display: grid; }
.legal-toc-box a { display: inline-flex; align-items: center; min-height: 40px; color: var(--ink-2); }
.legal-body { max-width: 72ch; font-size: 1.03rem; }
.legal-body h2 { margin: clamp(32px, 3vw, 48px) 0 var(--space-3); font-size: clamp(1.3rem, 0.7vw + 1.1rem, 1.65rem); color: var(--deep); scroll-margin-top: calc(var(--header-h) + 20px); }
.legal-body p { margin: 0 0 1em; color: var(--ink-2); }
.legal-body ul { margin: 0 0 1em; padding-left: 1.3em; display: grid; gap: 0.45em; color: var(--ink-2); }
.legal-body li::marker { color: var(--brand-600); }
.legal-body code { padding: 1px 6px; border-radius: 6px; background: var(--enamel); font-size: 0.9em; }
.legal-updated { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--space-5) !important; padding: 6px 14px; border-radius: 999px; background: var(--enamel); color: var(--muted) !important; font-size: 0.92rem; font-weight: 600; }
.legal-lead { font-size: 1.12rem; color: var(--ink) !important; }
.legal-note { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 var(--space-5); padding: 14px 16px; border-radius: 14px; background: #fff6e0; color: #6b4300; }
.legal-note p { margin: 0 !important; color: inherit !important; }
.legal-note .icon { margin-top: 3px; }
.legal-contact { list-style: none; padding: 0 !important; }
.legal-contact li { display: flex; align-items: flex-start; gap: 10px; }
.legal-contact .icon { margin-top: 4px; color: var(--brand-600); }
.legal-rail__title { margin: 0; font-size: 1.2rem; font-weight: 700; color: var(--deep); }
.legal-rail__text { margin: -6px 0 0; color: var(--muted); }
.legal-rail__actions { display: grid; gap: var(--space-2); }
.legal-rail__other { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; }
@media (min-width: 1024px) {
    .legal { grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); grid-template-areas: "box rail" "body rail"; gap: var(--space-5) var(--space-7); }
    .legal-toc-box { grid-area: box; }
    .legal-body { grid-area: body; }
    .legal-rail { grid-area: rail; position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1440px) {
    .legal--toc { grid-template-columns: minmax(200px, 2.4fr) minmax(0, 6.6fr) minmax(300px, 3fr); grid-template-areas: "toc body rail"; }
    .legal--toc .legal-toc-box { display: none; }
    .legal--toc .legal-toc { display: block; grid-area: toc; position: sticky; top: calc(var(--header-h) + 24px); }
    .legal-body { justify-self: center; width: 100%; }
}
@media (min-width: 1920px) {
    .legal--toc { grid-template-columns: minmax(240px, 3fr) minmax(0, 6fr) minmax(340px, 3fr); }
}

/* ==========================================================================
   CTA band (G6) and footer (G7)
   ========================================================================== */
.cta-band {
    display: grid; gap: var(--space-6); padding: clamp(40px, 6vw, 96px) var(--gutter);
    background: radial-gradient(70% 120% at 100% 0%, rgba(20, 184, 166, 0.25), transparent 60%), var(--deep);
    color: var(--text-on-dark);
}
.cta-band h2 { margin: 0; color: #ffffff; }
.cta-band p { margin: var(--space-3) 0 0; max-width: 56ch; }
.cta-band__side { display: grid; gap: var(--space-4); align-content: center; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.cta-band__actions .btn { flex: 1 1 100%; }
@media (min-width: 480px) { .cta-band__actions .btn { flex: 0 0 auto; } }
@media (min-width: 1024px) {
    .cta-band { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
    .cta-band__side { justify-items: end; }
    .cta-band__actions { justify-content: flex-end; }
}

.site-footer { padding: clamp(40px, 5vw, 80px) var(--gutter) 0; background: var(--night); color: #b5d8d1; }
.site-footer__grid { display: grid; gap: var(--space-6) var(--gap); }
.site-footer h2 { margin: 0 0 var(--space-3); font-size: 1.05rem; color: #ffffff; }
.site-footer ul { display: grid; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #d7f2ec; text-decoration: none; }
.site-footer a:hover { color: #ffffff; text-decoration: underline; }
.footer-col ul a { display: inline-flex; align-items: center; min-height: 40px; }
.footer-about p { margin: var(--space-3) 0 0; max-width: 40ch; }
.footer-social { display: flex !important; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4) !important; }
.footer-social a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(211, 239, 233, 0.25); border-radius: 999px; }
.footer-social .icon { width: 1em; height: 1em; }
.footer-visit address { font-style: normal; margin-bottom: var(--space-2); }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; overflow-wrap: anywhere; }
.footer-contact .icon { color: var(--mint-on-dark); }
.footer-hours { width: auto; margin-top: var(--space-3); font-size: 0.94rem; }
.footer-hours th, .footer-hours td { padding: 5px 0; text-align: left; vertical-align: top; color: #b5d8d1; }
.footer-hours th { padding-right: var(--space-4); font-weight: 700; white-space: nowrap; }
.footer-hours tr.is-today th, .footer-hours tr.is-today td { color: #ffffff; }
.site-footer__bar {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-6);
    margin-top: clamp(32px, 4vw, 56px); padding: var(--space-5) 0 calc(var(--space-6) + 72px);
    border-top: 1px solid rgba(211, 239, 233, 0.12); font-size: 0.9rem;
}
.site-footer__bar p { margin: 0; }
.site-footer__bar ul { display: flex; flex-wrap: wrap; gap: 4px var(--space-5); }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
    .site-footer__grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr); }
    .site-footer__bar { padding-bottom: var(--space-6); }
}

/* ---------- Floating WhatsApp / Call (G8) ---------- */
.float-actions {
    position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45;
    display: grid; gap: var(--space-3); justify-items: end;
}
.float-btn {
    position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    color: #ffffff; text-decoration: none; box-shadow: 0 14px 28px -12px rgba(0, 0, 0, 0.5);
}
.float-btn:hover { color: #ffffff; filter: brightness(1.08); }
.float-btn .icon { width: 26px; height: 26px; }
.float-btn--wa { background: #15803d; }   /* white label: 5:1 contrast */
.float-btn--call { background: var(--brand-700); }
.float-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
body.has-bottom-bar .float-actions { bottom: calc(84px + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
    .float-btn--call { display: none; }
    .float-btn--wa { display: inline-flex; gap: 10px; width: auto; height: 52px; padding: 0 22px 0 18px; border-radius: 999px; font-weight: 700; }
    .float-btn__label { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
    body.has-bottom-bar .float-actions { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ==========================================================================
   Day 6 — Book appointment (PUB-11): steps, pick cards, calendar, free times
   Phones: one step per screen + sticky bottom bar (Back · summary · Continue).
   md: month calendar instead of the day strip. lg: step 8/12 + summary rail 4/12.
   xl: calendar and times side by side inside the step + the rail = three columns.
   ========================================================================== */
.page-band--compact { padding-block: clamp(18px, 2.6vw, 40px); }
.page-band--compact .page-band__intro { margin-top: var(--space-2); font-size: 1.04rem; }
@media (max-width: 767.98px) { .page-band--compact h1 { font-size: 1.85rem; } }
.page-band__cta-title { margin: 0; font-weight: 700; color: var(--deep); }
@media (min-width: 1024px) {
    .page-band--compact .page-band__cta { gap: 8px; padding: var(--space-4); }
    .page-band--compact .page-band__cta .status { margin-bottom: 0; }
}

.booking { position: relative; padding: clamp(16px, 2.4vw, 36px) var(--gutter) clamp(40px, 5vw, 88px); scroll-margin-top: calc(var(--header-h) + 4px); }
.booking__layout { display: grid; gap: var(--space-6); align-items: start; }
.booking__main { min-width: 0; transition: opacity 150ms var(--ease); }
.booking__notes { margin-bottom: var(--space-5); }
.book-rail { display: none; }
@media (min-width: 1024px) {
    .booking__layout { grid-template-columns: minmax(0, 8fr) minmax(300px, 4fr); gap: clamp(32px, 3vw, 64px); }
    .book-rail { display: grid; gap: var(--space-3); position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1920px) { .booking__layout { grid-template-columns: minmax(0, 9fr) minmax(360px, 3fr); } }

/* Loading between steps (booking.js): the step fades and a thin bar runs along the top */
.booking.is-busy .booking__main { opacity: 0.5; pointer-events: none; }
.booking.is-busy::before {
    content: ""; position: fixed; left: 0; top: 0; z-index: 120; width: 30%; height: 3px;
    background: var(--brand-600); animation: book-load 900ms var(--ease) infinite;
}
@keyframes book-load { from { transform: translateX(-100%); } to { transform: translateX(340%); } }

/* ---------- Progress ---------- */
.book-steps { margin-bottom: clamp(18px, 2.2vw, 32px); }
.book-steps__list { display: flex; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.book-steps__item { position: relative; flex: 1 1 0; min-width: 0; padding-top: 10px; }
.book-steps__item::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 999px; background: var(--line); }
.book-steps__item.is-done::before, .book-steps__item.is-current::before { background: var(--brand-600); }
.book-steps__link { display: flex; align-items: center; gap: 8px; min-height: 40px; color: var(--subtle); font-weight: 600; font-size: 0.95rem; text-decoration: none; }
a.book-steps__link:hover { color: var(--brand-800); }
a.book-steps__link:hover .book-steps__label { text-decoration: underline; }
.book-steps__num {
    display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
    background: var(--surface-3); color: var(--muted); font-size: 0.85rem; font-weight: 700;
}
.is-done .book-steps__num { background: var(--brand-100); color: var(--brand-800); }
.is-current .book-steps__num { background: var(--deep); color: #ffffff; }
.is-current .book-steps__link { color: var(--deep); font-weight: 700; }
.book-steps__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 767.98px) {
    /* hidden on screen, still read out ("Treatment (done — change)") — links need a name */
    .book-steps__item:not(.is-current) .book-steps__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .book-steps__item.is-current { flex-grow: 3; }
}

/* ---------- Step header, hints, empty states ---------- */
.book-step__head { margin-bottom: var(--space-5); }
.book-step__title { margin: 0; font-size: clamp(1.45rem, 0.9vw + 1.15rem, 2.05rem); color: var(--deep); }
.book-step__title:focus { outline: none; box-shadow: none; }
.book-step__lead { margin: 6px 0 0; max-width: 62ch; color: var(--muted); }
.book-hint {
    display: flex; gap: 10px; align-items: flex-start; margin: 0 0 var(--space-5); padding: 12px 16px;
    border: 1px solid var(--card-line); border-radius: 14px; background: var(--enamel); color: var(--ink-2); font-size: 0.96rem;
}
.book-hint > .icon { margin-top: 3px; color: var(--brand-700); }
.book-hint > span { min-width: 0; }
.book-hint a { font-weight: 700; }
.book-empty { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-7) var(--space-4); text-align: center; }
.book-empty > .icon { width: 40px; height: 40px; color: var(--brand-600); }
.book-empty h3 { margin: 0; font-size: 1.25rem; }
.book-empty p { margin: 0; color: var(--muted); }
.book-note { margin: 0; color: var(--muted); font-size: 0.94rem; }
.book-form { min-width: 0; }
.book-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* In-step Back / Continue (from lg — below that the bottom bar has them) */
.book-actions { display: none; }
.book-actions--start { display: flex; margin-top: var(--space-5); }
.book-actions--start .btn { white-space: normal; text-align: left; }
@media (min-width: 1024px) {
    .book-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); }
    .book-actions .btn-primary { margin-left: auto; }
    .book-actions .btn-ghost { margin-left: -12px; padding-inline: 12px; }
    .book-actions--start { border-top: 0; padding-top: 0; }
}

/* ---------- Step 1: search + chips ---------- */
.book-filter { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.book-search { max-width: 640px; }

/* ---------- Pick cards (treatments, dentists): a radio button styled as a card ---------- */
.pick-grid {
    --min: 260px; --cols: 5; --pick-gap: 12px;
    display: grid; gap: var(--pick-gap);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--min), (100% - (var(--cols) - 1) * var(--pick-gap)) / var(--cols))), 1fr));
}
.pick-grid--doc { --min: 280px; --cols: 4; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(var(--min), (100% - (var(--cols) - 1) * var(--pick-gap)) / var(--cols))), 1fr)); }
.pick {
    position: relative; display: flex; align-items: flex-start; gap: 14px; min-width: 0;
    padding: 16px 48px 16px 16px; border: 1.5px solid var(--card-line); border-radius: 16px; background: #ffffff;
    cursor: pointer; transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.pick[hidden] { display: none; }
.pick:hover { border-color: var(--brand-600); }
.pick__input { position: absolute; top: 18px; right: 18px; width: 20px; height: 20px; margin: 0; opacity: 0; }
.pick:has(.pick__input:checked) { border-color: var(--deep); background: var(--brand-50); box-shadow: inset 0 0 0 1px var(--deep); }
.pick:has(.pick__input:focus-visible) { box-shadow: var(--focus); }
.pick__check {
    position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 24px; height: 24px;
    border: 1.5px solid var(--line-strong); border-radius: 50%; background: #ffffff; color: transparent;
}
.pick__input:checked ~ .pick__check { border-color: var(--deep); background: var(--deep); color: #ffffff; }
.pick__body { display: grid; gap: 4px; min-width: 0; }
.pick__title { font-weight: 700; line-height: 1.3; color: var(--ink); }
.pick__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; color: var(--muted); font-size: 0.92rem; }
.pick__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.pick__meta .icon { color: var(--brand-600); }
.pick__price { font-weight: 700; color: var(--deep); font-variant-numeric: tabular-nums; }
.pick__sub { color: var(--muted); font-size: 0.92rem; }
/* icon + ONE text span: with large phone text the line wraps as a sentence, the icon stays in front */
.pick__days, .pick__next, .pick__away { display: flex; align-items: flex-start; gap: 6px; font-size: 0.92rem; line-height: 1.4; }
.pick__days > .icon, .pick__next > .icon, .pick__away > .icon { margin-top: 0.2em; }
.pick__days > span, .pick__next > span, .pick__away > span { min-width: 0; }
.pick__days { color: var(--ink-2); }
.pick__days .icon, .pick__next .icon { color: var(--brand-600); }
.pick__next { margin-top: 2px; color: var(--brand-800); }
.pick__next.is-none { color: var(--subtle); }
.pick__next.is-none .icon { color: var(--subtle); }
.pick__away { color: var(--warning); font-weight: 600; }
.pick__avatar { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: var(--enamel); }
.pick__avatar .doc-photo { position: absolute; inset: 0; }
.pick__avatar .doc-mono__initials { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: transparent; font-size: 1.05rem; }
.pick__avatar--any { display: grid; place-items: center; background: var(--deep); color: var(--mint-on-dark); }
.pick__avatar--any .icon { width: 26px; height: 26px; }

/* ---------- Step 3: days + times ---------- */
.when { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.when__days { min-width: 0; }
.when__label { margin: 0 0 var(--space-3); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); }
.when__legend { display: none; }
@media (min-width: 768px) {
    .when__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: var(--space-3) 0 0; font-size: 0.88rem; color: var(--muted); }
    .when__key { width: 14px; height: 14px; border-radius: 4px; }
    .when__key + .when__key, .when__legend > .when__key:not(:first-child) { margin-left: 8px; }
    .when__key--open { background: var(--brand-50); border: 1.5px solid var(--brand-200); }
    .when__key--off { background: var(--surface-2); border: 1.5px dashed var(--line-strong); }
}
@media (min-width: 1280px) {
    .when { grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr); align-items: start; gap: clamp(24px, 2.4vw, 48px); }
    .when > .book-actions { grid-column: 1 / -1; margin-top: 0; }
}
@media (min-width: 1440px) { .when { grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr); } }

/* Day strip (phones and small tablets): every bookable day, swipe sideways */
.day-strip {
    position: relative; display: flex; gap: var(--space-2); list-style: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px;
    overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-strip li { flex: none; scroll-snap-align: start; }
.day-strip__day {
    display: grid; justify-items: center; width: 4.1em; min-width: 66px; padding: 8px 4px 9px;
    border: 1.5px solid var(--card-line); border-radius: 14px; background: #ffffff;
    color: var(--ink); line-height: 1.2; text-decoration: none; font-variant-numeric: tabular-nums;
}
.day-strip__wd { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.day-strip__num { font-size: 1.4rem; font-weight: 700; color: var(--deep); }
.day-strip__mon { font-size: 0.78rem; color: var(--muted); }
.day-strip__count { margin-top: 4px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; color: var(--brand-700); }
a.day-strip__day:hover { border-color: var(--brand-600); color: var(--ink); }
.day-strip__day.is-selected { border-color: var(--deep); background: var(--deep); }
.day-strip__day.is-selected :is(.day-strip__wd, .day-strip__num, .day-strip__mon) { color: #ffffff; }
.day-strip__day.is-selected .day-strip__count { color: var(--mint-on-dark); }
.day-strip__day:not(.is-open) { border-style: dashed; background: var(--surface-2); }
.day-strip__day:not(.is-open) :is(.day-strip__num, .day-strip__count) { color: #5b6b7f; }   /* 5.2:1 on the grey (WCAG AA) */
@media (min-width: 768px) { .day-strip { display: none; } }

/* Month calendar (from md) */
.cal { display: none; }
@media (min-width: 768px) { .cal { display: block; container-type: inline-size; } }
.cal__month { padding: var(--space-4); border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; }
.cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-2); }
.cal__title { margin: 0; font-size: 1.12rem; color: var(--deep); }
.cal__nav { width: 44px; height: 44px; border-radius: 12px; }
.cal__nav.is-off { opacity: 0.35; }
.cal__grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 4px; }
.cal__grid th { padding: 4px 0; font-size: 0.8rem; font-weight: 700; text-align: center; color: var(--subtle); background: none; }
.cal__grid abbr { text-decoration: none; }
.cal__grid td { padding: 0; }
.cal__day {
    display: grid; align-content: center; justify-items: center; gap: 2px; min-height: 52px; padding: 4px 2px;
    border: 1.5px solid transparent; border-radius: 12px; color: #5b6b7f; line-height: 1.1; text-decoration: none; font-variant-numeric: tabular-nums;
}
.cal__num { font-size: 1rem; font-weight: 700; }
.cal__count { font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.cal__day.is-open { border-color: var(--brand-100); background: var(--brand-50); color: var(--ink); }
.cal__day.is-open .cal__count { color: var(--brand-700); }
a.cal__day.is-open:hover { border-color: var(--brand-600); color: var(--ink); }
.cal__day.is-selected { border-color: var(--deep); background: var(--deep); color: #ffffff; }
.cal__day.is-selected .cal__count { color: var(--mint-on-dark); }
.cal__day.is-today .cal__num { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cal__day.is-closed .cal__num { text-decoration: line-through; }
.cal__day.is-past, .cal__day.is-later { color: #64748b; font-weight: 400; }
.cal__day.is-pad { min-height: 0; }
@container (max-width: 440px) { .cal__free { display: none; } }
@container (min-width: 560px) { .cal__day { min-height: 60px; } }

/* Free times */
.when__times { min-width: 0; scroll-margin-top: calc(var(--header-h) + 16px); }
.when__times:focus { outline: none; box-shadow: none; }
.slot-panel__head { margin-bottom: var(--space-4); }
.slot-panel__title { margin: 0; font-size: 1.15rem; color: var(--deep); }
.slot-panel__meta { margin: 2px 0 0; color: var(--muted); font-size: 0.94rem; }
.slot-panel__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
.slot-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.slot-group__label { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 0; font-weight: 700; color: var(--ink-2); }
.slot-group__label .icon { color: var(--brand-600); }
.slot-group__count { padding: 0 8px; border-radius: 999px; background: var(--enamel); color: var(--muted); font-size: 0.8rem; }
/* columns in em: with large phone text the chips get wider (fewer per row) instead of the time spilling out */
.slot-grid, .slot-skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 6.4em), 1fr)); gap: var(--space-2); }
.slot { position: relative; display: block; min-width: 0; }
.slot__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.slot__text {
    display: grid; place-items: center; min-height: 48px; padding: 0 8px; border: 1.5px solid var(--card-line); border-radius: 12px;
    background: #ffffff; color: var(--ink); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums;
    transition: border-color var(--fast) var(--ease), background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.slot:hover .slot__text { border-color: var(--brand-600); color: var(--brand-800); }
.slot__input:checked + .slot__text { border-color: var(--deep); background: var(--deep); color: #ffffff; }
.slot__input:focus-visible + .slot__text { box-shadow: var(--focus); }
.slot-empty {
    display: grid; justify-items: start; gap: var(--space-3); padding: var(--space-5);
    border: 1.5px dashed var(--line-strong); border-radius: 16px; background: var(--surface-2);
}
.slot-empty > .icon { width: 32px; height: 32px; color: var(--brand-600); }
.slot-empty .btn { max-width: 100%; white-space: normal; text-align: left; }
.slot-empty__text { margin: 0; font-weight: 600; color: var(--ink-2); }
.slot-skeleton span {
    height: 48px; border-radius: 12px; background: linear-gradient(90deg, var(--surface-3) 0%, #f8fafc 50%, var(--surface-3) 100%);
    background-size: 200% 100%; animation: book-shimmer 1.1s linear infinite;
}
@keyframes book-shimmer { to { background-position: -200% 0; } }

/* ---------- Summary rail (lg+) ---------- */
.book-sum { gap: var(--space-3); }
.book-sum__title { margin: 0; font-size: 1.2rem; color: var(--deep); }
.book-sum__list { display: grid; margin: 0; }
.book-sum__row { display: grid; grid-template-columns: minmax(0, 1fr); padding: 12px 0; border-top: 1px solid var(--line); }
.book-sum__row dt { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 700; color: var(--subtle); }
.book-sum__row dt .icon { color: var(--brand-600); }
/* the "Change" link sits inside the dd (only dt/dd may be in a dl row), to the right of the value */
.book-sum__row dd { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--space-3); align-items: center; min-width: 0; margin: 2px 0 0; font-weight: 700; color: var(--ink); }
.book-sum__row dd > span, .book-sum__row dd > small { grid-column: 1; min-width: 0; }
.book-sum__row dd small { display: block; font-weight: 500; color: var(--muted); }
.book-sum__row.is-empty dd { font-weight: 500; color: #64748b; }   /* 4.6:1 (WCAG AA) */
.book-sum__change { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: inline-flex; align-items: center; min-height: 44px; font-size: 0.92rem; font-weight: 700; }
.book-sum__clinic { display: flex; gap: 8px; margin: 0; padding-top: var(--space-3); border-top: 1px solid var(--line); font-size: 0.92rem; font-weight: 700; color: var(--ink-2); }
.book-sum__clinic .icon { margin-top: 3px; color: var(--brand-600); }
.book-sum__clinic small { display: block; font-weight: 500; color: var(--muted); }
.book-rail__help { margin: 0; padding: 0 var(--space-2); color: var(--muted); font-size: 0.92rem; }

/* ---------- Bottom bar (below lg) ---------- */
.book-bar { gap: var(--space-3); }
.book-bar__back { width: 44px; height: 44px; border-radius: 12px; color: var(--ink-2); }
.book-bar__text { flex: 1; }
.book-bar__text strong, .book-bar__text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.book-bar__text strong { font-size: 0.98rem; }
.book-bar__go { flex: none; min-height: 48px; }
@media (max-width: 419.98px) {
    .book-bar { gap: var(--space-2); }
    .book-bar__text strong { font-size: 0.9rem; }
    .book-bar__text span { font-size: 0.82rem; }
    body.site .book-bar__go { padding-inline: 16px; }
}

/* ==========================================================================
   Day 7 — booking steps 4–5, confirmation page (PUB-11, PUB-12), next free time (PUB-01, G6)
   ========================================================================== */
@media (min-width: 1024px) { .hide-lg { display: none !important; } }
/* Pages with the sticky bottom bar: fields reached with Tab (or scrolled to) stop above the bar, not behind it */
@media (max-width: 1023.98px) { html:has(body.has-bottom-bar) { scroll-padding-bottom: 96px; } }
.nowrap-email { overflow-wrap: anywhere; }

/* In-step actions shown on every size (steps 4–5: the main button sits right under the form) */
.book-actions--always { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
@media (max-width: 1023.98px) {
    .book-actions--always .btn-primary { order: -1; flex: 1 1 100%; }
    .book-actions--always .btn-ghost { margin-inline: auto; }
}
@media (min-width: 1024px) { .book-actions--always { margin-top: var(--space-2); } }
.book-actions--confirm .btn-primary { flex: 1 1 100%; max-width: 460px; margin-left: 0 !important; }

/* ---------- Step 4: your details ---------- */
.details-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); container-type: inline-size; }
.details-form__fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
@container (min-width: 560px) {
    .details-form__fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .details-form__fields > .field:first-child, .details-form__fields > .span-all { grid-column: 1 / -1; }
}
@container (min-width: 960px) {
    .details-form__fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .details-form__fields > .field:first-child { grid-column: auto; }
}
.details-form .textarea { min-height: 76px; }
.consent { padding: 14px 16px; border: 1.5px solid var(--card-line); border-radius: 14px; background: var(--enamel); }
.consent.is-invalid { border-color: var(--danger); background: #fff7f7; }
.consent__check { font-size: 0.96rem; line-height: 1.5; color: var(--ink-2); }
.consent__check input { flex: none; }
.consent__check span { min-width: 0; }
.consent .field-error { margin-top: 8px; }
.details-form__privacy, .verify__rule { display: flex; align-items: flex-start; gap: 8px; }
.details-form__privacy .icon, .verify__rule .icon { flex: none; margin-top: 0.25em; color: var(--brand-600); }
.form-alert .alert { margin: 0; }

/* ---------- Step 5: verify & confirm ---------- */
.verify, .verify-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); min-width: 0; }
.verify-msg .alert { margin: 0; }
@media (min-width: 1280px) {
    .verify-form {
        grid-template-columns: minmax(0, 1.3fr) minmax(280px, 1fr); column-gap: clamp(24px, 3vw, 56px);
        grid-template-areas: "code card" "rule card" "actions card"; grid-template-rows: auto auto 1fr; align-items: start;
    }
    .verify-form > .otp, .verify-form > .verified-line { grid-area: code; }
    .verify-form > .verify__details { grid-area: card; }
    .verify-form > .verify__rule { grid-area: rule; }
    .verify-form > .book-actions { grid-area: actions; }
}
.otp { max-width: 460px; }
.otp__input {
    height: 60px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 700;
    letter-spacing: 0.45em; text-align: center; padding-left: 0.45em;
}
.otp.is-enhanced .otp__input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.otp__boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(6px, 1.6vw, 10px); }
.otp__box {
    width: 100%; min-width: 0; aspect-ratio: 5 / 6; padding: 0; border: 1.5px solid var(--line-strong); border-radius: 12px;
    background: #ffffff; color: var(--deep); font: 700 clamp(1.3rem, 5vw, 1.7rem) / 1 var(--font-site); text-align: center;
    font-variant-numeric: tabular-nums; caret-color: var(--brand-600);
    transition: border-color var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
}
.otp__box:hover { border-color: #94a3b8; }
.otp__box:focus { outline: none; border-color: var(--brand-600); box-shadow: var(--focus); }
.otp__box.is-filled { border-color: var(--deep); background: var(--brand-50); }
.otp.is-invalid .otp__box { border-color: var(--danger); }
.otp .hint strong { color: var(--warning); }
.otp .field-error { margin-top: 6px; }

.verified-line {
    display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 16px;
    border-radius: 14px; background: var(--success-bg); color: #14532d; font-weight: 700;
}
.verified-line .icon { flex: none; width: 26px; height: 26px; color: var(--success); }
.verified-line span { display: grid; min-width: 0; }
.verified-line small { font-weight: 500; overflow-wrap: anywhere; }

.resend { display: grid; margin-top: var(--space-3); color: var(--muted); font-size: 0.94rem; line-height: 1.45; }
.resend__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-4); }
.resend-form { display: none; }
.resend__timer { color: var(--subtle); font-variant-numeric: tabular-nums; }
.resend__timer:empty { display: none; }
.resend__other { display: inline-flex; align-items: center; min-height: 44px; }
.link-btn:disabled { color: var(--subtle); text-decoration: none; cursor: default; }

.verify__details {
    display: grid; gap: var(--space-3); padding: clamp(18px, 2vw, 26px);
    border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; box-shadow: 0 28px 56px -44px rgba(7, 42, 39, 0.6);
}
.verify__title { margin: 0; font-size: 1.15rem; color: var(--deep); }
.verify__list { display: grid; margin: 0; }
/* label + value on one line; with large phone text the value moves under its label instead of breaking words */
.verify__list > div, .booked-card__list > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-3); padding: 10px 0; border-top: 1px solid var(--line); }
.verify__list dt { flex: 0 0 5.6em; color: var(--muted); font-size: 0.94rem; }
.verify__list dd { flex: 1 1 10em; margin: 0; min-width: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.verify__when dd { color: var(--deep); }
.verify__change { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }

/* ---------- Confirmation page (PUB-12) ---------- */
.booked { padding-bottom: var(--section-y); }
.booked__head {
    display: flex; align-items: center; gap: clamp(14px, 2vw, 24px);
    padding: clamp(24px, 4vw, 56px) var(--gutter); background: var(--enamel); border-bottom: 1px solid var(--card-line);
}
.booked__icon { display: grid; place-items: center; flex: none; width: clamp(52px, 5vw, 76px); height: clamp(52px, 5vw, 76px); border-radius: 50%; background: var(--success); color: #ffffff; box-shadow: 0 0 0 8px rgba(21, 128, 61, 0.12); }
.booked__icon--pending { background: var(--wait); box-shadow: 0 0 0 8px rgba(217, 119, 6, 0.14); }
.booked__icon .icon { width: 52%; height: 52%; stroke-width: 2.6; }
.booked__intro { min-width: 0; }
.booked h1 { margin: 0; font-size: clamp(1.8rem, 2vw + 1.25rem, 3.2rem); color: var(--deep); }
@media (max-width: 479.98px) {
    .booked__head { flex-direction: column; align-items: flex-start; }
    .booked h1 { font-size: 1.7rem; }
}
.booked__lead { margin: 6px 0 0; max-width: 62ch; color: var(--muted); font-size: 1.08rem; }
.booked__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); padding: clamp(20px, 3vw, 48px) var(--gutter) 0; }
.booked__main, .booked__map, .booked__tips { min-width: 0; }
.booked__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-content: start; }
@media (min-width: 1024px) {
    .booked__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-areas: "main map" "main tips"; align-items: start; }
    .booked__main { grid-area: main; }
    .booked__map { grid-area: map; }
    .booked__tips { grid-area: tips; }
}
@media (min-width: 1440px) {
    .booked__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); grid-template-areas: "main map tips"; }
}
.booked-card {
    display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: clamp(18px, 2.4vw, 32px);
    border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff; box-shadow: 0 28px 56px -44px rgba(7, 42, 39, 0.6);
}
.booked-card__when { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); padding: var(--space-4); border-radius: 16px; background: var(--deep); color: #ffffff; }
.booked-card__icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border-radius: 14px; background: rgba(255, 255, 255, 0.1); color: var(--marigold); }
.booked-card__icon .icon { width: 26px; height: 26px; }
.booked-card__when p { display: grid; flex: 1 1 8em; min-width: 0; margin: 0; line-height: 1.3; overflow-wrap: anywhere; }
.booked-card__when strong { font-size: clamp(1.2rem, 0.7vw + 1rem, 1.55rem); }
.booked-card__when span { color: var(--text-on-dark); }
.booked-card__list { display: grid; margin: 0; }
.booked-card__list > div { padding: 11px 0; }
.booked-card__list dt { flex: 0 0 5.8em; color: var(--muted); }
.booked-card__list dd { flex: 1 1 10em; margin: 0; min-width: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.booked-card__list small { display: block; font-weight: 500; color: var(--muted); }
.booked-card__list > .booked-card__ref { align-items: center; }
.ref-code {
    display: inline-block; padding: 2px 10px; border-radius: 8px; background: var(--enamel-2); color: var(--deep);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.12rem; letter-spacing: 0.12em;
}
.booked-card__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
.booked-card__actions .btn { white-space: normal; text-align: center; }
@media (min-width: 480px) {
    .booked-card__actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .booked-card__actions > .btn-primary:first-child { grid-column: 1 / -1; }
}
.booked__account { margin: 0; }
.booked__change { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); }
.booked__change .icon { flex: none; margin-top: 0.3em; color: var(--brand-600); }
.booked__map { display: flex; flex-direction: column; }
.booked__map .contact-map { aspect-ratio: 16 / 10; }
@media (min-width: 1440px) { .booked__map .contact-map { aspect-ratio: 4 / 5; } }
.booked__tips { display: grid; gap: var(--space-4); align-content: start; padding: clamp(18px, 2vw, 28px); border-radius: 20px; background: var(--enamel); }
.booked__tips h2 { margin: 0; font-size: clamp(1.25rem, 0.6vw + 1.05rem, 1.55rem); color: var(--deep); }
.tips { display: grid; gap: var(--space-4); list-style: none; margin: 0; padding: 0; }
.tips li { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-2); line-height: 1.5; }
.tips li > .icon { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--brand-700); }
.tips li > span { min-width: 0; }
.tips strong { color: var(--deep); }
.booked__again { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }

/* ---------- Next free time: hero card (xl) and CTA band ---------- */
.hero-card--next { display: none !important; }
@media (min-width: 1440px) {
    .hero-card--next {
        display: grid !important; gap: 2px; right: 24px; top: 24px; min-width: 240px; padding: 14px 18px;
        color: var(--ink); text-decoration: none; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease);
    }
    .hero-card--next:hover { color: var(--ink); transform: translateY(-2px); }
    .hero-card--next .hero-card__sub { padding-left: 0; }
}
.hero-card__label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand-700); }
.hero-card--next strong { font-size: 1.25rem; color: var(--deep); }
.hero-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-weight: 700; color: var(--brand-700); }
.hero-card__go .icon { width: 1em; height: 1em; }

.cta-band__next {
    display: inline-flex; align-items: flex-start; gap: 10px; max-width: 100%; padding: 10px 14px;
    border: 1px solid rgba(211, 239, 233, 0.25); border-radius: 14px; color: var(--text-on-dark); text-decoration: none; line-height: 1.45;
}
.cta-band__next:hover { border-color: var(--mint-on-dark); color: #ffffff; }
.cta-band__next > .icon { flex: none; margin-top: 0.2em; color: var(--marigold); }
.cta-band__next > span { min-width: 0; }
.cta-band__next strong { color: #ffffff; }
@media (min-width: 1024px) { .cta-band__next { text-align: left; } }

/* ==========================================================================
   Day 6 — large phone text (Android "font size" / browser zoom, Pages doc R12–R13)
   Single-column grids get an explicit minmax(0, 1fr) track so one wide child (a table,
   a button) cannot push the page sideways, and buttons may wrap onto two lines on phones.
   ========================================================================== */
@media (max-width: 1023.98px) {
    .visit, .contact, .legal, .cta-band, .booked__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767.98px) {
    body.site .btn { max-width: 100%; white-space: normal; text-align: center; }
    .status > span:last-child { min-width: 0; }
}
@media (max-width: 479.98px) {
    .hours-table th, .hours-table td { padding: 10px 12px; }
    .hours-table th { white-space: normal; }
    .review-card__tag { white-space: normal; }
    .legal-rail__actions { grid-template-columns: minmax(0, 1fr); }
}

/* ==========================================================================
   Day 8 — manage appointment (PUB-13), reschedule picker, cancel form, cards shared with the
   patient portal (the portal loads this file too, plus patient.css for its shell)
   Stacked on phones; from lg the appointment card (5/12) beside the actions (7/12).
   ========================================================================== */
.pcard {
    --pcard-pad: clamp(18px, 2vw, 28px);
    display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: var(--space-4);
    min-width: 0; padding: var(--pcard-pad); border: 1px solid var(--card-line); border-radius: 20px; background: #ffffff;
}
.pcard__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-4); }
.pcard__title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.1rem, 0.35vw + 1rem, 1.28rem); color: var(--deep); }
.pcard__title .icon { flex: none; color: var(--brand-600); }
.pcard__more { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; text-decoration: none; }
.pcard__more:hover { text-decoration: underline; }
.pcard__muted { margin: 0; color: var(--muted); }
.pcard__small { font-size: 0.9rem; }

/* A rule / note line with an icon in front (BR-05 window, "please call") */
.prule { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.prule > .icon { flex: none; margin-top: 0.25em; color: var(--brand-600); }
.prule > span { min-width: 0; }
.prule a { font-weight: 700; white-space: nowrap; }
.prule--closed { padding: 12px 14px; border-radius: 14px; background: var(--warning-bg); color: #78350f; }
.prule--closed > .icon { color: var(--warning); }

/* ---------- Layout: card + actions ---------- */
.manage { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
.manage--site { padding: clamp(20px, 3vw, 48px) var(--gutter) var(--section-y); }
.manage__card, .manage__actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; align-content: start; }
@media (min-width: 1024px) {
    .manage { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
    .manage__card { position: sticky; top: calc(var(--header-h) + 24px); }
}
.appt-card__heading { margin: 0; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--subtle); }
.appt-card--cancelled .booked-card__when { background: var(--surface-3); color: var(--ink-2); }
.appt-card--cancelled .booked-card__when span { color: var(--muted); }
.appt-card--cancelled .booked-card__when strong { text-decoration: line-through; }
.appt-card--cancelled .booked-card__icon { background: #ffffff; color: var(--danger); }
.appt-card__links { display: flex; flex-wrap: wrap; gap: 4px var(--space-2); margin-top: -4px; }
.appt-card__links .btn { padding-inline: 10px; }
.ref-code--sm { padding: 1px 8px; font-size: 0.95rem; letter-spacing: 0.1em; }
.manage__closed { display: grid; gap: var(--space-3); padding: var(--space-4); border-radius: 16px; background: var(--enamel); }
.manage__closed-title { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-weight: 700; color: var(--deep); }
.manage__closed-title .icon { flex: none; margin-top: 0.2em; color: var(--brand-700); }
.manage__closed-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.manage__account { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--muted); font-size: 0.95rem; }
.manage__account .icon { flex: none; margin-top: 0.3em; color: var(--brand-600); }
.manage__account a { font-weight: 700; }

/* ---------- Reschedule picker (booking step 3 inside a card) ---------- */
.manage__picker { container: picker / inline-size; }
.resched { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); min-width: 0; }
.resched.is-busy { opacity: 0.55; pointer-events: none; transition: opacity 150ms var(--ease); }
.resched__note { margin: 0; }
.resched__doctors .when__label { margin-bottom: var(--space-2); }
.resched .when { grid-template-columns: minmax(0, 1fr); }
@container picker (min-width: 780px) {
    .resched .when { grid-template-columns: minmax(300px, 5fr) minmax(0, 7fr); align-items: start; gap: clamp(20px, 2.2vw, 40px); }
}
.resched__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); }
@media (max-width: 1023.98px) {
    /* chips and the day strip run to the card's edges (not the page's) */
    .resched__chips, .resched .day-strip { margin-inline: calc(-1 * var(--pcard-pad, 18px)); padding-inline: var(--pcard-pad, 18px); scroll-padding: 0 var(--pcard-pad, 18px); }
}
@media (max-width: 767.98px) {
    .resched__actions {
        position: sticky; bottom: 0; z-index: 5; margin-inline: calc(-1 * var(--pcard-pad, 18px));
        padding: 12px var(--pcard-pad, 18px) calc(12px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(8px); box-shadow: 0 -10px 24px -20px rgba(7, 42, 39, 0.5);
    }
    .resched__actions .btn-primary { flex: 1 1 100%; }
    .resched__actions .btn-ghost { margin-inline: auto; }
}
/* The appointment's own day in the calendar / day strip: a marigold dot (legend "Your visit now") */
.resched :is(.day-strip__day, .cal__day).is-yours { position: relative; }
.resched :is(.day-strip__day, .cal__day).is-yours::after {
    content: ""; position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%;
    background: var(--marigold); box-shadow: 0 0 0 2px #ffffff;
}
.resched__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: var(--space-3) 0 0; font-size: 0.88rem; color: var(--muted); }
.resched__key { display: inline-flex; align-items: center; gap: 6px; }
.resched .when__key--yours { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--marigold); }
@media (max-width: 767.98px) {
    /* phones: the day strip already says "3 free" / "Closed" — only the dot needs explaining */
    .resched__key--wide { display: none; }
    .resched__legend { margin-top: 0; }
}
/* The appointment's own time: shown, but not selectable */
.slot--own .slot__text { gap: 0; line-height: 1.1; border-style: dashed; background: var(--enamel); color: var(--muted); }
.slot--own .slot__text small { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.02em; color: var(--brand-700); }
.slot--own .slot__input { cursor: not-allowed; }
.slot--own:hover .slot__text { border-color: var(--card-line); color: var(--muted); }

/* ---------- Cancel ---------- */
.cancel-box { padding: 0; gap: 0; }
.cancel-box__summary {
    display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 var(--pcard-pad);
    list-style: none; cursor: pointer; font-weight: 700; color: var(--danger); border-radius: 20px;
}
.cancel-box__summary::-webkit-details-marker { display: none; }
.cancel-box__summary:hover { background: #fff7f7; }
.cancel-box__caret { margin-left: auto; transition: transform 150ms var(--ease); }
.cancel-box[open] .cancel-box__caret { transform: rotate(180deg); }
.cancel-box[open] .cancel-box__summary { border-radius: 20px 20px 0 0; }
.cancel-box__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 0 var(--pcard-pad) var(--pcard-pad); }
.cancel-form { gap: var(--space-4); }
.cancel-form__reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16em), 1fr)); gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cancel-form__reasons legend { margin-bottom: 8px; }
.cancel-form__reasons .field-error { grid-column: 1 / -1; }
.cancel-reason {
    display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; min-width: 0;
    border: 1.5px solid var(--card-line); border-radius: 14px; background: #ffffff; cursor: pointer; line-height: 1.35;
}
.cancel-reason:hover { border-color: var(--brand-600); }
.cancel-reason:has(input:checked) { border-color: var(--deep); background: var(--brand-50); }
.cancel-reason input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--brand-700); }
.cancel-reason span { min-width: 0; }
.cancel-form__reasons.has-error .cancel-reason { border-color: #fecaca; }
.cancel-form .textarea { min-height: 72px; }
.cancel-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

/* ---------- Manage link that opens nothing (404) ---------- */
.link-invalid { display: grid; justify-items: center; gap: var(--space-4); padding: clamp(48px, 8vw, 120px) var(--gutter); text-align: center; background: var(--enamel); }
.link-invalid__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #ffffff; color: var(--brand-700); box-shadow: 0 18px 40px -24px rgba(7, 42, 39, 0.5); }
.link-invalid__icon .icon { width: 36px; height: 36px; }
.link-invalid h1 { margin: 0; max-width: 24ch; font-size: clamp(1.7rem, 2vw + 1.2rem, 2.8rem); color: var(--deep); }
.link-invalid__lead { margin: 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; }
.link-invalid__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-3); }

/* Confirmation page of a booking cancelled later */
.booked__icon--cancelled { background: var(--danger); box-shadow: 0 0 0 8px rgba(185, 28, 28, 0.12); }

/* Header: "My account" when a patient is logged in (Login link otherwise) */
.site-header__login.is-account .icon { color: var(--brand-700); }

/* ==========================================================================
   Day 15 — Demo logins (PUB-16, /demo)
   phones: stacked · md: role cards 3 across · lg: tour as a row of step cards · xl: pitch beside the tour
   ========================================================================== */
.demo-band__eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 var(--space-3); font-size: 0.9rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-700); }
.demo-band h1 { max-width: 22ch; }
.demo-band__reset {
    display: flex; align-items: flex-start; gap: 12px; padding: var(--space-4) var(--space-5);
    border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; min-width: 0;
}
.demo-band__reset > .icon { flex: none; width: 28px; height: 28px; color: var(--brand-700); }
.demo-band__reset-title { margin: 0; font-weight: 700; color: var(--deep); }
.demo-band__reset-text { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 1024px) { .demo-band__reset { width: 340px; } }

.demo-roles-section { display: grid; gap: var(--gap); }
.demo-roles { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); list-style: none; margin: 0; padding: 0; }
@media (min-width: 1024px) { .demo-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.demo-role {
    container-type: inline-size; container-name: demorole; min-width: 0;
    padding: clamp(20px, 2vw, 32px); border: 1px solid var(--card-line); border-radius: 22px; background: #ffffff;
    box-shadow: 0 24px 48px -40px rgba(7, 42, 39, 0.6);
}
.demo-role__in { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr auto; gap: var(--space-4); height: 100%; min-width: 0; }
.demo-role__access { display: grid; gap: var(--space-4); min-width: 0; }
/* A wide card (one per row on tablets): the login box sits beside the text */
@container demorole (min-width: 600px) {
    .demo-role__in { grid-template-columns: minmax(0, 1fr) minmax(240px, 300px); grid-template-rows: auto auto 1fr; column-gap: var(--space-6); }
    .demo-role__access { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}
.demo-role__head { display: flex; align-items: center; gap: 14px; min-width: 0; }
.demo-role__head > div { min-width: 0; }
.demo-role__icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--tone-bg, var(--enamel)); color: var(--tone-ink, var(--brand-700)); }
.demo-role__icon .icon { width: 26px; height: 26px; }
.demo-role--admin  { --tone-bg: #e1f4ee; --tone-ink: #0f766e; }
.demo-role--doctor { --tone-bg: #e3eefc; --tone-ink: #1d4ed8; }
.demo-role--patient { --tone-bg: #fdecdf; --tone-ink: #b4541a; }
.demo-role__title { margin: 0; }
.demo-role__who { margin: 2px 0 0; color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.demo-role__intro { margin: 0; font-weight: 600; color: var(--ink-2); }
.demo-role__try { display: grid; gap: 10px; align-content: start; list-style: none; margin: 0; padding: 0; }
.demo-role__try li { display: flex; gap: 10px; min-width: 0; color: var(--ink-2); line-height: 1.45; }
.demo-role__try .icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--open); }
.demo-role__try span { min-width: 0; }
.demo-role__login { display: grid; gap: 6px; margin: 0; padding: var(--space-3) var(--space-4); border-radius: 14px; background: var(--enamel); }
.demo-role__login div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.demo-role__login dt { flex: 0 0 5.6em; color: var(--muted); font-size: 0.9rem; }
.demo-role__login dd { flex: 1 1 12em; margin: 0; min-width: 0; }
.demo-role__login code { font-size: 0.85rem; color: var(--deep); overflow-wrap: anywhere; }
.demo-role__form { margin: 0; }
.demo-role__form .btn { white-space: normal; text-align: center; min-height: 48px; height: auto; padding-block: 10px; }
.demo-role__missing { display: flex; gap: 10px; margin: 0; color: var(--muted); }
.demo-role__missing .icon { flex: none; margin-top: 3px; }

.demo-know { padding: var(--space-5) clamp(20px, 2vw, 32px); border-radius: 18px; background: var(--enamel); border: 1px solid var(--card-line); }
.demo-know h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 var(--space-3); }
.demo-know h3 .icon { color: var(--brand-700); }
.demo-know ul { display: grid; gap: 8px; margin: 0; padding-left: 1.2em; color: var(--ink-2); }
@media (min-width: 1280px) { .demo-know ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); padding-left: 0; list-style: none; } }

.demo-lower { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); background: var(--enamel); }
/* Six steps fill whole rows (1 → 2 → 3 → 6 columns from 2400); the closing step spans the row below. */
.demo-tour__steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); list-style: none; margin: 0; padding: 0; }
.demo-step--last { grid-column: 1 / -1; }
@media (min-width: 640px) { .demo-tour__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .demo-tour__steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.demo-step {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-content: start; align-items: center; gap: 6px 12px; min-width: 0;
    padding: var(--space-4) var(--space-4) var(--space-5); border-radius: 18px; background: #ffffff; border: 1px solid var(--card-line);
}
.demo-step h3, .demo-step p { grid-column: 1 / -1; }
.demo-step__num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--deep); color: #ffffff; font-weight: 700; }
.demo-step__time { font-size: 0.85rem; font-weight: 700; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.demo-step h3 { margin: 6px 0 0; font-size: 1.05rem; }
.demo-step p { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }

.demo-pitch {
    display: grid; align-content: start; gap: var(--space-4); padding: clamp(24px, 3vw, 40px); border-radius: 24px; min-width: 0;
    background: radial-gradient(70% 120% at 100% 0%, rgba(20, 184, 166, 0.25), transparent 60%), var(--deep); color: var(--text-on-dark);
}
.demo-pitch :focus-visible { box-shadow: 0 0 0 3px var(--marigold); }
.demo-pitch__eyebrow { margin: 0; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mint-on-dark); }
.demo-pitch h2 { margin: 0; color: #ffffff; }
.demo-pitch p { margin: 0; max-width: 56ch; }
.demo-pitch__facts { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.demo-pitch__facts li { display: flex; gap: 10px; min-width: 0; }
.demo-pitch__facts .icon { flex: none; margin-top: 3px; color: var(--mint-on-dark); }
.demo-pitch__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.demo-pitch__actions .btn { flex: 1 1 100%; }
@media (min-width: 480px) { .demo-pitch__actions .btn { flex: 0 0 auto; } }
@media (min-width: 1440px) {
    .demo-lower { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
}
@media (min-width: 1920px) { .demo-lower { grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); } }
@media (min-width: 2400px) { .demo-tour__steps { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.demo-step--last { background: var(--brand-50); border-color: var(--brand-200); }

/* Booking step 4 / contact form: the demo note (Day 15) */
.demo-note { display: flex; gap: 10px; margin: 0; padding: 12px 14px; border-radius: 14px; background: #fff7e6; border: 1px solid #f4d9a6; color: #5c3d00; font-size: 0.95rem; line-height: 1.45; }
.demo-note .icon { flex: none; margin-top: 2px; color: #b45309; }
.demo-note span { min-width: 0; }

/* ==========================================================================
   Day 16 — Smile gallery (PUB-05), blog (PUB-07, PUB-08), FAQ (PUB-09) + the Home teasers and the service page's "Results"
   ========================================================================== */

/* ---------- Before / after card: gallery, Home, service "Results" ---------- */
/* Without JavaScript: the two pictures side by side. With site.js (.ba.is-ready): one frame, "after" underneath,
   "before" cut at the handle (--pos), a 44 px handle; the range input under it is the keyboard / screen-reader control. */
.ba-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; }
.ba { --pos: 50%; position: relative; }
.ba__pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; background: var(--card-line); }
.ba__side { position: relative; margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--enamel); }
.ba__side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__tag {
    position: absolute; left: 8px; bottom: 8px; z-index: 3; padding: 1px 10px; border-radius: 999px;
    background: rgba(7, 42, 39, 0.8); color: #ffffff; font-size: 0.8rem; font-weight: 700; line-height: 1.7; pointer-events: none;
}
.ba.is-ready .ba__pair {
    position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; gap: 0;
    touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.ba.is-ready .ba__side { position: absolute; inset: 0; aspect-ratio: auto; }
.ba.is-ready .ba__side--before { z-index: 1; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba.is-ready .ba__tag--after { left: auto; right: 8px; }
.ba.is-ready .ba__side img { pointer-events: none; -webkit-user-drag: none; }
.ba__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; display: flex; justify-content: center; width: 44px; margin-left: -22px; pointer-events: none; }
.ba__handle::before { content: ""; width: 3px; height: 100%; background: #ffffff; box-shadow: 0 0 0 1px rgba(7, 42, 39, 0.2), 0 0 14px rgba(7, 42, 39, 0.35); }
.ba__knob {
    position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: #ffffff; color: var(--deep); box-shadow: 0 8px 20px -8px rgba(7, 42, 39, 0.7); transform: translate(-50%, -50%);
    transition: transform 120ms var(--ease);
}
.ba__knob .icon { width: 22px; height: 22px; }
.ba.is-dragging .ba__knob { transform: translate(-50%, -50%) scale(1.08); }
.ba:focus-within .ba__knob { box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px var(--brand-700); }
.ba__control { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ba-card__body { display: grid; align-content: start; gap: 4px; padding: 14px 18px 18px; }
.ba-card__cat { margin: 0; font-size: 0.85rem; font-weight: 700; color: var(--brand-700); }
.ba-card__cat a { color: inherit; text-decoration: none; }
.ba-card__cat a:hover { text-decoration: underline; }
.ba-card__title { margin: 0; font-size: 1.12rem; line-height: 1.3; letter-spacing: -0.01em; }
.ba-card__desc { margin: 0; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .ba__knob { transition: none; } }

/* Gallery page: chips, then grid (340 px, 5) — 1 → 2 (640) → 3 (1024) → 4 (1440) → 5 (2200) */
.gallery-page { display: grid; gap: var(--space-6); padding-top: clamp(24px, 3vw, 56px); }
.gallery-page > .chips { margin-bottom: calc(-1 * var(--space-3)); }
.ba-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
@media (min-width: 640px) { .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1440px) { .ba-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 2200px) { .ba-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.gallery-next {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4);
    padding: var(--space-5); border: 1px solid var(--card-line); border-radius: 18px; background: var(--enamel);
}
.gallery-next p { margin: 0; min-width: 0; }
.gallery-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; color: var(--muted); font-size: 0.95rem; }
.gallery-note .icon { flex: none; margin-top: 3px; color: var(--brand-600); }

/* Home "Smile gallery": swipe row below 1024, then rows of 3 (6 across from 1920 when there are 6) */
.home-gallery { background: var(--enamel); }
.ba-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 84%); gap: var(--space-4);
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain;
}
.ba-row > * { scroll-snap-align: start; }
@media (min-width: 640px) { .ba-row { grid-auto-columns: minmax(280px, 46%); } }
@media (min-width: 1024px) {
    .ba-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; overflow: visible; }
}
@media (min-width: 1920px) { .ba-row--n6 { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

/* Service page "Results" */
.ba-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--space-4); }
.svc-note--top { margin: 0 0 var(--space-5); }
.svc-more { margin: var(--space-4) 0 0; }
.svc-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 700; }

/* ---------- Blog list (PUB-07) ---------- */
.blog-page { display: grid; gap: clamp(28px, 3vw, 48px); padding-top: clamp(24px, 3vw, 56px); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin: 0; color: var(--subtle); font-size: 0.9rem; }
.post-feature { display: grid; overflow: hidden; border: 1px solid var(--card-line); border-radius: 24px; background: #ffffff; }
.post-feature__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--enamel); color: var(--brand-600); }
.post-feature__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-feature__body { display: grid; align-content: center; justify-items: start; gap: var(--space-3); padding: clamp(20px, 3vw, 56px); min-width: 0; }
.post-feature__eyebrow { margin: 0; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brand-700); }
.post-feature__title { margin: 0; font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.7rem); line-height: 1.15; }
.post-feature__title a { color: var(--deep); text-decoration: none; }
.post-feature__title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-feature__excerpt { margin: 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; }
.post-feature .btn { margin-top: var(--space-2); }
@media (min-width: 1024px) {
    .post-feature { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
    .post-feature__media { aspect-ratio: auto; min-height: 380px; }
}
.blog-page__more { margin: 0 0 calc(-1 * var(--space-3)); font-size: clamp(1.3rem, 0.8vw + 1.1rem, 1.75rem); }

/* Posts grid (300 px, 5); a short list (under 4) fills the row */
.post-grid {
    --min: 300px; --cols: 5;
    display: grid; gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(min(100%, max(var(--min), (100% - (var(--cols) - 1) * var(--gap)) / var(--cols))), 1fr));
}
.post-grid--few { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }

.post-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--card-line); border-radius: 18px; background: #ffffff; }
.post-card:hover { border-color: var(--brand-200); }
.post-card__media { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--enamel); color: var(--brand-600); }
.post-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 300ms var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__tile { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }
.post-card__tile .icon { width: 40px; height: 40px; stroke-width: 1.6; }
.post-card__body { display: grid; align-content: start; gap: 8px; padding: 16px 18px 20px; }
.post-card__title { margin: 0; font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.01em; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.post-card__title a:hover { color: var(--brand-800); text-decoration: underline; }
.post-card__title a:focus-visible { outline: none; box-shadow: none; }
.post-card:has(.post-card__title a:focus-visible) { box-shadow: var(--focus); border-color: var(--brand-600); }
.post-card__excerpt { margin: 0; color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .post-card__media img { transition: none; } }

/* Home "Dental care tips" + "Keep reading": swipe row below 1024, then 3 / 4 across (4 posts: 2 × 2 until 1440) */
.post-row {
    display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 82%); gap: var(--space-4);
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 12px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); overscroll-behavior-x: contain;
}
.post-row > * { scroll-snap-align: start; }
@media (min-width: 640px) { .post-row { grid-auto-columns: minmax(260px, 46%); } }
@media (min-width: 1024px) {
    .post-row { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin: 0; padding: 0; overflow: visible; }
    .post-row--n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .post-row--n1 { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
}
@media (min-width: 1440px) { .post-row--n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- Blog post (PUB-08) ---------- */
.post-preview {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
    padding: 10px var(--gutter); background: var(--deep); color: var(--text-on-dark);
}
.post-preview p { margin: 0; }
.post-preview strong { color: #ffffff; }
.post-hero { padding: clamp(20px, 3vw, 56px) var(--gutter) clamp(24px, 3vw, 48px); background: var(--enamel); }
.post-hero h1 { margin: 0; max-width: 26ch; font-size: clamp(2rem, 2.3vw + 1.25rem, 3.6rem); color: var(--deep); }
.post-meta--hero { margin-top: var(--space-4); font-size: 0.98rem; color: var(--muted); }
.post-hero__lead { margin: var(--space-4) 0 0; max-width: 62ch; color: var(--ink-2); font-size: clamp(1.08rem, 0.4vw + 1rem, 1.25rem); }
.post-cover { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--enamel); }
.post-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .post-cover { aspect-ratio: 21 / 9; max-height: 74vh; } }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-7); padding: clamp(28px, 3.5vw, 64px) var(--gutter) var(--section-y); }
.post-toc { display: none; }
.post-main { min-width: 0; }
.post-rail { display: grid; gap: var(--space-5); align-content: start; min-width: 0; }
.post-rail__title { margin: 0; font-size: 1.15rem; font-weight: 700; color: var(--deep); letter-spacing: -0.01em; }
.post-rail__text { margin: -6px 0 0; color: var(--muted); font-size: 0.95rem; }
@media (min-width: 1024px) {
    .post-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); align-items: start; gap: clamp(32px, 4vw, 72px); }
    .post-rail { position: sticky; top: calc(var(--header-h) + 24px); }
}
@media (min-width: 1440px) {
    .post-layout--toc { grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) minmax(290px, 340px); }
    .post-layout--toc .post-toc { display: block; position: sticky; top: calc(var(--header-h) + 24px); }
    .post-layout--toc .post-toc-box { display: none; }
}
/* 2xl: the article stays ~72 characters wide in the middle; the menu and the rail take the rest */
@media (min-width: 1920px) {
    .post-layout, .post-layout--toc { grid-template-columns: minmax(220px, 1fr) minmax(0, 76ch) minmax(320px, 1fr); }
    .post-layout:not(.post-layout--toc) .post-main { grid-column: 2; }
    .post-toc { justify-self: end; width: min(100%, 300px); }
    .post-rail { justify-self: start; width: min(100%, 420px); }
}
.post-toc ol { display: grid; list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.post-toc a { display: flex; align-items: center; min-height: 40px; margin-left: -2px; padding: 4px var(--space-4); border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 600; line-height: 1.35; }
.post-toc a:hover { color: var(--brand-800); }
.post-toc a.is-current { border-left-color: var(--brand-600); color: var(--deep); }
.post-toc-box { margin-bottom: var(--space-6); border: 1px solid var(--card-line); border-radius: 16px; background: var(--enamel); }
.post-toc-box summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 52px; padding: 10px 18px; list-style: none; cursor: pointer; font-weight: 700; }
.post-toc-box summary::-webkit-details-marker { display: none; }
.post-toc-box[open] .faq__chevron { transform: rotate(180deg); }
.post-toc-box ol { margin: 0; padding: 0 18px 16px 2.4em; display: grid; gap: 4px; }
.post-toc-box a { display: inline-flex; min-height: 36px; align-items: center; color: var(--brand-800); font-weight: 600; }

/* The article: cleaned HTML (p, h2–h4, lists, quotes, links, code) */
.article { max-width: 72ch; color: var(--ink-2); font-size: clamp(1.03rem, 0.25vw + 0.98rem, 1.15rem); line-height: 1.75; overflow-wrap: break-word; }
.article > :first-child { margin-top: 0; }
.article > :last-child { margin-bottom: 0; }
.article p, .article ul, .article ol, .article blockquote, .article pre { margin: 0 0 1.1em; }
.article h2, .article h3, .article h4 { color: var(--deep); scroll-margin-top: calc(var(--header-h) + 24px); }
.article h2 { margin: 1.8em 0 0.6em; font-size: clamp(1.4rem, 0.8vw + 1.15rem, 1.9rem); line-height: 1.2; }
.article h3 { margin: 1.5em 0 0.5em; font-size: clamp(1.15rem, 0.4vw + 1.05rem, 1.35rem); line-height: 1.3; }
.article h4 { margin: 1.3em 0 0.4em; font-size: 1.05rem; }
.article ul, .article ol { padding-left: 1.4em; }
.article li + li { margin-top: 0.45em; }
.article li::marker { color: var(--brand-600); font-weight: 700; }
.article a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.article a:hover { color: var(--brand-800); }
.article strong, .article b { color: var(--ink); }
.article blockquote { padding: 14px 20px; border-left: 4px solid var(--brand-500); border-radius: 0 14px 14px 0; background: var(--enamel); color: var(--ink); }
.article blockquote > :last-child { margin-bottom: 0; }
.article hr { margin: 2em 0; border: 0; border-top: 1px solid var(--line); }
.article code { padding: 0.1em 0.35em; border-radius: 6px; background: var(--enamel); font-family: var(--font-mono); font-size: 0.9em; }
.article pre { overflow-x: auto; padding: 14px 16px; border-radius: 12px; background: #0b1f1d; color: #e2f3ef; font-size: 0.9em; line-height: 1.55; }
.article pre code { padding: 0; background: none; color: inherit; }
.post-updated { margin: var(--space-5) 0 0; color: var(--subtle); font-size: 0.92rem; }
.post-share { display: grid; gap: var(--space-3); max-width: 72ch; margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--line); }
:where(body.site) .post-share__title { margin: 0; font-size: 1.05rem; }
.post-treatments { display: grid; gap: var(--space-3); }
.post-treatments__list { display: grid; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.post-treatment {
    display: flex; align-items: center; gap: var(--space-3); min-height: 60px; padding: 8px 12px;
    border: 1px solid var(--card-line); border-radius: 14px; background: #ffffff; color: var(--ink); text-decoration: none;
}
.post-treatment:hover { border-color: var(--brand-600); color: var(--brand-800); }
.post-treatment__text { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.post-treatment__text small { color: var(--subtle); font-variant-numeric: tabular-nums; }
.post-treatment > .icon { flex: none; color: var(--subtle); }
.post-related { background: var(--enamel); }

/* ---------- FAQ (PUB-09) ---------- */
/* phones: search → count → topic chips (scroll) → questions → help · from lg: topics 3 | search + questions 6 | help 3 */
.faq-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: clamp(24px, 3vw, 56px) var(--gutter) var(--section-y); }
.faq-search { display: flex; gap: var(--space-2); }
.faq-search .svc-search__box { flex: 1; }
.faq-count { margin: 0; color: var(--muted); }
.faq-count:empty { display: none; }
.faq-topics__title { display: none; }
.faq-topics__list {
    display: flex; gap: var(--space-2); list-style: none;
    margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter);
    overflow-x: auto; scrollbar-width: none; scroll-padding: 0 var(--gutter);
}
.faq-topics__list::-webkit-scrollbar { display: none; }
.faq-topic {
    flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border: 1px solid var(--card-line); border-radius: 999px; background: #ffffff;
    color: var(--ink-2); font-weight: 700; text-decoration: none; white-space: nowrap;
}
.faq-topic:hover { border-color: var(--brand-600); color: var(--brand-800); }
.faq-topic.is-active { border-color: var(--deep); background: var(--deep); color: #ffffff; }
.faq-topic.is-active .chip__count { background: rgba(255, 255, 255, 0.16); color: #ffffff; }
.faq-main { display: grid; gap: clamp(32px, 3vw, 48px); min-width: 0; }
.faq-group[hidden], .faq[hidden] { display: none; }
.faq-group__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px var(--space-4); margin-bottom: var(--space-4); }
:where(body.site) .faq-group__head h2 { margin: 0; font-size: clamp(1.35rem, 0.8vw + 1.1rem, 1.8rem); }
.faq-group__links { margin: 0; color: var(--subtle); font-weight: 600; }
.faq-group__links a { display: inline-flex; align-items: center; min-height: 44px; }
.faq-page .faq-list { max-width: none; }
.faq-empty { display: grid; justify-items: center; gap: var(--space-3); padding: var(--space-6) var(--space-4); border: 1px dashed var(--card-line); border-radius: 18px; text-align: center; }
.faq-empty[hidden] { display: none; }
.faq-empty > .icon { width: 36px; height: 36px; color: var(--brand-600); }
.faq-empty p { margin: 0; color: var(--muted); }
.faq-help { min-width: 0; margin-top: var(--space-5); }
@media (min-width: 1024px) {
    .faq-page {
        grid-template-columns: minmax(200px, 3fr) minmax(0, 6fr) minmax(270px, 3fr);
        grid-template-areas: "topics search help" "topics count help" "topics main help";
        grid-template-rows: auto auto 1fr; align-items: start; column-gap: clamp(24px, 3vw, 56px);
    }
    .faq-search { grid-area: search; }
    .faq-count { grid-area: count; }
    .faq-topics {
        grid-area: topics; position: sticky; top: calc(var(--header-h) + 24px);
        max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
    }
    .faq-main { grid-area: main; }
    .faq-help { grid-area: help; position: sticky; top: calc(var(--header-h) + 24px); margin-top: 0; }
    .faq-topics__title { display: block; margin: 0 0 var(--space-2); font-size: 0.9rem; font-weight: 700; color: var(--subtle); }
    .faq-topics__list { display: grid; gap: 2px; margin: 0; padding: 0; overflow: visible; border-left: 2px solid var(--line); }
    .faq-topic {
        justify-content: space-between; width: 100%; min-height: 44px; margin-left: -2px; padding: 6px var(--space-4);
        border: 0; border-left: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted);
        white-space: normal; line-height: 1.3;
    }
    .faq-topic:hover { background: var(--enamel); }
    .faq-topic.is-active { border-left-color: var(--brand-600); background: var(--enamel); color: var(--deep); }
    .faq-topic.is-active .chip__count { background: #ffffff; color: var(--muted); }
}

/* ---------- Print: just the content ---------- */
@media print {
    .demo-bar, .infobar, .site-header, .drawer, .float-actions, .bottom-bar, .cta-band, .quickbook, .svc-rail, .svc-toc, .book-steps,
    .portal-top, .portal-side, .ptabs, .resched, .cancel-box, .post-rail, .post-toc, .post-toc-box, .post-share, .post-preview,
    .faq-topics, .faq-search, .faq-help { display: none !important; }
    body.has-bottom-bar { padding-bottom: 0; }
}
