/* Academy chrome rebuild: two shells, one DB-driven chrome color contract. */

.public-shell {
    --academy-header-height: 56px;
    --academy-footer-height: 40px;
    --academy-sidebar-width: 60px;
    --academy-sidebar-expanded-width: 240px;
    grid-template-columns: var(--academy-sidebar-width) minmax(0, 1fr) !important;
}

.public-shell.public-sidebar-expanded {
    grid-template-columns: var(--academy-sidebar-expanded-width) minmax(0, 1fr) !important;
}

.public-header.header1 {
    background: var(--academy-header-bg) !important;
    background-color: var(--academy-header-bg) !important;
    background-image: none !important;
}

.lx-sidebar.sidemeny1,
.lx-sidebar.sidemeny1 .lx-sidebar-nav,
.lx-sidebar.sidemeny1 .lx-sidebar-link,
.lx-sidebar.sidemeny1 .lx-sidebar-link.active {
    background: var(--academy-sidebar-bg) !important;
    background-color: var(--academy-sidebar-bg) !important;
    background-image: none !important;
}

.public-footer {
    background: var(--academy-footer-bg) !important;
    background-color: var(--academy-footer-bg) !important;
    background-image: none !important;
}

.public-header.header1 {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 9998 !important;
    min-height: var(--academy-header-height) !important;
    height: var(--academy-header-height) !important;
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font: 14px/1.2 Inter, system-ui, sans-serif;
}

.public-header.header1 .lxh-brand {
    min-width: 240px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary) !important;
    text-decoration: none;
}

.public-header.header1 .lxh-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    color: var(--text-inverse);
    background: linear-gradient(135deg, var(--teal-500), var(--success-fg));
    font: 800 18px/1 var(--font-sans);
}

.public-header.header1 .lxh-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.public-header.header1 .lxh-brand-name {
    color: var(--text-primary);
    font: 800 18px/1 var(--font-sans);
    letter-spacing: 0;
}

.public-header.header1 .lxh-brand-tagline {
    margin-top: 2px;
    color: var(--text-muted);
    font: 500 11px/1 var(--font-sans);
}

.public-header.header1 .lxh-spacer {
    flex: 1;
}

.public-header.header1 .lxh-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    flex: 0 0 auto;
}

.public-header.header1 .lxh-form {
    margin: 0;
}

.public-header.header1 .lxh-user,
.public-header.header1 .lxh-currency {
    position: relative;
}

.public-header.header1 .lxh-user > summary,
.public-header.header1 .lxh-currency > summary {
    list-style: none;
    gap: 4px;
}

.public-header.header1 .lxh-user > summary::-webkit-details-marker,
.public-header.header1 .lxh-currency > summary::-webkit-details-marker {
    display: none;
}

.public-header.header1 .lxh-user-menu,
.public-header.header1 .lxh-currency-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 10020;
    min-width: 112px;
    padding: 6px;
    border: 0;
    border-radius: 8px;
    background: var(--academy-header-bg);
    box-shadow: 0 16px 36px rgba(0,0,0,0.24);
}

.public-header.header1 .lxh-user-menu {
    min-width: 190px;
}

.public-header.header1 .lxh-user-menu form,
.public-header.header1 .lxh-currency-menu form {
    margin: 0;
}

.public-header.header1 .lxh-user-item,
.public-header.header1 .lxh-currency-item {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font: 700 13px/1 var(--font-sans);
    cursor: pointer;
}

.public-header.header1 .lxh-user-item {
    justify-content: flex-start;
}

.public-header.header1 .lxh-user-menu a.lxh-user-item {
    text-decoration: none;
}

.public-header.header1 .lxh-user-avatar {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: var(--accent, var(--brand-500));
    color: var(--text-inverse);
    font: 800 12px/1 var(--font-sans);
}

.public-header.header1 .lxh-user-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.public-header.header1 .lxh-user-item:hover,
.public-header.header1 .lxh-currency-item:hover,
.public-header.header1 .lxh-user-item:focus-visible,
.public-header.header1 .lxh-currency-item.is-active {
    background: rgba(99,102,241,0.14);
}

.public-header.header1 .lxh-auth,
.public-header.header1 .lxh-icon {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-radius: 8px;
    border: 0;
    background: transparent;
    color: var(--text-primary) !important;
    text-decoration: none;
    font: 600 14px/1 var(--font-sans);
    cursor: pointer;
}

