:root {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: #111827;
    background: #f3f4f6;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

button {
    font: inherit;
}

button {
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 700;
}

button:disabled {
    cursor: default;
}

.topbar {
    min-height: 72px;
    padding: 14px 22px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #111827;
    color: white;
}

.brand {
    font-size: 18px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.tagline {
    margin-top: 3px;
    font-size: 13px;
    opacity: 0.7;
}

.top-actions {
    display: flex;
    gap: 8px;
}

.header-button {
    padding: 9px 13px;
    background: #374151;
    color: white;
}

main {
    width: min(850px, calc(100% - 28px));
    margin: 30px auto 80px;
}

.panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
}

.centered {
    padding: 44px;
    text-align: center;
}

.hero {
    padding: 42px;
    text-align: center;
}

.hero h1 {
    margin: 8px 0 10px;
    font-size: clamp(30px, 5vw, 46px);
}

.hero-copy {
    max-width: 600px;
    margin: 0 auto;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.6;
}

.eyebrow {
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.12em;
    color: #6b7280;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 34px;
}

.time-button {
    min-height: 150px;
    padding: 20px 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    background: #f3f4f6;
    color: #111827;
    border: 2px solid transparent;
}

.time-button strong {
    font-size: 42px;
    line-height: 1;
}

.time-button span {
    margin-top: 4px;
    font-size: 18px;
}

.time-button small {
    margin-top: 12px;
    color: #6b7280;
}

.active-time {
    background: #111827;
    color: white;
}

.active-time small {
    color: #d1d5db;
}

.unavailable {
    opacity: 0.45;
}

.mastery-panel {
    margin-top: 16px;
    padding: 24px;

    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px 30px;
    align-items: center;
}

.mastery-panel h2 {
    margin: 5px 0 0;
}

.mastery-number {
    text-align: right;
}

.mastery-number strong {
    display: block;
    font-size: 36px;
}

.mastery-number span {
    font-size: 13px;
    color: #6b7280;
}

.mastery-details {
    grid-column: 1 / -1;
    color: #4b5563;
    font-size: 14px;
}

.session-header {
    padding: 20px 24px;

    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.session-header h1 {
    margin: 5px 0 0;
    font-size: 24px;
}

.step-counter {
    white-space: nowrap;
    color: #6b7280;
    font-weight: 700;
    font-size: 13px;
}

.learning-card {
    margin-top: 16px;
    padding: 34px;
    min-height: 390px;
}

.learning-card h2 {
    margin: 12px 0 22px;
    font-size: 30px;
}

.learning-body {
    font-size: 21px;
    line-height: 1.7;
}

.single-action {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

.big-button {
    padding: 14px 24px;
    min-width: 190px;
}

.primary {
    background: #111827;
    color: white;
}

.secondary {
    background: #e5e7eb;
    color: #111827;
}

.choice-list {
    display: grid;
    gap: 12px;
    margin-top: 26px;
}

.choice {
    width: 100%;
    padding: 16px 18px;
    text-align: left;

    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;

    background: #f3f4f6;
    color: #111827;

    border: 2px solid transparent;
}

.choice:hover:not(:disabled) {
    border-color: #9ca3af;
}

.choice.correct {
    background: #dcfce7;
    border-color: #16a34a;
}

.choice.wrong {
    background: #fee2e2;
    border-color: #dc2626;
}

.choice-key {
    font-weight: 850;
}

.feedback-box {
    margin-top: 22px;
    padding: 18px;

    border-radius: 12px;
    background: #f9fafb;

    line-height: 1.55;
}

.feedback-result {
    margin-bottom: 7px;
    font-weight: 850;
}

.result-card {
    padding: 48px 40px;
}

.result-card h1 {
    font-size: 38px;
    margin: 10px 0 30px;
}

.score strong {
    display: block;
    font-size: 70px;
    line-height: 1;
}

.score span {
    display: block;
    margin-top: 6px;
    color: #6b7280;
}

.result-grid {
    margin: 34px auto;
    max-width: 500px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.result-grid div {
    padding: 18px;
    border-radius: 12px;
    background: #f3f4f6;
}

.result-grid span {
    display: block;
    font-size: 12px;
    color: #6b7280;
}

.result-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 28px;
}

.result-card .big-button {
    margin: 7px;
}

.toast {
    position: fixed;

    left: 50%;
    bottom: 22px;

    transform: translateX(-50%);

    background: #111827;
    color: white;

    padding: 11px 16px;
    border-radius: 10px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 650px) {
    main {
        width: min(100% - 18px, 850px);
        margin-top: 12px;
    }

    .hero {
        padding: 30px 20px;
    }

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

    .time-button {
        min-height: 105px;
    }

    .learning-card {
        padding: 26px 20px;
        min-height: 350px;
    }

    .learning-card h2 {
        font-size: 25px;
    }

    .learning-body {
        font-size: 18px;
    }

    .mastery-panel {
        grid-template-columns: 1fr;
    }

    .mastery-number {
        text-align: left;
    }

    .mastery-details {
        grid-column: auto;
    }
}
