/* The video guide for drivers (help-video.html, js/help-video.js; owner
   2026-11-15). Drivers are 40-65: big type, big targets (56 px and more),
   few choices. Theme tokens from style.css / themes.css, so light, dark and
   the skins all work. html.hv-embed = inside the app (no top bar, no heading). */

.hv-body {
  margin: 0;
  background: var(--bg);
  background-image: var(--bg-gradient);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* ---------- top bar ---------- */
.hv-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) calc(clamp(14px, 4vw, 40px) + env(safe-area-inset-right, 0px))
           10px calc(clamp(14px, 4vw, 40px) + env(safe-area-inset-left, 0px));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.hv-mark { display: flex; flex-direction: column; justify-content: center; gap: 5px; min-height: 48px; color: var(--text); text-decoration: none; }
.hv-mark-rps { font-weight: 800; font-stretch: 118%; font-size: 20px; letter-spacing: .1em; line-height: 1; }
.hv-mark-sub { display: flex; align-items: center; gap: 7px; }
.hv-mark-sub i { height: 2px; width: 40px; border-radius: 99px; background: var(--brand); }
.hv-mark-sub span { font-size: 8px; font-weight: 600; letter-spacing: .5em; color: var(--text-muted); }
.hv-back {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--border-strong); border-radius: 999px;
  color: var(--text); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
}
.hv-back:focus-visible, .hv-mark:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .hv-back:hover { border-color: var(--text); } }

/* ---------- layout ---------- */
.hv-main {
  max-width: 1240px; margin: 0 auto;
  padding: clamp(18px, 4vw, 44px) calc(clamp(14px, 4vw, 40px) + env(safe-area-inset-right, 0px))
           calc(clamp(28px, 5vw, 60px) + env(safe-area-inset-bottom, 0px)) calc(clamp(14px, 4vw, 40px) + env(safe-area-inset-left, 0px));
}
.hv-hero { margin-bottom: clamp(16px, 3vw, 26px); }
.hv-eyebrow {
  margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--text-muted);
}
.hv-title {
  margin: 0 0 10px; font-size: clamp(1.9rem, 5.2vw, 3rem); font-weight: 800; font-stretch: 110%;
  line-height: 1.06; letter-spacing: -.015em; color: var(--text);
}
.hv-lead { margin: 0; max-width: 62ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); }

/* ---------- languages: three big buttons ---------- */
.hv-langs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; max-width: 720px; margin: 0 0 clamp(16px, 3vw, 24px); }
.hv-lang {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0;
  min-height: 60px; padding: 8px 12px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 700 18px/1.2 var(--font, 'Archivo', sans-serif);
  transition: background var(--dur-2, .18s), border-color var(--dur-2, .18s), box-shadow var(--dur-2, .18s);
  touch-action: manipulation;
}
.hv-lang > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hv-lang-code {
  flex: none; display: grid; place-items: center; width: 34px; height: 26px; border-radius: 7px;
  background: var(--surface-2); color: var(--text-muted); font-size: 13px; letter-spacing: .06em;
}
.hv-lang[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--brand), var(--brand-700)); color: #fff; border-color: transparent;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--brand) 32%, transparent);
}
.hv-lang[aria-pressed="true"] .hv-lang-code { background: rgba(255, 255, 255, .22); color: #fff; }
.hv-lang:focus-visible, .hv-speed-btn:focus-visible, .hv-ch:focus-visible, .hv-soon-link:focus-visible {
  outline: 3px solid var(--brand); outline-offset: 3px;
}
@media (hover: hover) and (pointer: fine) { .hv-lang:not([aria-pressed="true"]):hover { border-color: var(--text); } }

/* ---------- player + chapters ---------- */
.hv-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(18px, 3vw, 28px); align-items: start; }
@media (min-width: 1024px) { .hv-stage { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); } }
.hv-player { min-width: 0; }
.hv-frame {
  position: relative; border-radius: 16px; overflow: hidden; background: #000;
  aspect-ratio: 16 / 9; box-shadow: var(--elev-2, 0 10px 30px rgba(0, 0, 0, .3));
  border: 1px solid var(--border);
}
.hv-video { display: block; width: 100%; height: 100%; background: #000; object-fit: contain; }
.hv-video[hidden] { display: none; }
.hv-now { margin: 12px 2px 0; min-height: 1.5em; font-weight: 700; font-size: 18px; color: var(--text); }
.hv-now:empty { min-height: 0; margin: 0; }
.hv-now[hidden] { display: none; }

.hv-speed { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 10px; max-width: 520px; margin-top: 14px; }
.hv-speed[hidden] { display: none; }
.hv-speed-label { font-weight: 700; color: var(--text-muted); margin-right: 4px; }
.hv-speed-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px 8px; text-align: center; min-height: 56px; padding: 6px 20px; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--text);
  font: 600 17px/1 var(--font, 'Archivo', sans-serif); touch-action: manipulation;
}
.hv-speed-btn b { font-weight: 800; }
.hv-speed-btn[aria-pressed="true"] { border-color: var(--text); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--text); }
.hv-subs { margin: 12px 2px 0; font-size: 15px; color: var(--text-muted); }
.hv-subs[hidden] { display: none; }

