:root {
    --crm-learn-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
    --crm-learn-border-strong: rgba(255, 255, 255, 0.08);
    --crm-learn-panel: rgba(10, 16, 23, 0.72);
    --crm-learn-panel-strong: rgba(10, 16, 23, 0.88);
    --crm-learn-highlight: linear-gradient(135deg, rgba(37, 211, 102, 0.18), rgba(136, 175, 237, 0.18));
}

body.crm-admin[data-theme="light"] {
    --crm-learn-border-strong: rgba(19, 28, 38, 0.08);
    --crm-learn-panel: rgba(255, 255, 255, 0.88);
    --crm-learn-panel-strong: rgba(255, 255, 255, 0.96);
    --crm-learn-shadow: 0 22px 44px rgba(22, 32, 42, 0.1);
}

body.crm-admin .crm-appbar__custom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

body.crm-admin .crm-doc-link--context {
    border-color: rgba(136, 175, 237, 0.28) !important;
}

body.crm-learning-page .container {
    max-width: min(1680px, calc(100vw - 24px));
    padding-bottom: 22px !important;
}

body.crm-admin .crm-learn-shell {
    display: grid;
    grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin: 6px 0 28px;
}

body.crm-admin .crm-learn-shell.is-embed {
    display: block;
    margin: 0;
}

body.crm-admin .crm-learn-sidebar {
    position: sticky;
    top: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: calc(100vh - 28px);
}

body.crm-admin .crm-learn-sidebar__card,
body.crm-admin .crm-learn-hero,
body.crm-admin .crm-learn-article,
body.crm-admin .crm-learn-hero__card,
body.crm-admin .crm-learn-embedbar {
    border: 1px solid var(--crm-learn-border-strong);
    border-radius: 22px;
    background: var(--crm-learn-panel);
    box-shadow: var(--crm-learn-shadow);
    backdrop-filter: blur(18px);
}

body.crm-admin[data-theme="light"] .crm-learn-sidebar__card,
body.crm-admin[data-theme="light"] .crm-learn-hero,
body.crm-admin[data-theme="light"] .crm-learn-article,
body.crm-admin[data-theme="light"] .crm-learn-hero__card,
body.crm-admin[data-theme="light"] .crm-learn-embedbar {
    backdrop-filter: blur(12px);
}

body.crm-admin .crm-learn-sidebar__card {
    padding: 20px;
}

body.crm-admin .crm-learn-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(136, 175, 237, 0.12);
    color: var(--crm-text-secondary);
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.crm-admin .crm-learn-sidebar__title,
body.crm-admin .crm-learn-hero h2,
body.crm-admin .crm-learn-embedbar h1,
body.crm-admin .crm-learn-article__header h2 {
    margin: 0 0 14px;
    color: var(--crm-text-primary);
    line-height: 1.15;
}

body.crm-admin .crm-learn-sidebar__title {
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}

body.crm-admin .crm-learn-sidebar__text,
body.crm-admin .crm-learn-hero__card span,
body.crm-admin .crm-learn-hero__content p,
body.crm-admin .crm-learn-article__header p,
body.crm-admin .crm-learn-search-meta {
    color: var(--crm-text-secondary);
    line-height: 1.65;
}

body.crm-admin .crm-learn-sidebar__text,
body.crm-admin .crm-learn-hero__content p,
body.crm-admin .crm-learn-article__header p {
    margin: 0 0 14px;
}

body.crm-admin .crm-learn-content h1,
body.crm-admin .crm-learn-content h2,
body.crm-admin .crm-learn-content h3,
body.crm-admin .crm-learn-content h4,
body.crm-admin .crm-learn-content h5,
body.crm-admin .crm-learn-content h6 {
    margin: 22px 0 10px !important;
    line-height: 1.22 !important;
}

body.crm-admin .crm-learn-content p,
body.crm-admin .crm-learn-content ul,
body.crm-admin .crm-learn-content ol,
body.crm-admin .crm-learn-content blockquote,
body.crm-admin .crm-learn-content pre {
    margin: 0 0 16px !important;
}

body.crm-admin .crm-learn-content li + li {
    margin-top: 8px !important;
}

