:root {
    --color-primary: #6389e1;
    --color-primary-dark: #315bb8;
    --color-primary-darker: #24458f;
    --color-accent: #8a6f3d;
    --color-ink: #243033;
    --color-muted: #5f6f73;
    --color-border: #d8e3e5;
    --color-surface: #ffffff;
    --color-soft: #eef3ff;
    --color-warm: #f7f3ec;
    --color-error: #9d2f2f;
    --font-base: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --color-text: var(--color-ink);
    --font-display: "Source Sans 3", var(--font-base);
    --space-1: .5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3.5rem;
    --radius-sm: .35rem;
    --radius: .5rem;
    --container: 72rem;
    --article: 48rem;
    --shadow: 0 18px 45px rgb(32 54 108 / 10%);
    --shadow-card: 0 6px 24px rgb(32 54 108 / 6%);
    --shadow-panel: 0 10px 32px rgb(32 54 108 / 7%);
    --motion-fast: 160ms ease;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-base);
    color: var(--color-ink);
    background: #fbfdfd;
    line-height: 1.6;
}

/* WEB-0150: links in the darker brand blue, 6:1 on white; the lighter --color-primary (3.4:1) is below WCAG's 4.5:1 for text. */
a {
    color: var(--color-primary-dark);
}

a:hover {
    color: var(--color-primary-darker);
}

:focus-visible {
    outline: 3px solid #ffbf47;
    outline-offset: 3px;
}

/* Route navigation moves assistive-technology focus to the page landmark.
   The landmark is not an interactive control and should not look selected. */
main[tabindex="-1"]:focus {
    outline: none;
}

.site-container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

.announcement {
    background: var(--color-primary-dark);
    color: white;
    font-size: .95rem;
}

.announcement-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: 2.6rem;
    padding-block: .35rem;
}

.announcement p {
    flex: 1 1 auto;
    margin: 0;
    min-width: 14rem;
}

.announcement-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: .45rem;
    justify-content: flex-end;
}

.announcement-actions a {
    background: white;
    border: 1px solid white;
    border-radius: var(--radius-sm);
    color: var(--color-primary-darker);
    font-size: .86rem;
    font-weight: 800;
    line-height: 1.2;
    padding: .38rem .72rem;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
    white-space: nowrap;
}

.announcement-actions a:hover,
.announcement-actions a:focus-visible {
    background: var(--color-soft);
    border-color: var(--color-soft);
    color: var(--color-primary-darker);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgb(255 255 255 / 96%);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    min-height: 4.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    min-height: 2.75rem;
    padding-inline: .7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-ink);
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
    white-space: nowrap;
}

/* WEB-0181: the clinic's logo and name at the left of the header, home; a test system's badge beside it (WEB-0179). */
.site-identity {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    color: var(--color-primary-darker);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.2;
    text-decoration: none;
}

.site-brand img {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
}

.site-brand:hover,
.site-brand:focus-visible {
    color: var(--color-primary-dark);
}

.desktop-nav,
.mobile-menu nav {
    align-items: center;
    gap: .8rem;
}

.desktop-nav {
    display: none;
    gap: .45rem;
}

.desktop-nav a,
.mobile-menu a {
    padding: .45rem .65rem;
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--color-ink);
    font-weight: 650;
    white-space: nowrap;
    transition:
        background-color 160ms ease,
        color 160ms ease;
}

.desktop-nav a {
    padding-inline: .5rem;
}

.desktop-nav a:hover,
.desktop-nav a:focus-visible,
.mobile-menu a:hover,
.mobile-menu a:focus-visible {
    background: rgb(99 137 225 / 18%);
    color: var(--color-primary-dark);
}

