:root {
    --heading-font: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #b1d1cf;
    color: #060b6f;
    padding: 20px;
    min-height: 100vh;
}

a {
    color: #0450a8;
}

a:hover {
    color: #060b6f;
}

h1 a {
    color: inherit;
    text-decoration: none;
}

h1 a:hover {
    text-decoration: underline;
}

header {
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    border: 1px solid rgba(6, 11, 111, 0.12);
}

h1,
h1 a,
h2,
h3,
.video-title,
.video-modal-title {
    font-family: var(--heading-font);
}

h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin-bottom: 10px;
}

.status-notice {
    display: inline-block;
    margin: 0 auto 18px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.55);
    color: #060b6f;
    border-radius: 4px;
    border: 1px solid rgba(6, 11, 111, 0.14);
    border-left: 3px solid #986c32;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 760px;
    text-align: left;
    line-height: 1.45;
}

.subtitle {
    font-size: 1.2rem;
    color: #2e3a7a;
    max-width: 800px;
    margin: 0 auto;
}

/* ── Search bar ── */
.search-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid rgba(6, 11, 111, 0.12);
}

.search-section label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.04em;
    color: #060b6f;
}

.search-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

#transcriptSearch {
    flex: 1;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(6, 11, 111, 0.2);
    border-radius: 8px;
    color: #060b6f;
    font-size: 1rem;
    padding: 10px 14px;
    outline: none;
    transition: border-color 0.2s;
}

#transcriptSearch::placeholder {
    color: rgba(6, 11, 111, 0.5);
}

#transcriptSearch:focus {
    border-color: #986c32;
}

#searchToggleAll,
#searchClear,
#toggleAllVideos {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(6, 11, 111, 0.2);
    border-radius: 8px;
    color: #060b6f;
    font-size: 0.95rem;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

#searchToggleAll:hover,
#searchClear:hover,
#toggleAllVideos:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(6, 11, 111, 0.3);
}

#searchStatus {
    font-size: 0.85rem;
    color: #2e3a7a;
    margin-top: 8px;
}

#searchResults {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(177, 209, 207, 0.12);
    border: 1px solid rgba(177, 209, 207, 0.25);
    border-radius: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    min-height: 40px;
}

.search-result:hover,
.search-result:focus-visible {
    background: rgba(6, 11, 111, 0.12);
    border-color: rgba(152, 108, 50, 0.35);
    outline: none;
}

.search-result-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #060b6f;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}

.search-result-time {
    font-size: 0.75rem;
    background: rgba(6, 11, 111, 0.08);
    color: #2e3a7a;
    border-radius: 20px;
    padding: 2px 8px;
    white-space: nowrap;
    flex: none;
    margin-bottom: 0;
}

.search-result-text {
    font-size: 0.9rem;
    line-height: 1.45;
    flex: 1 1 0;
    min-width: 0;
}

.search-result-context {
    display: inline;
}

.context-line {
    display: inline;
    margin: 0;
    padding: 0;
}

.context-line.before::after,
.context-line.match::after {
    content: ' ';
}

.context-line.before,
.context-line.after {
    color: #2e3a7a;
}

.context-line.match {
    font-weight: 700;
}

.search-result-text mark {
    background: rgba(177, 209, 207, 0.75);
    color: #060b6f;
    border-radius: 2px;
    padding: 0 2px;
}

