/* ==========================================================
   AulaDigital Panamá — Nivel 7° a 12° (Pre-Media y Media)
   ==========================================================
   Todo cuelga de `body.teen`, que app.js pone según grade_group. Así esta
   hoja se carga siempre pero no toca ni un píxel de primaria: no hay dos
   plantillas que mantener en paralelo ni riesgo de que un cambio de
   secundaria se filtre a Kinder.

   El resto de la plataforma ya era oscura. Lo que cambia aquí no es "modo
   oscuro" sino el registro: menos redondeo, tipografía monoespaciada en todo
   lo que es dato o etiqueta, y paneles de métrica en vez de premios.
   ========================================================== */

body.teen {
  /* Más frío y más contrastado que la base: esto se ve en un laboratorio con
     tubos fluorescentes, no en una tablet en el sofá. */
  --bg:          #080B11;
  --surface:     #0F141C;
  --surface2:    #151C26;
  --border:      #232C3A;
  --border-soft: #1A222E;

  /* Cian profundo: es el único azul de la paleta con contraste suficiente
     para texto blanco encima (5.3:1). El indigo de primaria no llegaba. */
  --primary:      #0E7490;
  --primary-h:    #0891B2;
  --primary-glow: rgba(34,211,238,.25);

  --text:       #DDE6F0;
  --text-muted: #7D8B9E;
  --text-dim:   #3F4A5A;

  /* Cian brillante para datos y acentos SOBRE fondo oscuro (nunca de fondo). */
  --teen-accent: #22D3EE;
  --teen-ok:     #34D399;
  --teen-warn:   #FBBF24;
  --teen-bad:    #F87171;

  /* Esquinas casi rectas: la redondez es lo que más "infantiliza" una UI. */
  --r-sm: 4px;
  --r:    6px;
  --r-lg: 8px;

  /* Fredoka fuera. Los títulos pasan a monoespaciada técnica. */
  --f-head: 'Fira Code', ui-monospace, monospace;
}

/* Etiquetas, títulos y datos en monoespaciada; el texto corrido sigue en
   Outfit, que se lee mejor en párrafo largo. */
body.teen .nav-group-title,
body.teen .section-label,
body.teen .mod-label,
body.teen .card-title,
body.teen .pill {
  font-family: var(--f-head);
  letter-spacing: 0;
  text-transform: none;
}

body.teen .nav-group-title { color: var(--text-dim); font-weight: 500; }

/* Sin el desplazamiento lateral ni el rebote del ícono al pasar el mouse. */
body.teen .side-btn { border-radius: var(--r-sm); font-weight: 500; }
body.teen .side-btn:hover { transform: none; background: rgba(34,211,238,.06); }
body.teen .side-btn:hover .icon { transform: none; }
body.teen .side-btn.active {
  background: rgba(34,211,238,.10);
  border-left: 2px solid var(--teen-accent);
  color: var(--teen-accent);
}
body.teen .side-btn .icon { font-size: 14px; opacity: .85; }

/* ── Panel de inicio ─────────────────────────────────────── */
/* El degradado morado con la bola de luz se cambia por una rejilla técnica. */
body.teen .welcome-hero {
  background:
    linear-gradient(180deg, rgba(34,211,238,.05), transparent 60%),
    repeating-linear-gradient(0deg,  transparent 0 23px, rgba(255,255,255,.022) 23px 24px),
    repeating-linear-gradient(90deg, transparent 0 23px, rgba(255,255,255,.022) 23px 24px),
    var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teen-accent);
  border-radius: var(--r-lg);
  padding: 24px 28px;
}
body.teen .welcome-hero::before { display: none; }   /* fuera la bola de luz */
body.teen .welcome-hero h2 { font-size: 22px; letter-spacing: -.01em; }
body.teen .welcome-hero h2::before {
  content: '> ';
  color: var(--teen-accent);
}
body.teen .welcome-hero p { color: var(--text-muted); max-width: 620px; }

