/* ==========================================================================
   Acute Medical Staffing — one-page site
   Brand colours taken from the AMS logo: navy #041C3D, red #B8101F.
   Palette is deliberately light: white and pale blue-tint grounds, navy ink,
   red used only as the accent. No gradients, no shadows at rest — surfaces
   are separated by a step in tone.
   ========================================================================== */

:root {
    /* --- Brand --- */
    --navy: #041C3D;
    --navy-soft: #14315A;
    --red: #B8101F;
    --red-dark: #8C0C17;

    /* --- Grounds (tone steps, lightest first) --- */
    --ground: #FFFFFF;
    --ground-tint: #F1F5FA;
    --ground-tint-2: #E4ECF6;

    /* --- Ink --- */
    --ink: #16202E;          /* running text — 14.5:1 on white */
    --ink-heading: #041C3D;  /* headings — 17:1 on white */
    --ink-muted: #4A5568;    /* secondary notes — 7.5:1 on white */
    --ink-on-dark: #FFFFFF;

    /* --- States --- */
    --error: #B3261E;
    --error-tint: #FCEBEA;
    --success: #146C2E;
    --success-tint: #E7F4EA;

    /* --- Radius: one decision, used everywhere --- */
    --radius-pill: 999px;
    --radius-card: 14px;
    --radius-field: 8px;

    /* --- Motion --- */
    --transition-fast: 140ms ease;
    --transition-base: 220ms ease;

    /* --- Type --- */
    --font-heading: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Five sizes do the work. Nothing meant to be read is under 13px. */
    --text-sm: clamp(0.82rem, 0.80rem + 0.10vw, 0.88rem);   /* 13–14px */
    --text-base: clamp(1.00rem, 0.97rem + 0.16vw, 1.08rem); /* 16–17px */
    --text-lg: clamp(1.12rem, 1.05rem + 0.34vw, 1.30rem);
    --text-xl: clamp(1.45rem, 1.25rem + 0.85vw, 1.95rem);
    --text-display: clamp(2.4rem, 1.30rem + 4.6vw, 4.75rem); /* hero only */

    /* --- Space --- */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;

    --container-max: 1120px;
    --container-padding: 1.25rem;
    --header-height: 68px;

    --z-sticky: 200;
    --z-modal: 300;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--ink);
    background-color: var(--ground);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font: inherit; cursor: pointer; background: none; border: none; }
input, select, textarea { font: inherit; color: inherit; }

a { color: var(--navy); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--red); }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ---------------------------------------------------------- Typography -- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.14;
    color: var(--ink-heading);
    letter-spacing: -0.015em;
    text-wrap: balance;
}

h1 { font-size: var(--text-display); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { color: var(--ink); text-wrap: pretty; }

/* A section opens with a heading that names it. No eyebrow labels. */
.section-title { margin-bottom: var(--space-3); }

.section-intro {
    font-size: var(--text-lg);
    color: var(--ink-muted);
    max-width: 60ch;
    margin-bottom: var(--space-10);
}

/* ------------------------------------------------------------- Buttons -- */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-base);
    line-height: 1.3;
    text-align: center;
    min-height: 48px;
    border: 2px solid transparent;
    transition: background-color var(--transition-base),
                color var(--transition-base),
                border-color var(--transition-base),
                transform var(--transition-fast);
}

/* Request Staffing is the primary conversion goal, so the primary button wears
   the brand red rather than navy. White on --red measures about 6.9:1. */
.btn-primary {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--ink-on-dark);
}
.btn-primary:hover,
.btn-primary:focus-visible {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
    color: var(--ink-on-dark);
}
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
    background-color: transparent;
    border-color: var(--navy);
    color: var(--navy);
}
.btn-secondary:hover,
.btn-secondary:focus-visible {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--ink-on-dark);
}

.btn-block { width: 100%; }

.btn-large {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
    min-height: 56px;
}

.btn:disabled,
.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading { color: transparent; }
.btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    color: var(--ink-on-dark);
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------------------------------------- Header -- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    background-color: var(--ground);
    transition: transform var(--transition-base), background-color var(--transition-base);
}