body.crm-admin .crm-learn-search-label {
    display: block;
    margin: 18px 0 8px;
    color: var(--crm-text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.crm-admin input[data-learning-search] {
    min-height: 46px !important;
    border-radius: 14px !important;
    border: 1px solid var(--crm-border) !important;
    background: rgba(255, 255, 255, 0.03) !important;
}

body.crm-admin .crm-learn-search-meta {
    margin-top: 10px;
    font-size: 0.82rem;
}

body.crm-admin .crm-learn-search-controls {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    align-items: center;
}

body.crm-admin .crm-learn-search-controls .btn {
    min-width: 0;
}

body.crm-admin .crm-learn-tabs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    overflow: auto;
    padding-right: 6px;
    scrollbar-width: thin;
}

body.crm-admin .crm-learn-tab {
    appearance: none;
    -webkit-appearance: none;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    justify-items: start;
    justify-content: flex-start;
    width: 100%;
    min-height: 72px;
    padding: 13px 15px;
    text-align: left;
    border: 1px solid var(--crm-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--crm-text-primary);
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

body.crm-admin .crm-learn-tab.is-active {
    border-color: rgba(37, 211, 102, 0.32);
    background: var(--crm-learn-highlight);
}

body.crm-admin .crm-learn-tab.is-hidden {
    display: none;
}

body.crm-admin .crm-learn-tab:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 211, 102, 0.34);
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.14);
}

body.crm-admin .crm-learn-tab__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: start;
    width: 42px;
    height: 42px;
    margin-top: 1px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--crm-text-primary);
    font-size: 0.84rem;
    font-weight: 800;
}

body.crm-admin .crm-learn-tab__text {
    display: block;
    min-width: 0;
    width: 100%;
    justify-self: start;
    place-self: center start;
    text-align: left;
    align-self: center;
}

body.crm-admin .crm-learn-tab__text strong {
    display: block;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.34;
    font-weight: 650;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    text-align: left;
}

body.crm-admin .crm-learn-hero__linebreak {
    display: block;
}

body.crm-admin .crm-learn-hero__card--media {
    gap: 10px;
}

body.crm-admin .crm-learn-audio-player {
    width: 100%;
    margin-top: 8px;
}

body.crm-admin .crm-learn-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

body.crm-admin .crm-learn-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

body.crm-admin .crm-learn-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.72fr);
    gap: 20px;
    padding: 26px;
}

body.crm-admin .crm-learn-hero__meta {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

body.crm-admin .crm-learn-hero__card {
    padding: 16px 18px;
}

body.crm-admin .crm-learn-hero__label {
    margin-bottom: 7px;
    color: var(--crm-text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

body.crm-admin .crm-learn-hero__card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--crm-text-primary);
    font-size: 1rem;
}

body.crm-admin .crm-learn-hero__linebreak {
    display: block;
    margin-top: 2px;
}

body.crm-admin .crm-learn-hero__card a {
    color: var(--crm-link);
}

body.crm-admin .crm-learn-hero__card a:hover {
    color: var(--crm-text-primary);
    text-decoration: underline;
}

body.crm-admin .crm-learn-articles {
    min-width: 0;
}

body.crm-admin .crm-learn-article {
    display: none;
    padding: 28px 30px;
}

body.crm-admin .crm-learn-shell.is-embed .crm-learn-article,
body.crm-admin .crm-learn-article.is-active {
    display: block;
    animation: crm-learn-article-in 0.26s ease;
}

body.crm-admin .crm-learn-article.is-hidden {
    display: none !important;
}

body.crm-admin .crm-learn-article__header {
    margin-bottom: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--crm-border);
}

body.crm-admin .crm-learn-article__header p {
    max-width: 72ch;
    overflow-wrap: anywhere;
}

body.crm-admin .crm-learn-subsections {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

body.crm-admin .crm-learn-subsections a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(136, 175, 237, 0.1);
    border: 1px solid rgba(136, 175, 237, 0.18);
    color: var(--crm-text-secondary) !important;
    font-size: 0.8rem;
    font-weight: 700;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.crm-admin .crm-learn-subsections a:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 211, 102, 0.32);
    background: rgba(37, 211, 102, 0.09);
    color: var(--crm-text-primary) !important;
}

body.crm-admin .crm-learn-content {
    color: var(--crm-text-primary);
    line-height: 1.82;
    font-size: 1rem;
    overflow-wrap: anywhere;
}

body.crm-admin .crm-learn-content > *:first-child {
    margin-top: 0;
}

body.crm-admin .crm-learn-content > *:last-child {
    margin-bottom: 0;
}

body.crm-admin .crm-learn-content h3,
body.crm-admin .crm-learn-content h4 {
    margin: 34px 0 12px;
    color: var(--crm-text-primary);
    line-height: 1.3;
    scroll-margin-top: 124px;
}

