/* Specialty layouts extend the homepage's care components and illustrations. */
body.specialty-page { padding-bottom: 0; background: #fbfdfc; }
.family-page {
    --care-ink: #174b50;
    --care-text: #405c5e;
    --care-teal: #286e73;
    --care-mint: #edf5f2;
    --care-paper: #fbfdfc;
    --care-line: #ccdfda;
    color: var(--care-text);
}
.family-section { padding: clamp(40px, 6vw, 80px) clamp(16px, 4vw, 48px); }
.family-page [id] { scroll-margin-top: 16px; }
.family-page p { max-width: 65ch; }
.family-page .care-eyebrow {
    margin: 0 0 12px;
    color: var(--care-teal);
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.5;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}
.family-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0; list-style: none; font-size: 0.875rem; }
.family-breadcrumb li + li::before { content: "/"; margin-right: 12px; color: #6b8584; }
/* The timetable stays full width below the responsive hero band. */
.family-page .specialty-detail__hero-layout {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: clamp(20px, 3vw, 32px);
    padding-block: clamp(18px, 2.6vw, 32px);
}
.poz-hero { container: poz-hero / inline-size; }
.poz-hero__overview {
    display: grid;
    grid-template-columns: clamp(4.5rem, 23cqi, 8.5rem) minmax(0, 1fr);
    grid-template-areas:
        "art heading"
        "actions actions"
        "funding funding";
    gap: clamp(0.875rem, 2cqi, 1.5rem);
    min-width: 0;
}
.poz-hero__heading {
    grid-area: heading;
    align-self: center;
    min-width: 0;
}
.family-page .poz-hero__heading .care-eyebrow { margin-bottom: 8px; }
.family-page .poz-hero__heading h1 {
    margin: 0;
    font-size: clamp(2rem, 3.8cqi, 3.25rem);
    line-height: 1.13;
}
.poz-hero__stethoscope {
    grid-area: art;
    display: block;
    align-self: center;
    width: min(100%, 8.5rem);
    height: auto;
}
.family-page .poz-hero__actions {
    grid-area: actions;
    margin: 0;
}
.poz-hero__funding { grid-area: funding; }
.family-page .poz-hero__actions,
.poz-hero__funding {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 0.625rem;
    min-width: 0;
}
.family-page .poz-hero__actions .patient-cta-pair__link {
    width: 100%;
    justify-content: center;
}
.poz-hero__funding .pricing-ui__category-link--art {
    display: grid;
    place-items: center;
    min-height: 3rem;
    padding: 0;
    border: 0;
    background: transparent;
    text-decoration: none;
}
.poz-hero__funding .pricing-ui__category-link--art:is(:hover, :focus-visible, :active) {
    background: transparent;
    text-decoration: none;
}
.poz-hero__funding .pricing-ui__category-link--art img {
    display: block;
    width: min(100%, 15rem);
    height: auto;
}
@container poz-hero (width >= 36rem) {
    .poz-hero__overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "art heading"
            "actions funding";
    }
    .poz-hero__stethoscope {
        justify-self: center;
        width: min(100%, 11.75rem);
    }
}
@container poz-hero (width >= 62rem) {
    .poz-hero__overview {
        grid-template-columns: minmax(7.5rem, 11.75rem) minmax(0, 1.35fr) minmax(12rem, 1fr) minmax(11rem, 1fr);
        grid-template-areas: "art heading actions funding";
    }
}
/* Keep the hero and admissions bands distinct without a large nested card. */
.poz-hero__admissions {
    min-width: 0;
    padding-block-start: clamp(16px, 2vw, 24px);
    border-top: 1px solid var(--care-line);
}
.poz-hero__admissions h2 { margin:0 0 12px; color:var(--care-ink); font-size:clamp(1.3rem,2.2vw,1.75rem); line-height:1.25; }
.family-page .poz-hero__admissions p:not(.care-eyebrow) { margin:0 0 16px; line-height:1.6; }
.poz-hero__admissions a { display:inline-flex; align-items:center; min-height:44px; color:var(--care-ink); font-weight:700; text-underline-offset:4px; text-decoration:underline; overflow-wrap:anywhere; }
.family-page .family-breadcrumb a { color: var(--care-text); text-underline-offset: 4px; }
.family-diagnostics { background: #f1f6f4; }
.family-diagnostics > .care-container > .care-heading { max-width: 48rem; }
.family-diagnostics__columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); margin-top: 36px; }
.family-diagnostics__columns > div { border-top: 1px solid #b9d1ca; padding-top: 24px; }
.family-diagnostics h3 { margin: 0 0 16px; color: var(--care-ink); font-size: 1.5rem; font-weight: 600; line-height: 1.3; }
.family-diagnostics p { margin: 0 0 20px; }
.family-tests { margin: 24px 0; }
.family-tests > div { display: grid; grid-template-columns: minmax(0, min(8rem, 35%)) minmax(0, 1fr); gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--care-line); }
.family-tests dt { color: var(--care-ink); font-weight: 600; }
.family-tests dd { margin: 0; line-height: 1.6; }
.family-page .family-note { margin: 20px 0 0; font-size: 0.875rem; line-height: 1.65; }
.family-page .family-text-link { display: inline-block; padding-block: 10px; color: var(--care-ink); font-weight: 600; text-underline-offset: 5px; }
.family-page :focus-visible { outline: 3px solid #8a4b00; outline-offset: 5px; }
@media (max-width: 767px) {
    .family-diagnostics__columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 399px) {
    .family-tests > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}

/* POZ availability: the normal page shows source-attributed historical hours until approved operational doctor hours replace them. */
.poz-schedule { background:var(--care-paper);padding-block:clamp(32px,5vw,64px) }
.poz-schedule__grid { display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr));gap:20px;margin-top:24px }
.poz-schedule__card { min-width:0;padding:clamp(18px,2.6vw,28px);border:1px solid var(--care-line);border-radius:16px;background:#f1f6f4 }
.poz-schedule__card h3 { margin:0 0 16px;font-size:clamp(1.25rem,2.4vw,1.5rem);color:var(--care-ink);overflow-wrap:anywhere }
.poz-schedule__role { margin:0 0 8px;font-weight:700;color:var(--care-ink) }
.poz-schedule__slots { padding:0;margin:0;list-style:none }
.poz-schedule__slots li { display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 16px;border-top:1px solid var(--care-line);padding-block:12px }
.poz-schedule__day,.poz-schedule__hours { color:var(--care-ink);font-weight:700 }
/* Time ranges may wrap within narrow cards, including under enlarged text. */
.poz-schedule__hours { white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums }
.poz-schedule__detail { display:block;flex-basis:100%;line-height:1.5 }
.poz-schedule__exceptions { margin-top:16px;border-top:1px solid var(--care-line);padding-top:12px }
.poz-schedule__exceptions dt { font-weight:700;color:var(--care-ink) }
.poz-schedule__exceptions dd { margin:4px 0 12px }
.poz-schedule__card .poz-schedule__verified { margin:16px 0 0;font-size:0.9375rem }
@media(max-width:399px) {
 .poz-schedule__slots li { display:block;overflow-wrap:anywhere }
 .poz-schedule__hours { display:block;margin-top:4px }
 .poz-schedule__card,.poz-schedule__verified,.poz-schedule__exceptions { overflow-wrap:anywhere }
}


/* Narrow POZ page: enlarged root text must reflow in the page and fixed header.
   This does not reduce text size, alter the navbar algorithm or hide overflow. */
@media (max-width: 767px) {
    .specialty-page .site-header :is(.brand, .header-actions, .header-cta, .contact-bar__link) {
        min-width: 0;
        flex-shrink: 1;
    }
    .specialty-page .site-header :is(.brand-name, .header-cta, .contact-bar__link) {
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .specialty-page .family-page :is(h1, h2, h3, p, li, dt, dd, a) {
        overflow-wrap: anywhere;
    }
}

/* POZ page layout must respond to available column width at enlarged root
   typography, including just above the 767px viewport breakpoint. */
@media (min-width: 768px) {
    .specialty-page .family-page :is(
        .family-diagnostics__columns,
        .appointments__options
    ) {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
    }
}
.specialty-page .family-page :is(h1, h2, h3, p, li, dt, dd, a) {
    overflow-wrap: anywhere;
}

/* A43-01: when the fixed POZ header grows under text enlargement, give it an
   independently keyboard-scrollable area instead of obscuring the document.
   40dvh leaves a usable main-content viewport even on 320x360 displays.
   The shared navbar's measured --header-height follows the capped border box.
   The no-JS fallback must also cap the reserved body/fragment scroll offset. */
html:has(body.specialty-page) { --header-height: min(10rem, 40dvh); }
body.specialty-page .site-header {
    max-height: 40vh;
    max-height: 40dvh;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
}
/* A fixed disclosure is not clipped by the header's own scrollport. The
   existing menu height calculation still uses the measured header reserve. */
body.specialty-page .site-header .main-navigation {
    position: fixed;
    top: var(--header-height);
}

/* Keep the icons and spacing compact so long labels can wrap on narrow screens. */
@media (max-width: 767px) {
    body.specialty-page .site-header .main-navigation {
        left: auto;
        right: max(4px, env(safe-area-inset-right, 0px));
        width: min(26rem, calc(100vw - max(4px, env(safe-area-inset-left, 0px)) - max(4px, env(safe-area-inset-right, 0px))));
        padding: 4px;
    }
    body.specialty-page .site-header .main-navigation .menu-link {
        min-height: 44px;
        gap: 8px;
        padding: 8px;
    }
    body.specialty-page .site-header .main-navigation .menu-link > span {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        white-space: normal;
        overflow-wrap: break-word;
    }
    body.specialty-page .site-header .main-navigation .menu-link > .navbar-icon {
        width: 20px;
        height: 20px;
    }
    body.specialty-page .site-header .main-navigation .menu-link > .navbar-chevron {
        width: 16px;
        height: 16px;
    }
    body.specialty-page .site-header .main-navigation .menu-heading {
        padding-inline: 8px;
        letter-spacing: 0.035em;
    }
}

/* Batch 45: patient-facing POZ components remain visible without approved records. */
.poz-schedule__card--empty { background:#fff;box-shadow:0 6px 22px rgba(23,75,80,.045); }
.poz-schedule__card--empty h3 { margin-bottom:18px; }
.family-page .poz-schedule__label { font-weight:700;color:var(--care-ink);margin:0 0 8px; }
.family-page .poz-schedule__empty { margin:0;color:var(--care-text); }
/* The diagnostic team cards remain even though coordinated-care cards were removed. */
/* Reuse the detailed POZ doctor card inside the hero; the nurse and
   midwife cards remain in the separate section below. */
.poz-hero__admissions > .poz-schedule__card--historical { margin: 0 0 16px; }
.poz-hero__admissions > a { display: flex; width: fit-content; }

/* Shared schedule card styling for the doctor timetable in the hero and
   the nurse and midwife cards in the section below. */
.poz-schedule__grid { gap: clamp(12px, 2vw, 20px); }
.poz-schedule__card { background: #fff; box-shadow: 0 6px 22px rgba(23,75,80,.045); }
.poz-schedule__card--historical { background: #f1f6f4; box-shadow: none; }
.family-page .poz-schedule__intro { margin: 0 0 18px; max-width: 85ch; }
.poz-schedule__days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: clamp(10px, 1.5vw, 14px);
}
.poz-schedule__day-group {
    min-width: 0;
    padding: clamp(12px, 1.5vw, 18px);
    background: #fff;
    border: 1px solid var(--care-line);
    border-radius: 12px;
}
.poz-schedule__day-group h4 { margin: 0 0 10px; font-size: 1.1rem; line-height: 1.35; color: var(--care-ink); }
.poz-schedule__day-slots { list-style: none; margin: 0; padding: 0; }
.poz-schedule__day-slots li { min-width: 0; padding: 10px 0; border-top: 1px solid var(--care-line); overflow-wrap: anywhere; }
.poz-schedule__day-slots li:first-child { padding-top: 0; border-top: 0; }
.poz-schedule__day-slots .poz-schedule__hours, .poz-schedule__doctor { display: block; }
.poz-schedule__doctor { margin-top: 3px; }
.poz-schedule__visit { display: inline-block; margin-top: 4px; font-weight: 700; color: #765019; }
