/* Shared masthead and account navigation. Palette tokens belong in theme.css. */
.site-navbar {
    min-height: var(--site-header-height);
    padding-block: 0;
    background: linear-gradient(110deg, var(--site-surface-raised), var(--site-surface));
    border-top: 3px solid var(--site-accent);
    border-bottom: 1px solid var(--site-brass);
    box-shadow: var(--site-shadow);
}

.site-navbar::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--site-brass), var(--site-accent), var(--site-brass), transparent);
    pointer-events: none;
}

.site-navbar-inner {
    min-height: calc(var(--site-header-height) - 4px);
    gap: 1rem;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-width: 0;
    margin-right: 0;
    padding-block: 0.5rem;
}

/* The original dark wordmark stays legible in both modes on this ivory inset. */
.site-brand-seal {
    display: block;
    flex-shrink: 0;
    padding: 0.4rem 0.65rem;
    background-color: var(--site-logo-paper);
    border: 1px solid var(--site-brass);
    border-radius: 0.2rem;
    box-shadow: inset 0 0 0 3px var(--site-logo-edge);
}

.site-brand-logo {
    display: block;
    width: 9.5rem;
    height: auto;
}

.site-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    padding-left: 1.25rem;
    border-left: 1px solid var(--bs-border-color);
}

.site-brand-kicker {
    color: var(--site-link);
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.site-brand-name {
    max-width: 20rem;
    overflow: hidden;
    color: var(--site-heading);
    font-family: var(--site-font-heading);
    font-size: 1.65rem;
    line-height: 1.2;
    text-overflow: ellipsis;
}

.site-brand-tagline {
    color: var(--site-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.03em;
}

.site-navbar-actions {
    flex-shrink: 0;
    gap: 0.5rem;
}

.site-navbar-actions > .nav-item > .nav-link {
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.6rem 0.75rem;
    color: var(--site-text);
    background-color: var(--site-surface-raised);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.site-navbar-actions > .nav-item > .nav-link:hover,
.site-navbar-actions > .nav-item > .nav-link[aria-expanded="true"] {
    color: var(--site-link);
    background-color: var(--site-surface-muted);
    border-color: var(--site-accent);
}

.site-navbar-actions .dropdown-toggle > span {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-brand:focus-visible,
.site-navbar-actions > .nav-item > .nav-link:focus-visible {
    outline: 2px solid var(--site-accent);
    outline-offset: 3px;
}

.site-header-status {
    width: 6.5rem;
    color: var(--site-text-muted);
    text-align: right;
}

/* The theme toggle shows the mode you'll switch to. */
[data-bs-theme="dark"] .theme-icon-to-dark,
[data-bs-theme="light"] .theme-icon-to-light {
    display: none;
}

@media (max-width: 991.98px) {
    .site-brand-copy { display: none; }
}

@media (max-width: 575.98px) {
    :root { --site-header-height: 5.25rem; }

    .site-navbar-inner { gap: 0.5rem; }
    .site-brand-seal { padding: 0.35rem 0.5rem; }
    .site-brand-logo { width: 7rem; }
    .site-navbar-actions { gap: 0.375rem; }

    .site-header-status {
        position: absolute;
        right: 0.75rem;
        bottom: 0.15rem;
        width: 11rem;
        font-size: 0.625rem;
        line-height: 1;
    }
}
