/* DohOps narrated videos: the player, chapters, transcript and the /videos library cards.
   Loaded only on pages that show a video (built by build/build_videos.py and its embeds). */

.dv-player { max-width: 1040px; margin: 0 auto; }
.dv-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden;
  background: #0b1530; border: 1px solid var(--color-border, #e5e7eb);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.dv-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #0b1530; }
.dv-play {
  position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px;
  border: 0; border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center;
  background: rgba(10, 111, 181, 0.94); color: #fff;
  box-shadow: 0 12px 34px rgba(10, 23, 51, 0.35), 0 0 0 10px rgba(255, 255, 255, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
}
.dv-play:hover, .dv-play:focus-visible { transform: scale(1.07); background: #0A6FB5; }
.dv-play svg { margin-left: 5px; }
/* The big button shows only once video-player.js is running (it adds .dv-ready). Until then the
   phone's own play control works, so a slow first load from a shared link never leaves a dead button. */
.dv-player.dv-ready .dv-play { display: flex; }
.dv-player.is-started .dv-play { display: none; }
.dv-bar {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: center;
  margin-top: 16px; font-size: 14px; color: var(--color-body, #475569);
}
.dv-cc {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1px solid var(--color-border, #e5e7eb); background: #fff; border-radius: 999px;
  padding: 7px 15px; font: inherit; font-size: 13px; font-weight: 700; color: var(--color-navy, #0A1733);
}
.dv-cc[aria-pressed="false"] { color: var(--color-body, #475569); font-weight: 600; }
.dv-cc__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.dv-cc[aria-pressed="false"] .dv-cc__dot { background: #cbd5e1; }
.dv-link { color: var(--color-navy, #0A6FB5); font-weight: 600; text-decoration: none; }
.dv-link:hover { text-decoration: underline; }
/* Answer pages: the tour opens at a chapter ("Starts at 1:29" until it plays) */
.dv-startat {
  position: absolute; left: 14px; top: 14px; z-index: 1; pointer-events: none;
  background: rgba(10, 23, 51, 0.86); color: #fff; font-size: 13px; font-weight: 700;
  padding: 6px 11px; border-radius: 8px; letter-spacing: 0.02em;
}
.dv-player.is-started .dv-startat { display: none; }
.dv-from {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--color-navy, #0A6FB5);
}
.dv-from:hover, .dv-from:focus-visible { text-decoration: underline; }
.dv-video::cue {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
  font-size: 0.95em; line-height: 1.35; color: #fff; background: rgba(10, 23, 51, 0.82);
}

/* The card shown when a video ends */
.dv-end {
  position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at center, rgba(13, 31, 66, 0.97), rgba(10, 23, 51, 0.99));
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.dv-end[hidden] { display: none; }
.dv-end__inner { max-width: 600px; }
.dv-end__kicker { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #C9A24A; }
.dv-end__title { margin: 0 0 10px; font-size: clamp(19px, 3vw, 30px); font-weight: 800; line-height: 1.2; color: #fff; }
.dv-end__text { margin: 0 auto 20px; max-width: 520px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); }
.dv-end__buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.dv-end__replay {
  margin-top: 16px; padding: 4px 8px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.8); text-decoration: underline;
}
.dv-end__replay:hover, .dv-end__replay:focus-visible { color: #fff; }
@media (max-width: 640px) {
  .dv-end { padding: 10px; }
  .dv-end__kicker, .dv-end__text { display: none; }
  .dv-end__title { font-size: 17px; margin-bottom: 10px; }
  .dv-end__buttons { gap: 8px; }
  .dv-end__buttons a { padding: 9px 14px; font-size: 14px; }
  .dv-end__replay { margin-top: 6px; font-size: 13px; }
}

/* Chapters */
.dv-chapters { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.dv-chapter {
  width: 100%; display: flex; gap: 14px; align-items: baseline; text-align: left; cursor: pointer;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 12px; padding: 14px 16px;
  font: inherit; font-size: 15px; line-height: 1.45; color: var(--color-navy, #0A1733);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dv-chapter:hover, .dv-chapter:focus-visible { border-color: #0A6FB5; box-shadow: 0 6px 18px rgba(10, 111, 181, 0.12); }
.dv-chapter__time { flex: none; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 13px; color: #0A6FB5; }

/* Transcript */
.dv-transcript { max-width: 760px; margin: 0 auto; font-size: 16px; line-height: 1.75; color: var(--color-body, #475569); }
.dv-transcript p { margin: 0 0 14px; }

/* Library cards */
.dv-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.dv-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid var(--color-border, #e5e7eb); border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 23, 51, 0.04); transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dv-card:hover, .dv-card:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14); }
.dv-card__thumb { position: relative; aspect-ratio: 16 / 9; background: #0b1530; overflow: hidden; }
.dv-card__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dv-card__thumb--tour { background: #eef2f7; }
.dv-card__thumb--tour img { object-position: top left; }
.dv-card__tourmark {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(10, 23, 51, 0.82); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.35); transition: transform 0.18s ease;
}
.dv-card__tourmark svg { width: 26px; height: 26px; }
.dv-card:hover .dv-card__tourmark { transform: scale(1.08); }
.dv-card__badge {
  position: absolute; right: 10px; bottom: 10px; background: rgba(10, 23, 51, 0.86); color: #fff;
  font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 7px; letter-spacing: 0.02em;
}
.dv-card__playicon {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(10, 111, 181, 0.92); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 7px rgba(255, 255, 255, 0.2); transition: transform 0.18s ease;
}
.dv-card:hover .dv-card__playicon { transform: scale(1.08); }
.dv-card__playicon svg { margin-left: 3px; }
.dv-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.dv-card__kind { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #C9A24A; }
.dv-card__title { font-size: 19px; line-height: 1.3; font-weight: 700; color: var(--color-navy, #0A1733); margin: 0; }
.dv-card__text { font-size: 15px; line-height: 1.6; color: var(--color-body, #475569); margin: 0; }
.dv-card__cta { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: #0A6FB5; }
.dv-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 0 0 8px; }
.dv-pill {
  display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--color-border, #e5e7eb);
  background: #fff; color: var(--color-navy, #0A1733); font-size: 14px; font-weight: 600; text-decoration: none;
}
.dv-pill:hover { border-color: #0A6FB5; color: #0A6FB5; }

@media (max-width: 640px) {
  .dv-frame { border-radius: 12px; }
  .dv-play { width: 68px; height: 68px; margin: -34px 0 0 -34px; }
  .dv-play svg { width: 26px; height: 26px; }
  .dv-startat { left: 10px; top: 10px; font-size: 12px; padding: 5px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .dv-card, .dv-card__playicon, .dv-play, .dv-chapter { transition: none; }
}
