.site-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    min-width: 0;
    align-self: center;
    flex: 0 0 auto;
}

.site-header-actions > nav,
.site-header-actions > .header-links {
    display: block !important;
    width: auto !important;
    min-width: 0;
    flex: 0 0 auto !important;
}

.site-header-actions > .site-shared-auth {
    display: flex !important;
    align-items: center;
    width: auto !important;
    min-width: 0;
    flex: 0 0 auto !important;
}

.site-header-actions .auth-actions {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    height: 3.425rem !important;
    min-height: 3.425rem !important;
    max-height: 3.425rem !important;
    padding: .35rem;
    border: 1px solid rgba(148,163,184,.14);
    border-radius: 1rem;
    background: rgba(8,12,22,.62);
    box-shadow: 0 14px 35px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.035);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    white-space: nowrap;
    flex: 0 0 auto;
}

.site-header-actions .auth-actions > .btn,
.site-header-actions .auth-actions > .site-auth-button {
    box-sizing: border-box !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 1.15rem !important;
    margin: 0 !important;
    border-radius: .75rem !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    transform: none !important;
    flex: 0 0 auto !important;
}

.site-shared-auth {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.site-auth-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .7rem 1rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: .9rem;
    background: rgba(15,23,42,.58);
    color: #f8fafc;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

.site-auth-button:hover,
.site-auth-button:focus-visible {
    border-color: rgba(125,211,252,.42);
    background: rgba(30,41,59,.76);
    outline: none;
}

.site-auth-primary {
    border-color: transparent;
    background: linear-gradient(135deg, #38bdf8, #a78bfa);
    color: #020617;
}

.site-auth-primary:hover,
.site-auth-primary:focus-visible {
    background: linear-gradient(135deg, #67d1f7, #bd9bf9);
}

.site-auth-logout {
    border-color: rgba(248,113,113,.5);
    background: rgba(127,29,29,.16);
    color: #fca5a5;
}

.site-header-with-menu {
    position: relative;
    z-index: 1000 !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 2rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.5rem !important;
    flex-wrap: wrap !important;
}

.site-header-with-menu.site-header-blog-article,
body.blog-article-page > header.site-header-with-menu {
    max-width: 850px !important;
}

.site-header-with-menu > .logo {
    margin: 0 !important;
    flex: 0 0 auto;
}

.site-header-with-menu .logo-main,
.site-header-with-menu .logo-reflection {
    display: flex !important;
    align-items: center !important;
    gap: 2rem !important;
    font-size: 3rem !important;
    font-weight: 800 !important;
    line-height: 1.6 !important;
    letter-spacing: -.04em !important;
}

.site-header-with-menu .logo-icon {
    width: 64px !important;
    height: 64px !important;
    border-radius: 14px !important;
    font-size: 2rem !important;
}

.site-menu {
    position: relative;
    width: 44px;
    min-width: 44px;
    max-width: 44px;
    flex: 0 0 auto;
    z-index: 80;
}

.site-menu.site-menu-floating {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 120;
}

.site-menu-toggle {
    box-sizing: border-box;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    gap: 0;
    border-radius: .9rem !important;
    border-color: rgba(255,255,255,.2) !important;
    background:
        linear-gradient(135deg, rgba(255,255,255,.11), rgba(255,255,255,.025)) !important;
    color: #e2e8f0 !important;
    box-shadow:
        0 12px 30px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.16),
        inset 0 -1px 0 rgba(255,255,255,.035) !important;
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.site-menu-toggle:hover,
.site-menu.is-open .site-menu-toggle {
    border-color: rgba(56,189,248,.48) !important;
    background:
        linear-gradient(135deg, rgba(125,211,252,.18), rgba(192,132,252,.08)) !important;
    color: #7dd3fc !important;
}

.site-menu-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.site-menu-toggle span { display: none; }

.site-menu-panel {
    position: absolute;
    top: calc(100% + .7rem);
    right: 0;
    width: min(290px, calc(100vw - 2rem));
    padding: .65rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at 88% 0%, rgba(125,211,252,.2), transparent 44%),
        radial-gradient(circle at 8% 100%, rgba(192,132,252,.15), transparent 46%),
        linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.035)),
        rgba(8,12,22,.48);
    box-shadow:
        0 28px 75px rgba(0,0,0,.42),
        inset 0 1px 0 rgba(255,255,255,.2),
        inset 0 -1px 0 rgba(255,255,255,.04);
    backdrop-filter: blur(28px) saturate(165%);
    -webkit-backdrop-filter: blur(28px) saturate(165%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px) scale(.98);
    transform-origin: top right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}

