:root {
    --bg: #081019;
    --sidebar: #0c151e;
    --panel: #101923;
    --panel-2: #141d27;
    --panel-3: #1b2531;
    --border: #27313d;
    --text: #f5f7fa;
    --muted: #91a0b1;
    --teal: #087673;
    --teal-bright: #0aa7a2;
    --orange: #f97316;
    --green: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 320px;
    overflow-y: auto;
    padding: 22px 20px;
    background: var(--sidebar);
    border-right: 1px solid var(--border);
}

.main-content {
    margin-left: 320px;
    min-height: 100vh;
    padding: 30px 48px 70px;
    max-width: 1250px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--orange);
    color: white;
    font-weight: 800;
    font-size: 13px;
}

.brand strong {
    display: block;
    font-size: 17px;
}

.brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
}

.back-link {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-align: left;
    padding: 7px 2px 22px;
}

.course-summary {
    padding-bottom: 24px;
}

.course-summary h2 {
    margin: 0 0 17px;
    font-size: 17px;
}

.course-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #123a3b;
}

.course-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: var(--teal-bright);
    transition: width .25s ease;
}

.course-summary small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
}

.course-menu {
    padding-bottom: 20px;
}

.module {
    margin-bottom: 24px;
}

.module-title {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 13px;
}

.module-level {
    display: block;
    margin-bottom: 7px;
    color: var(--teal-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.lesson-item {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #aab6c5;
    text-align: left;
    padding: 10px 8px;
    margin-bottom: 2px;
}

.lesson-item:hover {
    background: var(--panel-2);
    color: white;
}

.lesson-item.active {
    background: var(--panel-3);
    color: white;
}

.lesson-dot {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    border: 1px solid #8491a0;
    border-radius: 50%;
}

.lesson-item.active .lesson-dot {
    border-color: var(--teal-bright);
    box-shadow: inset 0 0 0 3px var(--panel-3);
    background: var(--teal-bright);
}

.lesson-item.completed .lesson-dot {
    border-color: var(--green);
    background: var(--green);
}

.lesson-name {
    line-height: 1.35;
    font-size: 12px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border);
}

.eyebrow {
    color: var(--teal-bright);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
}

.topbar h1 {
    margin: 8px 0 0;
    font-size: clamp(22px, 3vw, 31px);
    line-height: 1.2;
}

.language-badge {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: #aebdcd;
    padding: 6px 10px;
    font-size: 10px;
}

.primary-btn,
.secondary-btn {
    border-radius: 7px;
    padding: 10px 15px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
}

.primary-btn {
    background: var(--teal-bright);
    color: #031313;
}

.primary-btn:hover {
    filter: brightness(1.08);
}

.secondary-btn {
    background: #17212c;
    border-color: var(--border);
    color: #dce3ea;
}

.secondary-btn:hover {
    background: #1d2935;
}

button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .sidebar {
        position: static;
        width: 100%;
        max-height: none;
    }

    .main-content {
        margin-left: 0;
        padding: 24px 18px 50px;
    }

    .topbar {
        flex-direction: column;
    }
}
