/* Phase 2 W6: Blog Index limited improvements only. */
.editorial-index--learning .editorial-accordion__description {
    margin: 0;
    padding: .95rem .55rem .75rem;
    border-top: 1px solid rgba(23, 36, 58, .1);
    color: var(--ed-muted);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.75;
}

.editorial-index--learning .editorial-row__badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #fff0d6;
    color: #9b5a0e;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .02em;
}

.editorial-index--learning .editorial-category-back {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    min-height: 44px;
    margin: .45rem .35rem .15rem;
    padding: .45rem .65rem;
    color: var(--ed-blue);
    font-size: .78rem;
    font-weight: 900;
    text-decoration: none;
}

.editorial-index--learning .editorial-category-back:hover,
.editorial-index--learning .editorial-category-back:focus-visible {
    text-decoration: underline;
    text-underline-offset: .2em;
}

.editorial-index--learning .editorial-service-section {
    scroll-margin-top: 7rem;
}

.editorial-index--learning .editorial-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .9rem;
}

.editorial-index--learning .editorial-service-card {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 184px;
    align-content: start;
    padding: 1.35rem 3rem 1.3rem 1.35rem;
    border: 1px solid var(--ed-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.editorial-index--learning .editorial-service-card:hover {
    transform: translateY(-2px);
    border-color: rgba(49, 95, 137, .28);
    box-shadow: var(--ed-shadow);
}

.editorial-index--learning .editorial-service-card:focus-visible {
    outline: 3px solid rgba(49, 95, 137, .35);
    outline-offset: 3px;
}

.editorial-index--learning .editorial-service-card--primary {
    border-color: rgba(49, 95, 137, .25);
    background: linear-gradient(145deg, #edf4fa, #fffdf9);
}

.editorial-index--learning .editorial-service-card__eyebrow {
    margin-bottom: .5rem;
    color: var(--ed-green);
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .1em;
}

.editorial-index--learning .editorial-service-card > strong {
    color: var(--ed-ink);
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.55;
}

.editorial-index--learning .editorial-service-card > span:not(.editorial-service-card__eyebrow) {
    margin-top: .55rem;
    color: var(--ed-text);
    font-size: .87rem;
    font-weight: 500;
    line-height: 1.75;
}

.editorial-index--learning .editorial-service-card > b {
    position: absolute;
    right: 1.2rem;
    bottom: 1.15rem;
    color: var(--ed-blue);
    font-size: 1.1rem;
}

/* The diary stays intact; only its position changes in W6. */
.editorial-index--learning .editorial-service-section + .editorial-diary-banner {
    margin-top: -.2rem;
}

@media (max-width: 600px) {
    .editorial-index--learning .editorial-hero {
        padding-bottom: 2.35rem;
    }

    .editorial-index--learning .editorial-main {
        padding-top: 1.25rem;
    }

    .editorial-index--learning .editorial-section--compact {
        margin-bottom: 3.15rem;
    }

    .editorial-index--learning .editorial-trouble-link {
        min-height: 70px;
        padding-block: .55rem;
    }

    .editorial-index--learning .editorial-accordion__description {
        padding: .8rem .25rem .6rem;
        font-size: .82rem;
        line-height: 1.7;
    }

    .editorial-index--learning .editorial-category-back {
        width: 100%;
        justify-content: flex-end;
        margin-inline: 0;
        padding-right: .25rem;
    }

    .editorial-index--learning .editorial-service-grid {
        grid-template-columns: 1fr;
        gap: .7rem;
    }

    .editorial-index--learning .editorial-service-card {
        min-height: 0;
        padding: 1rem 2.8rem 1rem 1rem;
        border-radius: 15px;
    }

    .editorial-index--learning .editorial-service-card > strong {
        font-size: 1rem;
    }

    .editorial-index--learning .editorial-service-card > span:not(.editorial-service-card__eyebrow) {
        margin-top: .35rem;
        font-size: .82rem;
        line-height: 1.65;
    }

    .editorial-index--learning .editorial-service-card > b {
        right: 1rem;
        bottom: 1rem;
    }

    .editorial-index--learning .editorial-service-section + .editorial-diary-banner {
        margin-top: -.1rem;
        margin-bottom: 3.15rem;
    }
}

@media (max-width: 359px) {
    .editorial-index--learning .editorial-service-card {
        padding-left: .85rem;
        padding-right: 2.55rem;
    }

    .editorial-index--learning .editorial-accordion summary {
        grid-template-columns: minmax(0, 1fr) auto 30px;
        gap: .55rem;
        padding-inline: .7rem;
    }
}
