/* Mosaic explainer videos: shared player and stage styles.
   Used by every page in videos/. Styles for one video's own scenes stay in that page. */
:root {
  --blue: #005EB8; --dark: #003087; --bright: #0072CE; --light-blue: #41B6E6;
  --green: #009639; --green-text: #006747; --grey-1: #4C6272; --grey-2: #5E6F7D;
  --grey-4: #D8DDE0; --grey-5: #F0F4F5; --warm: #FFB81C; --text: #212B32; --red: #DA291C;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text); background: #fff; -webkit-font-smoothing: antialiased;
  padding: 24px 16px 48px;
}
.page { max-width: 1100px; margin: 0 auto; }
.page > h1 { font-size: 22px; color: var(--dark); margin-bottom: 4px; }
.page > p.note { font-size: 14px; color: var(--grey-2); margin-bottom: 16px; }

/* ── Player ── */
.viewport { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 10px; background: var(--grey-5); }
.stage { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; }
.controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.controls button {
  border: 0; background: var(--blue); color: #fff; font: inherit; font-size: 14px; font-weight: 600;
  padding: 8px 14px; border-radius: 6px; cursor: pointer; min-width: 84px;
}
.controls button.secondary { background: var(--grey-5); color: var(--dark); }
.controls button:focus-visible { outline: 3px solid var(--warm); outline-offset: 2px; }
.controls button[hidden] { display: none; }
.controls input[type=range] { flex: 1; accent-color: var(--blue); }
.controls .time { font-size: 13px; color: var(--grey-2); font-variant-numeric: tabular-nums; min-width: 86px; text-align: right; }
.poster-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,48,135,0.25); border: 0; cursor: pointer; width: 100%;
}
.poster-play span {
  width: 88px; height: 88px; border-radius: 50%; background: var(--warm);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.poster-play:focus-visible span { outline: 4px solid #fff; outline-offset: 4px; }
/* ?embed=1: just the player, for showing inside another page */
html.embed body { padding: 0; background: transparent; overflow: hidden; }
html.embed .page > h1, html.embed .page > p.note, html.embed details.transcript { display: none; }
html.embed .controls { margin-top: 8px; }
details.transcript { margin-top: 18px; font-size: 15px; line-height: 1.6; }
details.transcript summary { cursor: pointer; color: var(--blue); font-weight: 600; }
details.transcript ol { margin: 10px 0 0 22px; }

/* ── Stage building blocks ── */
#bg { position: absolute; inset: 0; }
.a { position: absolute; left: 0; top: 0; }          /* positioned by keyframes (centre x, y) */
.cap { width: 1000px; text-align: center; font-size: 46px; font-weight: 700; color: var(--dark); line-height: 1.2; letter-spacing: -0.5px; }
.cap.sub { font-size: 28px; font-weight: 500; color: var(--grey-1); letter-spacing: 0; }
.cap.small { font-size: 19px; font-weight: 500; color: var(--grey-2); letter-spacing: 0; }
.cap.white { color: #fff; }
.tile { width: 170px; height: 170px; border-radius: 27px; display: flex; align-items: center; justify-content: center; }
.tile.on-light { box-shadow: 0 4px 14px rgba(0,48,135,0.12); }
.mock {
  width: 600px; height: 400px; background: #fff; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,48,135,0.14);
  overflow: hidden; display: flex; flex-direction: column;
}
.mock-bar {
  background: var(--dark); color: #fff; font-size: 17px; font-weight: 600; padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.mock-bar .muted { font-weight: 400; opacity: 0.8; font-size: 15px; }
.mock-body { padding: 20px 24px; flex: 1; position: relative; }
.bar { height: 12px; border-radius: 6px; background: var(--grey-4); transform-origin: left center; }
.chip { font-size: 14px; font-weight: 600; padding: 5px 12px; border-radius: 14px; }
.chip.topic { background: #E3F2FB; color: var(--dark); }
.chip.ssr { background: #FFF1D0; color: var(--dark); }

/* Phones: no room for the time counter beside the slider */
@media (max-width: 480px) {
  .controls { gap: 8px; }
  .controls button { min-width: 0; }
  .controls .time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .poster-play span { box-shadow: none; }
}
