:root {
    --ink: #101828;
    --muted: #667085;
    --line: #d0d5dd;
    --surface: #ffffff;
    --soft: #f7f8fb;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --gold: #b7791f;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--soft);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    min-height: 72px;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 20;
}

.brand,
.nav,
.hero-actions,
.lesson-actions,
.dashboard-head,
.study-toolbar,
.lesson-meta {
    align-items: center;
    display: flex;
    gap: 14px;
}

.brand {
    font-weight: 800;
}

.brand-mark {
    align-items: center;
    background: var(--ink);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 38px;
    justify-content: center;
    width: 38px;
}

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

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 34px 24px 64px;
}

.button {
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
}

.button:hover {
    background: var(--accent-dark);
}

.button.ghost {
    background: #fff;
    border-color: var(--line);
    color: var(--ink);
}

.button.large {
    min-height: 50px;
    padding: 13px 20px;
}

.hero {
    align-items: center;
    display: grid;
    gap: 32px;
    grid-template-columns: 1.02fr 0.98fr;
    min-height: calc(100vh - 150px);
}

.hero h1,
.dashboard-head h1,
.auth-card h1,
.media-panel h1 {
    letter-spacing: 0;
    line-height: 1.05;
    margin: 0;
}

.hero h1 {
    font-size: 58px;
}

.hero p {
    color: var(--muted);
    font-size: 19px;
    max-width: 640px;
}

.eyebrow,
.tag,
.step {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.hero-panel,
.auth-card,
.lesson-card,
.media-panel,
.study-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.08);
}

video,
audio {
    display: block;
    width: 100%;
}

.hero-panel video {
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    object-fit: cover;
}

.ai-disclosure {
    color: var(--muted);
    font-size: 12px;
    margin: 10px 12px 12px;
}

.features {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, 1fr);
    padding: 24px 0;
}

.features article {
    border-top: 3px solid var(--accent);
    padding-top: 16px;
}

.features strong,
.features span {
    display: block;
}

.features span,
.lesson-card p,
.auth-card p,
.media-panel p,
.rank-row small {
    color: var(--muted);
}

.auth-card {
    margin: 48px auto;
    max-width: 460px;
    padding: 30px;
}

form {
    display: grid;
    gap: 14px;
}

label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    gap: 6px;
}

input {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    min-height: 46px;
    padding: 10px 12px;
}

.alert {
    background: #fff4ed;
    border: 1px solid #fecdca;
    border-radius: 8px;
    color: var(--danger);
    margin: 14px 0;
    padding: 12px;
}

.alert.success {
    background: #ecfdf3;
    border-color: #abefc6;
    color: #067647;
}

.dashboard-head {
    justify-content: space-between;
    margin-bottom: 24px;
}

.dashboard-head h1 {
    font-size: 36px;
}

.lesson-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.method-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    margin-bottom: 24px;
    padding: 22px;
}

.method-panel h2 {
    margin: 0;
}

.method-panel p {
    color: var(--muted);
    margin: 0;
    max-width: 920px;
}

.method-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.method-steps span {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
}

.lesson-card {
    display: grid;
    gap: 14px;
    padding: 24px;
}

.lesson-card h2 {
    margin: 0;
}

.lesson-method {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 12px;
}

.lesson-method strong {
    color: var(--ink);
    font-size: 13px;
}

.lesson-method span {
    color: var(--muted);
    font-size: 14px;
}

.progress {
    background: #eaecf0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.progress span {
    background: var(--accent);
    display: block;
    height: 100%;
}

.lesson-meta {
    color: var(--muted);
    font-size: 13px;
    justify-content: space-between;
}

.lesson-shell {
    display: grid;
    gap: 22px;
    grid-template-columns: 380px minmax(0, 1fr);
}

.media-panel,
.study-panel {
    padding: 24px;
}

.media-panel {
    align-self: start;
    display: grid;
    gap: 16px;
}

.media-panel h1 {
    font-size: 30px;
}

.study-toolbar {
    justify-content: space-between;
    margin-bottom: 18px;
}

.study-toolbar h2 {
    margin: 0;
}

#counter {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 800;
    min-width: 86px;
    padding: 8px 12px;
    text-align: center;
}

.cards {
    min-height: 390px;
    position: relative;
}

.study-card {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: none;
    min-height: 360px;
    padding: 34px;
}

.study-card.active {
    display: grid;
    gap: 18px;
}

.study-card h3 {
    font-size: 58px;
    line-height: 1;
    margin: 0;
}

.word-pt {
    color: var(--accent);
    font-size: 28px;
    font-weight: 800;
    margin: 0;
}

.phrase {
    border-top: 1px solid var(--line);
    display: grid;
    gap: 12px;
    padding-top: 24px;
}

.phrase strong {
    font-size: 30px;
}

.phrase span {
    color: var(--muted);
    font-size: 22px;
}

.lesson-actions {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 18px;
}

.ranking {
    display: grid;
    gap: 10px;
}

.rank-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 70px 1fr auto;
    padding: 16px;
}

.rank-row strong {
    color: var(--accent);
}

.empty {
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    padding: 24px;
}

@media (max-width: 880px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .page {
        padding: 24px 16px 48px;
    }

    .hero,
    .features,
    .lesson-shell {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero h1 {
        font-size: 40px;
    }

    .lesson-actions,
    .rank-row {
        grid-template-columns: 1fr;
    }

    .study-card h3 {
        font-size: 42px;
    }

    .phrase strong {
        font-size: 24px;
    }
}