body.crm-admin .crm-learn-content h1,
body.crm-admin .crm-learn-content h2 {
    margin: 36px 0 14px;
    line-height: 1.2;
    scroll-margin-top: 124px;
}

@media (max-width: 860px) {
    body.crm-admin .crm-learn-content h1,
    body.crm-admin .crm-learn-content h2,
    body.crm-admin .crm-learn-content h3,
    body.crm-admin .crm-learn-content h4 {
        scroll-margin-top: 102px;
    }
}

body.crm-admin .crm-learn-content h3 {
    font-size: 1.18rem;
}

body.crm-admin .crm-learn-content h4 {
    font-size: 1rem;
}

body.crm-admin .crm-learn-content .is-target,
body.crm-admin .crm-learn-content h3.is-target,
body.crm-admin .crm-learn-content h4.is-target {
    animation: crm-learn-target-pulse 1.3s ease;
}

body.crm-admin .crm-learn-content h3.is-target,
body.crm-admin .crm-learn-content h4.is-target {
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(37, 211, 102, 0.1);
    box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.18);
}

body.crm-admin .crm-learn-content p,
body.crm-admin .crm-learn-content li {
    color: var(--crm-text-secondary);
    max-width: 78ch;
}

body.crm-admin .crm-learn-content p {
    margin: 0 0 16px;
}

body.crm-admin .crm-learn-content strong {
    color: var(--crm-text-primary);
}

body.crm-admin .crm-learn-content ul,
body.crm-admin .crm-learn-content ol {
    margin: 12px 0 16px;
    padding-left: 22px;
}

body.crm-admin .crm-learn-content li + li {
    margin-top: 8px;
}

body.crm-admin .crm-learn-content hr {
    margin: 26px 0;
    border: 0;
    border-top: 1px solid var(--crm-border);
}

body.crm-admin .crm-learn-content code {
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(136, 175, 237, 0.12);
    color: var(--crm-text-primary);
    font-size: 0.88em;
}

body.crm-admin .crm-learn-content pre {
    overflow: auto;
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(6, 10, 14, 0.88);
    color: #e4edf6;
}

body.crm-admin .crm-learn-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

body.crm-admin .crm-learn-content .crm-learn-callout {
    margin: 18px 0;
    padding: 16px 18px;
    border-left: 4px solid rgba(37, 211, 102, 0.55);
    border-radius: 16px;
    background: rgba(37, 211, 102, 0.08);
}

body.crm-admin .crm-learn-content .crm-learn-callout p {
    margin: 0;
}

body.crm-admin .crm-learn-mobile-nav {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 1400;
    display: none;
    align-items: center;
    gap: 8px;
    width: min(94vw, 440px);
    padding: 10px 12px;
    transform: translateX(-50%);
    border: 1px solid var(--crm-learn-border-strong);
    border-radius: 18px;
    background: rgba(10, 16, 23, 0.94);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

body.crm-admin .crm-learn-mobile-nav.is-visible {
    display: flex;
}

body.crm-admin .crm-learn-mobile-nav__status {
    min-width: 86px;
    text-align: center;
    color: var(--crm-text-secondary);
    font-size: 0.82rem;
    font-weight: 700;
}

@media (min-width: 781px) {
    body.crm-admin .crm-learn-mobile-nav,
    body.crm-admin .crm-learn-mobile-nav.is-visible {
        display: none !important;
    }
}

body.crm-admin .crm-learn-article__pager {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--crm-border);
}

body.crm-admin .crm-learn-pager-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 92px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--crm-text-primary) !important;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.crm-admin .crm-learn-pager-card:hover {
    transform: translateY(-1px);
    border-color: rgba(37, 211, 102, 0.34);
    background: rgba(37, 211, 102, 0.08);
}

body.crm-admin .crm-learn-pager-card--next {
    text-align: right;
    align-items: flex-end;
}

body.crm-admin .crm-learn-pager-card--placeholder {
    visibility: hidden;
    pointer-events: none;
}

body.crm-admin .crm-learn-pager-card__eyebrow {
    color: var(--crm-text-tertiary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.crm-admin .crm-learn-pager-card strong {
    color: var(--crm-text-primary);
    font-size: 0.98rem;
    line-height: 1.36;
}

body.crm-admin .crm-learn-embedbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    margin-bottom: 14px;
}

body.crm-admin .crm-learn-embedbar h1 {
    margin: 8px 0 0;
    font-size: 1.2rem;
}

body.crm-admin .crm-learn-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

body.crm-admin .crm-learn-modal.is-open {
    display: block;
}

body.crm-admin .crm-learn-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 16, 0.72);
    backdrop-filter: blur(6px);
}

