/* ─────────────────────────────────────────────────────────────────────────────
   Guía del P-Bit v2 (prototipo, 2026-10-12): estilos propios de la guía.
   Diseño y decisiones: docs/guia-pbit-rediseno-ux.md. Usa los tokens de css/style.css.
   Va en su propio archivo porque solo lo carga la guía: no pesa en el resto del sitio.
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* Colores de cada sensor, tomados de la pantalla del firmware */
  --s-temp: #ff2fb3;
  --s-hum: #19d3f0;
  --s-luz: #ffd21f;
  --s-son: #ff9a1f;
  --s-suelo: #4cd964;
  --s-termo: #ff8a2a;
  --s-lab: #62f304;
  --g2-dock-w: 300px;
  --g2-toc-w: 200px;
  /* Los fija js/guia-pbit-v2.js con las medidas reales de la cabecera del sitio */
  --header-h: 90px;
  --g2-bar-top: 90px;
  --g2-bar-h: 44px;
  --anchor-offset: 114px;
  /* Borde de chips, baldosas y campos sin seleccionar: 3,6:1 sobre la superficie de las tarjetas (WCAG 1.4.11) */
  --line-ui: #64748B;
  /* Escala tipográfica (tercera mayor; mínimo absoluto 12 px). El H2 de capítulo ya la usa; el resto de tamaños se migra al tocar cada componente */
  --fs-display: clamp(36px, 4.5vw, 52px);
  --fs-h2: clamp(28px, 3vw, 40px);
  --fs-h3: clamp(22px, 2vw, 28px);
  --fs-h4: 18px;
  --fs-lead: 20px;
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-label: 13px;
  --fs-eyebrow: 12px;
  /* Espaciado (base 4): 12-16 dentro de un componente, 16 entre párrafos, 24 entre bloques, 48 entre secciones y 96 entre capítulos */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  /* Radios: miniaturas, chips y campos / tarjetas, baldosas y recuadros / dock y hojas / píldoras */
  --r-1: 8px;
  --r-2: 12px;
  --r-3: 20px;
  --r-pill: 999px;
  /* Superficies, líneas y texto */
  --surface-1: #0b1220;
  --surface-2: #131c2f;
  --surface-hover: #1b2740;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: #334155;
  --text-1: #ffffff;
  --text-2: #e2e8f0;
  --text-3: #94a3b8;
  /* Papeles del color: lo activo, los enlaces y el foco, la seguridad */
  --action: #62f304;
  --link: #50b1f9;
  --focus: #50b1f9;
  --warn: #f59e0b;
}
@media (min-width: 1440px) { :root { --g2-dock-w: 340px; --g2-toc-w: 216px; } }

.g2-dock [hidden] { display: none !important; }

