.clickade-site-header {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
}

.clickade-site-nav,
.clickade-nav-links,
.clickade-site-brand,
.clickade-nav-link {
    display: flex;
    align-items: center;
}

.clickade-site-nav {
    min-height: 76px;
    gap: 12px;
}

.clickade-site-brand {
    flex: 0 0 auto;
    gap: 10px;
    color: var(--text, #f8fafc);
    font-size: 1.08rem;
    font-weight: 900;
    letter-spacing: -.04em;
    text-decoration: none;
    white-space: nowrap;
}

.clickade-site-brand .brand-mark {
    display: block;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
}

.clickade-nav-links {
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 3px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    container: clickade-nav / inline-size;
}
.clickade-nav-links::-webkit-scrollbar { display: none; }

.clickade-nav-link {
    flex: 0 0 auto;
    justify-content: center;
    gap: 8px;
    min-width: 40px;
    min-height: 40px;
    padding: 8px 10px;
    border: 0;
    border-radius: 11px;
    color: var(--muted, #9ca3af);
    background: transparent;
    font: inherit;
    font-size: .82rem;
    font-weight: 780;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: color .15s ease, background .15s ease, transform .15s ease;
}

.clickade-nav-link:hover,
.clickade-nav-link:focus-visible,
.clickade-nav-link[aria-current="page"] {
    color: var(--text, #f8fafc);
    background: rgba(255, 255, 255, .075);
}

.clickade-nav-link:focus-visible,
.clickade-site-brand:focus-visible {
    outline: 2px solid var(--blue, #55b8ff);
    outline-offset: 2px;
}

.clickade-nav-icon {
    display: block;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.clickade-nav-label { display: inline; }
.clickade-nav-logout { display: flex; margin: 0; }
.clickade-nav-signup { color: var(--text, #f8fafc); background: rgba(85, 184, 255, .14); }

/* Commerce pages keep their content in a padded shell. Align their shared
   header to the same viewport grid as pages that place it directly in body. */
.commerce-shell > .clickade-site-header {
    position: relative;
    left: 50%;
    width: min(1180px, calc(100vw - 36px));
    margin: -28px 0 28px;
    transform: translateX(-50%);
}

/* The nav links get the remaining header width. If labels no longer fit,
   switch every destination to a compact icon while retaining its accessible name. */
@container clickade-nav (max-width: 690px) {
    .clickade-nav-link { width: 38px; min-width: 38px; padding: 8px; gap: 0; }
    .clickade-nav-label { display: none; }
}

@media (max-width: 620px) {
    .clickade-site-header { width: calc(100% - 24px); }
    .commerce-shell > .clickade-site-header { width: calc(100vw - 24px); }
    .clickade-site-nav { min-height: 62px; gap: 7px; }
    .clickade-site-brand { gap: 7px; font-size: .96rem; }
    .clickade-site-brand .brand-mark { width: 29px; height: 29px; }
    .clickade-nav-links { justify-content: flex-start; gap: 0; }
    .clickade-nav-link { width: 34px; min-width: 34px; min-height: 38px; padding: 7px; }
    .clickade-nav-icon { width: 19px; height: 19px; flex-basis: 19px; }
}

@media (max-width: 390px) {
    .clickade-site-header { width: calc(100% - 16px); }
    .commerce-shell > .clickade-site-header { width: calc(100vw - 16px); }
    .clickade-site-nav { gap: 3px; }
    .clickade-site-brand { gap: 5px; font-size: .9rem; }
    .clickade-site-brand .brand-mark { width: 27px; height: 27px; }
    .clickade-nav-link { width: 31px; min-width: 31px; }
}

@media (prefers-reduced-motion: reduce) {
    .clickade-nav-link { transition: none; }
}