.site-header.scrolled {
    background-color: var(--ground-tint);
}

.site-header.scroll-down { transform: translateY(-100%); }
.site-header.scroll-up { transform: translateY(0); }

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    height: var(--header-height);
}

.logo { display: flex; align-items: center; flex-shrink: 0; line-height: 0; }
.logo-img { height: 38px; width: auto; }

.main-nav ul {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.main-nav a {
    position: relative;
    display: block;
    padding: var(--space-2) 0;
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--ink);
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--red);
    transition: width var(--transition-base);
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after { width: 100%; }

.header-actions { flex-shrink: 0; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    padding: 0;
    flex-shrink: 0;
}
.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--navy);
    border-radius: var(--radius-pill);
    transition: transform var(--transition-base), opacity var(--transition-fast);
    transform-origin: center;
}
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* --------------------------------------------------------- Mobile menu -- */
.mobile-menu {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 88vw);
    background-color: var(--ground);
    z-index: var(--z-modal);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform var(--transition-base), visibility var(--transition-base);
    overflow-y: auto;
    overscroll-behavior: contain;
}
.mobile-menu.active { transform: translateX(0); visibility: visible; }

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding: calc(var(--header-height) + var(--space-4)) var(--space-6) var(--space-8);
}

.mobile-menu nav ul { display: flex; flex-direction: column; gap: var(--space-1); }

.mobile-menu nav a {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-lg);
    font-weight: 500;
    color: var(--ink);
    border-radius: var(--radius-field);
}
.mobile-menu nav a:hover,
.mobile-menu nav a:focus-visible {
    background-color: var(--ground-tint);
    color: var(--navy);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------------- Hero -- */
/* Full-bleed photo hero: the handshake image sits under a navy scrim, strong
   on the left where the type sits, lighter to the right where the photo shows. */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(560px, 82vh, 860px);
    padding: var(--space-16) 0;
    background-color: var(--navy);
    overflow: hidden;
}

.hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

/* The photo breathes: a slow, almost-imperceptible drift across half a minute.
   It never shifts the scrim or the type above it, and stops dead when the
   visitor prefers reduced motion (the global rule lower down also caps it). */
@keyframes hero-photo-drift {
    0%   { transform: scale(1.04) translate3d(-1%, 0, 0); }
    100% { transform: scale(1.12) translate3d(1.5%, 1%, 0); }
}
.hero-photo {
    animation: hero-photo-drift 30s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
    will-change: transform;
}

/* Scrim under the text — the one gradient allowed in this design: it holds
   white type at AA contrast over a photograph instead of decorating anything. */
.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(4, 28, 61, 0.96) 0%,
        rgba(4, 28, 61, 0.88) 45%,
        rgba(4, 28, 61, 0.40) 78%,
        rgba(4, 28, 61, 0.20) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    text-align: left;
    color: var(--ink-on-dark);
}

.hero-section h1 {
    color: var(--ink-on-dark);
    font-size: clamp(2.5rem, 5.2vw, 4.25rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-4);
}

.hero-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: var(--text-lg);
    color: var(--ink-on-dark);
    margin-bottom: var(--space-5);
}

/* The plain sentence that says what this is, for a first-time visitor. */
.hero-lede {
    font-size: var(--text-lg);
    color: var(--ink-on-dark);
    max-width: 52ch;
    margin: 0 0 var(--space-10);
}

.hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
    max-width: 340px;
}
.hero-ctas .btn { width: 100%; }

/* The outline button reads against the photo, not the page ground. */
.hero-section .btn-secondary {
    border-color: var(--ink-on-dark);
    color: var(--ink-on-dark);
}
.hero-section .btn-secondary:hover,
.hero-section .btn-secondary:focus-visible {
    background-color: var(--ink-on-dark);
    border-color: var(--ink-on-dark);
    color: var(--navy);
}

/* --------------------------------------------------------------- About -- */
.about-section { padding: var(--space-20) 0; background-color: var(--ground); }