/* Enlaces de salto: solo se ven al recibir el foco con el teclado */
.g2-skip { position: absolute; left: 12px; top: -80px; z-index: 300; padding: 10px 16px; border-radius: 10px; background: var(--pbit-green); color: #0b1220; font: 700 14px var(--font-body); text-decoration: none; }
.g2-skip:focus { top: 12px; outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-skip + .g2-skip:focus { left: 190px; }
.g2-main:focus { outline: none; }

/* ── Layout: índice | texto | P-Bit acompañante ───────────────────────────────
   Un solo corte del índice, en 1240 px: por encima es un carril a la izquierda; por debajo, una barra bajo la
   cabecera que abre el mismo <nav> (nunca hay dos índices a la vez). Sin JS, el índice va abierto al principio. */
.g2 { display: grid; grid-template-columns: var(--g2-toc-w) minmax(0, 1fr) var(--g2-dock-w); gap: 40px; max-width: 1440px; margin: 0 auto; padding: 32px 24px 96px; align-items: start; }
@media (max-width: 1239px) { .g2 { grid-template-columns: minmax(0, 1fr) var(--g2-dock-w); } .g2-toc-wrap { grid-column: 1 / -1; } }
/* P-Bit plegado: su columna queda en una pestaña estrecha */
.g2.has-dock-hidden { grid-template-columns: var(--g2-toc-w) minmax(0, 1fr) 64px; }
@media (max-width: 1239px) { .g2.has-dock-hidden { grid-template-columns: minmax(0, 1fr) 64px; } }
/* Móvil: el P-Bit flota sobre el texto, que ocupa todo el ancho, plegado o no */
@media (max-width: 900px) { .g2, .g2.has-dock-hidden { grid-template-columns: minmax(0, 1fr); padding: 20px 16px 140px; } }
/* Sin JS el P-Bit virtual no puede flotar ni abrirse: en pantallas estrechas no se muestra */
/* (sin JS o sin html.live, el dock se oculta en ≤ 900: ver «Móvil» más abajo) */

/* ── Índice ────────────────────────────────────────────────────────────────── */
.g2-toc-wrap { font-size: 13px; }
.g2-toc-bar { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border-bottom: 1px solid var(--border-light); cursor: pointer; list-style: none; font: 600 14px var(--font-body); color: var(--text-primary); }
.g2-toc-bar::-webkit-details-marker { display: none; }
.g2-toc-bar::after { content: '▾'; margin-left: auto; color: var(--text-muted); }
.g2-toc-wrap[open] > .g2-toc-bar::after { content: '▴'; }
.g2-toc-now { color: var(--text-muted); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.g2-toc-bar:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: -3px; }
.g2-toc { padding: 12px 16px; }
.g2-toc .g2-toc-title { font-family: var(--font-code); font-size: 12px; font-weight: 400; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.g2-toc .g2-toc-title:hover { color: var(--text-primary); }
.g2-toc ol { list-style: none; margin: 0; padding: 0; }
.g2-toc a { display: flex; align-items: center; min-height: 32px; padding: 4px 10px; border-radius: 8px; color: var(--text-secondary); font-weight: 500; text-decoration: none; line-height: 1.3; }
@media (pointer: coarse) { .g2-toc a { min-height: 44px; } }
/* Subcapítulos (los sensores): su texto empieza más a la derecha que el de su capítulo. Solo se despliegan cuando el
   capítulo (o uno de ellos) es el actual; sin JS se ven siempre. */
.g2-toc .g2-toc-sub { margin: 0 0 4px 28px; padding: 0; border-left: 1px solid var(--border-light); }
.g2-toc .g2-toc-sub a { padding-left: 22px; }
html.js .g2-toc li:not(.is-open) > .g2-toc-sub { display: none; }
.g2-toc a:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.g2-toc a[aria-current] { background: rgba(98,243,4,0.08); color: var(--pbit-green); }
.g2-toc li.is-later a { opacity: 0.45; pointer-events: none; }
.g2-toc li.is-later a::after { content: 'luego'; margin-left: auto; font-size: 12px; font-family: var(--font-code); text-transform: uppercase; color: var(--text-muted); }
:lang(en) .g2-toc li.is-later a::after { content: 'later'; }
:lang(ca) .g2-toc li.is-later a::after { content: 'després'; }

/* Las cuatro partes (Empieza · Descubre · En clase · Consulta). Solo está desplegada la actual (y las que se abrieron a mano);
   sin JS se ven todas abiertas y sus nombres son texto. */
.g2-toc-parts { margin-top: 4px; }
.g2-toc-part { margin: 2px 0 6px; }
.g2-toc-part-name { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 10px; margin: 0; border: 0; background: none; text-align: left; font: 600 15px var(--font-body); color: var(--text-secondary); }
.g2-toc-part-name .g2-ico { flex: none; width: 16px; height: 16px; }
button.g2-toc-part-name { cursor: pointer; border-radius: 8px; }
button.g2-toc-part-name:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
button.g2-toc-part-name:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: -2px; }
button.g2-toc-part-name::after { content: '▸'; margin-left: auto; font-size: 12px; color: var(--text-muted); }
button.g2-toc-part-name[aria-expanded="true"]::after { content: '▾'; }
@media (pointer: coarse) { .g2-toc-part-name { min-height: 44px; } }
.g2-toc-part.is-current > .g2-toc-part-name { color: #fff; }
html.js .g2-toc-part:not(.is-open) > .g2-toc-chs { display: none; }
.g2-toc-chs > li > a { padding-left: 36px; }
/* Empieza es una secuencia: círculos numerados unidos por una línea */
.g2-toc-part[data-part="empieza"] .g2-toc-chs { counter-reset: paso; }
.g2-toc-part[data-part="empieza"] .g2-toc-chs > li { position: relative; counter-increment: paso; }
.g2-toc-part[data-part="empieza"] .g2-toc-chs > li > a { position: relative; }
.g2-toc-part[data-part="empieza"] .g2-toc-chs > li > a::before { content: counter(paso); position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line-ui); display: grid; place-items: center; font: 600 12px/1 var(--font-body); color: var(--text-secondary); background: var(--bg, #020617); z-index: 1; }
.g2-toc-part[data-part="empieza"] .g2-toc-chs > li:not(:last-child)::after { content: ''; position: absolute; left: 16px; top: 27px; bottom: -5px; width: 2px; background: var(--line-ui); }
.g2-toc-part[data-part="empieza"] .g2-toc-chs > li > a[aria-current]::before { border-color: var(--pbit-green); color: var(--pbit-green); }
/* Sensores: sus seis puntos de color, cuando no son el capítulo actual; cada uno, el suyo al desplegarse */
.g2-toc-dots { display: inline-flex; gap: 3px; margin-left: auto; }
.g2-toc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--d); }
.g2-toc li.is-open > a .g2-toc-dots { display: none; }
.g2-toc-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--d); margin-right: 8px; }
.g2-toc-foot { margin: 10px 0 0; font-size: 13px; }
.g2-toc .g2-toc-foot a { color: var(--text-muted); }
/* Ver todo: pone todos los paneles a la vista (sirve para buscar en Safari y para leer de corrido) */
.g2-seeall { min-height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-secondary); font: 600 13px var(--font-body); cursor: pointer; }
.g2-seeall[hidden] { display: none; }
.g2-seeall[aria-pressed="true"] { color: #0b1220; background: var(--pbit-green); border-color: var(--pbit-green); }
.g2-seeall:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-toc .g2-seeall { margin: 10px 0 0 10px; }
.g2-seeall-bar { display: none; }
body.g2-all .g2-tablist { display: none !important; }
body.g2-all .g2-tabpanel[hidden] { display: block !important; content-visibility: visible !important; }
body.g2-all .g2-tabs.is-ready .g2-tabpanel-title { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }

/* ── Móvil (≤ 900 px) ──────────────────────────────────────────────────────────
   Con html.live (JS + WebAssembly + <dialog>): barra inferior con el índice y el P-Bit virtual, y hojas modales. La barra de
   arriba y el P-Bit flotante desaparecen. Sin html.live (plan B): barra de arriba con el índice, sin P-Bit virtual, y todo el
   texto y las capturas completos. */
.g2-bottombar { display: none; }
.g2-sheet { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; background: transparent; color: var(--text-primary); }
.g2-sheet::backdrop { background: rgba(2,6,23,0.62); }
.g2-sheet-pbit { width: 100%; height: 100%; overflow: hidden; }
.g2-sheet-index[open] { display: flex; align-items: flex-end; width: 100%; height: 100%; }
.g2-sheet-panel { display: flex; flex-direction: column; width: 100%; max-height: 88vh; background: #0b1220; border-radius: 20px 20px 0 0; box-shadow: 0 -20px 60px rgba(0,0,0,0.6); }
.g2-sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 0 8px 0 20px; border-bottom: 1px solid var(--border-light); font: 700 17px var(--font-display); }
.g2-sheet-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: none; color: var(--text-primary); font-size: 20px; cursor: pointer; }
.g2-sheet-x:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: -3px; }
.g2-sheet-body { overflow: auto; overscroll-behavior: contain; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); }
.g2-sheet-index .g2-toc { padding: 8px 8px 0; }
.g2-sheet-index .g2-toc-part:not(.is-open) > .g2-toc-chs { display: block; }
.g2-sheet-index button.g2-toc-part-name { cursor: default; pointer-events: none; }
.g2-sheet-index button.g2-toc-part-name::after { content: none; }
.g2-sheet-index .g2-toc a { min-height: 44px; }
@media (max-width: 900px) {
  html:not(.live) .g2-dock { display: none; }
  html.live .g2-dock:not(.is-open) { display: none; }
  html.live .g2-toc-wrap, html.live .g2-seeall-bar { display: none !important; }
  html.live .g2, html.live .g2.has-dock-hidden { padding-top: 20px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  html.live .g2-bottombar:not([hidden]) { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 92; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 6px 12px calc(6px + env(safe-area-inset-bottom)); background: rgba(2,6,23,0.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--border-light); }
  .g2-bb-index { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--text-primary); font: 600 14px var(--font-body); text-align: left; cursor: pointer; }
  .g2-bb-index .g2-bb-now { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .g2-bb-index:focus-visible, .g2-bb-try:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: -3px; }
  .g2-bb-pbit { display: flex; align-items: center; gap: 8px; flex: none; }
  .g2-bb-label { font: 500 13px var(--font-body); color: var(--text-muted); }
  .g2-bottombar.is-live .g2-bb-label { display: none; }
  .g2-bb-live, .g2-bb-led, .g2-bb-note { display: none; }
  .g2-bottombar.is-live .g2-bb-live { display: block; width: 64px; height: 51px; border-radius: 6px; overflow: hidden; background: #000; border: 1px solid #334155; }
  .g2-bb-live canvas { display: block; width: 100%; height: 100%; }
  .g2-bottombar.is-live .g2-bb-led { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--pb-led, #2a2f36); box-shadow: 0 0 var(--pb-led-glow, 0px) var(--pb-led, transparent); }
  .g2-bottombar.is-live .g2-bb-note { display: block; font-size: 18px; line-height: 1; color: var(--text-muted); }
  .g2-bb-note.is-on { color: var(--pbit-green); }
  .g2-bb-try { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-primary); font: 600 14px var(--font-body); cursor: pointer; }
  .g2-bb-try::before { content: '▶'; color: var(--pbit-green); font-size: 11px; }
  .g2-bb-toast { position: absolute; left: 12px; right: 12px; bottom: calc(100% + 8px); margin: 0; padding: 10px 14px; border-radius: 12px; background: #131c2f; border: 1px solid var(--line-ui); font-size: 14px; color: var(--text-primary); }
  .g2-bb-toast[hidden] { display: none; }
  .g2-bb-toast button { border: 0; background: none; padding: 0 4px; min-height: 32px; color: var(--pbit-blue); font: 700 14px var(--font-body); text-decoration: underline; cursor: pointer; }
  @media (prefers-reduced-motion: no-preference) { .g2-bottombar.is-pulse .g2-bb-pbit { animation: g2-bb-pulse .6s ease-out; } }
}
@keyframes g2-bb-pulse { 40% { transform: scale(1.06); } }

/* Carril (≥ 1240 px): pegado bajo la cabecera, con su propio desplazamiento */
@media (min-width: 1240px) {
  .g2-toc-wrap { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; overscroll-behavior: contain; align-self: start; }
  .g2-toc-bar { display: none; }
  .g2-toc { padding: 0; }
}
/* Barra (< 1240 px, con JS): fija bajo la cabecera; al abrirla, el índice cuelga debajo */
@media (max-width: 1239px) {
  html.js .g2-toc-wrap { position: fixed; z-index: 95; top: var(--g2-bar-top); left: 0; right: 0; }
  html.js .g2-toc-bar { height: var(--g2-bar-h); background: rgba(2,6,23,0.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  html.js .g2-toc-wrap[open] > .g2-toc { max-height: calc(100vh - var(--g2-bar-top) - var(--g2-bar-h)); overflow: auto; overscroll-behavior: contain; background: #0b1220; border-bottom: 1px solid var(--border-light); box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
  html.js .g2 { padding-top: calc(32px + var(--g2-bar-h)); }
  html.js .g2-toc-bar { padding-right: 112px; }
  /* En la barra se ven todas las partes abiertas: cualquier capítulo está a dos toques */
  html.js .g2-toc-part:not(.is-open) > .g2-toc-chs { display: block; }
  html.js button.g2-toc-part-name { cursor: default; pointer-events: none; }
  html.js button.g2-toc-part-name::after { content: none; }
  html.js .g2-toc-bar-ico .g2-ico { width: 16px; height: 16px; color: var(--pbit-green); }
  html.js .g2-seeall-bar:not([hidden]) { display: flex; align-items: center; position: fixed; top: var(--g2-bar-top); right: 0; z-index: 96; height: var(--g2-bar-h); padding: 0 16px; border: 0; border-radius: 0; background: transparent; color: var(--pbit-blue); font: 600 14px var(--font-body); }
  html.js .g2-seeall-bar[aria-pressed="true"] { color: var(--pbit-green); }
}
@media (max-width: 900px) { html.js .g2, html.js .g2.has-dock-hidden { padding-top: calc(20px + var(--g2-bar-h)); } }
/* Los destinos de los enlaces quedan por debajo de la cabecera y de la barra */
h2, h3, .g2-hero, .g2-chapter, .g2-when, .g2-step, .g2-part, [role="tabpanel"], [data-tabs], details[id], #para-tu-centro, .g2-two > [id], .g2-stepper > li[id], .g2-lista-pasos > li[id], .g2-main :is(h3, h4, h5, h6)[id], .g2-symptom, #ayuda-problemas, #ayuda-preguntas, .g2-cuidado-grupo[id] { scroll-margin-top: var(--anchor-offset); }

/* ── Texto ─────────────────────────────────────────────────────────────────── */
.g2-main { min-width: 0; max-width: 720px; container-type: inline-size; }
/* Aviso de prototipo: una línea que se despliega; desaparece al publicar */
.g2-proto { border: 1px dashed rgba(245,158,11,0.6); background: rgba(245,158,11,0.07); color: #fcd34d; border-radius: 12px; padding: 0 16px; font-size: 13px; line-height: 1.55; margin-bottom: 12px; }
.g2-proto summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-weight: 600; }
.g2-proto p { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: inherit; }
/* Portada: qué es, para quién y por dónde seguir. Un solo relleno verde: la puerta principal. */
.g2-hero { padding: 0 0 32px; }
.g2-eyebrow { font-family: var(--font-code); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pbit-green); margin-bottom: 4px; }
.g2-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(36px, 5vw, 52px); line-height: 1.05; margin: 0 0 12px; }
.g2-promise { font-size: clamp(18px, 2.2vw, 20px); line-height: 1.55; color: var(--text-primary); margin: 0 0 18px; text-wrap: pretty; }
.g2-start { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 74px; padding: 14px 22px; border-radius: 16px; background: var(--pbit-green); color: #0b1220; text-decoration: none; }
.g2-start strong { font: 800 20px/1.2 var(--font-display); }
.g2-start span { font-size: 15px; font-weight: 500; }
.g2-start:hover { filter: brightness(1.06); }
.g2-start:focus-visible, .g2-routes a:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 3px; }
.g2-routes { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 12px 0 0; padding: 0; }
.g2-routes a { display: inline-flex; align-items: center; min-height: 44px; color: var(--pbit-blue); font-weight: 600; font-size: 16px; text-decoration: none; }
.g2-routes a:hover { text-decoration: underline; }
/* Portada: las pantallas reales que mueven el P-Bit virtual. Sin JS son capturas; con JS (html.live) llevan un botón encima. */
.g2-demo { margin: 18px 0 0; }
.g2-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.g2-chapter h2.g2-demo-title, .g2-demo-title { font: 600 18px/1.3 var(--font-display); letter-spacing: 0; margin: 0; color: var(--text-primary); }
.g2-act { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-primary); font: 600 15px var(--font-body); cursor: pointer; }
.g2-act { text-align: left; }
.g2-act::before { content: '▶'; flex: none; color: var(--action, var(--pbit-green)); font-size: 12px; }
.g2-act .g2-dot { margin: 0; flex: none; }
.g2-act-res { color: var(--text-muted); font-weight: 500; font-size: 14px; }
.g2-act-res::before { content: '· '; }
.g2-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; vertical-align: middle; }
/* Fila de chips que mueven el P-Bit virtual: una frase y sus botones */
.g2-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.g2-chiprow[hidden] { display: none; }
.g2-chiprow > span { color: var(--text-secondary); font-size: 15px; }
.g2-act:hover { background: rgba(255,255,255,0.05); border-color: var(--pbit-green); }
.g2-act:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-act[hidden] { display: none; }
.g2-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 616px; margin: 0; padding: 0; }
/* .g2-tile: una baldosa, tres variantes. pantalla (fondo negro), foto (fondo blanco) y estado (captura, nombre y descripción) */
.g2-tile { position: relative; margin: 0; }
.g2-tile--estado:focus-visible { outline: 2px solid var(--pbit-blue); outline-offset: 2px; }
.g2-tile.g2-tile--foto img { aspect-ratio: 4 / 3; background: #fff; border: 0; border-radius: 10px; }
.g2-tile.g2-tile--foto figcaption { font-size: 12px; font-weight: 400; color: var(--text-muted); line-height: 1.4; }
.g2-tile--estado { display: block; background: var(--gray-50); border: 1px solid var(--border-light); border-radius: 14px; padding: 10px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.g2-tile--estado:hover, .g2-tile--estado.is-current { border-color: var(--pbit-green); }
.g2-tile.g2-tile--estado img { border-radius: 6px; }
.g2-tile--estado strong { display: block; font-family: var(--font-code); font-size: 13px; margin: 8px 0 2px; color: var(--text-primary); }
.g2-tile--estado span { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.g2-tile img { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; border-radius: 8px; background: #000; border: 1px solid #334155; }
.g2-tile figcaption { margin-top: 6px; font: 600 13px/1.3 var(--font-body); color: var(--text-secondary); }
.g2-tile button { display: none; position: absolute; inset: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; }
html.live .g2-tile button { display: block; }
.g2-tile button:hover { box-shadow: 0 0 0 2px var(--pbit-green); }
.g2-tile button:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-discover { margin: 16px 0 0; font-size: 15px; line-height: 1.6; color: var(--text-secondary); }
.g2-discover a { color: var(--pbit-blue); font-weight: 600; }
.g2-poster { display: none; }
@media (max-width: 900px) {
  .g2-tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; max-width: none; padding-bottom: 6px; }
  .g2-tiles > .g2-tile { flex: 0 0 148px; scroll-snap-align: start; }
  html.live .g2-poster { display: block; position: relative; margin: 18px 0 0; max-width: 220px; }
}

/* Antes de empezar: dos columnas (a partir de 700 px de columna) y recuadros */
.g2-two { display: grid; gap: 24px; margin: 8px 0 16px; }
@container (min-width: 700px) { .g2-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; } }
.g2-callout { border-left: 4px solid var(--line-ui); background: rgba(148,163,184,0.08); border-radius: 0 12px 12px 0; padding: 12px 16px; margin: 8px 0 14px; font-size: 16px; line-height: 1.6; color: var(--text-secondary); }
.g2-callout strong { color: var(--text-primary); }
.g2-callout[hidden] { display: none; }
.g2-callout--info { border-left-color: var(--pbit-blue); background: rgba(56,189,248,0.07); }
.g2-callout--warn { border-left-color: #F59E0B; background: rgba(245,158,11,0.08); }
.g2-callout--try { display: flex; gap: 10px; align-items: flex-start; border-left-color: var(--pbit-green); background: rgba(98,243,4,0.08); color: var(--text-secondary); }
.g2-callout--try > i, .g2-callout--try > svg { flex: none; width: 20px; height: 20px; color: var(--pbit-green); margin-top: 3px; }
.g2-callout--try > div { min-width: 0; }
.g2-callout--try .g2-acts { margin-top: 6px; display: flex; }
.g2-need { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.g2-need li { position: relative; padding-left: 30px; }
.g2-need li::before { content: ''; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border: 2px solid var(--line-ui); border-radius: 4px; }
.g2-foot-link { margin-top: 16px; font-size: 15px; }
.g2-foot-link a { font-weight: 600; }

/* Cierre: ¿Y ahora? y Para tu centro */
.g2-nextcards { list-style: none; margin: 18px 0 40px; padding: 0; display: grid; gap: 12px; }
@container (min-width: 700px) { .g2-nextcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.g2-nextcard { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px; border-radius: 12px; border: 1px solid var(--line-ui); background: #131c2f; color: var(--text-secondary); text-decoration: none; }
.g2-nextcard strong { font: 700 17px/1.3 var(--font-display); color: var(--text-primary); }
.g2-nextcard span { font-size: 14px; line-height: 1.5; }
.g2-nextcard:hover { border-color: var(--pbit-green); }
.g2-nextcard:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
#para-tu-centro .g2-lineup { grid-template-columns: repeat(4, 96px); gap: 16px; justify-content: start; }
@media (max-width: 560px) { #para-tu-centro .g2-lineup { grid-template-columns: repeat(2, 96px); max-width: none; margin-inline: 0; } }
.g2-pending { display: inline-block; border: 1px dashed rgba(245,158,11,0.6); color: #fcd34d; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-family: var(--font-code); }
.g2-chapter { padding: 40px 0 56px; border-top: 1px solid var(--border-light); }
.g2-chapter:first-of-type { border-top: 0; padding-top: 8px; }
.g2-kicker { font-family: var(--font-code); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--pbit-green); margin-bottom: 10px; }
.g2-chapter h2 { font-family: var(--font-display); font-size: var(--fs-h2); line-height: 1.1; margin: 0 0 14px; }
.g2-chapter h3 { font-family: var(--font-display); font-size: 21px; margin: 40px 0 10px; }
/* El nombre de un sensor es un H3 (cuelga de «Los sensores») pero se ve como el de un capítulo */
.g2-chapter h3.g2-sensor-title { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.5px; margin: 0 0 14px; }
.g2-chapter p, .g2-chapter li { color: var(--text-secondary); font-size: 16px; line-height: 1.7; }
.g2-lead { font-size: 18px !important; color: var(--text-primary) !important; }
.g2-step { padding: 22px 0 6px; }
.g2-step + .g2-step { border-top: 1px dashed rgba(255,255,255,0.06); }
.g2-step-label { font-family: var(--font-code); font-size: 12px; font-weight: 400; line-height: 1.5; margin: 0; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }

.g2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin: 18px 0; }
.g2-card { background: var(--gray-50); border: 1px solid var(--border-light); border-radius: 14px; padding: 16px; }
.g2-card h4, .g2-card.g2-part > h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 15px; display: flex; align-items: center; gap: 8px; }
.g2-card p { margin: 0; font-size: 14px; line-height: 1.55; }
.g2-card .g2-swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g2-safety { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.g2-safety li { display: flex; gap: 12px; align-items: flex-start; background: var(--gray-50); border: 1px solid var(--border-light); border-radius: 12px; padding: 10px 14px; font-size: 15px; }
.g2-safety li i, .g2-safety li svg { flex: none; width: 20px; height: 20px; color: #f59e0b; margin-top: 2px; }

/* Cabecera de módulo de sensor, con el color del sensor */
.g2-sensor-head { display: flex; gap: 16px; align-items: center; margin-bottom: 8px; }
.g2-sensor-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex: none; }
.g2-sensor-icon svg, .g2-sensor-icon i { width: 26px; height: 26px; }
.g2-chapter[data-accent] .g2-kicker { color: var(--accent); }
.g2-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 16px 0; }
.g2-facts div { background: var(--gray-50); border-radius: 10px; padding: 10px 12px; }
.g2-facts span { display: block; font-family: var(--font-code); font-size: 12px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.g2-facts strong { font-size: 15px; color: var(--text-primary); }

/* ── Pantallas (capturas suavizadas) ───────────────────────────────────────── */
.g2-shot { margin: 0; }
.g2-shot img, .g2-shot canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; border-radius: 8px; background: #000; image-rendering: pixelated; }
.g2-shot canvas { image-rendering: auto; }
.g2-shot figcaption { margin-top: 6px; font-size: 13px; color: var(--text-muted); text-align: center; }
.g2-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.g2-shot.is-clickable { cursor: pointer; }
.g2-shot.is-clickable:hover img, .g2-shot.is-clickable:hover canvas { outline: 2px solid var(--pbit-green); outline-offset: 2px; }

/* Vistas: tarjeta con captura + para qué sirve */
.g2-views { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin: 14px 0; }
.g2-view { display: flex; flex-direction: column; gap: 8px; min-height: 44px; background: var(--gray-50); border: 1px solid var(--border-light); border-radius: 14px; padding: 8px; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.g2-view:hover, .g2-view.is-current { border-color: var(--pbit-green); }
/* Dentro de un botón solo cabe texto en línea: el título y la descripción son span, no h4 ni p */
.g2-view-text { display: block; }
.g2-view-title { display: block; margin: 0 0 2px; font-family: var(--font-display); font-size: 15px; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.g2-view-desc { display: block; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }

/* Anatomía de una pantalla: captura grande con puntos numerados */
.g2-anatomy { display: grid; grid-template-columns: minmax(0, 360px) 1fr; gap: 24px; align-items: start; margin: 18px 0; }
@media (max-width: 700px) { .g2-anatomy { grid-template-columns: 1fr; } }
.g2-anatomy-shot { position: relative; }
.g2-pin { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; background: var(--pbit-green); color: #021; font: 700 12px/24px var(--font-code); text-align: center; box-shadow: 0 0 0 4px rgba(98,243,4,0.25); }
.g2-anatomy ol { margin: 0; padding-left: 0; list-style: none; counter-reset: pin; }
.g2-anatomy ol li { counter-increment: pin; display: flex; gap: 10px; margin-bottom: 10px; font-size: 15px; }
.g2-anatomy ol li::before { content: counter(pin); flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--pbit-green); color: #021; font: 700 12px/22px var(--font-code); text-align: center; margin-top: 2px; }

/* Leer la pantalla: la captura a la izquierda, sus números fuera con una línea guía de 1 px a cada zona */
.g2-anatomy--out { grid-template-columns: minmax(0, 380px) 1fr; align-items: center; }
.g2-anatomy--out .g2-anatomy-shot { aspect-ratio: 200 / 128; }
.g2-anatomy--out .g2-shot { position: absolute; left: 0; top: 0; width: 80%; }
.g2-anatomy-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.g2-zone { fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke; }
.g2-zone-line { stroke: var(--text-muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.g2-pin-out { position: absolute; left: 90%; transform: translate(-50%, -50%); width: 24px; height: 24px; border: 1px solid var(--text-muted); border-radius: 50%; color: var(--text-primary); font: 700 12px/22px var(--font-code); text-align: center; }
.g2-anatomy--out .is-on.g2-zone { stroke: var(--pbit-green); fill: rgba(98,243,4,0.12); }
.g2-anatomy--out .is-on.g2-zone-line { stroke: var(--pbit-green); }
.g2-anatomy--out .is-on.g2-pin-out { background: var(--pbit-green); border-color: var(--pbit-green); color: #021; }
.g2-anat-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.g2-anatomy--out .g2-anat-list li { display: block; margin: 0; font-size: inherit; counter-increment: none; }
.g2-anatomy--out .g2-anat-list li::before { content: none; }
.g2-anat-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--text-secondary); font: inherit; font-size: 15px; line-height: 1.45; text-align: left; cursor: pointer; }
.g2-anat-item strong { color: var(--text-primary); }
.g2-anat-item:hover, .g2-anat-item[aria-pressed="true"] { border-color: var(--pbit-green); background: rgba(98,243,4,0.08); }
.g2-anat-item:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; border-color: var(--pbit-green); }
.g2-anat-n { flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: var(--pbit-green); color: #021; font: 700 12px/24px var(--font-code); text-align: center; }
@media (max-width: 700px) { .g2-anatomy--out { grid-template-columns: 1fr; } }

/* Mapa del carrusel */
.g2-map-group { margin: 14px 0 18px; }
.g2-map-group h3 { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); font-weight: 600; margin: 0 0 8px; }
.g2-map { display: grid; grid-template-columns: repeat(auto-fill, 88px); justify-content: start; gap: 10px 12px; }
.g2-carousel { margin: 14px 0 20px; }
.g2-map-note { margin: 0 0 6px; font-size: 15px; color: var(--text-secondary); }
.g2-carousel .g2-map-group { margin: 10px 0 12px; }
.g2-map button { background: none; border: 0; padding: 0; min-height: 44px; color: var(--text-secondary); font: 13px var(--font-body); cursor: pointer; text-align: center; }
.g2-map button canvas, .g2-map button img { display: block; width: 100%; aspect-ratio: 5 / 4; border-radius: 6px; border: 2px solid transparent; margin-bottom: 4px; background: #000; }
.g2-map button.is-current canvas, .g2-map button.is-current img { border-color: var(--pbit-green); }
.g2-map button.is-current { color: var(--pbit-green); font-weight: 600; }
.g2-map button small { display: block; font-size: 12px; color: var(--text-muted); }
.g2-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; margin: 8px 0 18px; }
.g2-flow span { padding: 2px 10px; border-radius: 12px; border: 1px solid var(--border-light); }
.g2-flow b { color: var(--text-muted); font-weight: 400; }

/* Stepper de «Primeros pasos»: 6 pasos con círculo, acción, «Verás:» y miniatura de 120 px */
.g2-before { margin: 4px 0 14px; font-size: 15px; }
.g2-before a { color: var(--pbit-blue); font-weight: 600; }
.g2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g2-stepper-progress { margin: 18px 0 10px; font: 600 15px var(--font-code); color: var(--text-primary); }
.g2-stepper { list-style: none; margin: 8px 0 20px; padding: 0; }
.g2-stepper > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 120px; column-gap: 14px; padding-bottom: 26px; }
.g2-stepper > li:last-child { padding-bottom: 0; }
.g2-stepper > li::before { content: ''; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--line-ui); }
.g2-stepper > li:last-child::before { display: none; }
.g2-sp-n { grid-row: 1; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-ui); display: grid; place-items: center; font: 700 14px var(--font-code); color: var(--text-primary); }
.g2-stepper > li.is-active .g2-sp-n { border-color: var(--pbit-blue); color: var(--pbit-blue); }
.g2-stepper > li.is-done .g2-sp-n { border-color: var(--pbit-green); background: var(--pbit-green); color: #021; font-size: 0; }
.g2-stepper > li.is-done .g2-sp-n::after { content: '✓'; font-size: 15px; }
.g2-stepper > li.is-done::before { background: var(--pbit-green); }
.g2-sp-body { grid-row: 1; grid-column: 2; min-width: 0; }
.g2-sp-act { margin: 2px 0 6px; font-size: 16px; line-height: 1.5; color: var(--text-primary); }
.g2-sp-see, .g2-sp-hint { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
.g2-sp-tools { display: flex; flex-wrap: wrap; gap: 10px; }
.g2-sp-tools > :not([hidden]) { margin: 4px 0 6px; }
.g2-sp-done { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-primary); font: 600 15px var(--font-body); cursor: pointer; }
.g2-sp-done:hover { border-color: var(--pbit-green); }
.g2-sp-done:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-stepper > li.is-done .g2-sp-done { display: none; }
.g2-sp-fig { grid-row: 1; grid-column: 3; margin: 2px 0 0; width: 120px; }
.g2-sp-fig img { display: block; width: 100%; height: auto; border-radius: 8px; background: #0b1220; }
.g2-gestos { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g2-gestos li { position: relative; padding: 8px 10px; border: 1px solid var(--border-light); border-radius: 12px; background: var(--gray-50); }
.g2-gestos i, .g2-gestos svg { width: 16px; height: 16px; color: var(--pbit-green); }
.g2-gestos strong { display: block; font-size: 14px; color: var(--text-primary); }
.g2-gestos span { display: block; font-size: 13px; line-height: 1.4; color: var(--text-muted); }
.g2-gestos li.is-done { border-color: rgba(98,243,4,0.5); background: rgba(98,243,4,0.06); }
.g2-gestos li.is-done::after { content: '✓'; position: absolute; top: 6px; right: 9px; color: var(--pbit-green); font-weight: 700; }
.g2-stepper-end { margin: 14px 0 0; padding: 14px 16px; border: 1px solid rgba(98,243,4,0.5); border-radius: 14px; background: rgba(98,243,4,0.06); }
.g2-stepper-end p { margin: 0; color: var(--text-primary); }
.g2-next-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 24px; margin-top: 10px !important; }
.g2-chapter-next { margin-top: 28px !important; padding-top: 6px; border-top: 1px solid var(--border-light); }
.g2-next { display: inline-flex; align-items: center; min-height: 48px; padding: 0; color: var(--pbit-blue); font-weight: 600; font-size: 16px; text-decoration: none; }
.g2-next:hover { text-decoration: underline; text-underline-offset: 4px; }
.g2-next:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
@container (max-width: 560px) {
  .g2-stepper > li { grid-template-columns: 28px minmax(0, 1fr); }
  .g2-sp-fig { grid-row: 2; grid-column: 2; margin-top: 8px; }
  .g2-gestos { grid-template-columns: 1fr; }
}
@media print { .g2-sp-done, .g2-sp-tools { display: none !important; } }

/* Plegables (ajustes, ficha técnica) */
.g2-more { border: 1px solid var(--border-light); border-radius: 14px; margin: 14px 0; background: rgba(30,41,59,0.5); }
.g2-more summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
.g2-more summary::-webkit-details-marker { display: none; }
.g2-more summary::after { content: '+'; margin-left: auto; font-family: var(--font-code); color: var(--text-muted); }
.g2-more[open] summary::after { content: '−'; }
.g2-more > div { padding: 0 18px 16px; }
.g2-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g2-table th, .g2-table td { text-align: left; padding: 9px 8px; border-top: 1px solid var(--border-light); vertical-align: top; }
.g2-table th { font-family: var(--font-code); font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); font-weight: 500; }
@media (max-width: 560px) { .g2-table thead { display: none; } .g2-table tr { display: block; border-top: 1px solid var(--border-light); padding: 8px 0; } .g2-table td { display: block; border: 0; padding: 2px 0; } .g2-table td::before { content: attr(data-label); display: block; font: 500 12px var(--font-code); letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted); } }

/* Estados de Planta Lab */
.g2-states { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 16px 0; }
.g2-state.is-current { border-color: var(--pbit-green); }

/* ── P-Bit acompañante ─────────────────────────────────────────────────────── */
.g2-dock { position: sticky; top: 88px; }
.g2-dock-card { position: relative; background: linear-gradient(160deg, rgba(30,41,59,0.85), rgba(2,6,23,0.9)); border: 1px solid var(--border-light); border-radius: 22px; padding: 18px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.g2-dock-head { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; min-height: 40px; }
/* Plegar / desplegar */
/* El asa de plegar va fuera de la tarjeta, en el borde izquierdo del dock (32 × 64 px) */
.g2-dock-hide { position: absolute; top: 24px; left: -36px; z-index: 3; width: 32px; height: 64px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border-light); background: #0f172a; color: var(--text-muted); cursor: pointer; padding: 0; }
.g2-dock-hide::after { content: ''; position: absolute; inset: -4px -4px -4px -6px; }
.g2-dock.is-hidden .g2-dock-hide { display: none; }
.g2-dock-hide:hover, .g2-dock-hide:focus-visible { color: var(--text-primary); }
.g2-dock-show { display: none; flex-direction: column; align-items: center; gap: 8px; width: 64px; padding: 14px 0; border-radius: 18px; border: 1px solid var(--border-light); background: linear-gradient(160deg, rgba(30,41,59,0.95), rgba(2,6,23,0.95)); color: var(--pbit-green); font: 700 12px var(--font-body); cursor: pointer; box-shadow: 0 16px 40px rgba(0,0,0,0.45); }
.g2-dock-show-led { width: 14px; height: 14px; border-radius: 50%; background: var(--pb-led, #2a2f36); box-shadow: 0 0 calc(var(--pb-led-glow, 0px) / 2) var(--pb-led, transparent); }
.g2-dock.is-hidden .g2-dock-card { display: none; }
.g2-dock.is-hidden .g2-dock-show:not([hidden]) { display: flex; }
.g2-dock-title { flex: 1 1 auto; font-size: 12px; font-weight: 700; color: var(--pbit-green); white-space: nowrap; }
.g2-dock-seal { flex: none; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(98,243,4,0.4); background: transparent; color: var(--pbit-green); font: 600 12px var(--font-body); cursor: pointer; white-space: nowrap; }
.g2-dock-seal:hover { background: rgba(98,243,4,0.1); }
.g2-dock-iconbtn { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border-light); background: #0f172a; color: var(--text-secondary); cursor: pointer; padding: 0; }
.g2-dock-iconbtn:hover { color: var(--text-primary); border-color: var(--pbit-blue); }
.g2-dock-seal:focus-visible, .g2-dock-iconbtn:focus-visible, .g2-dock-iconbtn:has(input:focus-visible), .g2-dock-hide:focus-visible, .g2-dock-env-sum:focus-visible, .g2-dock-reset:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-dock-speaker input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.g2-dock-speaker .g2-ico-on, .g2-dock-speaker:has(input:checked) .g2-ico-off { display: none; }
.g2-dock-speaker:has(input:checked) { color: var(--pbit-green); border-color: var(--pbit-green); }
.g2-dock-speaker:has(input:checked) .g2-ico-on { display: block; }
/* El menú «⋯»: ajustes que no hacen falta a la vista */
.g2-dock-menu { position: absolute; top: 56px; left: 12px; right: 12px; z-index: 4; display: grid; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--border-light); background: #0b1220; box-shadow: 0 20px 50px rgba(0,0,0,0.6); }
.g2-dock-menu .g2-dock-colors, .g2-dock-menu .g2-dock-power { margin: 0; }
.g2-dock-menu .g2-dock-colors button { width: 28px; height: 28px; }
.g2-dock-menu .g2-toggle { min-height: 32px; font-size: 13px; color: var(--text-secondary); }
.g2-dock-menu .g2-dock-about { margin: 0; }
.g2-dock-status { display: block; margin-top: 10px; font-family: var(--font-code); font-size: 12px; line-height: 1.4; text-align: center; color: var(--pbit-blue); min-height: 1.4em; }
.g2-dock[data-mode="step"] .g2-dock-status { color: var(--pbit-green); }
.g2-dock[data-mode="manual"] .g2-dock-status { color: #fcd34d; }
.g2-dock-now { margin-top: 10px; text-align: center; }
.g2-dock-now-text { margin: 0; min-height: 2.9em; font-size: 14px; line-height: 1.45; color: var(--text-secondary); }
.g2-dock[data-mode="manual"] .g2-dock-now-text { min-height: 0; }
.g2-dock-back { margin-top: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-primary); font: 600 14px var(--font-body); cursor: pointer; }
.g2-dock-back[hidden] { display: none; }
.g2-dock-back:hover { border-color: var(--pbit-green); }
.g2-dock-back:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }

/* Aparato: proporciones de la foto frontal (470 × 625). Las posiciones son porcentajes de la caja
   para poder cambiar el dibujo por la foto profesional sin tocar el resto. */
.pb-device { position: relative; width: 100%; aspect-ratio: 470 / 625; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.pb-knob { touch-action: none; }
.pb-device[data-frame="css"] .pb-body { position: absolute; inset: 0; border-radius: 9% / 7%; background: #2aa7d8; box-shadow: inset 0 0 0 2px rgba(255,255,255,0.18), 0 18px 40px rgba(0,0,0,0.5); }
.pb-device[data-frame="css"] .pb-board { position: absolute; inset: 4.5% 5% 3.5% 5%; border-radius: 4%; background: linear-gradient(180deg, #eef2f6, #dfe5eb); }
/* Marco con la foto de estudio recortada (tools/guia-pbit-v2/recorte_foto.py, caja de 774 × 1030):
   pantalla, LED, rueda y zumbador medidos sobre la foto, en porcentajes de esa caja. Cada color tiene su
   foto y sus medidas (el encuadre varía unos píxeles); el tamaño de la pantalla es el mismo en los cuatro. */
[data-frame="photo"], .pb-photo { --pb-photo: url("/Assets/guia-pbit/p-bit-cyan-frontal-recorte.webp"); --pb-scr-x: 28.13%; --pb-scr-y: 14.51%; --pb-led-x: 40.36%; --pb-led-y: 65.91%; --pb-knob-x: 74.47%; --pb-knob-y: 83.78%; --pb-knob-bx: 78.27%; --pb-knob-by: 87.57%; }
/* Desplazamiento de las piezas (LDR, puertos, TH Sensor) de cada foto respecto a la cian: sus recortes difieren unas décimas */
[data-frame="photo"], .pb-photo { --pb-dx: 0%; --pb-dy: 0%; }
[data-color="magenta"] { --pb-dx: -0.36%; --pb-dy: 0.05%; }
[data-color="verde"] { --pb-dx: 0%; --pb-dy: 0.05%; }
[data-color="amarillo"] { --pb-dx: 0.22%; --pb-dy: -0.27%; }
[data-color="magenta"] { --pb-photo: url("/Assets/guia-pbit/p-bit-magenta-frontal-recorte.webp"); --pb-scr-x: 27.61%; --pb-scr-y: 14.51%; --pb-led-x: 39.59%; --pb-led-y: 66.11%; --pb-knob-x: 74.47%; --pb-knob-y: 83.82%; --pb-knob-bx: 78.27%; --pb-knob-by: 87.61%; }
[data-color="verde"] { --pb-photo: url("/Assets/guia-pbit/p-bit-verde-frontal-recorte.webp"); --pb-scr-x: 27.35%; --pb-scr-y: 14.61%; --pb-led-x: 39.72%; --pb-led-y: 66.30%; --pb-knob-x: 74.95%; --pb-knob-y: 83.60%; --pb-knob-bx: 78.82%; --pb-knob-by: 87.38%; }
[data-color="amarillo"] { --pb-photo: url("/Assets/guia-pbit/p-bit-amarillo-frontal-recorte.webp"); --pb-scr-x: 28.39%; --pb-scr-y: 14.42%; --pb-led-x: 40.49%; --pb-led-y: 65.52%; --pb-knob-x: 74.90%; --pb-knob-y: 83.14%; --pb-knob-bx: 78.76%; --pb-knob-by: 86.86%; }
.pb-device[data-frame="photo"] { aspect-ratio: 774 / 1030; }
.pb-device[data-frame="photo"] .pb-body { position: absolute; inset: 0; background: var(--pb-photo) center / 100% 100% no-repeat; filter: drop-shadow(0 18px 28px rgba(0,0,0,0.5)); }
.pb-device[data-frame="photo"] .pb-board { display: none; }
.pb-device[data-frame="photo"] .pb-screen { left: var(--pb-scr-x); top: var(--pb-scr-y); width: 50.99%; height: 30.66%; border-radius: 0; box-shadow: none; }
/* LED: la foto lo tiene encendido; encima va el color real del firmware, o el LED apagado (blanco lechoso) */
.pb-device[data-frame="photo"] .pb-led { left: var(--pb-led-x); top: var(--pb-led-y); width: 6.46%; background: radial-gradient(circle at 42% 38%, #fff 0 14%, var(--pb-led) 46%, color-mix(in srgb, var(--pb-led) 75%, #000) 100%); box-shadow: 0 0 var(--pb-led-glow, 0px) calc(var(--pb-led-glow, 0px) / 2) var(--pb-led, transparent); }
.g2-dock.led-off .pb-device[data-frame="photo"] .pb-led { background: radial-gradient(circle at 42% 38%, #fff 0 18%, #e3e9ec 55%, #b9c4c9 100%); box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
/* Dónde está cada pieza en la foto (centro y tamaño en % de la foto, medidos sobre la cian; --pb-dx y --pb-dy corrigen el recorte de cada color) */
.pb-device[data-frame="photo"] .pb-buzzer { left: calc(80.59% + var(--pb-dx)); top: calc(63.29% + var(--pb-dy)); width: 15.94%; }
.pb-device[data-frame="photo"] .pb-mic { left: calc(52.88% + var(--pb-dx)); top: calc(64.98% + var(--pb-dy)); }
.pb-device[data-frame="photo"] .pb-ldr { left: calc(66.5% + var(--pb-dx)); top: calc(65.2% + var(--pb-dy)); width: 7.2%; }
.pb-device[data-frame="photo"] .pb-dht { left: calc(18.2% + var(--pb-dx)); top: calc(58.4% + var(--pb-dy)); width: 16.4%; height: 16.7%; border-radius: 6px; }
.pb-device[data-frame="photo"] .pb-port { width: 13.6%; height: 5.4%; }
.pb-device[data-frame="photo"] .pb-port.io33, .pb-device[data-frame="photo"] .pb-port.io32, .pb-device[data-frame="photo"] .pb-port.io35 { left: calc(47.45% + var(--pb-dx)); }
.pb-device[data-frame="photo"] .pb-port.i2c { left: calc(27.2% + var(--pb-dx)); }
.pb-device[data-frame="photo"] .pb-port.io33, .pb-device[data-frame="photo"] .pb-port.i2c.a { top: calc(75.8% + var(--pb-dy)); }
.pb-device[data-frame="photo"] .pb-port.io32, .pb-device[data-frame="photo"] .pb-port.i2c.b { top: calc(83.5% + var(--pb-dy)); }
.pb-device[data-frame="photo"] .pb-port.io35, .pb-device[data-frame="photo"] .pb-port.i2c.c { top: calc(91.2% + var(--pb-dy)); }
.pb-screen { position: absolute; left: 24.7%; top: 15.2%; width: 54.3%; height: 31.5%; background: #000; border-radius: 1.5%; display: grid; place-items: center; overflow: hidden; box-shadow: 0 0 0 3px #10151c; }
.pb-screen canvas, .pb-screen img { width: 100%; height: auto; aspect-ratio: 5 / 4; max-height: 100%; display: block; }
.pb-part { position: absolute; transform: translate(-50%, -50%); }
.pb-dht { left: 18.7%; top: 58.4%; width: 15%; height: 13%; background: #9fd3ea; border-radius: 6%; background-image: radial-gradient(#5aa7c9 30%, transparent 32%); background-size: 18% 18%; }
.pb-led { left: 38.7%; top: 62%; width: 6.5%; aspect-ratio: 1; border-radius: 50%; background: var(--pb-led, #2a2f36); box-shadow: 0 0 0 2px rgba(0,0,0,0.25), 0 0 var(--pb-led-glow, 0px) calc(var(--pb-led-glow, 0px) / 3) var(--pb-led, transparent); transition: background .15s, box-shadow .15s; }
.pb-mic { left: 51%; top: 63%; width: 9%; aspect-ratio: 1; border-radius: 50%; background: #1d2228; box-shadow: inset 0 0 0 3px #3a414a; }
.pb-ldr { left: 63%; top: 63%; width: 5%; aspect-ratio: 1; border-radius: 50%; background: #c99a52; box-shadow: inset 0 0 0 2px #8a6a3a; }
.pb-buzzer { left: 77.7%; top: 63%; width: 15%; aspect-ratio: 1; border-radius: 50%; background: #15191e; box-shadow: inset 0 0 0 4px #2b3138; }
.pb-buzzer::after { content: ''; position: absolute; inset: -20%; border-radius: 50%; border: 2px solid var(--pbit-blue); opacity: 0; }
.pb-device.is-beeping .pb-buzzer::after { animation: pb-ring .45s ease-out infinite; }
@keyframes pb-ring { from { opacity: .9; transform: scale(.7); } to { opacity: 0; transform: scale(1.25); } }
.pb-port { width: 13%; height: 5.4%; border-radius: 3px; }
.pb-port.i2c { background: #f5d33a; left: 26.6%; }
.pb-port.io33 { background: #1d2228; left: 45.3%; top: 75.2%; }
.pb-port.io32 { background: #2f55c9; left: 45.3%; top: 82.4%; }
.pb-port.io35 { background: #d23a32; left: 45.3%; top: 89.6%; }
.pb-port.i2c.a { top: 75.2%; } .pb-port.i2c.b { top: 82.4%; } .pb-port.i2c.c { top: 89.6%; }
.pb-device[data-frame="photo"] .pb-dht, .pb-device[data-frame="photo"] .pb-mic, .pb-device[data-frame="photo"] .pb-ldr,
.pb-device[data-frame="photo"] .pb-buzzer, .pb-device[data-frame="photo"] .pb-port { background: none; box-shadow: none; }
.pb-knob { left: 70.2%; top: 80.8%; width: 17%; aspect-ratio: 1; border-radius: 50%; border: 0; padding: 0; cursor: grab; background: repeating-conic-gradient(from var(--pb-knob, 0deg), #2b3036 0 10deg, #15191d 10deg 20deg); box-shadow: 0 6px 14px rgba(0,0,0,0.45), inset 0 0 0 5px #0d1013; }
.pb-knob::after { content: ''; position: absolute; left: 50%; top: 10%; width: 8%; height: 22%; margin-left: -4%; border-radius: 3px; background: #9aa4ae; transform-origin: 50% 182%; transform: rotate(var(--pb-knob, 0deg)); }
.pb-knob:active { cursor: grabbing; }
.pb-knob { transition: transform .08s ease-out, box-shadow .08s ease-out; }
.pb-knob.is-pressed { transform: translate(-50%, -50%) scale(.93); box-shadow: 0 2px 6px rgba(0,0,0,0.5), inset 0 0 0 5px #0d1013, inset 0 0 0 9px rgba(98,243,4,0.35); }
.pb-knob:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 3px; }
/* Pista hasta el primer uso: un anillo que late y una etiqueta */
.pb-knob-hint { position: absolute; left: 70.2%; top: 93%; transform: translateX(-50%); white-space: nowrap; font: 700 12px var(--font-body); color: #0b1220; background: var(--pbit-green); padding: 3px 8px; border-radius: 999px; pointer-events: none; z-index: 2; }
.pb-device.is-new .pb-knob::before { content: ''; position: absolute; inset: -14%; border-radius: 50%; border: 2px solid var(--pbit-green); animation: pb-ring 1.6s ease-out 4; }
.pb-device:not(.is-new) .pb-knob-hint { display: none; }
/* Rueda: un círculo de la propia foto, que gira con cada paso */
.pb-device[data-frame="photo"] .pb-knob { left: var(--pb-knob-x); top: var(--pb-knob-y); width: 13.44%; background: var(--pb-photo) var(--pb-knob-bx) var(--pb-knob-by) / 744.23% 990.38% no-repeat; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); transform: translate(-50%, -50%) rotate(var(--pb-knob, 0deg)); }
.pb-device[data-frame="photo"] .pb-knob.is-pressed { transform: translate(-50%, -50%) rotate(var(--pb-knob, 0deg)) scale(.95); box-shadow: 0 0 0 3px rgba(98,243,4,0.55); }
.pb-device[data-frame="photo"] .pb-knob-hint { left: var(--pb-knob-x); top: 92.5%; }
.pb-device[data-frame="photo"] .pb-knob::after { display: none; }
.pb-label { position: absolute; font: 700 2.4cqw var(--font-body); color: #1b2a36; }
.pb-device { container-type: inline-size; }
.pb-device[data-frame="photo"] .pb-label { display: none; }

.g2-dock-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.g2-dock-controls button { min-width: 0; height: 48px; border-radius: 14px; border: 1px solid var(--border-light); background: #0f172a; color: var(--text-primary); cursor: pointer; padding: 0 2px; touch-action: manipulation; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.g2-g-ico { font-size: 18px; line-height: 1; }
.g2-g-lbl { font: 600 12px/1.1 var(--font-body); color: var(--text-secondary); }
@media (min-width: 901px) and (max-height: 759px) { .g2-dock-controls button { height: 44px; } .g2-dock-controls .g2-g-lbl { display: none; } .g2-g-ico { font-size: 20px; } }
.g2-dock-controls button[data-act="press"] { color: var(--pbit-green); }
.g2-dock-controls button[data-act="hold"] .g2-g-ico { color: var(--pbit-blue); }
.g2-dock-controls button:active { background: #1e293b; }
.g2-dock-power { display: flex; flex-wrap: wrap; gap: 8px; }
.g2-dock-power button { height: 34px; border-radius: 17px; border: 1px solid var(--border-light); background: transparent; color: var(--text-secondary); font: 600 13px var(--font-body); padding: 0 14px; cursor: pointer; }
.g2-dock-power button::before { content: '⏻ '; }
.g2-dock-power button[data-power="fresh"]::before { content: '↺ '; }
.g2-dock-power button:hover { color: var(--text-primary); border-color: var(--pbit-blue); }
.g2-dock.is-off .g2-dock-power button[data-power="toggle"] { color: #0b1220; background: var(--pbit-green); border-color: var(--pbit-green); }
.g2-dock.is-off .g2-dock-controls button, .g2-dock.is-off .pb-knob { opacity: .45; }
/* Tocar los sensores de la foto: aro verde en los que la pantalla muestra, velados los demás (js «Touch the sensors on the photo») */
.pb-device[data-frame] .pb-part[data-sensor] { padding: 0; border: 0; min-width: 28px; min-height: 24px; background: rgba(255,255,255,0.4); cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color .2s, box-shadow .2s; }
.pb-device[data-frame] .pb-part[data-sensor]:hover, .pb-device[data-frame] .pb-part[data-sensor].is-tap { background: transparent; }
.pb-device[data-frame] .pb-part[data-sensor].is-tap { outline: 2px solid rgba(98,243,4,0.9); outline-offset: 3px; }
/* The hints pulse four times and rest: an animation that never ends keeps the page producing frames, and at 4x CPU that was ~45 % of the main thread with the P-Bit sitting still (PERF-02). */
.pb-device[data-frame] .pb-part[data-sensor].is-tap::after { content: ''; position: absolute; inset: -9px; border: 2px solid rgba(98,243,4,0.9); border-radius: 4px; pointer-events: none; animation: pb-tap 1.8s ease-out 4; }
.pb-device[data-frame] .pb-part[data-sensor]:hover { outline: 2px solid rgba(98,243,4,0.55); outline-offset: 3px; }
.pb-device[data-frame] .pb-part[data-sensor]:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 3px; background: transparent; }
.pb-device[data-frame] .pb-part[data-sensor].is-open { outline: 3px solid var(--pbit-green); outline-offset: 3px; background: transparent; }
.pb-device[data-frame] .pb-part[data-sensor].is-open::after { display: none; }
@keyframes pb-tap { from { opacity: .9; transform: scale(.9); } to { opacity: 0; transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .pb-device[data-frame] .pb-part[data-sensor].is-tap::after { animation: none; opacity: .5; } }
/* Dónde está el sensor que se lee: su pieza de la placa, o el puerto de su sonda */
.pb-device[data-frame] .pb-part.is-hot { outline: 2px solid var(--pbit-green); outline-offset: 3px; box-shadow: 0 0 16px 2px rgba(98,243,4,0.55); animation: pb-hot 1.1s ease-in-out 3; }
.pb-device[data-frame] .pb-port.is-hot { border-radius: 4px; }
@keyframes pb-hot { 50% { outline-offset: 7px; box-shadow: 0 0 26px 6px rgba(98,243,4,0.7); } }
@media (prefers-reduced-motion: reduce) { .pb-device[data-frame] .pb-part.is-hot { animation: none; } }
/* Ventana de los sensores: sobre la parte baja de la foto, con los deslizadores de lo que la pantalla muestra */
.pb-pop { position: absolute; left: 3%; right: 3%; bottom: 3%; z-index: 4; padding: 8px 10px 10px; border: 1px solid var(--line-ui); border-radius: 12px; background: #0f172a; box-shadow: 0 10px 30px rgba(0,0,0,0.55); text-align: left; user-select: auto; -webkit-user-select: auto; }
.pb-pop[hidden] { display: none; }
.pb-pop.is-top { bottom: auto; top: 3%; }
.pb-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pb-pop-head b { font: 700 13px/1.25 var(--font-body); color: var(--text-primary); }
.pb-pop-close { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-ui); background: transparent; color: var(--text-secondary); font: 700 18px/1 var(--font-body); cursor: pointer; padding: 0; }
.pb-pop-close:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.pb-pop-close:focus-visible, .pb-pop-go:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.pb-pop .g2-slider + .g2-slider { margin-top: 8px; }
.pb-pop-note { margin: 0 0 8px; font-size: 13px; line-height: 1.4; color: var(--text-secondary); }
.pb-pop-go { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--pbit-green); color: #0b1220; font: 700 13px var(--font-body); cursor: pointer; }
.g2-dock-panel { display: grid; gap: 12px; }
.g2-dock-panel:empty { display: none; }
.g2-slider label { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.g2-slider output { font-family: var(--font-code); font-size: 15px; font-weight: 700; color: var(--text-primary); }
.g2-slider input { width: 100%; accent-color: var(--accent, var(--pbit-blue)); }
/* El cajón «Entorno»: plegado, una línea con los valores; al abrirlo, solo se desplaza el cajón */
.g2-dock-env { margin-top: 10px; border-top: 1px solid var(--border-light); }
.g2-dock-env-sum { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px; background: transparent; border: 0; color: var(--text-secondary); font: 600 13px var(--font-body); cursor: pointer; text-align: left; }
.g2-dock-env-sum:hover { color: var(--text-primary); }
.g2-dock-env-chev { transition: transform .15s; }
.g2-dock-env.is-open .g2-dock-env-chev { transform: rotate(180deg); }
.g2-dock-env-body { padding: 4px 2px 6px; overflow-y: auto; min-height: 0; scrollbar-width: thin; }
.g2-dock-env-body .g2-dock-panel { margin-top: 4px; }
.g2-dock-reset { margin-top: 12px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-ui); background: transparent; color: var(--text-secondary); font: 600 13px var(--font-body); cursor: pointer; }
.g2-dock-reset:hover { color: var(--text-primary); border-color: var(--pbit-blue); }
.g2-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.g2-toggle input { accent-color: var(--pbit-green); }
.g2-dock-hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin: 4px 0 0; }
.g2-dock-about { margin-top: 8px; }
.g2-dock-about summary { cursor: pointer; min-height: 28px; display: flex; align-items: center; font-size: 12px; color: var(--text-secondary); }
.g2-dock-about summary:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }

/* Móvil: el P-Bit flota abajo a la derecha (pantalla pequeña con su LED); al tocarlo se abre entero */
@media (max-width: 900px) {
  .g2-dock { position: fixed; right: 12px; bottom: 12px; top: auto; width: 136px; z-index: 90; }
  .g2-dock-card { padding: 8px; border-radius: 16px; }
  .g2-dock:not(.is-open) .g2-dock-card > :not(.g2-dock-device):not(.g2-dock-open):not(.g2-dock-hide) { display: none; }
  .g2-dock-hide { top: -10px; left: auto; right: -10px; width: 30px; height: 30px; border-radius: 50%; background: #1e293b; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
  .g2-dock-hide::after { display: none; }
  .g2-dock.is-open .g2-dock-hide { display: none; }
  .g2-dock.is-hidden { width: auto; }
  .g2-dock-show { flex-direction: row; width: auto; padding: 0 16px; height: 48px; border-radius: 24px; }
  .g2-dock .pb-device { aspect-ratio: auto; }
  .g2-dock .pb-body, .g2-dock .pb-board, .g2-dock .pb-part, .g2-dock .pb-label, .g2-dock .pb-knob-hint { display: none; }
  .g2-dock .pb-screen { position: static; width: 100%; height: auto; border-radius: 8px; box-shadow: none; }
  .g2-dock-open { display: block; width: 100%; margin-top: 6px; border: 0; border-radius: 10px; padding: 6px; background: #0f172a; color: var(--pbit-green); font-weight: 600; font-size: 12px; }
  .g2-dock.is-open { left: 0; right: 0; bottom: 0; width: auto; }
  .g2-dock.is-open .g2-dock-card { border-radius: 22px 22px 0 0; padding: 16px; max-height: 88vh; overflow: auto; background: #0b1220; box-shadow: 0 -20px 60px rgba(0,0,0,0.6), 0 0 0 100vmax rgba(2,6,23,0.55); }
  .g2-dock.is-open .pb-device { aspect-ratio: 470 / 625; max-width: 300px; }
  .g2-dock.is-open .pb-device[data-frame="photo"] { aspect-ratio: 774 / 1030; }
  .g2-dock.is-open .pb-body, .g2-dock.is-open .pb-board, .g2-dock.is-open .pb-part, .g2-dock.is-open .pb-label { display: block; }
  .g2-dock.is-open .pb-device.is-new .pb-knob-hint { display: block; }
  .g2-dock.is-open .pb-screen { position: absolute; width: 54.3%; height: 31.5%; }
  .g2-dock.is-open .pb-device[data-frame="photo"] .pb-screen { width: 50.99%; height: 30.66%; }
  .g2-dock.is-open .g2-dock-open { display: block; order: -1; }
  .g2-dock.is-open .g2-dock-card { display: flex; flex-direction: column; }
  .g2-dock.is-open .g2-dock-card > .g2-dock-hide { display: none; }
}
@media (min-width: 901px) { .g2-dock-open { display: none; } }
@keyframes g2-dock-pulse { 40% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(98,243,4,0.35); } }
@media (max-width: 900px) and (prefers-reduced-motion: no-preference) { .g2-dock.is-pulse:not(.is-open) .g2-dock-card { animation: g2-dock-pulse .6s ease-out; } }

@media (prefers-reduced-motion: reduce) {
  .pb-device.is-beeping .pb-buzzer::after { animation: none; opacity: .8; }
  .pb-device.is-new .pb-knob::before { animation: none; opacity: .8; }
  .pb-knob { transition: none; }
}
.g2-link { background: none; border: 0; padding: 0; color: var(--pbit-blue); font: inherit; text-decoration: underline; cursor: pointer; }
/* Capturas suavizadas: el lienzo ocupa el sitio de la imagen (640 × 512 internos, 5:4) */
.g2-smooth { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; border-radius: 6px; background: #000; }
.g2-view img, .g2-state img { display: block; width: 100%; height: auto; border-radius: 6px; }
/* El aparato tiene un ancho fijo por tramo de pantalla y nunca por capítulo: así el texto no se mueve al leer.
   300 px con ≥ 1440 de ancho y ≥ 860 de alto; 260 con ≥ 1240 y ≥ 760; 240 en el resto (1280×720 y 1024×768).
   La tarjeta no pasa de la altura de la ventana y se desplaza por dentro si sus controles no caben. */
@media (min-width: 901px) {
  .g2-dock { top: calc(var(--header-h) + 16px); }
  .g2-dock-card { display: flex; flex-direction: column; max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; scrollbar-width: thin; }
  .g2-dock-card > * { flex: none; }
  .g2-dock-card > .g2-dock-env { flex: 0 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .g2-dock-env > .g2-dock-env-sum { flex: none; }
  .g2-dock .pb-device { width: 240px; }
}
@media (min-width: 1240px) and (min-height: 760px) { .g2-dock .pb-device { width: 260px; } }
@media (min-width: 1440px) and (min-height: 860px) { .g2-dock .pb-device { width: 300px; } }
/* «+n valores»: los deslizadores que no caben a la vista */
.g2-more-vals summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; font-size: 13px; color: var(--text-secondary); }
.g2-more-vals > div { display: grid; gap: 12px; padding-top: 6px; }
/* .g2-seg: las pestañas de texto, en píldoras de 44 px que saltan de línea y nunca se cortan */
.g2-tablist.g2-seg { gap: 8px; border-bottom: 0; margin-bottom: 14px; }
.g2-tablist.g2-seg [role="tab"] { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-ui); border-radius: 999px; background: transparent; color: var(--text-secondary); white-space: normal; text-align: left; }
.g2-tablist.g2-seg [role="tab"]:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.g2-tablist.g2-seg [role="tab"][aria-selected="true"] { color: var(--text-primary); border-color: var(--pbit-green); background: rgba(98,243,4,0.12); box-shadow: inset 0 0 0 1px var(--pbit-green); }
@media (max-width: 900px) {
  .g2-dock.is-open .g2-dock-head { display: flex; }
  .g2-dock.is-open .g2-dock-controls { display: grid; }
  .g2-dock.is-open .g2-dock-status, .g2-dock.is-open .g2-dock-now { display: block; }
  .g2-dock.is-open .g2-dock-env { display: block; }
  .g2-dock.is-open .g2-dock-menu { display: grid; position: static; margin: -4px 0 12px; box-shadow: none; }
}

/* Qué trae la caja */
.g2-box-list { margin: 10px 0 14px; padding-left: 1.1em; display: grid; gap: 8px; }
/* Los cuatro colores, cada uno con una pantalla distinta del firmware (capturas suavizadas encima de la foto) */
.g2-lineup { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 6px; padding: 0; list-style: none; }
.g2-lineup li { margin: 0; text-align: center; font-size: 12px; color: var(--text-muted); }
.pb-photo { position: relative; filter: drop-shadow(0 12px 18px rgba(0,0,0,0.45)); margin-bottom: 8px; }
.pb-photo > img { display: block; width: 100%; height: auto; }
.pb-photo-screen { position: absolute; left: var(--pb-scr-x); top: var(--pb-scr-y); width: 50.99%; height: 30.66%; background: #000; overflow: hidden; }
.pb-photo-screen img, .pb-photo-screen .g2-smooth { display: block; width: 100%; height: 100%; border-radius: 0; }
@media (max-width: 560px) { .g2-lineup { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 340px; margin-inline: auto; } }
/* Cajas de 1 y de 4, con la foto de la caja de 4 */
.g2-kits { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); gap: 20px; align-items: center; margin: 14px 0; }
.g2-kits figure { margin: 0; border-radius: 14px; overflow: hidden; }
.g2-kits img { display: block; width: 100%; height: auto; }
.g2-kits .g2-cards { grid-template-columns: 1fr; margin: 0; }
@media (max-width: 700px) { .g2-kits { grid-template-columns: 1fr; } }
/* Color de la carcasa del P-Bit virtual */
.g2-dock-colors { display: flex; gap: 12px; }
.g2-dock-colors button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); background: var(--c); padding: 0; cursor: pointer; }
.g2-dock-colors button[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.g2-dock-colors button:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }

/* Conoce tu P-Bit: la foto con un número sobre cada pieza, y una ficha con foto por pieza */
.g2-photo-map { display: flex; justify-content: center; margin: 18px 0 8px; }
.g2-photo-map figure { position: relative; margin: 0; width: min(100%, 420px); }
.g2-photo-frame { position: relative; }
.g2-photo-map img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 30px rgba(0,0,0,0.45)); }
.g2-photo-map figcaption { margin-top: 10px; font-size: 12px; color: var(--text-muted); text-align: center; }
/* Cada pieza de la foto es una zona transparente: solo la elegida (o la que tocas) lleva aro y número, para no tapar la placa */
.g2-hot { position: absolute; transform: translate(-50%, -50%); width: var(--w); height: var(--h); min-width: 28px; min-height: 28px; border-radius: var(--r, 50%); border: 2px solid transparent; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.g2-hot-n { position: absolute; top: -12px; left: -12px; display: none; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pbit-green); color: #0b1220; font: 800 12px var(--font-body); box-shadow: 0 0 0 2px rgba(11,18,32,0.8); }
.g2-hot:hover, .g2-hot:focus-visible, .g2-hot.is-on { border-color: var(--pbit-green); box-shadow: 0 0 0 2px rgba(11,18,32,0.7), 0 0 16px rgba(98,243,4,0.55); }
.g2-hot:hover .g2-hot-n, .g2-hot:focus-visible .g2-hot-n, .g2-hot.is-on .g2-hot-n { display: grid; }
.g2-hot:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 3px; }
/* Sin JS no hay pestañas ni aro elegido: todas las piezas llevan su número, que es la clave de la lista de fichas */
html:not(.js) .g2-hot { border-color: rgba(98,243,4,0.8); }
html:not(.js) .g2-hot .g2-hot-n { display: grid; }
/* Las tres caras de la foto: Delante, Detrás (tapa puesta) y Sin tapa (el portapilas abierto) */
.g2-viewseg { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.g2-viewseg[hidden] { display: none; }
.g2-viewseg button { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-ui); border-radius: 999px; background: transparent; color: var(--text-secondary); font: 600 14px var(--font-body); cursor: pointer; }
.g2-viewseg button:hover { color: var(--text-primary); border-color: var(--text-secondary); }
.g2-viewseg button[aria-pressed="true"] { color: var(--text-primary); border-color: var(--pbit-green); background: rgba(98,243,4,0.12); box-shadow: inset 0 0 0 1px var(--pbit-green); }
.g2-viewseg button:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-photo-map img[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .g2-photo-img { animation: g2-fadein .25s ease; } }
@keyframes g2-fadein { from { opacity: 0; } to { opacity: 1; } }
.g2-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--pbit-green); color: #0b1220; font: 800 12px var(--font-body); flex: none; }
.g2-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 14px; margin: 18px 0; }
.g2-part > p { margin: 0 0 10px; color: var(--text-muted); }
/* Ficha técnica de cada pieza: etiqueta pequeña y valor debajo */
.g2-spec { margin: 0; display: grid; gap: 8px; border-top: 1px solid var(--border-light); padding-top: 10px; }
.g2-spec dt { font: 700 12px var(--font-code); letter-spacing: .04em; text-transform: uppercase; color: var(--pbit-green); }
.g2-spec dd { margin: 2px 0 0; font-size: 14px; line-height: 1.45; }
.g2-steps { padding-left: 1.3em; display: grid; gap: 8px; }
.g2-part img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; margin-bottom: 10px; background: #fff; }
.g2-step-photo { margin: 10px 0 4px; width: min(100%, 360px); }
.g2-step-photo img { display: block; width: 100%; height: auto; border-radius: 10px; background: #fff; }
.g2-part:target { outline: 2px solid var(--pbit-green); outline-offset: 2px; }

/* Capítulo 4: portada con los seis sensores */
.g2-sensor-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px; margin: 18px 0; }
.g2-sensor-index a { display: grid; grid-template-columns: 10px 1fr; gap: 4px 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border-light); background: var(--gray-50); color: inherit; text-decoration: none; }
.g2-sensor-index a::before { content: ''; grid-row: span 2; border-radius: 5px; background: var(--accent); }
.g2-sensor-index strong { font-size: 15px; }
.g2-sensor-index span { font-size: 13px; color: var(--text-muted); }
.g2-sensor-index a:hover, .g2-sensor-index a:focus-visible { border-color: var(--accent); }
.g2-slider label.g2-plug { display: inline-flex; justify-content: flex-start; align-items: center; gap: 8px; width: auto; margin-top: 8px; font-size: 12px; color: var(--text-muted); }
.g2-slider input:disabled { opacity: .35; }

/* Fotos oficiales del fabricante (sondas de Elecrow) */
.g2-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 10px; margin: 14px 0 4px; }
.g2-gallery figcaption { margin-top: 6px; }
.g2-credit, .g2-step p.g2-credit { font-size: 12px; color: var(--text-muted); margin: 0 0 14px; }
.g2-slider .g2-plug input { width: auto; margin: 0; }

/* Pestañas ([data-tabs], js/guia-pbit-v2.js). Sin JS se ven todos los paneles con su título. */
.g2-tabs { margin: 18px 0; }
.g2-tablist { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--border-light); margin-bottom: 14px; }
/* Sin JS la lista de pestañas no sirve de nada (el atributo hidden se queda): el display de arriba no debe ganarle */
.g2-tablist[hidden], .g2-tabs-gallery .g2-tablist[hidden] { display: none; }
/* Un panel que no se ve usa hidden="until-found" (Ctrl+F lo abre): sin caja vacía de borde ni relleno */
body:not(.g2-all) .g2-tabpanel[hidden="until-found"] { padding: 0 !important; border: 0 !important; margin: 0 !important; }
.g2-tablist [role="tab"] { background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; color: var(--text-secondary); font: 600 15px var(--font-body); cursor: pointer; }
.g2-tablist [role="tab"][aria-selected="true"] { color: var(--text-primary); border-bottom-color: var(--accent, var(--pbit-green)); }
.g2-tablist [role="tab"]:hover { color: var(--text-primary); }
.g2-tablist [role="tab"]:focus-visible, .g2-tabpanel:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-tabs.is-ready .g2-tabpanel-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g2-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--dot); margin-right: 8px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.g2-table a { color: var(--pbit-blue); }
/* Variante galería: las pestañas son miniaturas de pantallas (capítulo 7) */
.g2-tabs-gallery .g2-tablist { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; overflow: visible; border-bottom: 0; }
.g2-tabs-gallery .g2-tablist [role="tab"] { display: flex; flex-direction: column; gap: 6px; padding: 6px; border: 2px solid var(--border-light); border-radius: 12px; background: #0f172a; white-space: normal; font-size: 13px; text-align: center; }
.g2-tabs-gallery .g2-tablist [role="tab"] img, .g2-tabs-gallery .g2-tablist [role="tab"] .g2-smooth { display: block; width: 100%; height: auto; border-radius: 6px; }
.g2-tabs-gallery .g2-tablist [role="tab"][aria-selected="true"] { border-color: var(--pbit-green); color: var(--text-primary); box-shadow: 0 0 0 3px rgba(98,243,4,0.18); }
.g2-tabs-gallery .g2-tabpanel { border: 1px solid var(--border-light); border-radius: 14px; padding: 16px 18px; background: rgba(15,23,42,0.5); }
.g2-shot-one { max-width: 260px; margin: 0 0 12px; }
/* Tu primera clase: lista de cuatro pasos con captura; sin detección (no es .g2-stepper), el P-Bit sigue al paso por su data-dock */
.g2-lista-pasos { list-style: none; margin: 8px 0 16px; padding: 0; }
.g2-lista-pasos > li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) 96px; column-gap: 14px; padding-bottom: 14px; }
.g2-lista-pasos .g2-sp-fig { width: 96px; }
.g2-lista-pasos .g2-sp-act { margin-bottom: 2px; }
.g2-lista-pasos .g2-sp-see { margin-bottom: 0; }
.g2-lista-pasos > li:last-child { padding-bottom: 0; }
.g2-lista-pasos > li::before { content: ''; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--line-ui); }
.g2-lista-pasos > li:last-child::before { display: none; }
@container (max-width: 560px) {
  .g2-lista-pasos > li { grid-template-columns: 28px minmax(0, 1fr); }
  .g2-lista-pasos .g2-sp-fig { grid-row: 2; grid-column: 2; margin-top: 8px; }
}
/* Programarlo: tira de 3 capturas de P-Blocks (16:9, con su pie) y procedimiento BOOT plegado */
.g2-shots-tira { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.g2-shots-tira .g2-shot img { aspect-ratio: 16 / 9; image-rendering: auto; object-fit: cover; }
.g2-shots-tira .g2-shot a { display: block; border-radius: 8px; }
.g2-shots-tira .g2-shot a:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-shots-tira .g2-shot figcaption { text-align: left; }
@container (max-width: 560px) { .g2-shots-tira { grid-template-columns: 1fr; } }
/* Cuidado y seguridad: todo a la vista, en 2 columnas a partir de 700 px, con un H3 por grupo y sus avisos */
.g2-cuidado { margin: 12px 0; }
.g2-cuidado-grupo { margin: 0 0 18px; break-inside: avoid; }
.g2-cuidado-grupo h3 { margin: 0 0 6px; font-size: 18px; }
.g2-cuidado-grupo h4 { margin: 8px 0 3px; font-size: 15px; color: var(--text-primary); }
.g2-cuidado-grupo .g2-callout { margin: 8px 0; }
.g2-cuidado-grupo p, .g2-cuidado-grupo li { font-size: 15px; line-height: 1.45; }
.g2-cuidado-grupo p { margin: 0 0 8px; }
.g2-cuidado-grupo ul { margin: 0 0 8px; padding-left: 20px; }
.g2-cuidado-grupo li { margin-bottom: 3px; }
.g2-cuidado-grupo .g2-callout { padding: 8px 12px; }
.g2-cuidado-grupo .g2-callout ul { margin-bottom: 0; }
/* Problemas y preguntas: tarjetas por grupo en 2 columnas desde 700 px, con filtro de texto (solo con JS) */
.g2-sym-find { margin: 12px 0 4px; }
.g2-sym-find label { display: block; margin-bottom: 4px; font-size: 14px; color: var(--text-muted); }
.g2-sym-find input { width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-ui); border-radius: 12px; background: var(--gray-50); color: var(--text-primary); font: 16px var(--font-body); }
.g2-sym-find input:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-sym-none { margin: 8px 0 0; color: var(--text-muted); font-size: 15px; }
.g2-symptoms h3, #ayuda-preguntas h3 { margin: 18px 0 8px; }
.g2-sym-group { margin: 0 0 14px; }
.g2-sym-title { margin: 12px 0 8px; font-size: 16px; color: var(--text-primary); }
.g2-sym-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
@container (min-width: 700px) { .g2-sym-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g2-symptom { padding: 12px 14px; border: 1px solid var(--border-light); border-radius: 14px; background: rgba(30,41,59,0.5); }
.g2-symptom h4 { margin: 0 0 6px; font-size: 16px; line-height: 1.35; color: var(--text-primary); }
.g2-symptom p { margin: 0 0 4px; font-size: 15px; line-height: 1.45; }
.g2-symptom p strong { color: var(--text-primary); }
.g2-sym-fig { float: right; width: 84px; margin: 0 0 6px 10px; }
.g2-sym-fig img { display: block; width: 100%; height: auto; border-radius: 6px; background: #0b1220; }
.g2-symptom .g2-chiprow { clear: both; display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 6px 0 0; }
#ayuda-preguntas .g2-more { margin: 8px 0; }
.g2-symptom[hidden], .g2-sym-group[hidden] { display: none; }
.g2-sym-end { margin-top: 16px; }
/* Recorrido de 1 minuto: los tres botones salen en «Ahora» solo mientras dura */
.g2-dock-tour { display: none; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.g2-dock[data-mode="tour"] .g2-dock-tour { display: flex; }
.g2-dock[data-mode="tour"] .g2-dock-status { color: var(--pbit-green); }
.g2-dock-tour button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-ui); border-radius: 999px; background: transparent; color: var(--text-primary); font: 600 14px var(--font-body); cursor: pointer; }
.g2-dock-tour button:hover { border-color: var(--pbit-green); }
.g2-dock-tour button:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-dock-tour button[hidden] { display: none; }
@media (pointer: coarse) { .g2-dock-tour button { min-height: 44px; } }
.g2-sym-tour { margin: 0 0 12px; }
@container (min-width: 700px) { .g2-cuidado { column-count: 2; column-gap: 32px; } }
/* Temporizador y Sistema: solo dos baldosas (las dos paradas del carrusel); Ajustes, Reposo y Reset total son desplegables de Sistema con su miniatura */
.g2-tabs-gallery.g2-tabs-2 .g2-tablist { grid-template-columns: repeat(2, minmax(0, 150px)); }
.g2-tabs-2 .g2-shots { grid-template-columns: repeat(3, minmax(0, 128px)); gap: 10px; margin: 12px 0; }
.g2-tabs-2 .g2-shots figcaption { font-size: 12px; line-height: 1.3; }
.g2-callout--try .g2-acts.g2-acts-inline { display: inline-flex; margin: 0 4px 0 0; }
.g2-more-shot > summary img { flex: none; width: 64px; height: auto; aspect-ratio: 5 / 4; border-radius: 6px; background: #000; }
@media (min-width: 901px) { html.live .g2-anatomy-thumb { grid-template-columns: minmax(0, 160px) 1fr; } }
@media (max-width: 560px) { .g2-tabs-gallery .g2-tablist { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .g2-tabs-gallery .g2-tablist [role="tab"] { font-size: 12px; padding: 4px; } }
.g2-tabs-gallery .g2-tabpanel ul, .g2-tabs-gallery .g2-tabpanel ol { padding-left: 1.3em; }
.g2-main p a, .g2-main li a, .g2-main td a, .g2-main dd a { color: var(--pbit-blue); }
.g2-part .g2-spec + .g2-credit { margin: 12px 0 0; }
/* Capítulo 1: explorador. La foto con números a la izquierda; a la derecha, las piezas en miniatura y la ficha
   de la elegida. Sin JS, las fichas van todas debajo de la foto. */
.g2-explorer.is-ready { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
.g2-explorer.is-ready .g2-photo-map { margin: 0; position: sticky; top: var(--anchor-offset); }
.g2-explorer.is-ready .g2-parts { display: block; margin: 0; }
.g2-explorer .g2-tabpanel.g2-part { padding: 14px; }
/* Conoce en dos niveles: chips numerados (.g2-seg) y fichas con lo que se usa a la vista; los datos técnicos, plegados */
.g2-partchips { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 6px; margin-bottom: 8px; }
.g2-tablist.g2-partchips [role="tab"] { display: inline-flex; align-items: center; gap: 6px; width: auto; padding: 4px 10px 4px 6px; font: 600 14px/1.2 var(--font-body); }
.g2-chip-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--pbit-green); color: #0b1220; font: 800 12px var(--font-body); }
.g2-chip-name small { font-size: 12px; position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.g2-part h3 small { font-size: 12px; font-weight: 500; color: var(--text-muted); }
.g2-partchips-label { grid-column: 1 / -1; margin-top: 0; font: 700 12px var(--font-code); letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.g2-spec-vista { border-top: 0; padding-top: 0; margin-bottom: 4px; }
.g2-part .g2-callout { margin: 10px 0 0; padding: 10px 14px; font-size: 15px; line-height: 1.5; }
.g2-part .g2-callout ul { margin: 6px 0 0; padding-left: 1.2em; }
.g2-part-tech { margin: 8px 0 0; }
.g2-explorer .g2-part img { margin-bottom: 6px; }
.g2-part-tech summary { min-height: 44px; padding: 10px 16px; }
.g2-part-links { margin: 12px 0 0; font-size: 14px; }
.g2-part-links a { display: inline-flex; align-items: center; min-height: 32px; }
.g2-part-nav { display: none; margin: 12px 0 0; gap: 8px; justify-content: space-between; }
.g2-part-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-ui); border-radius: 999px; color: var(--text-primary); text-decoration: none; font-weight: 600; }
.g2-part-nav--first { justify-content: flex-end; }
.g2-colorline { display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin: 10px 0 4px; }
.g2-colorline[hidden] { display: none; }
.g2-colorline > span { margin-right: 8px; font-size: 15px; color: var(--text-secondary); }
@media (max-width: 520px) { .g2-colorline > span { flex: 0 0 100%; margin: 0; } }
.g2-colorline button { position: relative; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.g2-colorline button::before { content: ''; position: absolute; inset: 8px; border-radius: 50%; background: var(--c); border: 2px solid rgba(255,255,255,0.25); }
.g2-colorline button[aria-pressed="true"]::before { border-color: #fff; box-shadow: 0 0 0 2px var(--c); }
.g2-colorline button:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 0; border-radius: 50%; }
@media (max-width: 900px) {
  .g2-explorer.is-ready .g2-part-nav { display: flex; }
}
/* La leyenda del dock: de qué pieza sale el dato que enseña el P-Bit */
.g2-dock-src { display: inline-flex; align-items: center; min-height: 32px; margin-top: 4px; font-size: 13px; color: var(--pbit-blue); }
.g2-dock-src[hidden] { display: none; }
/* Alertas: «Provoca una alerta» arriba y «Cuándo avisa» siempre a la vista, con sus 3 reglas */
.g2-callout-note { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.g2-when { margin: 6px 0 18px; }
.g2-when h3 { margin: 0 0 6px; }
.g2-when > p { margin: 0 0 10px; }
.g2-when .g2-table td:first-child { white-space: nowrap; }
.g2-table--tight th, .g2-table--tight td { padding: 5px 8px; line-height: 1.4; }
.g2-two-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; align-items: start; }
@media (max-width: 700px) { .g2-two-tables { grid-template-columns: 1fr; } }
.g2-when .g2-dot { margin-right: 8px; }
/* Chuleta del P-Bit: una hoja A4 con cuatro bloques de la guía; solo existe al imprimirla */
[data-chuleta][hidden] { display: none !important; }
.g2-chuleta { display: none; }
@page chuleta { size: A4; margin: 12mm; }
@media print {
  body.g2-printing-chuleta > *:not(.g2-chuleta) { display: none !important; }
  body.g2-printing-chuleta { background: #fff !important; }
  body.g2-printing-chuleta .g2-chuleta { display: block; page: chuleta; font: 400 12px/1.4 var(--font-body); color: #111; background: #fff; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .g2-chuleta h1 { margin: 0 0 8px; font: 800 22px var(--font-display); color: #111; }
  .g2-chuleta h2, .g2-chuleta h3 { margin: 10px 0 4px; font: 700 14px var(--font-display); color: #111; }
  .g2-chuleta :where(p, li, span, strong, small, a, div, td, th, kbd) { color: #111 !important; }
  .g2-chuleta :where(div, li, ul, section) { background: transparent !important; box-shadow: none !important; }
  .g2-chuleta a { text-decoration: none; }
  .g2-chuleta .g2-ch-b { break-inside: avoid; }
  .g2-chuleta .g2-gestos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
  .g2-chuleta .g2-gestos li { display: grid; gap: 2px; padding: 6px 8px; border: 1px solid #777; border-radius: 6px; }
  .g2-chuleta .g2-ch-pantallas { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
  .g2-chuleta .g2-ch-pantallas li { display: flex; flex-wrap: wrap; gap: 4px 14px; }
  .g2-chuleta .g2-ch-pantallas strong { flex: 0 0 100%; }
  .g2-chuleta .g2-ch-pantallas small { margin-left: 4px; font-size: 11px; }
  .g2-chuleta .g2-when { margin: 0; }
  .g2-chuleta .g2-ranges { grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 6px; }
  .g2-chuleta .g2-range { padding: 5px 7px; border: 1px solid #777; border-radius: 6px; background: transparent !important; }
  .g2-chuleta .g2-range h4 { margin: 0 0 4px; font-size: 12px; color: #111; }
  .g2-chuleta .g2-range-flag { padding: 0 6px; border-color: #555; font-size: 10px; color: #111 !important; }
  .g2-chuleta .g2-range-ticks { height: 14px; margin: 2px 0 1px; font-size: 10px; line-height: 14px; }
  .g2-chuleta .g2-range p { font-size: 11px; line-height: 1.3; }
  .g2-chuleta .g2-when > p { margin: 0 0 4px; }
  .g2-chuleta .g2-rules { margin: 4px 0 0; padding-left: 1.2em; }
  .g2-chuleta .g2-rules li { margin: 0; }
  .g2-chuleta .g2-safety { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
  .g2-chuleta .g2-safety li { display: flex; gap: 8px; align-items: flex-start; padding: 4px 8px; border: 1px solid #777; border-radius: 6px; }
  .g2-chuleta svg { width: 16px; height: 16px; flex: 0 0 auto; stroke: #111; }
}
/* Buscador: botón en el índice, atajo «/» y diálogo con los resultados */
.g2-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.g2-searchbtn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 40px; margin: 0 0 12px; padding: 0 12px; border: 1px solid var(--line-ui); border-radius: 10px; background: transparent; color: var(--text-secondary); font: 600 14px var(--font-body); cursor: pointer; }
.g2-searchbtn[hidden] { display: none; }
.g2-searchbtn:hover { border-color: var(--pbit-blue); color: var(--text-primary); }
.g2-searchbtn:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-searchbtn kbd { min-width: 22px; padding: 1px 6px; border: 1px solid var(--line-ui); border-radius: 6px; font: 600 12px var(--font-body); text-align: center; color: var(--text-secondary); }
.g2-sheet-index .g2-searchbtn { min-height: 44px; }
.g2-search { border: 0; padding: 0; margin: 0; max-width: none; max-height: none; background: transparent; color: var(--text-primary); }
.g2-search::backdrop { background: rgba(2, 6, 23, 0.62); }
.g2-search[open] { display: flex; align-items: flex-start; justify-content: center; width: 100%; height: 100%; padding: 9vh 16px 16px; box-sizing: border-box; }
.g2-search-panel { display: flex; flex-direction: column; width: min(660px, 100%); max-height: 82vh; background: #0b1220; border: 1px solid var(--line-ui); border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65); overflow: hidden; }
.g2-search-box { padding: 12px 16px 8px; }
.g2-search-box input { width: 100%; min-height: 48px; padding: 0 14px; box-sizing: border-box; border: 1px solid var(--line-ui); border-radius: 10px; background: #020617; color: var(--text-primary); font: 500 17px var(--font-body); }
.g2-search-box input:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: 2px; }
.g2-search-list { list-style: none; margin: 0; padding: 4px 8px 12px; overflow: auto; overscroll-behavior: contain; }
.g2-search-list a { display: grid; gap: 2px; padding: 10px 12px; min-height: 48px; border-radius: 10px; color: var(--text-primary); text-decoration: none; }
.g2-search-list a:hover, .g2-search-list a:focus-visible { background: rgba(255, 255, 255, 0.07); }
.g2-search-list a:focus-visible { outline: 3px solid var(--pbit-blue); outline-offset: -3px; }
.g2-search-list strong { font-size: 16px; }
.g2-search-ctx { font-size: 13px; color: var(--pbit-blue); }
.g2-search-snip { font-size: 14px; line-height: 1.4; color: var(--text-secondary); }
.g2-search-snip mark { background: rgba(98, 243, 4, 0.22); color: inherit; border-radius: 3px; padding: 0 1px; }
.g2-search-none { padding: 14px 12px; color: var(--text-secondary); }
@media (max-width: 900px) {
  .g2-search[open] { padding: 0; }
  .g2-search-panel { width: 100%; max-height: min(78vh, 78dvh); border-radius: 0 0 20px 20px; border-width: 0 0 1px; }
}
.g2-found { animation: g2-found 2.2s ease-out; }
@keyframes g2-found { 0%, 60% { outline: 3px solid var(--pbit-green); outline-offset: 4px; } 100% { outline: 3px solid transparent; outline-offset: 4px; } }
@media (prefers-reduced-motion: reduce) { .g2-found { animation: none; outline: 3px solid var(--pbit-green); outline-offset: 4px; } }
@media print { .g2-searchbtn, .g2-search { display: none !important; } }
/* Cuándo avisa: una tarjeta por sensor con su barra de límites, y las muestras de color del LED (plan §10, fase 3) */
.g2-ranges { list-style: none; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .g2-ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2-ranges { grid-template-columns: 1fr; } }
.g2-range { border: 1px solid var(--line-ui); border-radius: var(--r-2, 12px); padding: 10px 12px; background: var(--surface-1, transparent); }
.g2-range h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.g2-range h4 .g2-dot { margin-right: 0; }
.g2-range-flag { margin-left: auto; padding: 2px 8px; border: 1px solid var(--line-ui); border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--text-secondary); white-space: nowrap; }
.g2-range-flag.is-on { color: var(--pbit-green); border-color: currentColor; }
.g2-range-bar { display: flex; gap: 2px; height: 10px; }
.g2-range-bar i { display: block; min-width: 4px; background: var(--z); border-radius: 2px; }
.g2-range-bar .z-ok { --z: #3ad46a; }
.g2-range-bar .z-al { --z: #ff9a1f; }
.g2-range-bar .z-gr { --z: #ff3b30; }
.g2-range-ticks { position: relative; height: 18px; margin: 3px 0 2px; font-size: 12px; line-height: 18px; color: var(--text-secondary); }
.g2-range-ticks span { position: absolute; top: 0; left: var(--at); transform: translateX(-50%); white-space: nowrap; }
.g2-range-ticks span.is-start { transform: none; }
.g2-range-ticks span.is-end { transform: translateX(-100%); }
.g2-range p { margin: 0; font-size: 14px; line-height: 1.4; }
.g2-led-grid { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 1100px) { .g2-led-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2-led-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.g2-led-grid li { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 8px 6px; border: 1px solid var(--line-ui); border-radius: var(--r-2, 12px); text-align: center; font-size: 13px; line-height: 1.3; color: var(--text-secondary); }
.g2-led-grid strong { font-size: 14px; color: var(--text-primary); }
.g2-led-sw { width: 24px; height: 24px; border-radius: 50%; background: var(--led); box-shadow: 0 0 10px 1px var(--led); border: 2px solid rgba(255, 255, 255, 0.85); }
.g2-rules { margin: 12px 0 0; padding-left: 1.3em; }
.g2-rules li { margin-bottom: 6px; }
@media (min-width: 901px) and (max-height: 759px) { .g2-dock-src { display: none; } }
@media (max-width: 1100px) { .g2-explorer.is-ready { grid-template-columns: 1fr; } .g2-explorer.is-ready .g2-photo-map { position: static; } }
/* Capítulo 4: los seis sensores en galería; cada sensor es un panel */
/* ── Módulo de sensor (plan §7.6): una barra de acento y aire, no una tarjeta ─────────────────────────────────
   Cabecera con icono, tira de datos, cinco pasos numerados con el chip del color del sensor y pie con «Siguiente sensor».
   El color del sensor solo va en la barra, el icono y el chip: nunca como relleno ni aro de selección. */
.g2-sensor-tabs { margin-top: -10px; container-type: inline-size; }
.g2-sensor-tabs .g2-tablist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; border-bottom: 0; margin-bottom: 4px; }
@container (min-width: 700px) { .g2-sensor-tabs .g2-tablist { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.g2-sensor-tabs .g2-tablist [role="tab"] { position: relative; align-items: center; justify-content: center; gap: 3px; min-height: 92px; padding: 14px 6px 8px; overflow: hidden; border-color: var(--line-ui); }
.g2-sensor-tabs .g2-tablist [role="tab"]::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); }
.g2-sensor-tabs .g2-tablist [role="tab"] svg, .g2-sensor-tabs .g2-tablist [role="tab"] i { width: 24px; height: 24px; color: var(--accent); }
.g2-stile-name { font: 700 14px/1.2 var(--font-display); color: var(--text-primary); }
.g2-stile-hint { font-size: 12px; line-height: 1.2; color: var(--text-muted); }
.g2-sensor-tabs .g2-tablist [role="tab"][aria-selected="true"]::after { content: '✓'; position: absolute; top: 9px; right: 8px; font: 700 13px/1 var(--font-body); color: var(--pbit-green); }
.g2-sensor-tabs .g2-tabpanel.g2-sensor { border: 0; border-top: 4px solid var(--accent); border-radius: 0; background: none; padding: 20px 0 0; margin: 14px 0 0; counter-reset: sh; }
.g2-sensor-head { gap: 14px; margin-bottom: 4px; }
.g2-sensor-icon { width: 44px; height: 44px; border-radius: 12px; }
.g2-sensor-icon svg, .g2-sensor-icon i { width: 24px; height: 24px; }
.g2-chapter .g2-sensor-kind { margin: 0; font: 400 12px/1.4 var(--font-code); letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-muted); }
.g2-chapter .g2-sensor-head h3.g2-sensor-title { font-size: clamp(26px, 3.4vw, 32px); margin: 2px 0 0; }
.g2-sensor .g2-lead { margin: 8px 0 12px; }
.g2-sensor .g2-facts { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 0; margin: 10px 0 6px; border-block: 1px solid var(--line, rgba(148,163,184,.14)); }
.g2-sensor .g2-facts[data-n="4"] { --cols: 4; }
.g2-sensor .g2-facts div { background: none; border-radius: 0; padding: 10px 14px; border-left: 1px solid var(--line, rgba(148,163,184,.14)); }
.g2-sensor .g2-facts div:first-child { border-left: 0; padding-left: 0; }
.g2-sensor .g2-facts dt { font: 400 12px/1.4 var(--font-code); letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); }
.g2-sensor .g2-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; line-height: 1.35; color: var(--text-primary); }
.g2-chapter .g2-tech { margin: 0 0 4px; font-size: 14px; line-height: 1.5; color: var(--text-muted); }
@container (max-width: 520px) {
  .g2-sensor .g2-facts[data-n="4"] { --cols: 2; }
  .g2-sensor .g2-facts[data-n="4"] div:nth-child(3) { border-left: 0; padding-left: 0; }
  .g2-sensor .g2-facts[data-n="4"] div:nth-child(n+3) { border-top: 1px solid var(--line, rgba(148,163,184,.14)); }
}
/* Pasos: H4 numerados con un chip de 24 px del color del sensor */
.g2-sstep { padding: 16px 0 2px; }
.g2-sensor h4.g2-sh { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; font: 700 18px/1.3 var(--font-display); color: var(--text-primary); }
.g2-sensor h4.g2-sh::before { counter-increment: sh; content: counter(sh); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #020617; font: 800 13px/1 var(--font-body); }
.g2-sstep > p, .g2-sstep-more p { max-width: 66ch; }
.g2-sstep-more { margin: 12px 0; }
.g2-sstep-more > summary { padding: 12px 16px; }
.g2-sstep-more > summary h4 { margin: 0; }
.g2-sstep-more > summary::after { margin-left: auto; }
.g2-sstep-more > div { padding: 0 16px 14px; }
.g2-sstep ul { margin: 0 0 8px; padding-left: 1.3em; }
.g2-sstep li { margin-bottom: 2px; }
.g2-sensor .g2-sa-list { margin: 8px 0 0; font-size: 15px; line-height: 1.6; }
.g2-sensor .g2-callout { margin: 0 0 4px; padding: 10px 16px; }
.g2-sensor .g2-callout ul { margin: 4px 0 0; padding-left: 1.3em; }
.g2-sensor .g2-callout li { font-size: 15px; line-height: 1.55; }
.g2-callout-label { display: inline-flex; align-items: center; gap: 6px; color: #F59E0B !important; font: 700 13px/1.4 var(--font-code); letter-spacing: 1px; text-transform: uppercase; }
.g2-callout-label svg, .g2-callout-label i { width: 16px; height: 16px; }
.g2-sensor-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 18px 0 0 !important; padding-top: 14px; border-top: 1px solid var(--line, rgba(148,163,184,.14)); }
.g2-rel { font-size: 15px; color: var(--text-secondary); }
/* Vistas: pestañas con miniatura (5, o 7 en Sonido) y un panel con la descripción completa de la elegida */
.g2-vtabs { margin: 8px 0 6px; }
.g2-vtabs .g2-tablist { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 8px; margin: 0 0 10px; border-bottom: 0; }
.g2-vtabs .g2-tablist [role="tab"] { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 4px 6px; border: 2px solid var(--line-ui); border-radius: 8px; background: #0f172a; font-size: 12px; line-height: 1.2; text-align: center; }
.g2-vtabs .g2-tablist [role="tab"] img { display: block; width: 100%; max-width: 128px; height: auto; border-radius: 4px; }
.g2-vtabs .g2-tablist [role="tab"][aria-selected="true"] { border-color: var(--pbit-green); color: var(--text-primary); font-weight: 700; }
.g2-tabs-gallery .g2-vtabs .g2-vpanel { padding: 0; border: 0; border-radius: 0; background: none; }
.g2-vpanel p { margin: 0 0 6px; max-width: 66ch; }
.g2-vshot { max-width: 200px; margin: 6px 0 4px; }
html.live .g2-vshot { display: none; }
@media (max-width: 900px) { html.live .g2-vshot { display: block; } }
@container (max-width: 639px) { .g2-vtabs[data-n="7"] .g2-tablist { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@container (max-width: 479px) { .g2-vtabs[data-n="5"] .g2-tablist { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Sondas: galería 3×1 y «Conecta la sonda» en dos columnas (pasos y capturas de 96 px) */
.g2-sensor .g2-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 10px 0 2px; }
.g2-sensor .g2-gallery figcaption { font-size: 12px; line-height: 1.35; }
.g2-plug { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 20px; margin: 10px 0 4px; }
@container (min-width: 700px) { .g2-plug { grid-template-columns: minmax(0, 1fr) auto; align-items: start; } }
.g2-chapter h5.g2-plug-title, .g2-chapter .g2-sensor h5 { margin: 0 0 4px; font: 700 15px/1.3 var(--font-display); color: var(--text-primary); }
.g2-plug-steps { margin: 0 0 6px; padding-left: 1.4em; }
.g2-plug-steps li { margin: 0; }
.g2-plug p { margin: 0; font-size: 15px; line-height: 1.55; }
.g2-shots.g2-shots-3 { grid-template-columns: repeat(3, 108px); gap: 10px; margin: 0; }
.g2-shots.g2-shots-3 figcaption { font-size: 12px; line-height: 1.3; }
@container (max-width: 479px) { .g2-sensor .g2-gallery { grid-template-columns: minmax(0, 1fr); } .g2-shots.g2-shots-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Capítulo 8: tarjetas de las situaciones de aprendizaje */
.g2-sas { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.g2-sa { display: flex; flex-direction: column; gap: 4px; padding: 8px 8px 12px; border: 1px solid var(--border-light); border-radius: 12px; background: #0f172a; color: var(--text-primary); text-decoration: none; }
.g2-sa:hover, .g2-sa:focus-visible { border-color: var(--pbit-green); }
.g2-sa img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }
.g2-sa strong { font-size: 14px; line-height: 1.3; }
.g2-sa span { font-size: 12px; color: var(--text-muted); }
.g2-tabpanel > h4 { margin: 18px 0 6px; font-size: 16px; }
.g2-shots-wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.g2-shots-wide img { display: block; width: 100%; height: auto; border-radius: 8px; }

/* ── Impresión: todo el texto, sin el P-Bit virtual ni la navegación ──────────────
   Los paneles que no se ven (hidden) y los <details> cerrados (los abre js/guia-pbit-v2.js al imprimir) salen enteros. */
@media print {
  header, .drift-container, .progress-container, .g2-dock, .g2-toc-wrap, .g2-tablist, .g2-proto { display: none !important; }
  .g2 { display: block; padding: 0; max-width: none; }
  .g2-main { max-width: none; }
  .g2-tabpanel[hidden] { display: block !important; content-visibility: visible !important; }
  .g2-tabs.is-ready .g2-tabpanel-title { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .g2-chapter { break-before: auto; padding: 16px 0; }
  .g2-tabpanel, .g2-safety li, .g2-more { break-inside: avoid; }
  body { background: #fff !important; }
  .g2-main, .g2-main :where(h1, h2, h3, h4, p, li, td, th, dt, dd, span, strong, summary, figcaption, label) { color: #111 !important; }
  .g2-main :where(div, section, li, details, table, figure) { background: transparent !important; box-shadow: none !important; }
}
