.abcde-page,
.abcde-session-main,
.abcde-results {
    width: min(1160px, calc(100% - 32px));
    margin: 0 auto;
}

.abcde-page {
    display: grid;
    gap: 26px;
    padding: 10px 0 48px;
}

.abcde-header,
.abcde-session-header,
.abcde-results-header {
    align-items: center;
}

.abcde-hero {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(480px, 1.2fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border: 1px solid #d7e0dc;
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 10%, rgba(79, 155, 123, 0.16), transparent 32%),
        #ffffff;
    box-shadow: 0 16px 42px rgba(32, 66, 53, 0.07);
}

.abcde-hero h1 {
    margin: 7px 0 12px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.02;
}

.abcde-hero > div > p:last-child {
    max-width: 56ch;
    margin: 0;
    color: #5d6a65;
    line-height: 1.65;
}

.abcde-letter-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.abcde-letter {
    display: flex;
    min-height: 158px;
    padding: 15px 10px;
    border: 1px solid #d6dfdb;
    border-top: 5px solid var(--letter-color);
    border-radius: 16px;
    background: var(--letter-bg);
    text-align: center;
    flex-direction: column;
    justify-content: center;
}

.abcde-letter strong {
    color: var(--letter-color);
    font-size: 2.15rem;
    line-height: 1;
}

.abcde-letter span {
    margin-top: 9px;
    color: #1e2c27;
    font-size: 0.86rem;
    font-weight: 800;
}

.abcde-letter small {
    margin-top: 5px;
    color: #68766f;
    font-size: 0.67rem;
    line-height: 1.25;
}