/* ── Search result grouping ── */
.search-result-group {
    background: rgba(177, 209, 207, 0.08);
    border: 1px solid rgba(177, 209, 207, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.search-result-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(177, 209, 207, 0.15);
    border-bottom: 1px solid rgba(177, 209, 207, 0.2);
    padding: 10px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #060b6f;
    transition: background 0.2s;
}

.search-result-group-title:hover {
    background: rgba(177, 209, 207, 0.25);
}

.search-result-group-title-text {
    display: inline-flex;
    align-items: center;
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.search-result-group-title-text:hover {
    text-decoration: underline;
}

.search-result-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.8em;
    min-height: 1.8em;
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    padding: 0;
    margin-left: 1rem;
    transition: transform 0.2s;
    font-size: 1rem;
}

.search-result-group-toggle[aria-expanded="false"] {
    transform: rotate(-90deg);
}

.search-result-group-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.search-result-group-items[hidden] {
    display: none !important;
}

.search-result-group .search-result {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(177, 209, 207, 0.1);
    border-radius: 0;
    padding: 10px 16px;
    margin: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.search-result-group .search-result:last-child {
    border-bottom: none;
}

.search-result-group .search-result:hover {
    background: rgba(177, 209, 207, 0.12);
    border-color: transparent;
}

/* ── Top ten clips ── */
.top-clips-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    padding: 20px 24px 14px;
    border: 1px solid rgba(6, 11, 111, 0.12);
}

.top-clips-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin-bottom: 14px;
}

.top-clips-header h2 {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #060b6f;
}

.top-clips-sub {
    font-size: 0.88rem;
    color: #2e3a7a;
}

.top-clips-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 15.5rem;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 4px 2px 12px;
    margin: 0;
    list-style: none;
    scrollbar-width: thin;
    scrollbar-color: rgba(6, 11, 111, 0.35) transparent;
}

.top-clips-row::-webkit-scrollbar {
    height: 6px;
}

.top-clips-row::-webkit-scrollbar-thumb {
    background: rgba(6, 11, 111, 0.3);
    border-radius: 3px;
}

.top-clips-row > li {
    scroll-snap-align: start;
    min-height: 19rem;
}

.top-clip-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    width: 100%;
    height: 100%;
    min-height: 19rem;
    border: 1px solid rgba(6, 11, 111, 0.2);
    border-radius: 12px;
    overflow: hidden;
    background: #060b6f;
    color: #fff;
    font: inherit;
    text-align: left;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.top-clip-card:hover,
.top-clip-card:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(6, 11, 111, 0.35);
    border-color: #986c32;
    outline: none;
}

.top-clip-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.9;
    transition: transform 0.3s;
}

.top-clip-card:hover .top-clip-photo {
    transform: scale(1.04);
}

.top-clip-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(6, 11, 111, 0.25) 0%,
            rgba(6, 11, 111, 0.55) 42%,
            rgba(4, 6, 60, 0.94) 78%,
            rgba(3, 5, 48, 0.98) 100%);
}

.top-clip-rank {
    position: absolute;
    top: 2px;
    left: 10px;
    font-family: var(--heading-font);
    font-size: 3.4rem;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.92);
    text-shadow: 0 2px 12px rgba(6, 11, 111, 0.6);
}

@supports not (-webkit-text-stroke: 2px #fff) {
    .top-clip-rank {
        color: rgba(255, 255, 255, 0.92);
    }
}

.top-clip-duration {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    color: #060b6f;
    font-size: 0.75rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
}

.top-clip-duration svg {
    display: block;
}

.top-clip-quote {
    position: relative;
    padding: 0 14px 10px;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.42;
    text-shadow: 0 1px 8px rgba(3, 5, 48, 0.8);
}

.top-clip-meta {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 14px 13px;
}

.top-clip-speaker {
    font-family: var(--heading-font);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #b1d1cf;
}

.top-clip-talk {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 480px) {
    .top-clips-row {
        grid-auto-columns: 82vw;
    }

    .top-clips-row > li,
    .top-clip-card {
        min-height: 17rem;
    }
}

/* ── Day sections ── */
.video-container {
    display: grid;
    gap: 40px;
    padding: 20px 0;
}

.day-section {
    display: grid;
    gap: 28px;
}

.day-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    padding: 24px 10px 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #060b6f;
}

.video-grid {
    columns: 22rem;
    column-gap: 25px;
}

@supports (grid-template-rows: masonry) {
    .video-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
        grid-template-rows: masonry;
        gap: 25px;
        columns: unset;
        column-gap: unset;
    }
}

.video-grid:has(.video-card.condensed) {
    columns: 1;
    max-width: 56rem;
}