.public-header.header1 .lxh-icon {
    width: 38px;
    min-width: 38px;
    padding: 0;
}

.public-header.header1 .lxh-primary {
    padding: 0 16px !important;
    border-radius: 8px;
    color: var(--text-inverse) !important;
    background: var(--accent, var(--brand-500)) !important;
    box-shadow: none;
}

.public-header.header1 :focus-visible,
.lx-sidebar.sidemeny1 :focus-visible,
.public-footer :focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 3px;
}

.lx-sidebar.sidemeny1 {
    position: fixed !important;
    left: 0 !important;
    top: var(--academy-header-height) !important;
    bottom: var(--academy-footer-height) !important;
    z-index: 100 !important;
    width: var(--academy-sidebar-width) !important;
    min-width: var(--academy-sidebar-width) !important;
    max-width: var(--academy-sidebar-width) !important;
    height: calc(100vh - var(--academy-header-height) - var(--academy-footer-height)) !important;
    max-height: calc(100vh - var(--academy-header-height) - var(--academy-footer-height)) !important;
    overflow: hidden auto !important;
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    box-shadow: none !important;
    scrollbar-width: none;
}

.lx-sidebar.sidemeny1:hover,
.lx-sidebar.sidemeny1:focus-within,
.public-shell.public-sidebar-expanded .lx-sidebar.sidemeny1 {
    width: var(--academy-sidebar-expanded-width) !important;
    min-width: var(--academy-sidebar-expanded-width) !important;
    max-width: var(--academy-sidebar-expanded-width) !important;
}

.lx-sidebar.sidemeny1::-webkit-scrollbar {
    display: none;
}

.lx-sidebar.sidemeny1 .lx-sidebar-label {
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.lx-sidebar.sidemeny1:hover .lx-sidebar-label,
.lx-sidebar.sidemeny1:focus-within .lx-sidebar-label,
.public-sidebar-expanded .lx-sidebar.sidemeny1 .lx-sidebar-label {
    opacity: 1;
    transform: none;
}

.lx-sidebar.sidemeny1 .lx-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px 0 24px;
}

.lx-sidebar.sidemeny1 .lx-sidebar-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 0 !important;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: none;
}

.lx-sidebar.sidemeny1 .lx-sidebar-link:hover,
.lx-sidebar.sidemeny1 .lx-sidebar-link.active {
    color: var(--text-primary);
    background: rgba(99,102,241,0.10) !important;
}

.lx-sidebar.sidemeny1 .lx-sidebar-icon {
    width: 24px;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.public-main {
    min-height: calc(100vh - var(--academy-header-height) - var(--academy-footer-height)) !important;
    padding-top: calc(var(--academy-header-height) + 13px) !important;
    padding-bottom: calc(var(--academy-footer-height) + 20px) !important;
}

.public-topmark-shell {
    margin-bottom: 24px;
}

.public-main > .public-topmark-shell + :where(section, div, main, article) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.public-main > .public-topmark-shell + :where(section, div, main, article) > :where(section, div, main, article):first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.public-topmark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 6px 12px;
    border: 1px solid rgba(139, 92, 246, 0.30);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.10);
    color: rgb(109, 40, 217);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.dark .public-topmark {
    color: rgb(196, 181, 253);
}

.public-topmark-dot {
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    border-radius: 999px;
    background: rgb(139, 92, 246);
}

.public-main.has-public-topmark > :not(.public-topmark-shell):first-of-type :where(header, div):first-child > p:first-child:is(.inline-flex, [class*="uppercase"]) {
    display: none !important;
}

.public-main > :where(section, div, main, article).mx-auto,
.public-main > section > :where(section, div, main, article).mx-auto {
    margin-left: 0 !important;
}

.public-main > section > .home-cta-panel.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.public-main > :where(section, div, main, article):first-child,
.public-main > :where(section, div, main, article):first-child > :where(section, div, main, article):first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.public-main > :where(section, div, main, article):first-child .grid.lg\:grid-cols-\[0\.95fr_1\.05fr\].items-center:first-child {
    align-items: start !important;
}

.public-main > :where(section, div, main, article):first-child header:first-child > h1:first-child,
.public-main > :where(section, div, main, article):first-child header:first-child > a:first-child + h1 {
    margin-top: 0 !important;
}

.public-footer {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 9999 !important;
    min-height: var(--academy-footer-height) !important;
    height: var(--academy-footer-height) !important;
    display: flex !important;
    align-items: center;
    padding: 0 24px;
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    color: var(--text-secondary);
    font-size: 14px;
}

