.lf8 {
    --lf8-blue: #1457a6;
    --lf8-blue-dark: #0c376e;
    --lf8-green: #1f7a46;
    --lf8-green-soft: #eaf7ef;
    --lf8-red: #b52a2a;
    --lf8-red-soft: #fff0f0;
    --lf8-amber: #986100;
    --lf8-amber-soft: #fff8e5;
    --lf8-border: #c9d5e6;
    --lf8-surface: #f7faff;
    color: #16243a;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 0 7rem;
}

.lf8__hero {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: 1px solid #8fb0dc;
    border-radius: 18px;
    background: linear-gradient(135deg, #eef6ff 0%, #dcecff 100%);
    box-shadow: 0 12px 30px rgba(20, 87, 166, .12);
}

.lf8__hero-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 4.6rem;
    height: 4.6rem;
    border-radius: 18px;
    background: linear-gradient(145deg, var(--lf8-blue), var(--lf8-blue-dark));
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    box-shadow: inset 0 1px rgba(255, 255, 255, .35), 0 8px 18px rgba(12, 55, 110, .22);
}

.lf8__hero h1,
.lf8__module-header h2,
.lf8__result h2 {
    margin: .15rem 0 .45rem;
    color: #10264a;
}

.lf8__hero p,
.lf8__module-header p,
.lf8__notice,
.lf8__workflow p {
    margin: 0;
    line-height: 1.55;
}

.lf8__notice {
    display: grid;
    gap: .25rem;
    margin: 1rem 0;
    padding: .9rem 1.1rem;
    border-left: 5px solid var(--lf8-amber);
    border-radius: 8px;
    background: var(--lf8-amber-soft);
}

.lf8__workflow {
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--lf8-border);
    border-radius: 14px;
    background: #fff;
}

.lf8__workflow h2 {
    margin: 0 0 .6rem;
    font-size: 1.15rem;
}

.lf8__workflow ol {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
    counter-reset: lf8-step;
}

.lf8__workflow li {
    counter-increment: lf8-step;
    padding: .75rem;
    border-radius: 10px;
    background: var(--lf8-surface);
}

.lf8__workflow li::before {
    content: counter(lf8-step);
    display: inline-grid;
    place-items: center;
    width: 1.55rem;
    height: 1.55rem;
    margin-right: .4rem;
    border-radius: 50%;
    color: #fff;
    background: var(--lf8-blue);
    font-weight: 700;
}

.lf8__tabs {
    position: sticky;
    top: .5rem;
    z-index: 8;
    display: flex;
    gap: .45rem;
    overflow-x: auto;
    padding: .55rem;
    border: 1px solid var(--lf8-border);
    border-radius: 12px;
    background: rgba(247, 250, 255, .96);
    box-shadow: 0 8px 24px rgba(27, 56, 91, .12);
    backdrop-filter: blur(8px);
}

.lf8__tabs button {
    flex: 1 0 auto;
    min-height: 2.7rem;
    padding: .55rem .8rem;
    border: 1px solid #9fb5d2;
    border-radius: 8px;
    background: #fff;
    color: #15365f;
    font-weight: 700;
    cursor: pointer;
}

.lf8__tabs button:hover,
.lf8__tabs button:focus-visible,
.lf8__tabs button[aria-selected="true"] {
    border-color: var(--lf8-blue);
    background: var(--lf8-blue);
    color: #fff;
}

.lf8__module {
    scroll-margin-top: 5rem;
    margin-top: 1.2rem;
}

.lf8__module[hidden] {
    display: none;
}

.lf8__module-header {
    padding: 1.25rem;
    border: 1px solid var(--lf8-border);
    border-radius: 14px 14px 0 0;
    background: linear-gradient(90deg, #eef5ff, #fff);
}

.lf8__knowledge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--lf8-border);
    border-top: 0;
    background: #fff;
}

.lf8__knowledge-grid article {
    padding: .9rem;
    border-radius: 10px;
    background: var(--lf8-surface);
}

.lf8__knowledge-grid h3,
.lf8__knowledge-grid p {
    margin: 0;
}

.lf8__knowledge-grid h3 {
    margin-bottom: .35rem;
    color: var(--lf8-blue-dark);
    font-size: 1rem;
}

.lf8__knowledge-grid p {
    line-height: 1.5;
}

.lf8__quiz {
    margin-top: 1rem;
}

