.grammar-path {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 2rem 0 3.5rem;
}

.grammar-path__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 1.25rem;
    padding: 2rem;
    border: 1px solid #d8e7f7;
    border-radius: 28px;
    background: linear-gradient(135deg, #f7fbff 0%, #eef8ff 48%, #fff9ef 100%);
    box-shadow: 0 20px 54px rgba(24, 78, 137, 0.08);
}

.grammar-path__hero-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.grammar-path__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: #55718f;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.grammar-path__eyebrow,
.grammar-path__section-heading span {
    color: #1268c5;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.grammar-path__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.55rem;
}

.grammar-path__hero h1 {
    max-width: 760px;
    margin: 0;
    color: #14375f;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.grammar-path__hero-copy > p {
    max-width: 760px;
    margin: 1rem 0 0;
    color: #5b7390;
    font-size: 1rem;
    line-height: 1.7;
}

.grammar-path__hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.35rem;
}

.grammar-path__button,
.grammar-path__notice a,
.grammar-path__step-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.68rem 1rem;
    border-radius: 13px;
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
}

.grammar-path__button--primary {
    background: #1769c8;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 105, 200, 0.18);
}

.grammar-path__button--secondary {
    border: 1px solid #cddff0;
    background: #ffffff;
    color: #315c83;
}

.grammar-path__profile {
    padding: 1.25rem;
    border: 1px solid rgba(188, 213, 237, 0.86);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
}

.grammar-path__level {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.15rem 0.85rem;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e4edf6;
}

.grammar-path__level > span {
    grid-column: 1 / -1;
    color: #6b8097;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.grammar-path__level strong {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    border-radius: 18px;
    background: #1268c9;
    color: #ffffff;
    font-size: 1.65rem;
}

.grammar-path__level small {
    color: #274e75;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.45;
}

.grammar-path__profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.grammar-path__profile-grid div {
    min-width: 0;
    padding: 0.75rem;
    border-radius: 13px;
    background: #f5f9fd;
}

.grammar-path__profile-grid dt {
    color: #7890a7;
    font-size: 0.7rem;
    font-weight: 800;
}

.grammar-path__profile-grid dd {
    margin: 0.18rem 0 0;
    color: #244b72;
    font-size: 0.84rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.grammar-path__notice {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px dashed #b8d3ee;
    border-radius: 17px;
    background: #f6fbff;
}

.grammar-path__notice > i {
    color: #1769c7;
    font-size: 1.5rem;
}

.grammar-path__notice div {
    display: grid;
    gap: 0.15rem;
    flex: 1;
}

.grammar-path__notice strong {
    color: #1a4169;
}

.grammar-path__notice span {
    color: #657d94;
    line-height: 1.45;
}

.grammar-path__notice a {
    background: #1769c8;
    color: #ffffff;
}

.grammar-path__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.grammar-path__summary > div {
    padding: 1rem;
    border: 1px solid #e0e9f3;
    border-radius: 16px;
    background: #ffffff;
}

.grammar-path__summary span,
.grammar-path__summary small {
    display: block;
    color: #778ca1;
    font-size: 0.72rem;
}

.grammar-path__summary span {
    font-weight: 800;
}

.grammar-path__summary strong {
    display: block;
    margin: 0.22rem 0;
    color: #173f69;
    font-size: 1.55rem;
}

.grammar-path__roadmap {
    margin-top: 1.4rem;
    padding: 1.5rem;
    border: 1px solid #e0e9f3;
    border-radius: 24px;
    background: #ffffff;
}

.grammar-path__section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.2rem;
}

.grammar-path__section-heading h2 {
    margin: 0.2rem 0 0;
    color: #173d66;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.grammar-path__section-heading p {
    max-width: 520px;
    margin: 0;
    color: #71869b;
    line-height: 1.55;
    text-align: right;
}

.grammar-path__steps {
    display: grid;
    gap: 0;
    margin: 1.35rem 0 0;
    padding: 0;
    list-style: none;
}

.grammar-path__step {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    min-width: 0;
}

.grammar-path__rail {
    position: relative;
    display: flex;
    justify-content: center;
}

.grammar-path__rail::after {
    content: "";
    position: absolute;
    top: 42px;
    bottom: -1px;
    width: 2px;
    background: #dfe9f3;
}

.grammar-path__step:last-child .grammar-path__rail::after {
    display: none;
}

.grammar-path__rail > span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 2px solid #cedceb;
    border-radius: 50%;
    background: #ffffff;
    color: #617b94;
    font-size: 0.8rem;
    font-weight: 900;
}

.grammar-path__step > article {
    min-width: 0;
    margin: 0 0 1rem;
    padding: 1.1rem;
    border: 1px solid #e0e9f2;
    border-radius: 18px;
    background: #fbfdff;
}

.grammar-path__step.is-current > article {
    border-color: #9bc7ef;
    background: #f4f9ff;
    box-shadow: 0 12px 30px rgba(25, 105, 190, 0.09);
}

.grammar-path__step.is-current .grammar-path__rail > span {
    border-color: #1769c8;
    background: #1769c8;
    color: #ffffff;
}

.grammar-path__step.is-completed > article {
    border-color: #b9e1d5;
    background: #f4fbf8;
}

.grammar-path__step.is-completed .grammar-path__rail > span {
    border-color: #0b9174;
    background: #0b9174;
    color: #ffffff;
}

