:root {
    --lms-teal: var(--brand-primary, #044f54);
    --lms-teal-dark: #03383c;
    --lms-ink: var(--brand-text, #163033);
    --lms-muted: var(--brand-muted, #5d7476);
    --lms-line: var(--brand-border, #d7e4e3);
    --lms-paper: var(--brand-card-bg, #ffffff);
    --lms-wash: #f4f8f8;
    --lms-btn-text: var(--brand-button-text, #f7fbfb);
    --lms-shadow: 0 14px 36px rgb(4 79 84 / 0.08);
    --lms-radius: 18px;
    --lms-max: 1180px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.lms-body {
    margin: 0;
    min-height: 100%;
    background: var(--lms-wash);
    color: var(--lms-ink);
    font-family: "Segoe UI", "Source Sans 3", system-ui, sans-serif;
}

body.lms-body {
    display: flex;
    min-height: 100dvh;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--lms-teal);
    text-decoration: none;
}

a:hover {
    color: var(--lms-teal-dark);
}

.lms-skip {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.lms-skip:focus {
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    top: 12px;
    left: 12px;
    z-index: 200;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--lms-teal);
    color: var(--lms-btn-text);
}

.lms-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #ffffff;
    border-bottom: 1px solid var(--lms-line);
}

.lms-header__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
    width: min(100% - 40px, var(--lms-max));
    min-height: 84px;
    margin: 0 auto;
}

.lms-logo {
    display: flex;
    align-items: center;
    line-height: 0;
}

.lms-logo img {
    display: block;
    width: auto;
    max-width: 220px;
    height: 52px;
    object-fit: contain;
    object-position: left center;
}

.lms-nav {
    display: flex;
    justify-content: center;
}

.lms-nav__links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.lms-nav__links a {
    padding: 0;
    background: transparent;
    color: var(--lms-ink);
    font-size: 16px;
    font-weight: 700;
}

.lms-nav__links a.is-active,
.lms-nav__links a:hover {
    background: transparent;
    color: var(--lms-teal);
}

.lms-nav__toggle {
    display: none;
    width: 42px;
    height: 42px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--lms-line);
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
}

.lms-nav__toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--lms-teal);
}

.lms-header__account {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.lms-nav__auth {
    display: none;
}

#main-content {
    flex: 1 1 auto;
}

.lms-footer {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--lms-teal);
    color: var(--lms-btn-text);
    text-align: center;
}

.lms-footer p {
    margin: 0;
    font-size: 14px;
}

.lms-footer .dev-ql-trigger {
    color: var(--lms-btn-text);
}

.lms-wrap {
    width: min(100% - 40px, var(--lms-max));
    margin: 0 auto;
    padding: 40px 0 72px;
}

.lms-hero {
    position: relative;
    overflow: hidden;
    min-height: 420px;
    padding: 88px 20px 80px;
    background:
        linear-gradient(90deg, rgb(255 255 255 / 0.94) 0%, rgb(255 255 255 / 0.72) 48%, rgb(255 255 255 / 0.28) 100%),
        url("/images/lms-source/course-cover-wide.png") center / cover no-repeat;
}

.lms-hero__inner {
    width: min(100%, var(--lms-max));
    margin: 0 auto;
}