.desktop-nav a.active,
.mobile-menu a.active {
    box-shadow: inset 0 -0.2rem 0 var(--color-primary);
    color: var(--color-primary-dark);
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.nav-cta {
    padding-inline: .85rem;
}

.nav-cta,
.button-primary {
    background: var(--color-primary-dark);
    color: white;
}

.desktop-nav .nav-cta,
.mobile-menu .nav-cta {
    color: white;
}

.desktop-nav .nav-cta:hover,
.mobile-menu .nav-cta:hover {
    background: var(--color-primary-darker);
    color: white;
}

.button-primary:hover {
    background: var(--color-primary-darker);
    color: white;
}

.button-secondary {
    background: white;
    border-color: var(--color-border);
    color: var(--color-primary-dark);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.mobile-menu {
    position: relative;
}

.mobile-menu summary {
    cursor: pointer;
    font-weight: 750;
    white-space: nowrap;
}

.mobile-menu nav {
    position: absolute;
    right: 0;
    display: grid;
    width: min(18rem, calc(100vw - 2rem));
    padding: var(--space-2);
    background: white;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.site-section {
    padding-block: var(--space-5);
}

/* WEB-0183: a short label on a card, above its title or under a name: an article's category, a person's credentials. */
.card-label {
    color: var(--color-accent);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.section-muted {
    background: var(--color-soft);
}

.text-link {
    font-weight: 750;
}

.input {
    width: 100%;
    min-height: 2.75rem;
    padding: .7rem .8rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font: inherit;
}

textarea.input {
    min-height: 8rem;
}

.alert {
    padding: var(--space-2);
    border-radius: var(--radius);
    border: 1px solid var(--color-border);
    margin-block: var(--space-2);
}

.alert-error {
    border-color: var(--color-error);
    color: var(--color-error);
    background: #fff4f4;
}

.alert-info {
    background: var(--color-soft);
}

.legal-content {
    max-width: var(--article);
}

.legal-content h2 {
    margin: var(--space-3) 0 var(--space-1);
    font-size: 1.25rem;
}

.legal-content p {
    margin: 0 0 var(--space-2);
}

.responsive-table {
    width: 100%;
    border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
    padding: .8rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

@media (max-width: 48rem) {
    .announcement-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: .45rem;
        padding-block: .55rem;
    }

    .announcement p {
        min-width: 0;
    }

    .announcement-actions {
        justify-content: flex-start;
    }
}

@media (min-width: 48rem) {
    /* WEB-0181: beside the full menu there is room for the logo only; the name stays in the link for screen readers, and as its title. */
    .site-brand span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .desktop-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .mobile-menu {
        display: none;
    }

}

/* WEB-0181: the logo (and on a test system its badge, WEB-0179) takes room the menu had; a little less space between its links keeps them
   on one line down to about 1080px (on Stage, about 1150px). */
@media (min-width: 48rem) {
    .desktop-nav {
        gap: .25rem;
    }

    .desktop-nav a {
        padding-inline: .4rem;
    }
}

@media (max-width: 42rem) {
    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        border: 1px solid var(--color-border);
        border-radius: var(--radius);
        margin-bottom: var(--space-2);
        background: white;
    }

    .responsive-table td {
        border-bottom: 0;
    }

    .responsive-table td::before {
        content: attr(data-label);
        display: block;
        font-size: .78rem;
        font-weight: 800;
        color: var(--color-muted);
        text-transform: uppercase;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
/* Accessible public-form required indicators. */
.required-marker {
    color: #b42318;
    margin-left: .15rem;
    font-weight: 800;
}

.required-fields-note {
    margin-bottom: var(--space-2);
    color: var(--color-muted);
    font-size: .92rem;
}

.input.invalid,
input.invalid,
select.invalid,
textarea.invalid {
    border-color: #b42318;
    box-shadow: 0 0 0 1px #b42318;
}

.validation-message {
    color: #b42318;
    font-weight: 700;
}

/* WEB-0149: the list of what to correct, at the top of a form after a submit with mistakes. */
.form-error-summary-title {
    font-weight: 700;
    margin-block-end: var(--space-1);
}

.form-error-summary ul {
    margin: 0;
    padding-inline-start: 1.25rem;
}

.form-error-summary:focus {
    outline: 3px solid var(--color-error);
    outline-offset: 2px;
}

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

/* WEB-0150 (review PR-066): printing an article, the directions or the privacy notice gives the text, the clinic's name and its contact
   details, without the menus and buttons; a link to another site shows where it goes, as paper cannot be clicked. */
@media print {
    .announcement,
    .mobile-menu,
    .desktop-nav,
    .skip-link,
    .content-browser-nav,
    .hero-carousel-pause,
    form,
    button,
    .button {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    main a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.85em;
        word-break: break-all;
    }

    img,
    figure,
    table {
        max-width: 100% !important;
        break-inside: avoid;
    }

    h1,
    h2,
    h3 {
        break-after: avoid;
    }
}
