/* The video library: browse everything first, open a film when ready. */
.learn-page { width: min(1080px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 56px; }
.learn-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 30px; }
.learn-header .eyebrow { margin: 0 0 12px; color: var(--fg-3); font: 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.learn-header h1 { margin: 0; font-size: clamp(32px, 3.6vw, 46px); line-height: 1.08; letter-spacing: -.045em; font-weight: 500; animation: none; }
.learn-header .learn-intro { margin: 12px 0 0; color: var(--fg-2); font-size: 16px; line-height: 1.5; }
.learn-channel { display: inline-flex; flex: none; align-items: center; gap: 9px; padding: 9px 0; color: var(--fg-2); font-size: 13px; white-space: nowrap; transition: color .2s; }
.learn-channel:hover { color: #fff; }
.learn-channel svg { flex: none; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.video-grid > li { min-width: 0; }
.video-card { display: block; height: 100%; padding: 8px; border: 1px solid var(--line-2); border-radius: 20px; background: linear-gradient(160deg, #111, #080808 70%); transition: border-color .25s, transform .25s var(--ease-out), background .25s; }
.video-card:focus-visible { outline: 2px solid #fff; outline-offset: 5px; border-radius: 20px; }
.video-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #171717; isolation: isolate; }
.video-cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.06) 60%, rgba(0,0,0,.35)); }
.video-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.video-play { position: absolute; top: 50%; left: 50%; z-index: 1; display: grid; place-items: center; width: 54px; height: 54px; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.65); border-radius: 50%; background: rgba(255,255,255,.92); color: #000; box-shadow: 0 4px 24px rgba(0,0,0,.16); transition: background .25s, scale .25s; }
.video-play svg { width: 17px; height: 19px; margin-left: 3px; }
.video-duration { position: absolute; z-index: 1; right: 10px; bottom: 10px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #fff; background: rgba(0,0,0,.76); font: 11px/1.2 var(--mono); }
.video-details { padding: 18px 12px 14px; }
.video-meta { display: flex; align-items: center; gap: 8px; min-height: 18px; margin: 0 0 9px; color: var(--fg-3); font: 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.video-meta .video-new { padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.86); font-size: 9px; }
.video-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.video-heading :is(h2, h3) { margin: 0; color: #fff; font-size: clamp(20px, 1.9vw, 24px); font-weight: 500; line-height: 1.2; letter-spacing: -.03em; }
.video-heading > svg { flex: none; margin-top: 5px; color: var(--fg-3); transition: transform .25s var(--ease-out), color .25s; }
.video-summary { max-width: 420px; margin: 9px 0 0; color: var(--fg-2); font-size: 14px; line-height: 1.5; text-wrap: pretty; }
.learn-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: 13px; }
.learn-bottom p { margin: 0; }
.learn-bottom a { display: inline-flex; align-items: center; gap: 8px; color: #fff; white-space: nowrap; }
.learn-bottom a:hover { text-decoration: underline; text-underline-offset: 4px; }
.learn-page + .bigfoot { margin-top: 0; }
.nav-links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.06); }
.tutorials.tutorial-preview { padding-top: 110px; }
.tutorial-preview .sec-head { gap: 24px; margin-bottom: 28px; }
.tutorial-preview .sec-head h2 { font-size: clamp(30px, 3.4vw, 44px); letter-spacing: -.035em; }
.preview-link { display: inline-flex; flex: none; align-items: center; gap: 10px; padding: 8px 0; color: var(--fg-2); font-size: 14px; transition: color .2s; }
.preview-link:hover { color: #fff; }

/* Native dialog keeps focus in the player and puts it above every site overlay. */
html.is-watching { overflow: hidden; }
.video-dialog { width: min(1000px, calc(100vw - 48px), calc((100dvh - 170px) * 16 / 9)); max-width: none; max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid #303030; border-radius: 18px; background: #0b0b0b; color: #fff; box-shadow: 0 32px 120px rgba(0,0,0,.65); }
.video-dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.video-dialog[open] { animation: video-arrive .2s var(--ease-out); }
.video-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 20px; }
.video-dialog-header h2 { margin: 0; font-size: 17px; font-weight: 500; line-height: 1.3; letter-spacing: -.02em; }
.video-close { display: grid; place-items: center; flex: none; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: #171717; color: var(--fg-2); cursor: pointer; }
.video-close:hover { background: #282828; color: #fff; }
.video-stage { width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.video-dialog-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; color: var(--fg-3); font-size: 12px; }
.video-dialog-footer a { color: var(--fg-2); }
.video-dialog-footer a:hover { color: #fff; }
@keyframes video-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (hover: hover) and (pointer: fine) {
  .video-card:hover { border-color: rgba(255,255,255,.34); transform: translateY(-3px); }
  .video-card:hover .video-cover img { transform: scale(1.025); }
  .video-card:hover .video-play { background: #fff; scale: 1.08; }
  .video-card:hover .video-heading > svg { transform: translate(2px, -2px); color: #fff; }
}
@media (max-width: 900px) {
  .learn-header { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .learn-channel { padding: 0; }
  .video-grid { gap: 16px; }
  .video-details { padding: 16px 8px 12px; }
  .video-heading > svg { display: none; }
}
@media (max-width: 600px) {
  .learn-page { width: calc(100% - 32px); padding-top: 24px; padding-bottom: 36px; }
  .learn-header { gap: 16px; }
  .learn-header h1 { max-width: 340px; font-size: 34px; }
  .learn-header .learn-intro { margin-top: 10px; font-size: 14px; }
  .video-grid { grid-template-columns: 1fr; gap: 12px; }
  .video-card { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; gap: 14px; padding: 10px; border-radius: 16px; }
  .video-cover { border-radius: 8px; }
  .video-play { width: 34px; height: 34px; }
  .video-play svg { width: 11px; height: 13px; margin-left: 2px; }
  .video-duration { right: 5px; bottom: 5px; padding: 3px 4px; border-radius: 4px; font-size: 9px; }
  .video-details { padding: 6px 2px 6px 0; }
  .video-meta { flex-wrap: wrap; gap: 5px; margin-bottom: 7px; font-size: 9px; letter-spacing: .02em; }
  .video-meta .video-new { font-size: 8px; }
  .video-heading :is(h2, h3) { font-size: 17px; line-height: 1.2; letter-spacing: -.025em; }
  .video-summary { display: none; }
  .learn-bottom { flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 16px; font-size: 12px; }
  .video-dialog { width: calc(100vw - 24px); border-radius: 14px; }
  .video-dialog-header { padding: 14px; gap: 12px; }
  .video-dialog-header h2 { font-size: 15px; }
  .video-dialog-footer { padding: 12px 14px; }
  .tutorials.tutorial-preview { padding-top: 80px; }
  .tutorial-preview .sec-head { gap: 12px; margin-bottom: 20px; }
  .preview-link { font-size: 13px; padding: 0; }
}
@media (max-height: 740px) and (min-width: 901px) {
  .learn-page { width: min(1000px, calc(100% - 48px)); padding-top: 26px; }
  .learn-header { margin-bottom: 24px; }
  .learn-header h1 { font-size: 38px; }
  .video-details { padding-top: 14px; padding-bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .video-card, .video-cover img, .video-play, .video-heading > svg { transition: none; }
  .video-card:hover, .video-card:hover .video-cover img, .video-card:hover .video-heading > svg { transform: none; }
  .video-card:hover .video-play { scale: 1; }
  .video-dialog[open] { animation: none; }
}