.lms-kicker {
    margin: 0 0 10px;
    color: var(--lms-teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.lms-hero h1 {
    max-width: 14ch;
    margin: 0;
    color: var(--lms-teal-dark);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.lms-hero p {
    max-width: 42rem;
    margin: 18px 0 0;
    color: var(--lms-muted);
    font-size: 18px;
    line-height: 1.65;
}

.lms-btn {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: var(--lms-teal);
    color: var(--lms-btn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.lms-btn:hover {
    background: var(--lms-teal-dark);
    color: var(--lms-btn-text);
}

.lms-btn--ghost {
    border: 1px solid var(--lms-line);
    background: transparent;
    color: var(--lms-teal-dark);
}

.lms-btn--ghost:hover {
    border-color: var(--lms-teal);
    background: transparent;
    color: var(--lms-teal);
}

.lms-header .lms-btn {
    min-height: 42px;
    padding: 0 16px;
}

.lms-hero .lms-btn {
    margin-top: 28px;
}

.lms-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 28px;
}

.lms-section-head h2 {
    margin: 0;
    color: var(--lms-teal-dark);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.lms-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.lms-home .lms-grid {
    grid-template-columns: minmax(0, 430px);
}

.lms-card {
    overflow: hidden;
    border: 1px solid var(--lms-line);
    border-radius: var(--lms-radius);
    background: var(--lms-paper);
    box-shadow: var(--lms-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lms-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgb(4 79 84 / 0.12);
}

.lms-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #dfeeed;
}

.lms-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lms-card__body {
    display: grid;
    gap: 12px;
    padding: 22px;
}

.lms-card__category {
    color: var(--lms-teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lms-card__title {
    margin: 0;
    color: var(--lms-teal-dark);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
}

.lms-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--lms-muted);
    font-size: 14px;
}

.lms-card__price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.lms-card__compare {
    color: #8b9998;
    font-size: 13px;
    text-decoration: line-through;
}

.lms-card__now {
    color: var(--lms-teal-dark);
    font-size: 22px;
    font-weight: 800;
}

.lms-band {
    padding: 72px 20px;
    background: linear-gradient(135deg, #174e50, var(--lms-teal));
    color: var(--lms-btn-text);
    text-align: center;
}

.lms-band h2,
.lms-band p {
    color: inherit;
}

.lms-band h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
}

.lms-band p {
    max-width: 42rem;
    margin: 14px auto 0;
    line-height: 1.7;
}

.lms-band .lms-btn {
    margin-top: 24px;
    border: 1px solid rgb(255 255 255 / 0.45);
    background: transparent;
}

.lms-catalog {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.lms-filters {
    position: sticky;
    top: 104px;
    padding: 20px;
    border: 1px solid var(--lms-line);
    border-radius: var(--lms-radius);
    background: #ffffff;
}

.lms-filters h3 {
    margin: 0 0 10px;
    color: var(--lms-teal-dark);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lms-filters .lms-field,
.lms-filters > form > label {
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
}

.lms-filters .lms-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--lms-muted);
    font-size: 13px;
}

.lms-filters input[type="search"] {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--lms-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--lms-ink);
    font: inherit;
}

.lms-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lms-sort a {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--lms-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--lms-muted);
    font-size: 12px;
    font-weight: 700;
}

.lms-sort a.is-active,
.lms-sort a:hover {
    border-color: var(--lms-teal);
    background: var(--lms-teal);
    color: var(--lms-btn-text);
}

.lms-course {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}

.lms-panel {
    overflow: hidden;
    border: 1px solid var(--lms-line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--lms-shadow);
}

.lms-course__main {
    padding: 32px;
}

.lms-chip {
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: rgb(4 79 84 / 0.08);
    color: var(--lms-teal);
    font-size: 12px;
    font-weight: 800;
}

.lms-course h1 {
    margin: 16px 0 22px;
    color: var(--lms-teal-dark);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.lms-cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 16px;
    background: #dfeeed;
}

.lms-course__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--lms-line);
    border-bottom: 1px solid var(--lms-line);
}

.lms-instructor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lms-instructor img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: #ffffff;
}

.lms-instructor small {
    display: block;
    color: var(--lms-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.lms-instructor strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 15px;
}

.lms-stats {
    color: var(--lms-muted);
    font-size: 14px;
}

.lms-stats b {
    color: var(--lms-teal-dark);
    font-size: 28px;
}

.lms-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 22px 0 0;
    color: var(--lms-muted);
}

.lms-facts span b {
    color: var(--lms-teal-dark);
}

.lms-copy {
    margin-top: 28px;
    color: #496260;
    font-size: 16px;
    line-height: 1.75;
}

.lms-copy h2,
.lms-copy h3,
.lms-copy strong {
    color: var(--lms-teal-dark);
}

.lms-copy p {
    margin: 0 0 14px;
}

.lms-copy ul {
    padding-left: 1.2em;
}

.lms-side {
    position: sticky;
    top: 104px;
    padding: 22px;
}

.lms-side__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.lms-ghost {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--lms-line);
    border-radius: 10px;
    background: #ffffff;
    color: var(--lms-teal-dark);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.lms-filters .lms-btn {
    width: 100%;
}

