/* WEAPON identity: original agency marks with responsive, accessible live type. */
.gateway-brand { display: inline-flex; align-items: center; justify-content: center; gap: .8rem; max-width: 100%; color: var(--text); text-decoration: none; }
.gateway-seal, .gateway-patch { flex: 0 0 auto; width: 42px; height: 52px; object-fit: contain; }
.gateway-wordmark { display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-width: 0; }
.gateway-wordmark strong { font-size: 1rem; font-weight: 800; letter-spacing: .12em; }
.gateway-wordmark > span { margin-top: .3rem; color: var(--subtle); font-size: 1rem; font-weight: 650; letter-spacing: .025em; }
.gateway-brand-auth { gap: 1.5rem; }
.gateway-brand-auth .gateway-seal, .gateway-brand-auth .gateway-patch { width: 64px; height: 72px; }
.gateway-brand-auth .gateway-wordmark strong { font-size: 1.5rem; }
.gateway-brand-auth .gateway-wordmark > span { font-size: 1.2rem; }
.sidebar > .gateway-brand { margin: .2rem 0 1.8rem; gap: .6rem; }
.sidebar > .gateway-brand .gateway-seal, .sidebar > .gateway-brand .gateway-patch { width: 35px; height: 44px; }
.sidebar > .gateway-brand .gateway-wordmark strong { font-size: .9rem; letter-spacing: .09em; }
.login-shell { justify-content: center; }
.login-header { justify-content: center; padding: 2rem 1rem 0; border: 0; background: transparent; }
.login-shell > main { flex: 0 0 auto; min-width: 0; padding: 1.5rem 1rem; }
.login-wrap { width: min(100%, 30rem); min-width: 0; margin: 0 auto; }
.login-card { min-width: 0; padding: clamp(1.25rem, 4vw, 2rem); border-top: 3px solid var(--brand-rule); border-radius: .75rem; box-shadow: 0 4px 20px var(--shadow-soft); overflow-wrap: anywhere; }
.login-card h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.login-card > h1, .login-card > .subtle { text-align: center; }
.login-card > .subtle { margin-bottom: 1.25rem; }
.login-card .system-use-notice { margin: 1.25rem 0; }
.login-card .system-use-notice h2 { font-size: .9rem; margin: 0 0 .5rem; }
.login-card .system-use-notice .checkbox-label { min-height: 44px; }
.login-card .primary-button { justify-content: center; }
.login-card .setup-entry { text-align: center; font-size: .8rem; }
.login-card .account-help { margin-top: 1.25rem; padding-top: 1rem; text-align: center; }
.login-card .account-help p { margin: 0 0 .4rem; }
.login-card .account-help a { display: inline-flex; align-items: center; min-height: 44px; }
.login-shell .standalone { width: min(100%, 30rem); margin: 0 auto; }
.gateway-home-seal { object-fit: contain; max-width: 100%; }
.topbar-label { color: var(--text); font-weight: 800; letter-spacing: .12em; }
a.topbar-home { display: inline-flex; align-items: center; min-height: 48px; min-width: 48px; text-decoration: none; border-radius: .25rem; }
a.topbar-home:hover { text-decoration: underline; }
.admin-dropdown { flex: none; }
.admin-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-height: 48px;
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: .5rem;
    color: var(--primary);
    font-size: .85rem;
    font-weight: 650;
    list-style: none;
}
.admin-trigger::-webkit-details-marker { display: none; }
.admin-trigger svg { width: 24px; height: 24px; }
.admin-trigger:hover, .admin-dropdown[open] > summary { background: var(--selected); }
.admin-links { width: min(230px, calc(100vw - 2rem)); }
.admin-links a[aria-current="page"] { background: var(--selected); font-weight: 700; }
.agency-account { display: flex; align-items: flex-start; gap: .5rem; min-width: 0; max-width: 100%; }
.header-agency-picker { display: grid; grid-template-columns: auto minmax(7.5rem, 8.5rem) auto; align-items: center; gap: .35rem .5rem; min-width: 0; }
.header-agency-picker label { font-size: .8rem; font-weight: 650; }
.header-agency-picker select { min-width: 0; width: 100%; min-height: 48px; padding: .45rem; border: 1px solid var(--border); border-radius: .4rem; background: var(--surface); color: inherit; font: inherit; }
.header-agency-picker .agency-submit { min-height: 48px; padding: .5rem .7rem; }
.header-agency-picker [data-agency-status] { grid-column: 1 / -1; font-size: .75rem; overflow-wrap: anywhere; }
.header-current-agency { max-width: 16rem; color: var(--subtle); font-size: .85rem; font-weight: 600; overflow-wrap: anywhere; }
.header-current-agency::before { content: "Agency: "; }
.agency-submit[hidden] { display: none; }
.agency-select-display { position: relative; min-width: 0; }
.topbar { flex-wrap: wrap; }
.query-shortcuts { display: flex; flex: 1 1 12rem; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; max-width: 100%; }
.query-shortcuts a,.query-shortcut-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 48px; max-width: 100%; padding: .55rem .75rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--surface); color: var(--primary); font: inherit; font-size: .85rem; font-weight: 650; text-decoration: none; overflow-wrap: anywhere; }
.query-shortcuts a:hover,.query-shortcut-button:hover { background: var(--selected); }
.query-shortcuts a:focus-visible,.query-shortcut-button:focus-visible { outline: 3px solid var(--focus-strong); outline-offset: 3px; }
.query-shortcut-button:disabled { opacity: .65; cursor: default; }
.query-shortcut-actions,.query-shortcut-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.query-shortcut-actions > a,.query-shortcut-row > a { display: inline-flex; align-items: center; min-height: 48px; }
.query-shortcut-actions [role=status] { flex-basis: 100%; font-size: .85rem; }
.query-shortcut-actions [role=status]:empty { display: none; }
.query-shortcut-row { padding: .5rem 0; border-bottom: 1px solid var(--border); }
.agency-select-display.enhanced select { color: transparent; appearance: none; }
.agency-select-display.enhanced select option { color: var(--text); background: var(--surface); }
.agency-selected-ori { position: absolute; inset: 0; display: flex; align-items: center; padding: .45rem 1.5rem .45rem .45rem; pointer-events: none; }
.agency-selected-ori::after { content: "▾"; position: absolute; right: .5rem; }
.agency-selected-ori[hidden] { display: none; }
@media (max-width: 900px) {
    .topbar { flex-wrap: wrap; }
    .account-summary { flex-wrap: wrap; justify-content: flex-end; }
    .header-agency-picker { grid-template-columns: auto minmax(7.5rem, 8.5rem); }
    .header-agency-picker .agency-submit { grid-column: 2; }
}
@media (max-width: 700px) {
    .account-summary { position: relative; gap: .5rem; }
    .header-agency-picker { grid-template-columns: auto minmax(7rem, 7.5rem); }
    .header-current-agency { max-width: 7rem; font-size: .75rem; }
    .admin-dropdown { position: static; }
    .gateway-brand-auth { gap: 1rem; }
    .gateway-brand-auth .gateway-seal, .gateway-brand-auth .gateway-patch { width: 48px; height: 60px; }
    .gateway-brand-auth .gateway-wordmark strong { font-size: 1.2rem; }
    .gateway-brand-auth .gateway-wordmark > span { font-size: 1rem; }
    .sidebar > .gateway-brand { display: none; }
    .topbar-label { display: inline; }
}

.sidebar-nav-group { min-width: 0; position: relative; }
.sidebar-parent { font-weight: 700; }
span.sidebar-parent:hover { background: transparent; }
.sidebar-nav-group.has-submenu > .sidebar-parent { margin-right: 48px; }
.sidebar-submenu > summary {
    position: absolute;
    top: 0;
    right: 0;
    width: 44px;
    height: 46px;
    padding: 0;
    list-style: none;
    justify-content: center;
}
.sidebar-submenu > summary::-webkit-details-marker { display: none; }
.sidebar-submenu > summary::after {
    content: "";
    width: .5rem;
    height: .5rem;
    flex-shrink: 0;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
}
.sidebar-submenu[open] > summary::after { transform: rotate(45deg); }
.sidebar-group-links {
    display: grid;
    gap: .25rem;
    margin: .25rem 0 0 .75rem;
    padding-left: .4rem;
    border-left: 2px solid var(--border);
}
.sidebar-submenu > summary:focus-visible { outline: 3px solid var(--focus-strong); outline-offset: 3px; }
@media (max-width: 700px) { .sidebar-nav-group { flex-basis: 100%; } }