@supports (grid-template-rows: masonry) {
    .video-grid:has(.video-card.condensed) {
        grid-template-columns: 1fr;
        max-width: 56rem;
    }
}

/* ── Video cards ── */
.video-card {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, opacity 0.3s ease, filter 0.3s ease;
    border: 6px solid #e8e8f1;
    display: flex;
    flex-direction: column;
    width: 100%;
    break-inside: avoid;
    margin-bottom: 25px;
}

@supports (grid-template-rows: masonry) {
    .video-card {
        margin-bottom: 0;
    }
}

.video-card.condensed {
    background: transparent;
    box-shadow: none;
    border: none;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    padding: 0px;
    margin: 0;
}

.video-card.condensed .video-info {
    padding: 0;
}

.video-card.condensed *:not(.video-info):not(.video-title):not(.video-icon):not(.video-icon *) {
    display: none;
}

.video-card.condensed .video-title>.video-icon,
.video-card.condensed .video-title>.video-icon * {
    display: inline-flex;
}

.open-video-modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    margin-top: 10px;
    background: rgba(152, 108, 50, 0.18);
    border: 1px solid rgba(152, 108, 50, 0.35);
    border-radius: 8px;
    color: #060b6f;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.open-video-modal-btn:hover {
    background: rgba(152, 108, 50, 0.32);
}

.open-video-modal-btn:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: 2px;
}

/* ── Video modal ── */
.video-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(6, 11, 111, 0.35);
}

.video-modal-overlay[hidden] {
    display: none !important;
}

.video-modal {
    display: flex;
    flex-direction: column;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    background: #f4f8f7;
    border-radius: 8px;
    border: 1px solid rgba(6, 11, 111, 0.14);
    overflow: hidden;
    color: #060b6f;
}

.video-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(177, 209, 207, 0.35);
    border-bottom: 1px solid rgba(6, 11, 111, 0.12);
    flex-shrink: 0;
}

.video-modal-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
    max-width: min(100%, 28rem);
}

.video-modal-title {
    font-size: 1.05rem;
    line-height: 1.4;
    font-weight: 700;
    margin: 0;
    padding-right: 8px;
}

.video-modal-close {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 8px;
    background: rgba(6, 11, 111, 0.1);
    color: #060b6f;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s;
}

.video-modal-close:hover {
    background: rgba(6, 11, 111, 0.2);
}

.video-modal-close:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: 2px;
}

.video-modal-workspace {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: rgba(177, 209, 207, 0.12);
}

.video-modal-panel {
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 260px;
    min-height: 180px;
    max-width: calc(100% - 24px);
    max-height: calc(100% - 24px);
    overflow: auto;
    resize: both;
    border: 1px solid rgba(6, 11, 111, 0.14);
    border-radius: 6px;
    background: #fff;
}

.video-modal-panel--video {
    left: 12px;
    top: 12px;
    width: calc(58% - 18px);
    height: calc(100% - 24px);
    background: #000;
    z-index: 1;
}

.video-modal-panel--transcript {
    left: calc(58% + 6px);
    top: 12px;
    width: calc(42% - 18px);
    height: calc(100% - 24px);
    z-index: 2;
}

.video-modal-panel.is-dragging {
    opacity: 0.96;
    border-color: rgba(6, 11, 111, 0.28);
}

