/* Video library only. Posters load with the page; video sources load on a click. */
.videos-page [hidden] { display: none !important; }
.videos-heading-row { display: flex; align-items: flex-end; gap: 48px; justify-content: space-between; margin: 42px 0 40px; }
.videos-heading-row h1 { font-size: clamp(2.4rem, 4.8vw, 3.5rem); line-height: 1.06; font-weight: 700; letter-spacing: -0.045em; }
.videos-intro-copy { max-width: 350px; color: var(--text-2); font-size: 1rem; line-height: 1.65; padding-bottom: 2px; }
.video-featured { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.video-featured-copy { padding: 32px; align-self: center; }
.video-category { font-family: 'JetBrains Mono', monospace; color: var(--text-3); font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; line-height: 1.6; }
.video-featured h2 { font-size: clamp(1.5rem, 2.3vw, 1.95rem); line-height: 1.2; letter-spacing: -.03em; margin: 14px 0; }
.video-featured-description { color: var(--text-2); font-size: .94rem; line-height: 1.65; }
.videos-page .video-watch-link { display: inline-flex; gap: 12px; align-items: center; padding: 12px 0; margin-top: 12px; min-height: 44px; color: var(--ink); font-size: .86rem; font-weight: 600; text-decoration: none; }
.video-watch-link:hover .video-watch-label { text-decoration: underline; text-underline-offset: 4px; }
.video-watch-duration { font-family: 'JetBrains Mono', monospace; color: var(--text-3); font-size: .72rem; font-weight: 500; }
.videos-page .video-poster { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink); text-decoration: none; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.video-featured > .video-poster { align-self: stretch; min-height: 100%; }
.video-play { position: absolute; inset: 0; display: grid; place-items: center; color: white; }
.video-play svg { width: 52px; height: 52px; padding: 17px; border-radius: 50%; background: var(--ink); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 2px 12px rgba(0,0,0,.15); transition: transform .18s ease; }
.video-poster:hover .video-play svg { transform: scale(1.08); }
.video-featured .video-play svg { width: 62px; height: 62px; padding: 20px; }
.video-duration { position: absolute; right: 12px; bottom: 12px; padding: 5px 7px; border-radius: 4px; background: var(--ink); color: white; font-family: 'JetBrains Mono', monospace; font-size: .69rem; line-height: 1; }
.video-featured .video-duration { display: none; }
.videos-library { background: var(--bg-soft); border-top: 1px solid var(--border); }
.videos-library-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 28px; }
.videos-library-heading > a { font-size: .82rem; }
.video-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; }
.video-filters { display: flex; flex-wrap: wrap; gap: 4px; }
.video-filters button { min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-2); font-family: inherit; font-size: .82rem; font-weight: 500; cursor: pointer; }
.video-filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: white; }
.video-filters button:hover { text-decoration: underline; text-underline-offset: 4px; }
.video-search { position: relative; flex: 0 1 260px; }
.video-search > svg { position: absolute; left: 13px; top: 14px; color: var(--text-3); pointer-events: none; }
.video-search input { width: 100%; min-height: 46px; padding: 12px 12px 12px 40px; border: 1px solid #aab8c1; border-radius: 7px; background: var(--surface); color: var(--ink); font-family: inherit; font-size: .84rem; }
.video-search input::placeholder { color: var(--text-3); opacity: 1; }
.video-results { min-height: 20px; margin: 0 0 24px; color: var(--text-3); font-size: .76rem; line-height: 1.5; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; }
.video-card { min-width: 0; scroll-margin-top: 90px; }
.video-card .video-poster { border: 1px solid var(--border); border-radius: 8px; }
.video-card-copy { padding: 18px 0 0; }
.video-card h3 { margin: 7px 0 8px; font-size: 1.04rem; line-height: 1.38; letter-spacing: -.018em; }
.videos-page .video-title-link { color: var(--ink); text-decoration: none; }
.video-title-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.video-card-description { font-size: .84rem; color: var(--text-2); line-height: 1.65; }
.video-note { margin-top: 12px; color: var(--text-3); font-size: .74rem; line-height: 1.6; }
.video-empty { text-align: center; padding: 56px 20px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.video-empty h3 { font-size: 1.25rem; margin-bottom: 12px; }
.video-empty p { color: var(--text-2); font-size: .9rem; line-height: 1.6; }
.video-reset { margin-top: 18px; min-height: 44px; padding: 10px 16px; border: 1px solid var(--ink); border-radius: 6px; background: var(--ink); color: white; font: 500 .82rem 'Inter', sans-serif; cursor: pointer; }
.video-reset:hover { text-decoration: underline; text-underline-offset: 4px; }
.video-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.video-dialog { margin: auto; width: min(1060px, calc(100% - 40px)); max-height: calc(100dvh - 40px); padding: 0; border: 1px solid var(--border); border-radius: 12px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow-pop); overflow: auto; }
.video-dialog::backdrop { background: rgba(8, 19, 29, .78); }
.video-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 8px 12px 8px 24px; }
.video-dialog-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid transparent; background: transparent; color: var(--ink); border-radius: 6px; cursor: pointer; }
.video-dialog-close:hover { border-color: var(--border); background: var(--bg-soft); }
.video-player-stage { background: #08131d; }
.video-player-stage video { display: block; width: 100%; height: min(56.25vw, 58dvh); min-height: 180px; object-fit: contain; background: #08131d; }
.video-dialog[data-portrait="true"] .video-player-stage video { height: min(80dvh, calc(100dvh - 120px)); }
.video-dialog-copy { padding: 24px; }
.video-dialog-copy h2 { margin-bottom: 10px; font-size: 1.35rem; line-height: 1.3; letter-spacing: -.02em; }
.video-dialog-copy > p:not(.video-note) { color: var(--text-2); font-size: .9rem; line-height: 1.65; }
.video-error { margin-top: 16px; padding: 12px 16px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 5px; }
.videos-player-open { overflow: hidden; }
@media (min-width: 900px) {
    .video-dialog[open][data-portrait="true"] { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); }
    .video-dialog[data-portrait="true"] .video-dialog-header { grid-column: 1 / -1; }
    .video-dialog[data-portrait="true"] .video-dialog-copy { align-self: center; }
}
@media (max-width: 899px) {
    .video-dialog[data-portrait="true"] .video-player-stage video { height: min(68dvh, 120vw); }
}
@media (max-width: 900px) {
    .videos-heading-row { gap: 28px; }
    .videos-intro-copy { max-width: 285px; font-size: .92rem; }
    .video-featured { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .video-featured-copy { padding: 24px; }
    .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .videos-heading-row { display: block; margin-top: 28px; margin-bottom: 28px; }
    .videos-intro-copy { max-width: 460px; margin-top: 20px; }
    .video-featured { grid-template-columns: minmax(0, 1fr); }
    .video-featured > .video-poster { min-height: 0; }
    .video-featured-copy { padding: 24px; }
    .video-featured h2 { margin-top: 10px; }
    .video-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .video-tools { gap: 14px; }
    .video-search { flex-basis: 100%; }
    .video-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; width: 100%; }
    .video-filters button { padding-left: 10px; padding-right: 10px; font-size: .78rem; }
    .video-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
    .video-dialog-header { padding-left: 18px; }
    .video-dialog-copy { padding: 20px; }
    .video-player-stage video { min-height: 0; height: min(68dvh, 120vw); }
}
@media (prefers-reduced-motion: reduce) {
    .video-play svg { transition: none; }
    .video-poster:hover .video-play svg { transform: none; }
}