.site-menu-panel::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: calc(1.35rem - 1px);
    background: linear-gradient(120deg, rgba(255,255,255,.08), transparent 34%, rgba(125,211,252,.035));
    pointer-events: none;
}

.site-menu.is-open .site-menu-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.site-menu-links {
    position: relative;
    z-index: 1;
    display: grid;
    gap: .3rem;
}

.site-menu-link {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem .85rem;
    border: 1px solid transparent;
    border-radius: .85rem;
    background: transparent;
    color: #cbd5e1;
    font: inherit;
    font-size: .9rem;
    font-weight: 700;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.site-menu-link::after {
    content: "→";
    color: #64748b;
    transition: color .18s ease, transform .18s ease;
}

.site-menu-link:hover,
.site-menu-link:focus-visible,
.site-menu-link.is-current {
    outline: none;
    color: #f8fafc;
    border-color: rgba(56,189,248,.2);
    background: rgba(56,189,248,.08);
    transform: translateX(2px);
}

.site-menu-link:hover::after,
.site-menu-link:focus-visible::after,
.site-menu-link.is-current::after {
    color: #38bdf8;
    transform: translateX(2px);
}

button.site-menu-link {
    appearance: none;
}

@media (max-width: 768px) {
    .site-header-with-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 1.5rem !important;
        gap: 3rem !important;
        flex-wrap: nowrap !important;
    }

    .site-header-with-menu > .site-header-actions {
        display: inline-flex !important;
        width: max-content !important;
        max-width: 100%;
        grid-template-columns: none !important;
        justify-content: center;
        flex-wrap: nowrap;
        gap: .75rem;
    }

    .site-menu-panel {
        position: fixed;
        top: var(--site-menu-panel-top, 5.25rem);
        right: 1rem;
        left: 1rem;
        width: auto;
    }
}

@media (max-width: 420px) {
    .site-header-with-menu {
        gap: 2.5rem !important;
    }

    .site-header-with-menu .logo-main,
    .site-header-with-menu .logo-reflection {
        gap: .8rem !important;
        font-size: 1.8rem !important;
    }

    .site-header-with-menu .logo-icon {
        width: 42px !important;
        height: 42px !important;
        border-radius: 10px !important;
        font-size: 1.3rem !important;
    }

    .site-header-actions {
        gap: .65rem;
    }

    .site-header-actions .auth-actions > .btn,
    .site-header-actions .auth-actions > .site-auth-button {
        height: 40px !important;
        min-height: 40px !important;
        padding-inline: .85rem !important;
        font-size: .86rem !important;
    }

    .site-header-actions .auth-actions {
        height: 3.3rem !important;
        min-height: 3.3rem !important;
        max-height: 3.3rem !important;
    }

    .site-menu {
        width: 40px;
        min-width: 40px;
        max-width: 40px;
    }

    .site-menu-toggle {
        width: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        height: 40px !important;
        min-height: 40px !important;
        max-height: 40px !important;
    }

    .site-menu-panel {
        right: 1rem;
    }

    .site-menu.site-menu-floating {
        top: .75rem;
        right: .75rem;
    }
}

.site-support-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: none;
    place-items: center;
    padding: 1rem;
    background: rgba(2,6,15,.68);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-support-modal.is-open { display: grid; }

.site-support-dialog {
    width: min(460px, 100%);
    padding: 2rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 1.75rem;
    background:
        radial-gradient(circle at 90% 0%, rgba(56,189,248,.18), transparent 45%),
        linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.035)),
        rgba(8,12,22,.7);
    color: #fff;
    text-align: center;
    box-shadow: 0 32px 85px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.18);
    backdrop-filter: blur(28px) saturate(150%);
    -webkit-backdrop-filter: blur(28px) saturate(150%);
}

.site-support-dialog h2 { margin: 0 0 .8rem; font-size: 1.5rem; }
.site-support-dialog p { margin: 0 0 1.4rem; color: #aebbd0; line-height: 1.55; }
.site-support-dialog a { color: #7dd3fc; font-weight: 800; text-decoration: none; }
.site-support-close {
    width: 100%;
    min-height: 44px;
    border: 0;
    border-radius: .9rem;
    background: linear-gradient(135deg, #38bdf8, #c084fc);
    color: #020617;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .site-menu-panel,
    .site-menu-link,
    .site-menu-link::after {
        transition: none;
    }
}