/* "Video coming soon": in the player's place, never a broken player. */
.hv-soon {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; padding: clamp(16px, 4vw, 36px); text-align: center;
  background: linear-gradient(160deg, var(--surface), var(--surface-2)); color: var(--text);
}
.hv-soon[hidden] { display: none; }
.hv-soon-ico { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--bg); color: var(--brand); }
.hv-soon-title { margin: 6px 0 0; font-size: clamp(1.3rem, 3.4vw, 1.9rem); font-weight: 800; }
.hv-soon-body { margin: 0; max-width: 46ch; color: var(--text-muted); font-size: clamp(15px, 2vw, 18px); }
.hv-soon-link {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 22px; margin-top: 6px; border-radius: 999px;
  background: var(--act-finish-solid, var(--brand)); color: var(--act-finish-on, #fff); font-weight: 700; text-decoration: none;
}
/* A phone's 16:9 box is too short for the message: let it grow. */
@media (max-width: 560px) {
  .hv-is-soon .hv-frame { aspect-ratio: auto; min-height: 300px; }
  .hv-is-soon .hv-soon { position: relative; min-height: 300px; }
}

.hv-chapters-box[hidden] { display: none; }
.hv-chapters-title { margin: 0; font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 800; }
.hv-chapters-hint { margin: 4px 0 12px; color: var(--text-muted); font-size: 16px; }
.hv-chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hv-ch {
  width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  min-height: 64px; padding: 10px 16px 10px 12px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 2px solid var(--border); background: var(--surface); color: var(--text);
  font: 700 18px/1.3 var(--font, 'Archivo', sans-serif); touch-action: manipulation;
  transition: border-color var(--dur-2, .18s), background var(--dur-2, .18s);
}
.hv-ch-n {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface-2); color: var(--text); font-size: 18px; font-weight: 800;
}
.hv-ch-t { min-width: 0; overflow-wrap: anywhere; }
.hv-ch-time { font-size: 15px; font-weight: 600; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hv-ch[aria-current="true"] {
  border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--surface));
}
.hv-ch[aria-current="true"] .hv-ch-n { background: var(--brand); color: #fff; }
@media (hover: hover) and (pointer: fine) { .hv-ch:not([aria-current="true"]):hover { border-color: var(--border-strong); } }
.hv-ch:active { transform: scale(.99); }

/* ---------- phones ---------- */
@media (max-width: 480px) {
  .hv-speed { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hv-speed-label { grid-column: 1 / -1; }
  .hv-speed-btn { padding: 0 10px; }
}
@media (max-width: 420px) {
  .hv-langs { gap: 8px; }
  .hv-lang { flex-direction: column; gap: 4px; min-height: 68px; padding: 8px 4px; font-size: 16px; }
  .hv-back { width: 48px; padding: 0; justify-content: center; }
  .hv-back span { display: none; }
  .hv-ch { gap: 12px; padding-right: 12px; grid-template-columns: 40px minmax(0, 1fr) auto; }
  .hv-ch-n { width: 40px; height: 40px; }
}
@media (max-width: 350px) {
  .hv-ch { grid-template-columns: 40px minmax(0, 1fr); }
  .hv-ch-time { grid-column: 2; margin-top: -4px; }
}

/* ---------- inside the app ---------- */
.hv-embed .hv-top, .hv-embed .hv-hero { display: none; }
.hv-embed .hv-main { padding-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  .hv-lang, .hv-ch { transition: none; }
  .hv-ch:active { transform: none; }
}