body.teen .mod-card {
  border-radius: var(--r);
  padding: 18px;
  transition: border-color .15s ease, background .15s ease;
}
body.teen .mod-card:hover {
  border-color: var(--teen-accent);
  background: var(--surface2);
  transform: none;                 /* sin el salto elástico */
  box-shadow: none;
}
body.teen .mod-icon { font-size: 20px; color: var(--teen-accent); line-height: 1; }
body.teen .mod-label { display: none; }   /* duplicaba el título */
body.teen .mod-title { font-size: 15px; }

/* ── Paneles de métrica ──────────────────────────────────── */
/* Compartidos por MecaSprint Pro, TermLab y los módulos nuevos: un número
   grande, su unidad y qué significa. Sin medallas ni confeti. */
.tm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.tm-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 14px;
}
.tm-val {
  font-family: var(--f-head);
  font-size: 24px;
  font-weight: 600;
  color: var(--teen-accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;   /* que no bailen los dígitos al variar */
}
.tm-val.ok   { color: var(--teen-ok); }
.tm-val.warn { color: var(--teen-warn); }
.tm-val.bad  { color: var(--teen-bad); }
.tm-unit { font-size: 12px; color: var(--text-muted); font-family: var(--f-head); }
.tm-lbl {
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}

/* Barra de progreso sobria, para pasos de guía y completitud del CV. */
.tm-bar {
  height: 4px;
  background: var(--surface2);
  border-radius: 2px;
  overflow: hidden;
}
.tm-bar > i {
  display: block;
  height: 100%;
  background: var(--teen-accent);
  transition: width .3s ease;
}

/* Encabezado de módulo: título, subtítulo y acciones a la derecha. */
.tm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.tm-head h2 {
  font-family: var(--f-head);
  font-size: 19px;
  font-weight: 600;
}
.tm-head p { color: var(--text-muted); font-size: 13px; margin-top: 4px; max-width: 640px; }
.tm-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Aviso de guardado / estado, discreto y en su sitio. */
.tm-state {
  font-family: var(--f-head);
  font-size: 11.5px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tm-state.ok  { color: var(--teen-ok); }
.tm-state.bad { color: var(--teen-bad); }

/* ══ CVLab ═══════════════════════════════════════════════════════════════ */
.cv-cargando { padding: 40px; text-align: center; color: var(--text-muted); }

.cv-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1000px) { .cv-layout { grid-template-columns: 1fr; } }

.cv-editor { display: flex; flex-direction: column; gap: 10px; }

.cv-medidor {
  display: flex; align-items: center; gap: 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 12px 16px;
}

.cv-sec {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 0 14px;
}
.cv-sec > summary {
  font-family: var(--f-head); font-size: 13.5px; font-weight: 600;
  padding: 12px 0; cursor: pointer; list-style: none;
  display: flex; align-items: center; gap: 8px;
}
.cv-sec > summary::before { content: '▸'; color: var(--teen-accent); font-size: 11px; }
.cv-sec[open] > summary::before { content: '▾'; }
.cv-sec > summary::-webkit-details-marker { display: none; }
.cv-cuenta {
  margin-left: auto; font-size: 11px; color: var(--text-dim);
  background: var(--surface2); border-radius: 10px; padding: 1px 8px;
}
.cv-ayuda { font-size: 12px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.cv-sec > *:last-child { margin-bottom: 14px; }

.cv-campo { display: block; margin-bottom: 10px; }
.cv-campo > span {
  display: block; font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}

.cv-fila {
  border: 1px solid var(--border-soft); border-radius: var(--r-sm);
  padding: 10px; margin-bottom: 10px;
  display: flex; flex-direction: column; gap: 7px;
}
.cv-fila-top { display: flex; gap: 7px; align-items: center; }
.cv-fechas { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.cv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cv-chip {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 20px; color: var(--text-muted);
  font-size: 11.5px; padding: 5px 11px; transition: all .14s ease;
}
.cv-chip:hover { border-color: var(--teen-accent); color: var(--text); }
.cv-chip.on {
  background: rgba(34,211,238,.12); border-color: var(--teen-accent); color: var(--teen-accent);
}

/* ── La hoja ─────────────────────────────────────────────── */
.cv-vista { position: sticky; top: 78px; }
.cv-vista-lbl {
  font-family: var(--f-head); font-size: 11px; color: var(--text-dim);
  margin-bottom: 8px; text-align: center;
}

/* Fondo blanco y medidas de carta: es papel, no una pantalla oscura. Lo que
   se ve aquí es exactamente lo que sale por la impresora. */
.cv-hoja {
  background: #FFFFFF;
  color: #1A1A1A;
  width: 100%;
  max-width: 216mm;              /* carta */
  min-height: 240mm;
  margin: 0 auto;
  padding: 18mm 16mm;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 10.5pt;
  line-height: 1.5;
}
.cv-hoja h1 { font-size: 21pt; line-height: 1.15; letter-spacing: -.01em; color: #111; }
.cvh-ph { color: #B0B0B0; font-weight: 400; }
.cvh-titular { font-size: 11pt; color: #444; margin-top: 2px; }
.cvh-contacto { font-size: 9pt; color: #555; margin-top: 8px; }
.cvh-sep { margin: 0 7px; color: #BBB; }
.cvh-head { border-bottom: 1.5px solid #222; padding-bottom: 12px; margin-bottom: 16px; }

.cvh-sec { margin-bottom: 15px; break-inside: avoid; }
.cvh-sec h3 {
  font-size: 9.5pt; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; color: #222;
  border-bottom: .5px solid #CCC; padding-bottom: 3px; margin-bottom: 8px;
}
.cvh-item { margin-bottom: 9px; break-inside: avoid; }
.cvh-item-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.cvh-item-top strong { font-size: 10.5pt; color: #111; }
.cvh-fecha { font-size: 9pt; color: #666; white-space: nowrap; }
.cvh-lugar { font-size: 9.5pt; color: #555; font-style: italic; }
.cvh-detalle { font-size: 10pt; color: #333; margin-top: 3px; }
.cvh-detalle p + p { margin-top: 4px; }
.cvh-lista { list-style: none; font-size: 10pt; }
.cvh-lista li { margin-bottom: 3px; }
.cvh-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 5px 7px; }
.cvh-chips li {
  font-size: 9pt; background: #F0F2F5; border: .5px solid #DDD;
  border-radius: 3px; padding: 2px 8px; color: #333;
}
.cvh-vacia { color: #AAA; text-align: center; padding: 40px 0; font-size: 10pt; }

/* Variantes de plantilla */
.cv-moderna .cvh-head { border-bottom: 3px solid #0E7490; }
.cv-moderna .cvh-sec h3 { color: #0E7490; border-bottom-color: #B6E3EE; }
.cv-tecnica { font-family: 'Fira Code', ui-monospace, monospace; font-size: 9.5pt; }
.cv-tecnica h1 { font-family: 'Fira Code', ui-monospace, monospace; font-size: 18pt; }
.cv-tecnica .cvh-sec h3::before { content: '// '; color: #999; }
.cv-tecnica .cvh-head { border-bottom: 1px dashed #333; }

/* ── Impresión ───────────────────────────────────────────── */
/* Se activa con body.cv-imprimiendo, que pone cvbuilder.js justo antes de
   llamar a print() y quita en afterprint. Sin la clase, imprimir desde otra
   pantalla se comporta como siempre.
   Se neutralizan los contenedores en vez de usar el truco de `visibility`:
   la app tiene ancestros con overflow y altura fija, y ahí el truco recorta
   el currículum a la primera página. */
@page { size: letter; margin: 12mm; }

@media print {
  body.cv-imprimiendo {
    background: #FFF !important;
    overflow: visible !important;
  }
  /* Todo lo que cuelga directamente de <body> y no es el layout se va: la
     cabecera, el globo del chat, los avisos, la barra de llamada, el visor de
     la pantalla del profe. Se hace por estructura y no enumerando clases
     porque la lista a mano se desincroniza — la primera versión de esta regla
     decía `.chat-fab` cuando la clase real es `.chat-bubble`, y el globo del
     chat salía impreso en la esquina del currículum. */
  body.cv-imprimiendo > *:not(.app-layout) { display: none !important; }

  body.cv-imprimiendo .sidebar,
  body.cv-imprimiendo .tm-head,
  body.cv-imprimiendo .cv-editor,
  body.cv-imprimiendo .cv-vista-lbl { display: none !important; }

  body.cv-imprimiendo .app-layout,
  body.cv-imprimiendo .main-content,
  body.cv-imprimiendo .screen.active,
  body.cv-imprimiendo .cv-layout,
  body.cv-imprimiendo .cv-vista {
    display: block !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
    animation: none !important;
    background: #FFF !important;
  }

  body.cv-imprimiendo .cv-hoja {
    box-shadow: none !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;      /* el margen lo pone @page */
    max-width: none !important;
    min-height: 0 !important;
    width: 100% !important;
  }
}

/* ══ TermLab ═════════════════════════════════════════════════════════════ */
.tl-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 940px) { .tl-layout { grid-template-columns: 1fr; } }

.tl-lateral { display: flex; flex-direction: column; gap: 8px; }
.tl-seccion {
  font-family: var(--f-head); font-size: 11px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px;
}
.tl-mis {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-muted);
  font-size: 12.5px; text-align: left; padding: 9px 11px; margin-bottom: 5px;
  transition: border-color .14s, color .14s;
}
.tl-mis:hover { border-color: var(--teen-accent); color: var(--text); }
.tl-mis.on { border-color: var(--teen-accent); color: var(--teen-accent); background: rgba(34,211,238,.07); }
.tl-mis.hecha .tl-mis-n { color: var(--teen-ok); }
.tl-mis-n { font-family: var(--f-head); font-size: 11px; color: var(--text-dim); }

.tl-brief {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px; margin-top: 6px;
}
.tl-brief-t { font-family: var(--f-head); font-size: 13px; margin-bottom: 6px; }
.tl-brief p { font-size: 12.5px; color: var(--text-muted); line-height: 1.55; }
.tl-ok-tag { font-size: 10px; color: var(--teen-ok); border: 1px solid var(--teen-ok); border-radius: 3px; padding: 0 5px; }
.tl-obj { margin: 9px 0 11px 16px; font-size: 12px; color: var(--text-muted); }
.tl-obj li { margin-bottom: 3px; }

/* ── La consola ──────────────────────────────────────────── */
.tl-consola {
  background: #05070B;
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 230px);
  min-height: 380px;
}
.tl-barra {
  display: flex; align-items: center; gap: 7px;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}
.tl-punto { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.tl-punto.r { background: #FF5F57; }
.tl-punto.a { background: #FEBC2E; }
.tl-punto.v { background: #28C840; }
.tl-titulo {
  margin-left: 8px; font-family: var(--f-head);
  font-size: 11.5px; color: var(--text-dim);
}

.tl-salida {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  font-family: var(--f-head);
  font-size: 13px;
  line-height: 1.6;
  color: #C8D4E0;
  white-space: pre-wrap;
  word-break: break-word;
}
.tl-linea { margin-bottom: 1px; }
.tl-err  { color: #FF7B72; }
.tl-ok   { color: #6EE7A8; }
.tl-info { color: #8B9BB0; font-style: italic; }
.tl-h    { color: var(--teen-accent); font-weight: 600; }
.tl-dir     { color: #6FB4FF; font-weight: 600; }
.tl-peligro { color: #FF7B72; text-decoration: underline wavy; }
.tl-prompt { color: #6EE7A8; }
.tl-ruta   { color: #6FB4FF; }

.tl-entrada-fila {
  display: flex; align-items: center; gap: 5px;
  border-top: 1px solid var(--border);
  padding: 9px 14px;
  font-family: var(--f-head);
  font-size: 13px;
  background: #05070B;
}
#tl-entrada {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  padding: 0;
  color: #E6EDF3;
  font-family: var(--f-head);
  font-size: 13px;
  caret-color: var(--teen-accent);
  width: auto;
}

/* ══ WebStudio ═══════════════════════════════════════════════════════════ */
.ws-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1000px) { .ws-layout { grid-template-columns: 1fr; } }

.ws-lateral { display: flex; flex-direction: column; }
.ws-vacio { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.ws-proy {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text-muted);
  padding: 9px 11px; margin-bottom: 5px; text-align: left;
  transition: border-color .14s, color .14s;
}
.ws-proy:hover { border-color: var(--teen-accent); color: var(--text); }
.ws-proy.on { border-color: var(--teen-accent); color: var(--teen-accent); background: rgba(34,211,238,.07); }
.ws-proy-t { font-size: 12.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-proy-m { font-family: var(--f-head); font-size: 10px; color: var(--text-dim); }
.ws-borrar { color: var(--text-dim); font-size: 12px; padding: 0 3px; }
.ws-borrar:hover { color: var(--teen-bad); }

.ws-retos { list-style: none; font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.ws-retos li.ok { color: var(--teen-ok); }

/* ── Bienvenida y plantillas ─────────────────────────────── */
.ws-bienvenida {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 28px;
}
.ws-bienvenida h3 { font-family: var(--f-head); font-size: 16px; margin-bottom: 16px; }
.ws-plantillas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ws-plantilla {
  display: flex; flex-direction: column; gap: 5px; text-align: left;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px; color: var(--text);
  transition: border-color .14s;
}
.ws-plantilla:hover { border-color: var(--teen-accent); }
.ws-plantilla strong { font-family: var(--f-head); font-size: 13.5px; }
.ws-plantilla span { font-size: 12px; color: var(--text-muted); line-height: 1.45; }

/* ── Editor y vista previa ───────────────────────────────── */
.ws-titulo-fila { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ws-titulo-fila .input { max-width: 340px; font-family: var(--f-head); font-size: 13px; }

.ws-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: calc(100vh - 265px);
  min-height: 400px;
}
@media (max-width: 820px) { .ws-split { grid-template-columns: 1fr; height: auto; } }

.ws-codigo, .ws-previa {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--r);
  overflow: hidden; background: var(--surface);
  min-height: 320px;
}
.ws-tabs { display: flex; background: var(--surface2); border-bottom: 1px solid var(--border); }
.ws-tab {
  background: transparent; border: 0; border-bottom: 2px solid transparent;
  color: var(--text-dim); font-family: var(--f-head); font-size: 12px;
  padding: 9px 16px;
}
.ws-tab.on { color: var(--teen-accent); border-bottom-color: var(--teen-accent); }

.ws-area {
  flex: 1; width: 100%;
  background: #05070B; border: 0; border-radius: 0; outline: none;
  color: #C8D4E0;
  font-family: var(--f-head); font-size: 13px; line-height: 1.65;
  padding: 12px 14px;
  resize: none;
  tab-size: 2;
}
.ws-area.hidden { display: none; }

.ws-previa-barra {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 6px 10px;
  font-family: var(--f-head); font-size: 11.5px; color: var(--text-dim);
}
#ws-marco {
  flex: 1; width: 100%; border: 0;
  background: #FFFFFF;      /* una página web empieza en blanco, no en negro */
}

/* ══ Guías Reales ════════════════════════════════════════════════════════ */
.gr-rejilla {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.gr-tarjeta {
  display: flex; flex-direction: column; gap: 7px; text-align: left;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px; color: var(--text);
  transition: border-color .15s, background .15s;
}
.gr-tarjeta:hover { border-color: var(--teen-accent); background: var(--surface2); }
.gr-tarjeta.lista { border-left: 3px solid var(--teen-ok); }
.gr-tarjeta-top { display: flex; align-items: center; justify-content: space-between; }
.gr-ico { font-size: 26px; }
.gr-tag {
  font-family: var(--f-head); font-size: 10px; color: var(--teen-ok);
  border: 1px solid var(--teen-ok); border-radius: 3px; padding: 1px 7px;
}
.gr-tag.parcial { color: var(--teen-warn); border-color: var(--teen-warn); }
.gr-tarjeta h3 { font-family: var(--f-head); font-size: 14.5px; font-weight: 600; }
.gr-tarjeta p { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; flex: 1; }
.gr-meta { font-family: var(--f-head); font-size: 10.5px; color: var(--text-dim); margin-bottom: 4px; }

/* ── Un paso ─────────────────────────────────────────────── */
.gr-cabecera { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.gr-titulo { font-family: var(--f-head); font-size: 15px; flex: 1; }
.gr-contador { font-family: var(--f-head); font-size: 12px; color: var(--text-dim); }

.gr-paso {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 26px;
  max-width: 780px;
}
.gr-paso h3 { font-family: var(--f-head); font-size: 17px; margin-bottom: 12px; }
.gr-cuerpo p { font-size: 14px; line-height: 1.7; color: var(--text); margin-bottom: 10px; }

.gr-pie { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; max-width: 780px; }

/* ── Capturas simuladas ──────────────────────────────────── */
.gr-sim { margin: 18px 0; }

.gr-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .gr-compare { grid-template-columns: 1fr; } }
.gr-col { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px; }
.gr-col.mal  { border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.05); }
.gr-col.bien { border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.05); }
.gr-col-t { font-family: var(--f-head); font-size: 11.5px; margin-bottom: 8px; }
.gr-col.mal  .gr-col-t { color: var(--teen-bad); }
.gr-col.bien .gr-col-t { color: var(--teen-ok); }
.gr-ej { font-family: var(--f-head); font-size: 12px; color: var(--text-muted); padding: 3px 0; }

.gr-ventana { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
.gr-ventana-barra {
  background: var(--surface2); border-bottom: 1px solid var(--border);
  padding: 7px 12px; font-family: var(--f-head); font-size: 11.5px; color: var(--text-muted);
}
.gr-menu { list-style: none; }
.gr-menu li {
  padding: 9px 14px; font-size: 13px; color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.gr-menu li.on {
  background: rgba(34,211,238,.10); color: var(--teen-accent);
  border-left: 3px solid var(--teen-accent);
}

.gr-doc { background: #FFF; color: #222; padding: 20px 24px; }
.gr-doc-h1 { font-size: 19px; font-weight: 700; color: #1a4d8f; margin: 10px 0 4px; }
.gr-doc-h2 { font-size: 15px; font-weight: 700; color: #2d6cb5; margin: 8px 0 3px; }
.gr-doc-p  { font-size: 13px; color: #444; }

.gr-hoja { width: 100%; border-collapse: collapse; background: #FFF; color: #222; font-size: 13px; }
.gr-hoja th, .gr-hoja td { border: 1px solid #D5D9DE; padding: 6px 10px; text-align: left; }
.gr-hoja th { background: #EEF1F4; font-weight: 600; color: #555; font-size: 12px; }
.gr-hoja td.formula { font-family: 'Fira Code', monospace; color: #0E7490; font-weight: 600; }

/* ── Interacción ─────────────────────────────────────────── */
.gr-opciones { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 12px; }
.gr-opcion {
  display: flex; align-items: flex-start; gap: 11px; text-align: left;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-size: 13.5px; line-height: 1.5; padding: 12px 14px;
  transition: border-color .14s, background .14s;
}
.gr-opcion:hover { border-color: var(--teen-accent); }
.gr-opcion.bien { border-color: var(--teen-ok); background: rgba(52,211,153,.10); }
.gr-opcion.mal  { border-color: var(--teen-bad); background: rgba(248,113,113,.10); }
.gr-letra {
  font-family: var(--f-head); font-size: 11px; color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 3px;
  width: 20px; height: 20px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}

.gr-escribir { margin: 18px 0 12px; display: flex; flex-direction: column; gap: 9px; align-items: flex-start; }
.gr-escribir textarea { font-family: var(--f-head); font-size: 13px; line-height: 1.6; }

.gr-feedback { font-size: 13px; line-height: 1.6; border-radius: var(--r-sm); padding: 0; }
.gr-feedback.bien { color: var(--teen-ok); background: rgba(52,211,153,.08); padding: 11px 14px; }
.gr-feedback.mal  { color: var(--teen-warn); background: rgba(251,191,36,.08); padding: 11px 14px; }
.gr-feedback strong { color: inherit; }