.grammar-path__step-head,
.grammar-path__step-title,
.grammar-path__step-footer {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.grammar-path__step-head,
.grammar-path__step-footer {
    justify-content: space-between;
}

.grammar-path__step-title {
    min-width: 0;
}

.grammar-path__step-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 12px;
    background: #eaf4ff;
    color: #1769c8;
    font-size: 1.08rem;
}

.grammar-path__step.is-completed .grammar-path__step-icon {
    background: #e0f6ef;
    color: #08775f;
}

.grammar-path__step-title small {
    display: block;
    margin-bottom: 0.12rem;
    color: #7a8da0;
    font-size: 0.7rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.grammar-path__step-title h3 {
    margin: 0;
    color: #193f67;
    font-size: 1.05rem;
}

.grammar-path__type {
    padding: 0.28rem 0.5rem;
    border-radius: 999px;
    background: #eef4fa;
    color: #58748f;
    font-size: 0.66rem;
    font-weight: 850;
    white-space: nowrap;
}

.grammar-path__step > article > p {
    margin: 0.8rem 0;
    color: #617991;
    line-height: 1.6;
}

.grammar-path__step-footer {
    padding-top: 0.75rem;
    border-top: 1px solid #e6edf5;
}

.grammar-path__step-footer > span {
    color: #7a8fa3;
    font-size: 0.74rem;
}

.grammar-path__step-footer a {
    min-height: 38px;
    padding: 0.5rem 0.75rem;
    background: #1769c8;
    color: #ffffff;
}

.grammar-path__step.is-completed .grammar-path__step-footer a {
    background: #0a8c70;
}

.grammar-path__rules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.grammar-path__rules > div {
    padding: 1.1rem;
    border: 1px solid #e3eaf2;
    border-radius: 18px;
    background: #ffffff;
}

.grammar-path__rules span {
    color: #e18413;
    font-size: 1.25rem;
}

.grammar-path__rules strong {
    display: block;
    margin: 0.45rem 0 0.3rem;
    color: #173f68;
}

.grammar-path__rules p {
    margin: 0;
    color: #6c8297;
    line-height: 1.55;
}

@media (max-width: 900px) {
    .grammar-path__hero {
        grid-template-columns: 1fr;
    }

    .grammar-path__summary {
        grid-template-columns: 1fr 1fr;
    }

    .grammar-path__rules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .grammar-path {
        width: min(100% - 1rem, 1180px);
        padding-top: 1rem;
    }

    .grammar-path__hero,
    .grammar-path__roadmap {
        padding: 1rem;
        border-radius: 20px;
    }

    .grammar-path__section-heading,
    .grammar-path__step-head,
    .grammar-path__step-footer,
    .grammar-path__notice {
        align-items: flex-start;
        flex-direction: column;
    }

    .grammar-path__section-heading p {
        max-width: none;
        text-align: left;
    }

    .grammar-path__summary {
        grid-template-columns: 1fr;
    }

    .grammar-path__step {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .grammar-path__rail > span {
        width: 32px;
        height: 32px;
    }

    .grammar-path__rail::after {
        top: 38px;
    }

    .grammar-path__type {
        align-self: flex-start;
    }

    .grammar-path__step-footer a,
    .grammar-path__notice a {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .grammar-path__profile-grid {
        grid-template-columns: 1fr;
    }

    .grammar-path__hero-actions,
    .grammar-path__hero-actions a {
        width: 100%;
    }
}

/* Grammar Professional V8 — Mastery Learning Loop */
.grammar-path__loop {
    margin: 1rem 0 1.25rem;
    padding: 1.2rem;
    border: 1px solid #dce7f3;
    border-radius: 22px;
    background: linear-gradient(145deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: 0 14px 36px rgba(32, 74, 117, 0.07);
}

.grammar-path__loop-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.grammar-path__loop-head > div > span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #1467ba;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.grammar-path__loop-head h2 {
    margin: 0.35rem 0 0.35rem;
    color: #17324d;
    font-size: clamp(1.2rem, 2vw, 1.7rem);
}

.grammar-path__loop-head p {
    margin: 0;
    color: #5e7488;
    line-height: 1.6;
}

.grammar-path__loop-head > strong {
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1268ca;
    font-size: 0.78rem;
}

.grammar-path__loop.is-mastered .grammar-path__loop-head > strong,
.grammar-path__loop.is-improving .grammar-path__loop-head > strong {
    background: #e9f8ef;
    color: #1b7a46;
}

.grammar-path__loop.is-repeat .grammar-path__loop-head > strong {
    background: #fff2e8;
    color: #b45a10;
}

.grammar-path__loop-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.grammar-path__loop-metrics article {
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #e1eaf3;
    border-radius: 16px;
    background: #fff;
}

.grammar-path__loop-metrics article.is-done {
    border-color: #cfead9;
    background: #f4fbf7;
}

.grammar-path__loop-metrics span,
.grammar-path__loop-metrics small,
.grammar-path__loop-metrics strong {
    display: block;
}

.grammar-path__loop-metrics span {
    color: #688096;
    font-size: 0.72rem;
    font-weight: 700;
}

.grammar-path__loop-metrics strong {
    margin-top: 0.3rem;
    color: #183b5b;
    font-size: 1.4rem;
}

.grammar-path__loop-metrics small {
    margin-top: 0.2rem;
    color: #7a8ea1;
    font-size: 0.68rem;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .grammar-path__loop-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .grammar-path__loop-head {
        flex-direction: column;
    }

    .grammar-path__loop-metrics {
        grid-template-columns: 1fr;
    }
}