.public-footer-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
}

.public-footer-meta {
    margin-right: auto;
}

.public-footer-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
}

.public-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.public-footer-links a:hover {
    color: var(--text-primary);
}

.app-header.header2,
.app-header.header2 .header-brand,
.app-header.header2 .lx-header-pill,
.app-header.header2 .lx-dropdown-toggle,
.app-header.header2 .lx-system-switcher-toggle,
.app-header.header2 .admin-header-pill,
.app-header.header2 .admin-header-role,
.app-header.header2 .admin-header-currency,
.app-header.header2 .admin-company-trigger,
.app-header.header2 .header-action,
.app-header.header2 .lx-icon-button,
.app-header.header2 .user-menu,
.app-header.header2 .lx-user-menu {
    background: var(--academy-header-bg) !important;
    background-color: var(--academy-header-bg) !important;
    background-image: none !important;
}

.lexico-sidebar2,
.lexico-sidebar2-actions,
.lexico-sidebar2-nav,
.lexico-sidebar2-group,
.lexico-sidebar2-items,
.lexico-sidebar2-direct,
.lexico-sidebar2-direct:hover,
.lexico-sidebar2-direct.active,
.lexico-sidebar2-direct.is-active,
.lexico-sidebar2-item,
.lexico-sidebar2-item:hover,
.lexico-sidebar2-item.active,
.lexico-sidebar2-item.is-active {
    background: var(--academy-sidebar-bg) !important;
    background-color: var(--academy-sidebar-bg) !important;
    background-image: none !important;
}

.lexico-footer2 {
    background: var(--academy-footer-bg) !important;
    background-color: var(--academy-footer-bg) !important;
    background-image: none !important;
}

.app-header.header2 {
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 1000 !important;
    min-height: var(--header-height) !important;
    height: var(--header-height) !important;
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 0 14px !important;
    border: 0 !important;
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
}

.app-header.header2 .header-brand,
.app-header.header2 .lx-header-pill,
.app-header.header2 .lx-dropdown-toggle,
.app-header.header2 .lx-system-switcher-toggle,
.app-header.header2 .admin-header-pill,
.app-header.header2 .admin-header-role,
.app-header.header2 .admin-header-currency,
.app-header.header2 .admin-company-trigger,
.app-header.header2 .header-action,
.app-header.header2 .lx-icon-button,
.app-header.header2 .user-menu,
.app-header.header2 .lx-user-menu {
    color: var(--text-primary) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.lexico-sidebar2,
.sidemeny2.sidebar.lexico-sidebar2 {
    position: fixed !important;
    left: 0 !important;
    top: var(--header-height) !important;
    bottom: var(--app-footer-height) !important;
    height: auto !important;
    border-right: 0 !important;
}

.lexico-footer2 {
    position: fixed !important;
    inset: auto 0 0 0 !important;
    z-index: 1000 !important;
    color: var(--text-secondary) !important;
    border-top: 0 !important;
}

@media (max-width: 900px) {
    .public-header.header1 {
        padding: 0 12px !important;
    }

    .public-header.header1 .lxh-brand {
        min-width: 0;
        gap: 10px;
    }

    .public-header.header1 .lxh-brand-mark {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 18px;
    }

    .public-header.header1 .lxh-brand-name {
        font-size: 18px;
    }

    .public-header.header1 .lxh-brand-tagline {
        font-size: 11px;
    }

    .public-header.header1 .lxh-actions {
        gap: 12px;
    }

    .public-header.header1 .lxh-user-name {
        display: none;
    }

    .public-header.header1 .lxh-auth,
    .public-header.header1 .lxh-icon {
        min-height: 38px;
        font-size: 14px;
    }

    .lx-sidebar.sidemeny1 {
        left: calc(-1 * var(--academy-sidebar-expanded-width)) !important;
        width: var(--academy-sidebar-expanded-width) !important;
        min-width: var(--academy-sidebar-expanded-width) !important;
        max-width: var(--academy-sidebar-expanded-width) !important;
    }

    .public-shell {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .public-shell.sidebar-open .lx-sidebar.sidemeny1 {
        left: 0 !important;
    }
}

@media (max-width: 640px) {
    .public-header.header1 .lxh-brand-tagline,
    .public-header.header1 .lxh-auth:not(.lxh-primary):nth-last-child(n+2),
    .public-footer-links {
        display: none;
    }
}