/* Left-aligned, not centred: the section heading and its intro sit on the
   container's left margin, so the body text must start there too. Centring a
   narrower block indents it against everything above it. */
.about-content {
    max-width: 68ch;
    font-size: var(--text-lg);
    line-height: 1.7;
}
.about-content p { margin-bottom: var(--space-4); }
.about-content p:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ Services -- */
.services-section { padding: var(--space-20) 0; background-color: var(--ground-tint); }

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

/* Surfaces are defined by a step in tone, not by a border or a shadow. */
.service-card {
    background-color: var(--ground);
    border-radius: var(--radius-card);
    padding: var(--space-8);
}

.service-card h3 {
    color: var(--navy);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 3px solid var(--red);
    display: inline-block;
}

.service-card > p { margin-bottom: var(--space-5); }

.role-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.role-list li {
    padding: 0.45rem 0.8rem;
    background-color: var(--ground-tint);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--ink);
}

.role-note {
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.services-note {
    margin-top: var(--space-8);
    max-width: 72ch;
    color: var(--ink-muted);
}

/* ---------------------------------------------------------- Applicants -- */
.applicants-section { padding: var(--space-20) 0; background-color: var(--ground); }

/* The live roles panel: a step up in tone from the white section ground, so it
   reads as its own surface without needing a shadow. */
.roles-panel {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-8) var(--space-6);
}

.roles-panel-title { font-size: var(--text-xl); margin-bottom: var(--space-3); }

.roles-panel-count { color: var(--ink); margin-bottom: var(--space-5); }

/* Rows are separated by space alone. A rule drawn between two lines of text is
   decoration the panel does not need. */
.roles-panel-list {
    display: grid;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

/* display: grid above would otherwise beat the UA stylesheet's [hidden] rule,
   leaving an empty row's worth of space if the data never arrives. */
.roles-panel-list[hidden] { display: none; }

.roles-panel-list li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-4);
    color: var(--ink);
}

.roles-panel-num {
    font-weight: 700;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}

.cta-note {
    margin: var(--space-4) 0 0;
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* ---------------------------------------------------------- Facilities -- */
.facilities-section { padding: var(--space-20) 0; background-color: var(--ground-tint); }

/* Two columns: the explanation on the left, the form on the right.
   Stacks on narrow screens. */
.split {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
    align-items: start;
}

.split-text .section-intro { margin-bottom: var(--space-5); }
.split-text > p { margin-bottom: var(--space-4); }

.check-list {
    display: grid;
    gap: var(--space-3);
    margin-top: var(--space-2);
}

.check-list li {
    position: relative;
    padding-left: var(--space-6);
    color: var(--ink);
}

.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background-color: var(--red);
    border-radius: 50%;
}

@media (min-width: 900px) {
    .split { grid-template-columns: 1fr 1.15fr; gap: var(--space-12); }
    /* Applicants runs the other way round: the live roles panel is narrower
       than the copy beside it. Declared here, after .split, so it wins. */
    .split-roles { grid-template-columns: 1.2fr 1fr; }
}

.form-card {
    max-width: 660px;
    margin-inline: auto;
    background-color: var(--ground);
    border-radius: var(--radius-card);
    padding: var(--space-8) var(--space-6);
}

.form-title { font-size: var(--text-xl); margin-bottom: var(--space-2); }

.form-intro {
    font-size: var(--text-base);
    color: var(--ink-muted);
    margin-bottom: var(--space-8);
}

/* Group heading: sentence case, readable size — not a tracked micro-label. */
.form-group-heading {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--navy);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-6);
    border-bottom: 2px solid var(--ground-tint-2);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
}

.form-group label {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--ink);
}

.req { color: var(--red); font-weight: 700; }

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: var(--ground);
    border: 1px solid var(--ground-tint-2);
    border-radius: var(--radius-field);
    font-size: var(--text-base);
    min-height: 50px;
    transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.form-group textarea { min-height: 130px; resize: vertical; line-height: 1.6; }

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--ink-muted); opacity: 1; }

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover { border-color: var(--ink-muted); }

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--navy);
    background-color: var(--ground-tint);
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23041C3D' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: var(--space-10);
    cursor: pointer;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
    background-color: var(--error-tint);
}

