.videos-page {
    width: min(100%, var(--content-max));
    margin-inline: auto;
    padding: 8rem var(--gutter) 5rem;
}

@media (min-width: 768px) {
    .videos-page {
        padding-inline: var(--gutter-lg);
        padding-top: 9rem;
    }
}

.videos-page__intro {
    max-width: 42rem;
    margin-bottom: 3.5rem;
}

.videos-title {
    margin: 0.75rem 0 1rem;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(2.875rem, 5vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--color-eco-ink);
    text-wrap: balance;
    hyphens: none;
}

.videos-page__intro p,
.videos-page__empty,
.video-detail__summary {
    color: var(--color-eco-ink-soft);
    font-size: 15px;
    line-height: 1.6;
}

.video-library {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
    gap: 1.25rem;
}

.video-card {
    display: block;
    overflow: hidden;
    border: 1px solid var(--color-eco-border);
    border-radius: 10px;
    background: var(--color-eco-paper);
    transition: background 180ms ease, border-color 180ms ease;
}

.video-card:hover {
    border-color: rgba(42, 47, 32, 0.26);
    background: var(--color-eco-cream-warm);
}

.video-card:focus-visible,
.video-queue__item:focus-visible,
.video-detail__back:focus-visible {
    outline: 2px solid var(--color-eco-cta-tan);
    outline-offset: 3px;
}

.video-card__poster {
    position: relative;
    display: grid;
    aspect-ratio: 16 / 9;
    place-items: center;
    overflow: hidden;
    background: var(--color-eco-forest);
}

.video-card__poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card__play {
    position: relative;
    z-index: 1;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(247, 241, 223, 0.8);
    border-radius: 999px;
    color: var(--color-eco-cream);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.video-card__duration {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    z-index: 1;
    padding: 0.25rem 0.4rem;
    background: rgba(42, 47, 32, 0.82);
    border-radius: 8px;
    color: var(--color-eco-cream);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
}

.video-card__content {
    padding: 1.05rem 1.15rem 1.2rem;
}

.video-card__content h2,
.video-detail__title {
    font-family: var(--font-display);
    font-weight: 500;
    text-wrap: balance;
    hyphens: none;
}

.video-card__content h2 {
    font-size: 22px;
    line-height: 1.45;
}

.video-card__content p,
.video-detail__subtitle {
    margin-top: 0.4rem;
    color: var(--color-eco-ink-soft);
    font-size: 13.5px;
    line-height: 1.5;
}

.video-detail {
    width: min(100%, var(--content-max-wide));
    margin-inline: auto;
    padding: 7.5rem var(--gutter) 5rem;
}

.video-detail__back {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--color-eco-olive-deep);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.video-detail__layout {
    display: grid;
    gap: 2.5rem;
}

.video-player {
    overflow: hidden;
    aspect-ratio: 11 / 5;
    border-radius: 14px;
    background: var(--color-eco-forest);
    box-shadow: 0 30px 60px -30px rgba(42, 47, 32, 0.25);
}

.video-player .jwplayer {
    width: 100% !important;
    height: 100% !important;
    opacity: 0;
    transition: opacity 1.6s ease;
}

.video-player.is-ready .jwplayer {
    opacity: 1;
}

.video-detail__main .eco-eyebrow {
    display: block;
    margin-top: 1.75rem;
}

.video-detail__title {
    margin-top: 0.7rem;
    font-size: clamp(2.75rem, 4vw, 2.875rem);
    line-height: 1.18;
    letter-spacing: -0.005em;
}

.video-detail__summary {
    max-width: 48rem;
    margin-top: 1.25rem;
}

.video-queue {
    align-self: start;
    overflow: hidden;
    border: 1px solid var(--color-eco-border);
    border-radius: 10px;
    background: var(--color-eco-paper);
}

.video-queue li+li {
    border-top: 1px solid var(--color-eco-border);
}

.video-queue__item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.25rem;
    text-align: left;
    transition: background 160ms ease;
}

.video-queue__item:hover,
.video-queue__item.is-active {
    background: var(--color-eco-cream-warm);
}

.video-queue__poster {
    position: relative;
    display: block;
    flex: none;
    width: 100px;
    height: 50px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-eco-forest);
}

.video-queue__poster img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-queue__duration {
    position: absolute;
    right: 0.45rem;
    bottom: 0.45rem;
    padding: 0.2rem 0.35rem;
    border-radius: 8px;
    background: rgba(42, 47, 32, 0.82);
    color: var(--color-eco-cream);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
}

.video-queue__title {
    flex: 1;
    min-width: 0;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.3;
}

@media (max-width: 767px) {
    .video-queue {
        overflow: hidden;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .video-queue ol {
        display: flex;
        gap: 0.75rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scroll-snap-type: inline proximity;
        scrollbar-width: thin;
    }

    .video-queue li {
        flex: 0 0 9rem;
        scroll-snap-align: start;
    }

    .video-queue li+li {
        border: 0;
    }

    .video-queue__item {
        display: block;
        padding: 0.65rem;
        border-radius: 10px;
    }

    .video-queue__item:hover {
        background: transparent;
    }

    .video-queue__item.is-active {
        background: var(--color-eco-cream-warm);
    }

    .video-queue__poster {
        width: 100%;
        height: auto;
        aspect-ratio: 16/9;
    }

    .video-queue__title {
        display: block;
        margin-top: 0.65rem;
        font-size: 13.5px;
    }
}

@media (min-width: 768px) {
    .video-detail {
        padding: 9rem var(--gutter-lg) 6rem;
    }
}

@media (min-width: 1024px) {
    .video-detail__layout {
        grid-template-columns: minmax(0, 1fr) 20rem;
        align-items: start;
    }

    .video-queue {
        max-height: calc(100vh - 11rem);
        overflow: auto;
    }
}

@media (prefers-reduced-motion: reduce) {

    .video-card,
    .video-player .jwplayer {
        transition: none;
    }
}