.videos-page { background: var(--bg); }
.videos-page .guide-topbar { position: static; }
.videos-page .guide-topbar nav a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: .55rem; }
.videos-main { width: min(1240px, calc(100% - 3rem)); margin: 0 auto; padding: 2rem 0; }
.videos-intro { display: flex; justify-content: space-between; gap: 2rem; align-items: center; margin-bottom: 1.5rem; }
.videos-intro h1 { font-size: clamp(2rem, 3vw, 2.5rem); line-height: 1.12; margin: .3rem 0 .7rem; letter-spacing: -.03em; }
.videos-intro p { margin: 0; color: var(--muted); max-width: 42rem; line-height: 1.6; }
.videos-channel-link { flex-shrink: 0; display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; }
.youtube-mark { width: 1.6rem; height: 1.15rem; display: inline-grid; place-items: center; background: #ef3535; border-radius: .3rem; }
.youtube-mark::after { content: ""; border-left: .42rem solid #fff; border-top: .26rem solid transparent; border-bottom: .26rem solid transparent; margin-left: .12rem; }
.video-filters { display: grid; grid-template-columns: minmax(0, 1fr) 12rem 12rem auto; gap: 1rem; align-items: end; padding: 1.1rem; border: 1px solid var(--line); border-radius: .85rem; background: var(--panel); }
.video-field { display: grid; gap: .5rem; min-width: 0; }
.video-field label { font-size: .8rem; font-weight: 750; color: var(--muted); }
.video-field input, .video-field select { min-height: 2.8rem; width: 100%; min-width: 0; }
.video-count { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; color: var(--muted); font-size: .85rem; margin: 1.4rem 0 1rem; }
.video-count p { margin: 0; }
.video-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
.video-card { min-width: 0; }
.video-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; border-radius: .8rem; overflow: hidden; border: 1px solid var(--line); background: #172e3c; transition: border-color .15s, transform .15s; }
.video-link:hover { border-color: #7fa5b7; transform: translateY(-2px); }
.video-thumb { display: block; position: relative; aspect-ratio: 16 / 9; background: #1f3a49; overflow: hidden; }
.video-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-duration { position: absolute; bottom: .6rem; right: .6rem; padding: .2rem .4rem; border-radius: .25rem; background: rgba(5, 15, 22, .9); color: #fff; font-size: .75rem; font-weight: 700; }
.video-latest { position: absolute; top: .7rem; left: .7rem; background: var(--accent); color: #052018; font-size: .7rem; font-weight: 850; letter-spacing: .02em; border-radius: .3rem; padding: .3rem .5rem; }
.video-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 50%; background: rgba(5, 15, 22, .8); border: 1px solid rgba(255,255,255,.4); }
.video-play::after { content: ""; border-left: .85rem solid #fff; border-top: .5rem solid transparent; border-bottom: .5rem solid transparent; margin-left: .2rem; }
.video-copy { padding: 1rem 1.1rem; display: flex; flex-direction: column; flex: 1; }
.video-topic { font-size: .7rem; letter-spacing: .04em; text-transform: uppercase; color: #b1d2e1; font-weight: 750; }
.video-copy h2 { font-size: 1rem; line-height: 1.5; margin: .5rem 0 1rem; overflow-wrap: anywhere; }
.video-card-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; margin-top: auto; font-size: .78rem; color: var(--muted); }
.video-card-footer strong { color: var(--accent); font-weight: 700; }
.video-empty { padding: 3rem 1rem; text-align: center; border: 1px solid var(--line); border-radius: .8rem; }
.video-empty h2 { margin-top: 0; }
.video-empty p { color: var(--muted); }
.videos-footer { padding-top: 2rem; margin-top: 2rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.videos-footer p { color: var(--muted); max-width: 45rem; font-size: .83rem; line-height: 1.6; margin: 0; }
.videos-footer a { color: #d9edf4; font-size: .9rem; }
.video-dialog { width: min(1040px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid #587c90; border-radius: .9rem; padding: 0; background: #102631; color: #fff; overflow: auto; box-shadow: 0 1.5rem 5rem #0008; }
.video-dialog::backdrop { background: rgba(2, 12, 18, .86); }
.video-dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: 1rem 1.2rem; }
.video-dialog-heading h2 { font-size: 1.05rem; line-height: 1.5; margin: 0; }
.video-dialog-close { border: 1px solid #5e7a89; border-radius: .5rem; padding: .55rem .8rem; color: #fff; background: transparent; font: inherit; cursor: pointer; flex-shrink: 0; }
.video-player-frame { aspect-ratio: 16 / 9; background: #000; }
.video-player-frame iframe { width: 100%; height: 100%; display: block; border: 0; }
.video-dialog-footer { padding: 1rem 1.2rem; display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; align-items: center; }
.video-dialog-footer p { color: var(--muted); margin: 0; font-size: .85rem; max-width: 30rem; }
.videos-page [hidden] { display: none !important; }
.videos-page :where(a, button, input, select):focus-visible { outline: 3px solid #a5e1fa; outline-offset: 3px; }
@media (max-width: 950px) {
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .video-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .video-field-search { grid-column: 1 / -1; }
  .video-filters > button { justify-self: start; }
  .videos-intro { align-items: flex-start; flex-direction: column; gap: 1.2rem; }
}
@media (max-width: 560px) {
  .videos-main { width: calc(100% - 2rem); padding-top: 1.7rem; }
  .videos-intro { margin-bottom: 1.5rem; }
  .videos-intro h1 { font-size: 2rem; }
  .video-grid { grid-template-columns: minmax(0, 1fr); gap: 1.1rem; }
  .video-filters { padding: .9rem; gap: .85rem; }
  .video-copy h2 { font-size: 1rem; }
  .video-dialog-heading { padding: .8rem; gap: .5rem; }
  .video-dialog-close { padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) { .video-link { transition: none; } .video-link:hover { transform: none; } }