.error-message {
    display: block;
    min-height: 1.2rem;
    font-size: var(--text-sm);
    color: var(--error);
}

.form-row { display: grid; grid-template-columns: 1fr; }

.form-notice {
    margin: var(--space-4) 0 0;
    font-size: var(--text-sm);
    color: var(--ink-muted);
    text-align: center;
}

.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.form-status {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-field);
    font-size: var(--text-base);
}
.form-status.success { background-color: var(--success-tint); color: var(--success); }
.form-status.error { background-color: var(--error-tint); color: var(--error); }

/* ------------------------------------------------------------- Contact -- */
.contact-section { padding: var(--space-20) 0; background-color: var(--ground); }

.contact-content { max-width: 820px; margin-inline: auto; }

.contact-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
}

.contact-item {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-6);
}

.contact-item dt {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--ink-muted);
    margin-bottom: var(--space-2);
}

.contact-item dd {
    font-size: var(--text-lg);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.contact-note {
    margin: var(--space-6) 0 0;
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* -------------------------------------------------------------- Footer -- */
/* Light close, matching the rest of the page. */
.site-footer {
    background-color: var(--ground-tint);
    color: var(--ink);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}

/* align-items must not be the flex default (stretch), or the logo image
   is stretched across the column and loses its proportions. */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
}

.footer-logo-img {
    height: 34px;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    object-fit: contain;
}

.footer-tagline {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: var(--text-base);
    color: var(--red);
    margin: 0;
}

.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    margin-top: var(--space-1);
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--ink-muted);
}

.footer-social a:hover,
.footer-social a:focus-visible { color: var(--red); }

.footer-social svg { flex: 0 0 auto; }

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.footer-contact a { color: var(--ink-muted); }
.footer-contact a:hover,
.footer-contact a:focus-visible { color: var(--red); }

.footer-nav ul { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); }

.footer-nav a {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--ink);
}
.footer-nav a:hover,
.footer-nav a:focus-visible { color: var(--red); }

.footer-legal { display: flex; flex-direction: column; gap: var(--space-3); }

.footer-legal p { margin: 0; font-size: var(--text-sm); color: var(--ink-muted); }

.legal-links { display: flex; flex-wrap: wrap; gap: var(--space-4); }

.legal-links a { font-size: var(--text-sm); color: var(--ink-muted); }
.legal-links a:hover,
.legal-links a:focus-visible { color: var(--red); }

/* ------------------------------------------------------- Job board page -- */
.jobs-hero {
    background-color: var(--ground-tint);
    padding: var(--space-16) 0;
    text-align: center;
}
.jobs-hero h1 {
    font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
    margin-bottom: var(--space-4);
}
.jobs-hero p { font-size: var(--text-lg); color: var(--ink-muted); max-width: 56ch; margin-inline: auto; }

.jobs-section { padding: var(--space-16) 0 var(--space-20); }

.jobs-toolbar {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

/* Fields are one column on phones. Each .jobs-field is allowed to shrink
   (min-width: 0) so a long option name can never push the row wider than the
   page — the select ellipses its text instead. */
.jobs-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.jobs-field { flex: 1 1 200px; min-width: 0; }

.jobs-toolbar input,
.jobs-toolbar select {
    width: 100%;
    max-width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--ground-tint-2);
    border-radius: var(--radius-field);
    background-color: var(--ground);
    color: var(--ink);
    font-size: var(--text-base);
    font-family: inherit;
    min-height: 50px;
    text-overflow: ellipsis;
}

.jobs-toolbar select { cursor: pointer; }

.btn-quiet {
    background: none;
    border: 0;
    padding: 0.5rem 0.25rem;
    color: var(--red);
    font-size: var(--text-base);
    font-weight: 600;
    font-family: inherit;
    min-height: 44px;
    cursor: pointer;
    flex: 0 0 auto;
}
.btn-quiet:hover,
.btn-quiet:focus-visible { color: var(--red-dark); text-decoration: underline; }