.video-modal-panel-handle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(6, 11, 111, 0.1);
    background: rgba(177, 209, 207, 0.28);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.video-modal-panel--video .video-modal-panel-handle {
    background: rgba(255, 255, 255, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
}

.video-modal-panel-handle:active {
    cursor: grabbing;
}

.video-modal-panel-handle-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.video-modal-panel-handle-hint {
    margin-left: auto;
    font-size: 0.68rem;
    color: #2e3a7a;
    letter-spacing: 0.02em;
}

.video-modal-panel-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-modal-player {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    background: #000;
    --plyr-font-size-small: 1.6rem;
    --plyr-font-size-base: 1.8rem;
    --plyr-font-size-large: 1.8rem;
    --plyr-font-size-xlarge: 1.8rem;
}

.video-modal-player video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.video-modal-player .plyr,
.video-modal-player .plyr__video-wrapper {
    height: 100%;
}

.video-modal-player .plyr__caption {
    line-height: 1.6;
}

.video-modal-links {
    flex: 0 0 auto;
    padding: 10px 14px 14px;
    background: #111;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.video-modal-links-heading {
    margin: 0 0 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.subtitle-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.subtitle-links a {
    color: #8fb85a;
    font-size: 0.875rem;
    line-height: 1.4;
    word-break: break-all;
    text-decoration: none;
}

.subtitle-links a:hover {
    text-decoration: underline;
}

.video-modal-transcript {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.video-modal-transcript-toolbar {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-bottom: 1px solid rgba(6, 11, 111, 0.1);
    background: rgba(177, 209, 207, 0.18);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.video-modal-transcript-search-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.video-modal-transcript-search {
    flex: 1 1 auto;
    min-width: 0;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid rgba(6, 11, 111, 0.2);
    border-radius: 6px;
    color: #060b6f;
    font-size: 0.82rem;
    padding: 7px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.video-modal-transcript-search::placeholder {
    color: rgba(6, 11, 111, 0.5);
}

.video-modal-transcript-search:focus {
    border-color: #986c32;
}

.video-modal-transcript-search:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.video-modal-transcript-search-status {
    flex: 0 0 auto;
    font-size: 0.75rem;
    color: #2e3a7a;
    white-space: nowrap;
}

.video-modal-transcript-sync-btn,
.video-modal-transcript-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(152, 108, 50, 0.18);
    border: 1px solid rgba(152, 108, 50, 0.35);
    border-radius: 6px;
    color: #060b6f;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 7px 12px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.video-modal-transcript-sync-btn:hover:not(:disabled),
.video-modal-transcript-view-btn:hover:not(:disabled) {
    background: rgba(152, 108, 50, 0.32);
}

.video-modal-transcript-sync-btn:focus-visible,
.video-modal-transcript-view-btn:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: 2px;
}

.video-modal-transcript-sync-btn:disabled,
.video-modal-transcript-view-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.video-modal-transcript-view-btn[aria-pressed="true"] {
    background: rgba(6, 11, 111, 0.12);
    border-color: rgba(6, 11, 111, 0.28);
}

.video-modal-transcript-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 14px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(6, 11, 111, 0.35) transparent;
}

.video-modal-transcript-body::-webkit-scrollbar {
    width: 8px;
}

.video-modal-transcript-body::-webkit-scrollbar-thumb {
    background: rgba(6, 11, 111, 0.35);
    border-radius: 4px;
}

.video-modal-transcript-body .cue-line {
    padding: 8px 10px;
    margin-bottom: 4px;
}

@keyframes cue-position-flash {
    0%,
    15% {
        background-color: #ffe566;
    }
    100% {
        background-color: transparent;
    }
}

.video-modal-transcript-body .cue-line.is-current-position {
    animation: cue-position-flash 10s ease-out forwards;
}

.video-modal-transcript-body .cue-time {
    font-size: 1rem;
    padding: 3px 10px;
    color: #036b64;
    background: rgba(6, 11, 111, 0.08);
}

.video-modal-transcript-body .cue-text {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 1;
    color: #1a1a2e;
}

.video-modal-transcript-body .cue-text mark {
    background: rgba(177, 209, 207, 0.75);
    color: #060b6f;
    border-radius: 2px;
    padding: 0 2px;
}

.video-modal-transcript-body .transcript-plain {
    margin: 8px 4px 0;
    font-size: 1.125rem;
    line-height: 1.75;
    color: #1a1a2e;
    white-space: pre-wrap;
}

.video-modal-transcript-body .transcript-plain mark {
    background: rgba(177, 209, 207, 0.75);
    color: #060b6f;
    border-radius: 2px;
    padding: 0 2px;
}

.video-modal-transcript-body .transcript-loading {
    font-size: 1rem;
    padding: 12px 4px;
}

.video-card:hover {
    border-color: #0450a8;
}

.video-card.dimmed {
    opacity: 0.45;
    filter: grayscale(0.45);
}

.video-card.dimmed:hover {
    border-color: #060b6f;
}

.video-card.highlighted {
    border-color: #986c32;
    border-width: 2px;
}

:root {
    --plyr-color-main: #5f7c2f;
}

.plyr--video:not(.plyr--playing) .plyr__overlay-controls,
.plyr--video:not(.plyr--playing) .plyr__control--overlaid {
    display: flex;
    visibility: visible;
    opacity: 0.95;
}

.plyr--video.plyr--playing:not(.plyr--hide-controls) .plyr__overlay-controls,
.plyr--video.plyr--playing:not(.plyr--hide-controls) .plyr__control--overlaid,
.plyr--video.plyr--playing.plyr--overlay-controls-pinned .plyr__overlay-controls,
.plyr--video.plyr--playing.plyr--overlay-controls-pinned .plyr__control--overlaid {
    display: flex;
    visibility: visible;
    opacity: 0.95;
}

.plyr__overlay-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 3;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.plyr__overlay-controls .plyr__control {
    pointer-events: auto;
}

.plyr__overlay-controls .plyr__control--overlaid {
    position: static;
    top: auto;
    left: auto;
    transform: none;
    margin: 0;
}

.plyr__control--overlaid {
    padding: 1.35rem;
    z-index: 3;
}

.plyr__control--overlay-seek {
    padding: 0.95rem;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 100%;
    color: #fff;
    border: 0;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.plyr__control--overlay-seek:hover,
.plyr__control--overlay-seek:focus-visible {
    background: var(--plyr-color-main, #5f7c2f);
}

.plyr__control--overlay-seek:active {
    transform: scale(0.96);
}

.plyr__control--overlaid svg,
.plyr__control--overlay-seek svg {
    width: 1.75rem;
    height: 1.75rem;
    display: block;
}

.plyr__control--overlay-seek svg {
    width: 1.35rem;
    height: 1.35rem;
}

.plyr__control--overlaid.plyr__control--pressed svg {
    left: 0;
}

/* Cinematic split-tone on speaker posters only (while player is stopped) */
.video-thumbnail {
    width: 100%;
    background: #accfce;
}

.video-thumbnail video {
    width: 100%;
    height: 200px;
    display: block;
}

/* Plyr duplicates the poster; we render our own filtered copy instead */
.video-thumbnail .plyr__poster {
    display: none !important;
}

.video-thumbnail .video-poster-filter-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.video-thumbnail .video-poster-filter {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    filter: saturate(1.45) contrast(1.2) brightness(0.84) sepia(0.32) hue-rotate(-18deg);
    transition: filter 0.45s ease;
}

.video-thumbnail .video-poster-filter-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(6, 11, 111, 0.35) 0%,
        transparent 45%,
        rgba(152, 108, 50, 0.28) 100%
    );
    mix-blend-mode: soft-light;
}

.video-card:hover .video-thumbnail .plyr.plyr--stopped .video-poster-filter {
    filter: saturate(1.55) contrast(1.24) brightness(0.88) sepia(0.26) hue-rotate(-14deg);
}

.video-thumbnail .plyr:not(.plyr--stopped) .video-poster-filter-wrap {
    opacity: 0;
    visibility: hidden;
}

.video-info {
    padding: 16px 20px 18px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #2e3a7a;
    margin-top: 6px;
}

.video-duration {
    background: rgba(6, 11, 111, 0.1);
    padding: 3px 8px;
    border-radius: 20px;
    color: #060b6f;
}

.copy-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(6, 11, 111, 0.1);
    border: none;
    border-radius: 8px;
    color: #060b6f;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.copy-button:hover {
    background: rgba(6, 11, 111, 0.2);
}

.copy-button:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: 2px;
}

.copy-button.is-pending-start {
    background: rgba(152, 108, 50, 0.35);
    box-shadow: inset 0 0 0 2px #986c32;
    animation: copy-pending-blink 1s ease-in-out infinite;
}

.copy-pending-hint {
    display: none;
    max-width: 16rem;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(152, 108, 50, 0.2);
    border: 1px solid rgba(152, 108, 50, 0.55);
    color: #4a3520;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    animation: copy-pending-blink 1s ease-in-out infinite;
}

.copy-pending-hint.is-visible {
    display: block;
}

@keyframes copy-pending-blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.35;
    }
}