body.crm-admin .crm-learn-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1240px, calc(100vw - 28px));
    height: min(86vh, 860px);
    margin: 6vh auto 0;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--crm-learn-border-strong);
    background: var(--crm-learn-panel-strong);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
}

body.crm-admin .crm-learn-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--crm-border);
    background: rgba(255, 255, 255, 0.03);
}

body.crm-admin .crm-learn-modal__title {
    color: var(--crm-text-primary);
    font-size: 1rem;
    font-weight: 800;
}

body.crm-admin .crm-learn-modal__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

body.crm-admin .crm-learn-modal__frame {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
}

body.crm-learning-embed-page .crm-global-footer {
    display: none !important;
}

body.crm-admin .crm-learn-empty {
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed var(--crm-border);
    color: var(--crm-text-secondary);
    text-align: center;
}

@keyframes crm-learn-article-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes crm-learn-target-pulse {
    0% {
        background: rgba(37, 211, 102, 0.22);
        box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.3), 0 0 0 0 rgba(37, 211, 102, 0.18);
    }

    100% {
        background: rgba(37, 211, 102, 0.1);
        box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.18), 0 0 0 10px rgba(37, 211, 102, 0);
    }
}

@media (max-width: 1180px) {
    body.crm-admin .crm-learn-shell {
        grid-template-columns: 1fr;
    }

    body.crm-admin .crm-learn-sidebar {
        position: static;
        max-height: none;
    }

    body.crm-admin .crm-learn-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow: visible;
        padding-right: 0;
    }

    body.crm-admin .crm-learn-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    body.crm-admin .crm-learn-sidebar__card,
    body.crm-admin .crm-learn-hero,
    body.crm-admin .crm-learn-article {
        border-radius: 18px;
    }

    body.crm-learning-page .container {
        max-width: calc(100vw - 10px);
    }

    body.crm-admin .crm-learn-shell {
        gap: 14px;
        margin-bottom: 18px;
    }

    body.crm-admin .crm-learn-tabs {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    body.crm-admin .crm-learn-tab {
        grid-template-columns: 36px minmax(0, 1fr);
        min-height: 0;
        padding: 11px 12px;
    }

    body.crm-admin .crm-learn-tab__number {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 0.76rem;
    }

    body.crm-admin .crm-learn-article,
    body.crm-admin .crm-learn-sidebar__card,
    body.crm-admin .crm-learn-hero {
        padding: 16px;
    }

    body.crm-admin .crm-learn-embedbar,
    body.crm-admin .crm-learn-modal__header {
        flex-direction: column;
        align-items: stretch;
    }

    body.crm-admin .crm-learn-modal__actions {
        flex-wrap: wrap;
    }

    body.crm-admin .crm-learn-modal__dialog {
        width: calc(100vw - 10px);
        height: 92vh;
        margin-top: 2vh;
        border-radius: 18px;
    }

    body.crm-admin .crm-learn-content {
        font-size: 0.96rem;
        line-height: 1.72;
    }

    body.crm-admin .crm-learn-content h3 {
        font-size: 1.08rem;
    }

    body.crm-admin .crm-learn-content h4 {
        font-size: 0.98rem;
    }

    body.crm-admin .crm-learn-search-controls {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    body.crm-admin .crm-learn-article__pager {
        grid-template-columns: 1fr;
    }

    body.crm-admin .crm-learn-pager-card--next {
        order: -1;
    }

    body.crm-admin .crm-learn-pager-card--prev {
        order: 1;
    }

    body.crm-admin .crm-learn-pager-card--next {
        text-align: left;
        align-items: flex-start;
    }

    body.crm-admin .crm-learn-pager-card--placeholder {
        display: none;
    }

    body.crm-admin .crm-learn-subsections {
        flex-wrap: nowrap;
        overflow: auto;
        padding-bottom: 6px;
        scrollbar-width: thin;
    }

    body.crm-admin .crm-learn-subsections a {
        white-space: nowrap;
    }

    body.crm-admin .crm-learn-mobile-nav {
        width: min(94vw, 420px);
        bottom: 10px;
    }
}