.jobs-count { font-size: var(--text-sm); color: var(--ink-muted); margin-bottom: var(--space-4); }

/* Cards in a row share one height, so the row reads as a band rather than a
   set of ragged blocks. */
.jobs-list { display: grid; gap: var(--space-4); align-items: stretch; }

.job-card {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.job-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-2) var(--space-4);
}

.job-card h3 { font-size: var(--text-lg); color: var(--navy); }

.job-chip {
    background-color: var(--ground-tint-2);
    color: var(--navy);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-5);
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

.job-pay { font-weight: 700; color: var(--ink); }

.job-summary { color: var(--ink); }

.job-details { margin-top: var(--space-1); }

.job-details summary {
    color: var(--red);
    font-weight: 600;
    cursor: pointer;
    padding: 0.4rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}
.job-details summary:hover { color: var(--red-dark); text-decoration: underline; }
.job-details[open] summary { margin-bottom: var(--space-3); }

/* Inset panel on the tinted card, so the posting body reads as one block
   without needing a border. */
.job-details-body {
    background-color: var(--ground);
    border-radius: var(--radius-field);
    padding: var(--space-5);
}

.job-details-body p { color: var(--ink); }
.job-details-body p + p { margin-top: var(--space-3); }

/* The disclosure + apply button sit at the foot of every card, so both line
   up across a row whose summaries run to different lengths. */
.job-card-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.job-card .btn {
    align-self: stretch;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
}

.jobs-message {
    padding: var(--space-6);
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    color: var(--ink);
}
.jobs-message a { text-decoration: underline; }

/* ------------------------------------------------------- Legal pages ---- */
.legal-section { padding: var(--space-16) 0 var(--space-20); }
.legal-content { max-width: 74ch; }

.legal-content h1 { margin-bottom: var(--space-4); }

.legal-content h2 {
    font-size: var(--text-xl);
    color: var(--navy);
    margin-top: var(--space-10);
    margin-bottom: var(--space-3);
}

.legal-content p { margin-bottom: var(--space-4); }
.legal-content a { color: var(--red); text-decoration: underline; }

/* Sits at the top of the drafts so nobody mistakes them for reviewed text. */
.legal-banner {
    background-color: var(--ground-tint-2);
    color: var(--red-dark);
    font-weight: 600;
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-field);
    margin-bottom: var(--space-4);
}

.legal-updated {
    font-size: var(--text-sm);
    color: var(--ink-muted);
}

/* -------------------------------------------------------- Page sections -- */
/* Shared page hero used on About, Services, Employers, Government, Contact */
.page-hero {
    background-color: var(--ground-tint);
    padding: var(--space-16) 0;
    text-align: center;
}
.page-hero h1 {
    font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.4rem);
    margin-bottom: var(--space-4);
}
.page-hero p {
    font-size: var(--text-lg);
    color: var(--ink-muted);
    max-width: 56ch;
    margin-inline: auto;
}

/* Mission & Values grid */
.mission-section { padding: var(--space-20) 0; background-color: var(--ground-tint); }
.values-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}
@media (min-width: 640px) {
    .values-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1040px) {
    .values-grid { grid-template-columns: repeat(4, 1fr); }
}
.value-card {
    background-color: var(--ground);
    border-radius: var(--radius-card);
    padding: var(--space-6);
}
.value-card h3 {
    color: var(--navy);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 3px solid var(--red);
    display: inline-block;
}
.value-card p { color: var(--ink); font-size: var(--text-base); }

/* Quality commitment list */
.quality-section { padding: var(--space-20) 0; background-color: var(--ground); }
.quality-list {
    display: grid;
    gap: var(--space-4);
    max-width: 800px;
}
.quality-list li {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-5) var(--space-6);
    color: var(--ink);
    line-height: 1.7;
}
.quality-list strong { color: var(--navy); }