.abcde-letter--a,
.abcde-sort-target--a { --letter-color: #a04d45; --letter-bg: #fff4f2; }
.abcde-letter--b,
.abcde-sort-target--b { --letter-color: #9a680f; --letter-bg: #fff8e8; }
.abcde-letter--c,
.abcde-sort-target--c { --letter-color: #267251; --letter-bg: #effaf5; }
.abcde-letter--d,
.abcde-sort-target--d { --letter-color: #386b9a; --letter-bg: #f0f7fd; }
.abcde-letter--e,
.abcde-sort-target--e { --letter-color: #72539a; --letter-bg: #f7f2fd; }

.abcde-safety-note {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 19px 22px;
    border: 1px solid #cfe0d7;
    border-radius: 18px;
    background: #f1f8f5;
}

.abcde-safety-note > span {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 50%;
    background: #2d7358;
    color: white;
    font-size: 1.2rem;
    place-items: center;
}

.abcde-safety-note strong {
    color: #245b47;
}

.abcde-safety-note p {
    margin: 4px 0 0;
    color: #52655c;
    line-height: 1.5;
}

.abcde-progress-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 24px 28px;
    border: 1px solid #d7e0dc;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(35, 68, 55, 0.06);
}

.abcde-progress-ring {
    display: grid;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: conic-gradient(#2d7358 var(--abcde-progress), #e5ece8 0);
    position: relative;
    place-content: center;
    text-align: center;
}

.abcde-progress-ring::before {
    position: absolute;
    inset: 8px;
    border-radius: inherit;
    background: white;
    content: "";
}

.abcde-progress-ring strong,
.abcde-progress-ring span {
    position: relative;
    z-index: 1;
}

.abcde-progress-ring strong {
    font-size: 1.65rem;
}

.abcde-progress-ring span {
    color: #68766f;
    font-size: 0.76rem;
}

.abcde-progress-card h2 {
    margin: 5px 0;
    font-size: 1.25rem;
}

.abcde-progress-card p:last-child {
    margin: 0;
    color: #68766f;
}

.abcde-accuracy {
    min-width: 132px;
    padding-left: 22px;
    border-left: 1px solid #e0e7e3;
    text-align: right;
}

.abcde-accuracy strong,
.abcde-accuracy span {
    display: block;
}

.abcde-accuracy strong {
    color: #2d7358;
    font-size: 1.7rem;
}

.abcde-accuracy span {
    max-width: 130px;
    color: #68766f;
    font-size: 0.76rem;
}

.abcde-mistake-callout {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border: 1px solid #e8d3b1;
    border-radius: 18px;
    background: #fff9ee;
}

.abcde-mistake-callout > div {
    display: flex;
    gap: 13px;
    align-items: center;
}

.abcde-mistake-callout > div > span {
    color: #946500;
    font-size: 1.6rem;
}

.abcde-mistake-callout p {
    margin: 4px 0 0;
    color: #735f3d;
}

.abcde-section-heading {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.abcde-section-heading h2 {
    margin: 5px 0 0;
}

.abcde-section-heading > span {
    color: #6d7a74;
    font-size: 0.85rem;
}

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

.abcde-activity-card {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    gap: 14px;
    width: 100%;
    padding: 22px;
    border: 1px solid #d7e0dc;
    border-radius: 20px;
    background: #ffffff;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.abcde-activity-card:hover {
    border-color: #9cbcaf;
    box-shadow: 0 12px 26px rgba(37, 79, 62, 0.09);
    transform: translateY(-2px);
}

.abcde-activity-card--featured {
    grid-column: 1 / -1;
    border-color: #a7c7ba;
    background: linear-gradient(135deg, #ffffff, #f0f8f4);
}

.abcde-activity-card__step {
    display: grid;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e9f2ee;
    color: #2d7358;
    font-size: 0.78rem;
    font-weight: 800;
    place-items: center;
}

.abcde-activity-card__icon {
    display: grid;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #f0f5f2;
    color: #2d7358;
    font-size: 1.05rem;
    font-weight: 900;
    place-items: center;
}

.abcde-activity-card__content {
    display: grid;
    gap: 7px;
}

.abcde-activity-card__content > strong {
    font-size: 1.05rem;
}

.abcde-activity-card__content > small {
    color: #63716b;
    line-height: 1.45;
}

.abcde-card-progress {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e4ebe7;
}

.abcde-card-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2d7358;
}

.abcde-activity-card__content em {
    color: #728079;
    font-size: 0.75rem;
    font-style: normal;
}

.abcde-sources {
    margin: 0;
}

.abcde-session-progress-text {
    display: flex;
    gap: 12px;
    align-items: center;
    color: #5d6a65;
    font-size: 0.85rem;
}

.abcde-session-progress-text strong {
    color: #18201d;
}

.abcde-session-progress {
    height: 5px;
    background: #e3ebe7;
}

.abcde-session-progress span {
    display: block;
    height: 100%;
    background: #2d7358;
    transition: width 220ms ease;
}

.abcde-session-main {
    display: grid;
    gap: 18px;
    max-width: 820px;
    padding: 28px 0 56px;
}

.abcde-review-context {
    width: min(820px, calc(100% - 32px));
    margin: 12px auto 0;
    padding: 12px 16px;
    border: 1px solid #d7e0dc;
    border-radius: 14px;
    background: #f5f8f6;
}

.abcde-review-context strong,
.abcde-review-context span {
    display: block;
}

.abcde-review-context span {
    margin-top: 4px;
    color: #63716b;
    font-size: 0.85rem;
}

.abcde-case-context,
.abcde-question-card {
    padding: 26px;
    border: 1px solid #d7e0dc;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 36px rgba(31, 67, 52, 0.06);
}

.abcde-case-context {
    background:
        radial-gradient(circle at 100% 0, rgba(84, 156, 126, 0.13), transparent 34%),
        #ffffff;
}

.abcde-case-context__heading {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.abcde-case-context__heading span,
.abcde-case-context__heading strong {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
}

.abcde-case-context__heading span {
    background: #eef3f0;
    color: #63716b;
}

.abcde-case-context__heading strong {
    background: #e3f1eb;
    color: #2d7358;
}

.abcde-case-context h1 {
    margin: 15px 0 8px;
    font-size: clamp(1.45rem, 4vw, 2rem);
}

.abcde-case-context p {
    margin: 0;
    color: #55645d;
    line-height: 1.6;
}

.abcde-case-timeline {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

.abcde-case-timeline span {
    display: grid;
    width: 28px;
    height: 28px;
    border: 1px solid #d1dbd6;
    border-radius: 50%;
    background: white;
    color: #7a8781;
    font-size: 0.75rem;
    font-weight: 800;
    place-items: center;
}

.abcde-case-timeline .is-complete {
    border-color: #2d7358;
    background: #2d7358;
    color: white;
}

.abcde-case-timeline .is-current {
    border-color: #2d7358;
    box-shadow: 0 0 0 3px #dcece5;
    color: #2d7358;
}

.abcde-question-meta {
    display: flex;
    gap: 9px;
    align-items: center;
    color: #6d7a74;
    font-size: 0.78rem;
}

.abcde-letter-chip {
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f2ed;
    color: #2d7358;
    font-weight: 900;
}

.abcde-report-question {
    margin-left: auto;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #7b514f;
    cursor: pointer;
    font: inherit;
}

.abcde-question-card h2 {
    margin: 20px 0;
    font-size: clamp(1.25rem, 3vw, 1.65rem);
    line-height: 1.35;
}

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

.abcde-answer {
    min-height: 72px;
    padding: 15px 16px;
    border: 1px solid #d4ddd8;
    border-radius: 14px;
    background: white;
    color: #26312d;
    cursor: pointer;
    font: inherit;
    line-height: 1.4;
    text-align: left;
}

.abcde-answer:not(:disabled):hover {
    border-color: #7fad9a;
    background: #f5faf7;
}

.abcde-answer--wrong,
.abcde-sort-target--wrong {
    border-color: #d7a2a2 !important;
    background: #fff2f2 !important;
    color: #8b2f2f !important;
}

.abcde-answer--correct,
.abcde-sort-target--correct {
    border-color: #69a78d !important;
    background: #edf8f3 !important;
    color: #216349 !important;
}

.abcde-sort-area {
    display: grid;
    gap: 14px;
}

.abcde-sort-card {
    padding: 22px;
    border: 2px dashed #9eb7ab;
    border-radius: 16px;
    background: #f5faf7;
    color: #244f3e;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.45;
    text-align: center;
}

.abcde-sort-area > p {
    margin: 0;
    color: #718078;
    font-size: 0.8rem;
    text-align: center;
}

.abcde-sort-targets {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
}

.abcde-sort-target {
    min-height: 76px;
    padding: 9px 4px;
    border: 1px solid #d4ddd8;
    border-top: 4px solid var(--letter-color);
    border-radius: 12px;
    background: var(--letter-bg);
    cursor: pointer;
    font: inherit;
}

.abcde-sort-target strong,
.abcde-sort-target span {
    display: block;
}

.abcde-sort-target strong {
    color: var(--letter-color);
    font-size: 1.4rem;
}

.abcde-sort-target span {
    margin-top: 4px;
    color: #5d6a65;
    font-size: 0.64rem;
}

.abcde-text-form {
    display: grid;
    gap: 8px;
}

.abcde-text-form label {
    color: #526059;
    font-size: 0.82rem;
    font-weight: 700;
}

.abcde-text-form > div {
    display: flex;
    gap: 10px;
}

.abcde-text-form input {
    min-width: 0;
    flex: 1;
    padding: 13px 14px;
    border: 1px solid #cbd7d1;
    border-radius: 12px;
    font: inherit;
}

.abcde-order-builder {
    display: grid;
    gap: 18px;
}

.abcde-order-slots,
.abcde-order-options {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.abcde-order-slots span,
.abcde-order-options button {
    display: grid;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 1.2rem;
    font-weight: 900;
    place-items: center;
}

.abcde-order-slots span {
    border: 2px dashed #bfcec7;
    background: #f5f8f6;
    color: #66756e;
}

.abcde-order-options button {
    border: 1px solid #86ab9a;
    background: white;
    color: #2d7358;
    cursor: pointer;
}

.abcde-order-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.abcde-feedback {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding: 18px;
    border: 1px solid;
    border-radius: 15px;
}

.abcde-feedback--correct {
    border-color: #aed4c3;
    background: #eef8f3;
    color: #245c47;
}

.abcde-feedback--wrong {
    border-color: #e4c9a5;
    background: #fff8ed;
    color: #775b2b;
}

.abcde-feedback__heading {
    display: flex;
    gap: 9px;
    align-items: center;
}

.abcde-feedback p {
    margin: 0;
    line-height: 1.55;
}

.abcde-feedback__explanation {
    padding-top: 10px;
    border-top: 1px solid currentColor;
    border-top-color: color-mix(in srgb, currentColor 22%, transparent);
}

.abcde-feedback .primary-button {
    width: fit-content;
    margin-top: 5px;
}

.abcde-results {
    max-width: 720px;
    padding: 28px 0 60px;
}

.abcde-results-card {
    padding: 34px;
    border: 1px solid #d7e0dc;
    border-radius: 24px;
    background: white;
    box-shadow: 0 16px 44px rgba(31, 67, 52, 0.08);
    text-align: center;
}

.abcde-results-icon {
    display: block;
    font-size: 2.4rem;
}

.abcde-results-card h1 {
    margin: 8px 0;
}

.abcde-result-percent {
    color: #2d7358;
    font-size: 2.2rem;
}

.abcde-case-summary {
    margin-top: 24px;
    padding: 18px;
    border-radius: 16px;
    background: #f3f8f5;
    text-align: left;
}

.abcde-case-summary h2 {
    margin: 0 0 7px;
    font-size: 1.05rem;
}

.abcde-case-summary p {
    margin: 0;
    color: #55645d;
    line-height: 1.55;
}

.abcde-level-up {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d7bc6b;
    border-radius: 15px;
    background: #fff8db;
    color: #6e5512;
    text-align: left;
}

.abcde-level-up > span {
    font-size: 1.5rem;
}

.abcde-level-up p {
    margin: 3px 0 0;
}

.abcde-results-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 24px;
}

@media (max-width: 850px) {
    .abcde-hero {
        grid-template-columns: 1fr;
    }

    .abcde-progress-card {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .abcde-accuracy {
        grid-column: 1 / -1;
        padding: 14px 0 0;
        border-top: 1px solid #e0e7e3;
        border-left: 0;
        text-align: left;
    }

    .abcde-accuracy span {
        max-width: none;
    }
}

@media (max-width: 650px) {
    .abcde-page,
    .abcde-session-main,
    .abcde-results {
        width: min(100% - 20px, 1160px);
    }

    .abcde-hero,
    .abcde-question-card,
    .abcde-case-context,
    .abcde-results-card {
        padding: 20px;
        border-radius: 18px;
    }

    .abcde-letter-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .abcde-letter {
        min-height: 112px;
        padding: 11px 6px;
    }

    .abcde-letter small {
        display: none;
    }

    .abcde-progress-card {
        gap: 16px;
        padding: 19px;
    }

    .abcde-progress-ring {
        width: 84px;
        height: 84px;
    }

    .abcde-progress-card h2 {
        font-size: 1rem;
    }

    .abcde-progress-card > div:nth-child(2) > p:last-child {
        display: none;
    }

    .abcde-mistake-callout,
    .abcde-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .abcde-activity-grid,
    .abcde-answer-grid {
        grid-template-columns: 1fr;
    }

    .abcde-activity-card--featured {
        grid-column: auto;
    }

    .abcde-activity-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 18px;
    }

    .abcde-activity-card__step {
        display: none;
    }

    .abcde-session-progress-text span {
        display: none;
    }

    .abcde-sort-targets {
        grid-template-columns: repeat(5, minmax(44px, 1fr));
    }

    .abcde-sort-target span {
        display: none;
    }

    .abcde-text-form > div,
    .abcde-results-actions {
        flex-direction: column;
    }

    .abcde-text-form button,
    .abcde-results-actions button {
        width: 100%;
    }

    .abcde-order-slots span,
    .abcde-order-options button {
        width: 46px;
        height: 46px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .abcde-activity-card,
    .abcde-session-progress span {
        transition: none;
    }
}