.lf8__quiz-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .75rem;
}

.lf8__quiz-heading h3 {
    margin: 0;
}

.lf8__quiz-heading strong {
    color: var(--lf8-blue-dark);
}

.lf8-question {
    margin: .8rem 0;
    border: 2px solid var(--lf8-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(22, 36, 58, .06);
    transition: border-color .18s ease, background .18s ease;
}

.lf8-question.is-correct {
    border-color: var(--lf8-green);
    background: var(--lf8-green-soft);
}

.lf8-question.is-wrong {
    border-color: var(--lf8-red);
    background: var(--lf8-red-soft);
}

.lf8-question.is-assisted {
    border-color: var(--lf8-amber);
    background: var(--lf8-amber-soft);
}

.lf8-question fieldset {
    min-width: 0;
    margin: 0;
    padding: 1rem;
    border: 0;
}

.lf8-question legend {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: .7rem;
    width: 100%;
    padding: 0;
}

.lf8-question legend > span {
    display: inline-grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 8px;
    background: var(--lf8-blue);
    color: #fff;
    font-weight: 800;
}

.lf8-question legend strong {
    line-height: 1.45;
}

.lf8-question legend small {
    color: #53677f;
    white-space: nowrap;
}

.lf8-question__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
    margin: .9rem 0;
}

.lf8-question__options label {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .7rem .75rem;
    border: 1px solid #b9c8db;
    border-radius: 9px;
    background: #fff;
    cursor: pointer;
}

.lf8-question__options label:hover,
.lf8-question__options label:focus-within {
    border-color: var(--lf8-blue);
    box-shadow: 0 0 0 2px rgba(20, 87, 166, .12);
}

.lf8-question__options input {
    flex: 0 0 auto;
    margin-top: .2rem;
    accent-color: var(--lf8-blue);
}

.lf8-question__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}

.lf8-question__actions button {
    min-height: 2.3rem;
}

.lf8-question__solution-button {
    padding: .45rem .8rem;
    border: 1px solid #9e7b26;
    border-radius: 6px;
    background: #fff8df;
    color: #654a08;
    font-weight: 700;
    cursor: pointer;
}

.lf8-question__feedback,
.lf8-question__solution {
    margin: .8rem 0 0;
    padding: .7rem .8rem;
    border-radius: 8px;
    line-height: 1.45;
}

.lf8-question__feedback {
    font-weight: 750;
}

.is-correct .lf8-question__feedback {
    color: #155e35;
    background: #d8f1e2;
}

.is-wrong .lf8-question__feedback {
    color: #8b2020;
    background: #ffdede;
}

.is-assisted .lf8-question__feedback,
.lf8-question__solution {
    color: #6b4b00;
    background: #ffefbe;
}

.lf8__result {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) 2fr auto;
    align-items: center;
    gap: 1rem;
    margin-top: 1.2rem;
    padding: .9rem 1rem;
    border: 2px solid #6f93c1;
    border-radius: 14px;
    background: rgba(242, 247, 255, .97);
    box-shadow: 0 10px 30px rgba(16, 38, 74, .2);
    backdrop-filter: blur(10px);
}

.lf8__result h2,
.lf8__result p {
    margin: 0;
}

.lf8__result > p {
    grid-column: 1 / -1;
    color: #53677f;
}

.lf8__result-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(5rem, 1fr));
    gap: .45rem;
}

.lf8__result-grid div {
    padding: .45rem .55rem;
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.lf8__result-grid span,
.lf8__result-grid strong {
    display: block;
}

.lf8__result-grid span {
    color: #60728a;
    font-size: .78rem;
}

.lf8__result-grid strong {
    margin-top: .1rem;
    color: var(--lf8-blue-dark);
    font-size: 1.05rem;
}

@media (max-width: 880px) {
    .lf8__workflow ol,
    .lf8__knowledge-grid,
    .lf8-question__options {
        grid-template-columns: 1fr;
    }

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

    .lf8__result > p {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .lf8__hero {
        align-items: flex-start;
    }

    .lf8__hero-mark {
        width: 3.3rem;
        height: 3.3rem;
        border-radius: 12px;
        font-size: 1.25rem;
    }

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

    .lf8-question legend {
        grid-template-columns: auto 1fr;
    }

    .lf8-question legend small {
        grid-column: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lf8-question {
        transition: none;
    }
}