/* CTA band used across pages */
.cta-band {
    background-color: var(--navy);
    color: var(--ink-on-dark);
    padding: var(--space-16) 0;
}
.cta-content { max-width: 800px; margin-inline: auto; text-align: center; }
.cta-content h2 {
    color: var(--ink-on-dark);
    margin-bottom: var(--space-3);
}
.cta-content p {
    color: rgba(255,255,255,0.85);
    margin-bottom: var(--space-8);
    max-width: 56ch;
    margin-inline: auto;
}
.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}
@media (min-width: 560px) {
    .cta-actions { flex-direction: row; justify-content: center; }
}
.cta-band .btn-primary {
    background-color: var(--red);
    border-color: var(--red);
}
.cta-band .btn-primary:hover,
.cta-band .btn-primary:focus-visible {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
}
.cta-band .btn-secondary {
    border-color: var(--ink-on-dark);
    color: var(--ink-on-dark);
}
.cta-band .btn-secondary:hover,
.cta-band .btn-secondary:focus-visible {
    background-color: var(--ink-on-dark);
    border-color: var(--ink-on-dark);
    color: var(--navy);
}

/* Services page specific */
.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-4);
    color: var(--red);
    flex-shrink: 0;
}

/* Settings & staffing types on Services page */
.service-meta {
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--ground-tint-2);
}
.service-meta h4 {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--navy);
    margin-bottom: var(--space-3);
}
.meta-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}
.meta-list li {
    padding: 0.35rem 0.7rem;
    background-color: var(--ground-tint);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--ink);
}

/* Employers page */
.employers-intro { padding: var(--space-20) 0; background-color: var(--ground); }
.employers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    /* Every tile in a row shares one height: the short ones are stretched to
       the tallest, so the row reads as one band instead of six ragged blocks. */
    align-items: stretch;
}
@media (min-width: 768px) {
    .employers-grid { grid-template-columns: 1fr 1fr; }
}
.employer-card {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-6);
    /* A column, so the heading sits at the top and the list is pushed down:
       the bullets start at the same line in every tile of the row. */
    display: flex;
    flex-direction: column;
}
.employer-card h3 {
    color: var(--navy);
    margin-bottom: var(--space-3);
    /* Two lines is the longest heading in this grid; reserving that height
       keeps the one- and two-line headings on the same baseline. */
    min-height: calc(2 * 1.3em);
    display: flex;
    align-items: flex-end;
}
.employer-card ul {
    display: grid;
    gap: var(--space-2);
    /* The list takes the remaining space, so a tile with three short bullets
       no longer leaves a hole under it. */
    flex: 1;
    align-content: start;
}
.employer-card li {
    position: relative;
    padding-left: var(--space-6);
    color: var(--ink);
}
.employer-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background-color: var(--red);
    border-radius: 50%;
}

/* Government page */
.government-section { padding: var(--space-20) 0; background-color: var(--ground); }
.government-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
@media (min-width: 900px) {
    .government-grid { grid-template-columns: 1fr 1fr; }
}
.gov-card {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-8);
}
.gov-card h3 { color: var(--navy); margin-bottom: var(--space-4); }
.gov-card ul { display: grid; gap: var(--space-3); }
.gov-card li {
    position: relative;
    padding-left: var(--space-6);
    color: var(--ink);
}
.gov-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 8px;
    height: 8px;
    background-color: var(--red);
    border-radius: 50%;
}

/* Careers page */
.careers-section { padding: var(--space-20) 0; background-color: var(--ground); }
.careers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-8);
}
@media (min-width: 768px) {
    .careers-grid { grid-template-columns: 1fr 1fr; }
}
.career-category {
    background-color: var(--ground-tint);
    border-radius: var(--radius-card);
    padding: var(--space-8);
}
.career-category h3 { color: var(--navy); margin-bottom: var(--space-4); }
.career-category ul { display: grid; gap: var(--space-2); }
.career-category li {
    padding: 0.5rem 0.9rem;
    background-color: var(--ground);
    border-radius: var(--radius-pill);
    color: var(--ink);
    font-weight: 500;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}
.career-category li:hover { background-color: var(--navy); color: var(--ink-on-dark); }

