/* Site header — flush to viewport top, full-bleed bars */

html {
    margin: 0 !important;
    padding: 0 !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
}

header.site-header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 10050 !important;
    background: #fff;
    transform: none !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* Auth pages: never hide site chrome */
body.page-auth header.site-header,
body.page-auth footer.site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Dark top bar — edge to edge, no safe-area padding (that caused the 24px gap) */
header.site-header > .site-topbar,
header.site-header > .bg-gray-900.site-topbar {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-top: 0.5rem !important;   /* matches former py-2 top */
    padding-bottom: 0.5rem !important; /* matches former py-2 bottom */
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: #111827 !important;
    box-sizing: border-box;
}

/* Nav — full bleed white */
header.site-header > .site-nav-bar,
header.site-header > nav.site-nav-bar {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
}

.site-nav-bar__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.75rem 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    .site-nav-bar__inner {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.site-topbar > .site-topbar-wrap {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 1280px) {
    .site-topbar > .site-topbar-wrap {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.site-topbar-inner {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
    gap: 1rem;
    align-items: center;
}

.site-topbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    white-space: nowrap;
}

.site-topbar-left span {
    display: inline-flex;
    align-items: center;
}

.site-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    white-space: nowrap;
}

.site-topbar-ticker {
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: 1.25rem;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.site-topbar-warning .site-topbar-ticker-track {
    animation-duration: 45s;
}

.site-topbar-ticker-track {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    width: max-content;
    animation: siteTopbarTicker 32s linear infinite;
}

.site-topbar-ticker-set {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-shrink: 0;
}

.site-topbar-ticker:hover .site-topbar-ticker-track {
    animation-play-state: paused;
}

@keyframes siteTopbarTicker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.site-topbar-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #e2e8f0;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-topbar-warning-item {
    color: #fef3c7;
}

.site-topbar-ticker-item i {
    color: #fbbf24;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.site-topbar-warning-item i {
    color: #f97316;
}

.site-topbar-ticker-item strong {
    color: #fff;
    font-weight: 700;
}

.site-topbar-ticker-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.2);
    color: #fde68a;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.site-topbar-warning-badge {
    background: rgba(249, 115, 22, 0.28);
    color: #ffedd5;
    border: 1px solid rgba(251, 146, 60, 0.45);
}

@media (max-width: 1024px) {
    .site-topbar-left span:last-child {
        display: none;
    }
}

@media (max-width: 768px) {
    .site-topbar-inner {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .site-topbar-left {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-topbar-ticker-track {
        animation: none;
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        gap: 0.5rem 1rem;
    }

    .site-topbar-ticker {
        height: auto;
        min-height: 1.25rem;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .site-topbar-ticker-set--dup {
        display: none;
    }
}