.lms-buy-stack {
    display: grid;
    gap: 10px;
}

.lms-buy {
    display: flex;
    width: 100%;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--lms-teal);
    color: var(--lms-btn-text);
}

.lms-buy:hover {
    background: var(--lms-teal-dark);
    color: var(--lms-btn-text);
}

.lms-buy--alt {
    background: transparent;
    color: var(--lms-teal);
    box-shadow: inset 0 0 0 2px var(--lms-teal);
}

.lms-buy--alt:hover {
    background: var(--lms-teal);
    color: var(--lms-btn-text);
}

.lms-buy__title {
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.lms-buy__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.lms-buy__now {
    font-size: 22px;
    font-weight: 800;
}

.lms-buy__was {
    font-size: 13px;
    text-decoration: line-through;
    opacity: 0.8;
}

.lms-note {
    margin: 10px 0 20px;
    color: var(--lms-muted);
    font-size: 13px;
}

.lms-note--error {
    color: #b91c1c;
    font-weight: 600;
}

.lms-curriculum {
    display: grid;
    gap: 10px;
}

.lms-topic {
    overflow: hidden;
    border: 1px solid var(--lms-line);
    border-radius: 12px;
    background: #ffffff;
}

.lms-topic > summary {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--lms-wash);
    color: var(--lms-teal-dark);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    cursor: pointer;
    list-style: none;
}

.lms-topic > summary::-webkit-details-marker {
    display: none;
}

.lms-lesson {
    display: grid;
    grid-template-columns: 22px 22px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--lms-line);
    color: var(--lms-ink);
}

.lms-lesson.is-locked {
    opacity: 0.72;
}

.lms-lesson:hover {
    background: #eef8f6;
}

.lms-lesson img {
    width: 20px;
    height: 20px;
    margin-top: 2px;
}

.lms-lesson strong {
    display: block;
    color: var(--lms-teal-dark);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lms-lesson small {
    display: block;
    margin-top: 2px;
    color: var(--lms-muted);
    font-size: 12px;
}

.lms-empty {
    padding: 32px;
    border: 1px dashed var(--lms-line);
    border-radius: 16px;
    color: var(--lms-muted);
    text-align: center;
}

@media (max-width: 980px) {
    .lms-catalog,
    .lms-course {
        grid-template-columns: 1fr;
    }

    .lms-filters,
    .lms-side {
        position: static;
    }
}

@media (max-width: 720px) {
    .lms-header__inner {
        grid-template-columns: 1fr auto;
        width: min(100% - 24px, var(--lms-max));
        min-height: 72px;
        gap: 10px;
    }

    .lms-logo img {
        max-width: 168px;
        height: 42px;
    }

    .lms-nav {
        justify-content: flex-end;
    }

    .lms-nav__toggle {
        display: inline-flex;
    }

    .lms-header__account {
        display: none;
    }

    .lms-nav__links {
        position: absolute;
        top: 72px;
        right: 12px;
        left: 12px;
        display: none;
        flex-direction: column;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--lms-line);
        border-radius: 14px;
        background: #ffffff;
        box-shadow: var(--lms-shadow);
    }

    .lms-nav__links a {
        padding: 12px 4px;
        background: transparent;
    }

    .lms-nav.is-open .lms-nav__links {
        display: flex;
    }

    .lms-nav__auth {
        display: grid;
        gap: 10px;
        margin-top: 8px;
        padding-top: 12px;
        border-top: 1px solid var(--lms-line);
    }

    .lms-nav__auth .lms-btn {
        width: 100%;
        min-height: 42px;
    }

    .lms-wrap,
    .lms-hero {
        width: auto;
    }

    .lms-wrap {
        width: min(100% - 24px, var(--lms-max));
        padding: 28px 0 56px;
    }

    .lms-hero {
        min-height: 320px;
        padding: 56px 20px;
    }

    .lms-grid {
        grid-template-columns: 1fr;
    }

    .lms-home .lms-grid {
        grid-template-columns: 1fr;
    }

    .lms-section-head {
        display: block;
    }

    .lms-sort {
        margin-top: 14px;
    }

    .lms-course__main,
    .lms-side {
        padding: 20px;
    }
}