/* Contact page */
.contact-page-section { padding: var(--space-20) 0; background-color: var(--ground); }
.contact-section--page { background-color: var(--ground-tint); }

/* The methods column mirrors the form card: a white panel on the tinted
   section, so the two columns read as deliberate peers. Action channels
   (phone, email) lead as large tappable rows; context follows a hairline. */
.contact-methods { display: grid; gap: var(--space-4); }

.contact-panel {
    background-color: var(--ground);
    border-radius: var(--radius-card);
    padding: var(--space-6);
    display: grid;
    gap: var(--space-4);
}

.contact-divider {
    height: 1px;
    background-color: var(--ground-tint-2);
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-2);
    margin: calc(-1 * var(--space-2));
    border-radius: var(--radius-field);
    color: inherit;
}
a.contact-method { transition: background-color var(--transition-fast); }
a.contact-method:hover { background-color: var(--ground-tint); }

.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 9px;
    background-color: var(--ground-tint);
    border-radius: var(--radius-field);
    color: var(--navy);
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.75;
}

.contact-info { flex: 1; }

.contact-info h3 {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--ink-muted);
    margin-bottom: var(--space-1);
}

.contact-value {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.contact-info p { margin-bottom: var(--space-1); }
.contact-info p:last-child { margin-bottom: 0; }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-10);
}
@media (min-width: 900px) {
    .contact-grid { grid-template-columns: 1fr 1.2fr; }
}

/* ========================================================================== */
/* ---------------------------------------------------------- Responsive -- */
@media (max-width: 860px) {
    .main-nav { display: none; }
    .header-actions { display: none; }
    .mobile-menu-toggle { display: flex; }
}

@media (min-width: 861px) {
    .mobile-menu { display: none; }
}

@media (min-width: 560px) {
    .hero-ctas { flex-direction: row; justify-content: flex-start; max-width: none; }
    .hero-ctas .btn { width: auto; min-width: 210px; }
}

@media (min-width: 640px) {
    .form-row { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
    .contact-details { grid-template-columns: repeat(3, 1fr); }
    .form-card { padding: var(--space-10) var(--space-8); }
}

@media (min-width: 768px) {
    :root { --header-height: 76px; }
    .logo-img { height: 42px; }
    .footer-content {
        grid-template-columns: 1.2fr 1fr 1.2fr;
        align-items: start;
    }
    .footer-nav ul { justify-content: flex-start; }
    .footer-legal { align-items: flex-end; }
    .legal-links { justify-content: flex-end; }
}

/* Two columns only once a card is still comfortably readable. */
@media (min-width: 1040px) {
    .jobs-list { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
    .services-grid { grid-template-columns: 1fr 1fr; }
}

/* Three service categories, so three columns once there is room for them. */
@media (min-width: 1120px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
    :root { --container-padding: 1rem; --header-height: 62px; }
    .logo-img { height: 32px; }
    .btn-large { padding: 0.9rem 1.4rem; }
    .form-card { padding: var(--space-6) var(--space-4); }
}

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

[hidden] { display: none !important; }

/* Reveal-on-scroll. Added by script.js only, so nothing is ever hidden
   when JavaScript is unavailable. */
.js-reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 520ms ease, transform 520ms ease;
}
.js-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .js-reveal { opacity: 1; transform: none; }
}

/* On a phone the type column spans the full width, so the scrim deepens all
   over rather than just on the left. */
@media (max-width: 640px) {
    .hero-section::after {
        background: linear-gradient(180deg,
            rgba(4, 28, 61, 0.92) 0%,
            rgba(4, 28, 61, 0.94) 100%);
    }
    .hero-photo { object-position: 42% 30%; }
}

@media print {
    .site-header, .mobile-menu, .mobile-menu-toggle, .hero-ctas,
    .form-card, .legal-links, .jobs-toolbar { display: none !important; }
    body { color: #000; }
    .hero-photo { display: none !important; }
    .hero-section, .services-section, .facilities-section, .site-footer { background: none !important; }
}