@media (prefers-reduced-motion: reduce) {
    .copy-button.is-pending-start,
    .copy-pending-hint {
        animation: none;
    }
}

.clip-timer {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 20;
    display: none;
    align-items: baseline;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(6, 11, 111, 0.94);
    color: #fff;
    font-size: 1.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45), 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.clip-timer.is-visible {
    display: inline-flex;
}

.clip-timer-label {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.9;
}

.clip-timer-value {
    min-width: 3.6em;
    text-align: right;
    font-size: 2.1rem;
    font-weight: 800;
}

/* ── Transcript accordion ── */
.transcript-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    background: rgba(152, 108, 50, 0.12);
    border: none;
    border-top: 1px solid rgba(6, 11, 111, 0.1);
    color: #4a3520;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 10px 20px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s;
    margin-top: auto;
}

.transcript-toggle:hover {
    background: rgba(152, 108, 50, 0.2);
    color: #2a1f10;
}

.transcript-toggle:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: -2px;
}

.transcript-toggle .arrow {
    display: inline-block;
    transition: transform 0.25s;
    font-style: normal;
}

.transcript-toggle[aria-expanded="true"] .arrow {
    transform: rotate(90deg);
}

.transcript-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
    background: rgba(6, 11, 111, 0.06);
}

.transcript-panel.open {
    max-height: 380px;
}

