/*
 * Site chrome: the one header and footer shared by every page outside the report workflow.
 *
 * Loaded globally by _Layout, because the pages that need it most (the resource guides, the error
 * pages) are exactly the ones that never opted into home.css. Built on the tokens in tokens.css.
 *
 * No JavaScript: several pages that use this header load no JS bundle at all, so a collapse toggle
 * would be dead on them. The nav wraps instead of collapsing.
 */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: .625rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1.5rem;
}

/* ---- brand ---------------------------------------------------------------- */

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    text-decoration: none;
}

.site-brand__logo { width: 34px; height: 34px; object-fit: contain; flex: none; }

.site-brand__name {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.site-brand__ez { color: #212529; }
.site-brand__report { color: var(--color-primary); }

.site-brand:hover .site-brand__report { color: var(--color-primary-dark); }

/* ---- navigation ------------------------------------------------------------ */

.site-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
}

.site-nav__link {
    color: var(--color-text-subtle);
    font-weight: 600;
    text-decoration: none;
    padding: .5rem 0;
    border-bottom: 2px solid transparent;
}

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

.site-nav__link[aria-current="page"] {
    color: var(--color-primary-dark);
    border-bottom-color: var(--color-primary);
}

.site-nav__cta {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    min-height: 44px;
    border-radius: 999px;
    background: var(--color-primary);
    color: var(--color-on-primary, #fff);
    font-weight: 700;
    text-decoration: none;
}

.site-nav__cta:hover,
.site-nav__cta:focus-visible { background: var(--color-primary-dark); color: var(--color-on-primary, #fff); }

/* The whole bar stacks rather than crushing the brand against the links. */
@media (max-width: 34em) {
    .site-header__inner { justify-content: center; text-align: center; }
    .site-nav { justify-content: center; width: 100%; }
}

/* ---- footer ---------------------------------------------------------------- */

.site-footer {
    background: var(--color-brand-navy);
    color: #e7edf3;
    margin-top: 3rem;
    padding: 2rem 1rem 1.5rem;
}

.site-footer__inner {
    max-width: 72rem;
    margin: 0 auto;
    text-align: center;
}

.site-footer__support { margin: 0 0 1rem; font-size: .95rem; }
.site-footer__support .bi { color: var(--color-danger); margin-right: .35rem; }

.site-footer a { color: #fff; text-decoration: underline; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration: none; }

.site-footer__nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .35rem 0;
    margin-bottom: 1rem;
    font-size: .9rem;
}

.site-footer__nav a { padding: .35rem .75rem; }

/* Separators are drawn rather than typed, so no stray pipe is left dangling at a wrap point. */
.site-footer__nav a + a { border-left: 1px solid rgba(255, 255, 255, .28); }

.site-footer__meta {
    margin: 0;
    font-size: .85rem;
    color: #b9c6d4;
}

.site-footer__version { opacity: .75; }

/* The workflow pages paint their own full-height background; without this the footer would sit on
   a strip of it rather than reading as the end of the page. */
.site-footer + * { margin-top: 0; }

@media (forced-colors: active) {
    .site-header { border-bottom: 1px solid CanvasText; }
    .site-nav__cta { border: 1px solid ButtonText; }
}
