/* Sísifo · botón «?» y diálogo de los vídeos tutoriales (templates/_tutorial.html, static/tutorial.js).
   Va en páginas de app.css (/preparadores, /repasar, /temario) y de panel.css (Mi cuenta, /grupo): solo usa los tokens que tienen los dos
   (--surface, --surface-2, --line, --line-2, --muted, --accent) y el texto con --ink o --text. */
.gv-boton { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font: 700 16px/1 system-ui, sans-serif;
  text-decoration: none; cursor: pointer; vertical-align: middle; transition: background .15s, color .15s, border-color .15s; }
.gv-boton[hidden] { display: none; }
.gv-boton:hover { background: var(--surface-2); color: var(--ink, var(--text)); border-color: var(--muted); }
.gv-boton:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (pointer: coarse) { .gv-boton { width: 40px; height: 40px; } }
/* el título y el «?» en la misma fila: si el título no cabe, se parte él y el botón sigue a su derecha */
.gv-titulo-fila { display: flex; align-items: center; gap: 10px; }
.gv-titulo-fila > h1, .gv-titulo-fila > h3 { margin: 0; min-width: 0; flex: 0 1 auto; }
/* un botón grande y el «?» a su lado (/ley/<slug>: «Repasar esta ley») */
.gv-boton-fila { display: flex; align-items: center; gap: 10px; }
.gv-boton-fila > .btn { min-width: 0; }
.about > .gv-titulo-fila { margin-bottom: 6px; }     /* /preparadores: el margen que tenía el h1 (app.css) */

.gv-dialogo { width: min(980px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 0;
  border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--ink, var(--text));
  box-shadow: 0 18px 50px rgb(0 0 0 / .3); overflow: auto; overscroll-behavior: contain; }
.gv-dialogo::backdrop { background: rgb(20 14 11 / .62); }
.gv-caja { padding: 12px 16px 16px; display: grid; gap: 12px; }
.gv-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gv-cab h2 { margin: 0; font-size: 18px; line-height: 1.25; }
.gv-cerrar { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px;
  background: none; color: var(--muted); cursor: pointer; margin-right: -8px; }
.gv-cerrar:hover { background: var(--surface-2); color: var(--ink, var(--text)); }
.gv-cerrar:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* 16:9 y, en pantallas bajas, que quepan la cabecera y los capítulos sin tener que desplazar */
.gv-video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100dvh - 210px); background: #000;
  border-radius: 10px; object-fit: contain; }
.gv-caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gv-cap { display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; min-height: 40px; padding: 6px 10px; text-align: left;
  border: 1px solid var(--line); border-radius: 10px; background: none; color: inherit; font: inherit; font-size: 14px;
  line-height: 1.2; cursor: pointer; }
.gv-cap:hover { background: var(--surface-2); }
.gv-cap:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.gv-cap.on { border-color: var(--accent); background: var(--surface-2); }
.gv-cap-t { flex: none; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; }
.gv-cap.on .gv-cap-t { color: var(--accent); }
@media (max-width: 640px) {
  .gv-dialogo { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 14px; }
  .gv-caja { padding: 8px 10px 12px; gap: 10px; }
  .gv-cab h2 { font-size: 16px; }
  .gv-caps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gv-cap { font-size: 13px; padding: 6px 8px; }
}
@media (max-width: 340px) { .gv-caps { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .gv-boton { transition: none; } }