.transcript-body {
    padding: 12px 16px;
    overflow-y: auto;
    max-height: 360px;
    scrollbar-width: thin;
    scrollbar-color: rgba(177, 209, 207, 0.6) transparent;
}

.transcript-body::-webkit-scrollbar {
    width: 5px;
}

.transcript-body::-webkit-scrollbar-thumb {
    background: rgba(177, 209, 207, 0.6);
    border-radius: 3px;
}

.transcript-loading {
    font-size: 0.8rem;
    color: #2e3a7a;
    padding: 6px 0;
}

/* ── Cue lines ── */
.cue-line {
    display: flex;
    gap: 10px;
    margin-bottom: 6px;
    align-items: flex-start;
    cursor: pointer;
    border-radius: 6px;
    padding: 4px 6px;
    transition: background 0.15s;
}

.cue-line:hover {
    background: rgba(177, 209, 207, 0.14);
}

.cue-line:focus-visible {
    outline: 2px solid #986c32;
    outline-offset: 1px;
}

.cue-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    background: rgba(6, 11, 111, 0.08);
    border-radius: 20px;
    padding: 2px 7px;
    margin-top: 2px;
    color: #036b64;
    white-space: nowrap;
}

.cue-text {
    font-size: 0.85rem;
    line-height: 1.45;
    color: #1a2347;
}

footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #2e3a7a;
}

@media (max-width: 768px) {
    .video-container {
        gap: 24px;
    }

    h1 {
        font-size: 2.2rem;
    }

    .video-modal-panel--video {
        left: 8px;
        top: 8px;
        width: calc(100% - 16px);
        height: calc(52% - 12px);
    }

    .video-modal-panel--transcript {
        left: 8px;
        top: calc(52% + 4px);
        width: calc(100% - 16px);
        height: calc(48% - 12px);
    }

    .video-modal-panel-handle-hint {
        display: none;
    }
}

@media (max-width: 480px) {
    .video-grid {
        columns: 1;
    }

    @supports (grid-template-rows: masonry) {
        .video-grid {
            grid-template-columns: 1fr;
        }
    }

    h1 {
        font-size: 1.8rem;
    }
}
