.ec-course-shelf__header {
    align-items: end;
    gap: 24px;
    margin-bottom: 24px;
}

.ec-course-shelf__header h2 {
    margin-bottom: 10px;
}

.ec-course-shelf__header p:last-child {
    max-width: 760px;
    margin-bottom: 0;
    color: #475569;
}

.ec-course-shelf__navigation {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
}

.ec-course-shelf__viewport {
    position: relative;
    min-width: 0;
    display: flow-root;
}

.ec-course-shelf__arrows {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}

.ec-course-shelf__arrows[hidden] {
    display: none;
}

.ec-course-shelf__all {
    margin-right: 8px;
    color: #6d28d9;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.ec-course-shelf__all:hover {
    text-decoration: underline;
}

.ec-course-shelf__arrows button {
    position: absolute;
    top: var(--shelf-card-midpoint, 50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    color: #111827;
    background: #fff;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .2);
    transform: translateY(-50%);
    pointer-events: auto;
    cursor: pointer;
}

.ec-course-shelf__arrows [data-shelf-prev] {
    left: -22px;
}

.ec-course-shelf__arrows [data-shelf-next] {
    right: -22px;
}

@media (max-width: 759px) {
    .ec-course-shelf__arrows [data-shelf-prev] { left: 0; }
    .ec-course-shelf__arrows [data-shelf-next] { right: 0; }
}

.ec-course-shelf__arrows button:hover:not(:disabled) {
    border-color: #6d28d9;
    color: #6d28d9;
    background: #f5f0ff;
}

.ec-course-shelf__arrows button:disabled {
    visibility: hidden;
    pointer-events: none;
}

.ec-course-shelf__arrows svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ec-course-shelf .ec-course-shelf__rail {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 60px) / 4);
    gap: 20px;
    align-items: stretch;
    min-width: 0;
    overflow-x: auto !important;
    width: calc(100% + 24px);
    margin: -12px -12px -28px;
    padding: 16px 12px 36px;
    scroll-padding-inline: 12px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ec-course-shelf__rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

@media (hover: hover) and (pointer: fine) {
    .ec-course-shelf__arrows {
        opacity: 0;
        transition: opacity .15s ease;
    }

    .ec-course-shelf__arrows button {
        pointer-events: none;
    }

    .ec-course-shelf:hover .ec-course-shelf__arrows,
    .ec-course-shelf:focus-within .ec-course-shelf__arrows {
        opacity: 1;
    }

    .ec-course-shelf:hover .ec-course-shelf__arrows button:not(:disabled),
    .ec-course-shelf:focus-within .ec-course-shelf__arrows button:not(:disabled) {
        pointer-events: auto;
    }
}

.ec-course-shelf .ec-course-card {
    z-index: auto !important;
    scroll-snap-align: start;
}

.ec-course-shelf .ec-course-card__main {
    display: flex;
    flex-direction: column;
}

.ec-course-shelf .ec-course-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.ec-course-shelf .ec-course-card__price-row {
    margin-top: auto;
}

.ec-course-shelf .ec-course-card__image {
    flex-shrink: 0;
    aspect-ratio: 1040 / 515;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 6px !important;
}

.ec-course-shelf .ec-course-card .ec-meta {
    margin-bottom: 6px !important;
}

.ec-course-card__learning-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3px 6px;
    margin: 0 0 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.ec-course-card__learning-meta span + span::before {
    content: "\00b7";
    margin-right: 6px;
}

.ec-home-learning-note {
    padding: 28px 0;
    background: #edf8f7;
    border-top: 1px solid #dcefed;
    border-bottom: 1px solid #dcefed;
}

.ec-home-learning-note__inner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
}

.ec-home-learning-note__icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: #0f766e;
    background: #d6efeb;
}

.ec-home-learning-note__icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.ec-home-learning-note h2 {
    margin: 0 0 6px;
    color: #102a43;
    font-size: 21px;
    line-height: 1.25;
}

.ec-home-learning-note p {
    max-width: 760px;
    margin: 0;
    color: #3b5b63;
    font-size: 14px;
    line-height: 1.5;
}

.ec-home-learning-note a {
    color: #0f766e;
    font-size: 13px;
    font-weight: 800;
}

.ec-home-updates .ec-home-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.ec-home-updates .ec-home-split > div {
    min-width: 0;
}

.ec-home-updates .ec-section__header {
    margin-bottom: 20px;
}

.ec-home-updates .ec-section__header h2 {
    margin-bottom: 0;
}

.ec-home-updates .ec-home-empty {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 144px;
    padding: 20px;
    border: 1px solid #d7d9df;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

.ec-home-empty > span {
    color: #0f766e;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ec-home-empty h3 {
    margin: 0;
    color: #111827;
    font-size: 17px;
    line-height: 1.3;
}

.ec-home-updates .ec-home-empty p {
    display: block;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #475569;
    box-shadow: none;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ec-home-updates .ec-event-list > a {
    grid-template-columns: 54px minmax(0, 1fr);
}

.ec-home-updates .ec-event-list > a span,
.ec-home-updates .ec-event-list > a em {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ec-course-shelf__rail:focus-visible,
.ec-course-shelf__arrows button:focus-visible,
.ec-course-shelf .ec-course-card:focus-visible {
    outline: 2px solid #6d28d9;
    outline-offset: 3px;
}

@media (max-width: 1100px) {
    .ec-course-shelf .ec-course-shelf__rail {
        grid-auto-columns: calc((100% - 40px) / 3);
    }

    .ec-course-shelf__header {
        align-items: start;
        flex-direction: column;
        gap: 16px;
    }

    .ec-course-shelf__navigation {
        width: 100%;
        justify-content: space-between;
    }

    .ec-home-learning-note__inner {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .ec-home-learning-note a {
        grid-column: 2;
    }
}

@media (max-width: 760px) {
    .ec-course-shelf .ec-course-shelf__rail {
        grid-auto-columns: 78%;
        gap: 16px;
    }

    .ec-course-shelf {
        padding: 30px 0;
    }

    .ec-home-updates .ec-home-split {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ec-home-learning-note__inner {
        gap: 12px;
    }

    .ec-home-learning-note h2 {
        font-size: 18px;
    }
}
