/* ═══════════════════════════════════════════════════════════
   EFI APP — sitio público.
   Los colores salen del logo: azul marino #162843 (tinta) y
   dorado #c99f59 (acento). Los neutros cálidos y los colores
   de estado vienen del app, para que se sienta el mismo
   producto.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* ── Marca (los dos colores del logo) ── */
  --tinta: #162843;
  --oro:   #c99f59;

  --bg:       oklch(0.985 0.003 85);
  --surface:  oklch(1     0     0);
  --surface-2:oklch(0.968 0.004 85);
  --chip:     oklch(0.955 0.005 85);
  --line:     oklch(0.90  0.006 85);
  --line-soft:oklch(0.945 0.005 85);
  --text:     oklch(0.22  0.008 85);
  --muted:    oklch(0.52  0.008 85);
  --faint:    oklch(0.66  0.006 85);
  --accent:   var(--tinta);
  --accent-fg:#fff;
  --accent-soft: oklch(0.975 0.022 80);   /* velo cálido, del lado del dorado */

  --free:  oklch(0.60 0.14 155);
  --occ:   oklch(0.56 0.10 245);
  --warn:  oklch(0.70 0.17 78);
  --over:  oklch(0.58 0.22 25);
  --clean: oklch(0.58 0.13 210);
  --maint: oklch(0.58 0.008 85);

  /* Los cuatro bloques comparten la tinta de la marca: la
     diferencia la hace el rótulo, no un arcoíris de colores.
     Los colores de estado se reservan para el tablero, donde
     sí significan algo. */
  --op: var(--accent); --fin: var(--accent); --inv: var(--accent); --ctl: var(--accent);

  --shadow-sm: 0 1px 2px oklch(0.2 0.01 85 / .06), 0 1px 1px oklch(0.2 0.01 85 / .04);
  --shadow-md: 0 4px 14px oklch(0.2 0.01 85 / .07), 0 1px 3px oklch(0.2 0.01 85 / .05);
  --shadow-lg: 0 18px 50px oklch(0.2 0.01 85 / .14), 0 4px 12px oklch(0.2 0.01 85 / .06);

  --radius: 8px;
  --radius-lg: 14px;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, system-ui, sans-serif;
  --maxw: 1180px;
}

:root[data-tema="oscuro"] {
  /* El azul marino del logo no se lee sobre fondo oscuro: en
     oscuro manda el dorado, que es el otro color de la marca. */
  --tinta: #F2EEE8;
  --oro:   #D4A961;

  --bg:       oklch(0.145 0.008 85);
  --surface:  oklch(0.195 0.009 85);
  --surface-2:oklch(0.225 0.009 85);
  --chip:     oklch(0.255 0.010 85);
  --line:     oklch(0.30  0.010 85);
  --line-soft:oklch(0.255 0.010 85);
  --text:     oklch(0.94  0.008 85);
  --muted:    oklch(0.68  0.008 85);
  --faint:    oklch(0.55  0.008 85);
  --accent:   var(--oro);
  --accent-fg:#16202b;
  --accent-soft: oklch(0.30 0.045 80);

  --free:  oklch(0.68 0.16 155);
  --occ:   oklch(0.68 0.12 245);
  --warn:  oklch(0.78 0.16 78);
  --over:  oklch(0.66 0.19 25);
  --clean: oklch(0.68 0.13 210);
  --maint: oklch(0.60 0.010 85);

  --op: var(--accent); --fin: var(--accent); --inv: var(--accent); --ctl: var(--accent);

  --shadow-sm: 0 1px 2px #0006;
  --shadow-md: 0 4px 16px #0007;
  --shadow-lg: 0 20px 55px #0009;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; }

.env { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

/* ───────────────────────── Header ───────────────────────── */

.hdr {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, background .2s;
}
.hdr.pegado { border-bottom-color: var(--line-soft); }
.hdr-in { display: flex; align-items: center; gap: 18px; height: 58px; }

/* El logo real, en dos variantes: el azul marino no se lee en
   fondo oscuro, así que ahí entra la versión de tinta clara. */
.marca { display: flex; align-items: center; text-decoration: none; }
.marca .mk { height: 27px; width: auto; display: block; }
:root[data-tema="oscuro"] .marca .mk-claro,
:root:not([data-tema="oscuro"]) .marca .mk-oscuro { display: none; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500;
  padding: 7px 11px; border-radius: var(--radius); transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--chip); }
.nav a.on { color: var(--text); background: var(--chip); }

.tema {
  display: grid; place-items: center; width: 32px; height: 32px; margin-left: 4px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.tema:hover { color: var(--text); border-color: var(--faint); }
.tema svg { width: 15px; height: 15px; }
:root[data-tema="oscuro"] .tema .i-sol { display: none; }
:root:not([data-tema="oscuro"]) .tema .i-luna { display: none; }

/* ───────────────────────── Hero ───────────────────────── */

.hero { padding: 76px 0 12px; position: relative; }
.hero::before {
  content: ''; position: absolute; inset: -30% 0 40%; z-index: -1;
  background: radial-gradient(60% 55% at 50% 0%, var(--accent-soft), transparent 70%);
  opacity: .8; pointer-events: none;
}
.hero h1 {
  margin: 0 0 16px; font-size: clamp(34px, 6.2vw, 54px); line-height: 1.05;
  letter-spacing: -.035em; font-weight: 660; max-width: 15ch;
}
/* Subrayado dorado en vez de palabra de otro color: se lee
   igual de bien en claro y en oscuro, y es el color del logo. */
.hero h1 em {
  font-style: normal;
  background-image: linear-gradient(color-mix(in oklab, var(--oro) 62%, transparent), color-mix(in oklab, var(--oro) 62%, transparent));
  background-repeat: no-repeat;
  background-size: 100% .14em;
  background-position: 0 88%;
}
.hero .bajada { margin: 0; font-size: clamp(16px, 2.2vw, 19px); color: var(--muted); max-width: 46ch; }

.acciones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 17px; border-radius: var(--radius); text-decoration: none;
  font-size: 14.5px; font-weight: 560; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:active { transform: translateY(1px); }
.btn-p { background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow-sm); }
.btn-p:hover { box-shadow: var(--shadow-md); }
.btn-s { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-s:hover { border-color: var(--faint); }
.btn svg { width: 15px; height: 15px; }

/* ── Tablero del hero (mock en vivo) ── */

.hero-vista { margin-top: 46px; }

.tablero {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.tablero-top {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-bottom: 1px solid var(--line-soft); background: var(--surface-2);
}
.tablero-top .luces { display: flex; gap: 5px; }
.tablero-top .luces i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); display: block; }
.tablero-top .ruta {
  margin-left: 6px; font-size: 11.5px; color: var(--faint); font-family: var(--mono);
}
.tablero-top .kpi { margin-left: auto; display: flex; gap: 16px; }
.tablero-top .kpi span { font-size: 11px; color: var(--faint); }
.tablero-top .kpi b { font-family: var(--mono); color: var(--text); font-weight: 560; }

/* Son 12 habitaciones: las columnas se fijan en divisores de 12 para que
   nunca quede una fila coja con un hueco al lado. */
.grilla {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 14px;
}
@media (min-width: 560px) { .grilla { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 900px) { .grilla { grid-template-columns: repeat(6, 1fr); } }

/* ── Escritorio: hero a dos columnas ──
   Desde 1000px el tablero se va al lado del texto en vez de debajo.
   Ahí el tablero vive en media pantalla, así que vuelve a 4 columnas
   (12 habitaciones = 3 filas completas). Esta regla va DESPUÉS de la
   de 900px a propósito: misma especificidad, gana la última. */
@media (min-width: 1000px) {
  .hero { padding-top: 92px; }
  .hero-grid {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 48px; align-items: center;
  }
  .hero-vista { margin-top: 0; }
  .hero h1 { font-size: clamp(46px, 4.4vw, 60px); }
  .grilla { grid-template-columns: repeat(4, 1fr); }
  .promesas { gap: 32px; }
}
.hab {
  border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 9px 10px 8px; background: var(--surface);
  position: relative; overflow: hidden;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), border-color .3s;
}
.hab::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--c); opacity: .9;
}
.hab.cambia { transform: scale(1.035); border-color: var(--c); }
.hab .no { font-family: var(--mono); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.hab .est {
  display: flex; align-items: center; gap: 5px; margin-top: 2px;
  font-size: 10px; color: var(--c); font-weight: 560; text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap;
}
.hab .est i { width: 5px; height: 5px; border-radius: 50%; background: var(--c); display: block; flex: none; }
.hab .t { margin-top: 5px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.hab .t.vacio { color: var(--faint); }

.libre   { --c: var(--free); }
.ocupada { --c: var(--occ); }
.porven  { --c: var(--warn); }
.vencida { --c: var(--over); }
.limpieza{ --c: var(--clean); }
.mant    { --c: var(--maint); }

.leyenda-mock {
  display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 14px 13px;
  font-size: 11px; color: var(--faint);
}
.leyenda-mock span { display: inline-flex; align-items: center; gap: 5px; }
.leyenda-mock i { width: 6px; height: 6px; border-radius: 50%; display: block; }

.nota-mock { text-align: center; font-size: 12px; color: var(--faint); margin: 12px 0 0; }

/* ───────────────────────── Secciones ───────────────────────── */

section { padding: 68px 0; }
section.ajustada { padding: 48px 0; }

.rotulo {
  font-size: 11.5px; font-weight: 620; letter-spacing: .1em; text-transform: uppercase;
  color: var(--faint); margin: 0 0 10px;
}
.titulo-sec {
  margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 32px); letter-spacing: -.03em;
  font-weight: 640; line-height: 1.15;
}
.intro-sec { margin: 0 0 32px; color: var(--muted); max-width: 54ch; font-size: 16px; }

/* Promesas */
.promesas { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.promesa { border-top: 2px solid var(--oro); padding-top: 14px; }
.promesa h3 { margin: 0 0 6px; font-size: 17px; letter-spacing: -.02em; font-weight: 600; }
.promesa p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* Bloques + tarjetas */
.bloque + .bloque { margin-top: 34px; }
.bloque-cab { display: flex; align-items: center; gap: 9px; margin-bottom: 13px; }
.bloque-cab i { width: 7px; height: 7px; border-radius: 2px; background: var(--oro); display: block; }
.bloque-cab h3 {
  margin: 0; font-size: 12px; font-weight: 620; letter-spacing: .09em;
  text-transform: uppercase; color: var(--muted);
}
.bloque-cab .raya { flex: 1; height: 1px; background: var(--line-soft); }
[data-bloque="Operación"]  { --bc: var(--op); }
[data-bloque="Finanzas"]   { --bc: var(--fin); }
[data-bloque="Inventario"] { --bc: var(--inv); }
[data-bloque="Control"]    { --bc: var(--ctl); }

.tarjetas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr)); }

.tarjeta {
  display: flex; gap: 12px; text-align: left; width: 100%;
  padding: 15px 15px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--surface); cursor: pointer; font: inherit; color: inherit;
  transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s, border-color .16s;
  position: relative;
}
.tarjeta:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in oklab, var(--bc) 35%, var(--line)); }
.tarjeta:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tarjeta .ico {
  flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--bc) 12%, var(--surface));
  color: var(--bc); border: 1px solid color-mix(in oklab, var(--bc) 22%, transparent);
}
.tarjeta .ico svg { width: 16px; height: 16px; }
.tarjeta h4 { margin: 2px 0 4px; font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
.tarjeta p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.tarjeta .flecha {
  position: absolute; right: 13px; top: 16px; color: var(--faint);
  opacity: 0; transform: translateX(-3px); transition: opacity .16s, transform .16s;
}
.tarjeta:hover .flecha { opacity: 1; transform: none; }
.tarjeta .flecha svg { width: 14px; height: 14px; }

/* Cinta de novedades en portada */
.cinta { display: grid; gap: 8px; }
.nov-mini {
  display: flex; gap: 12px; align-items: baseline; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  text-decoration: none; transition: border-color .15s, transform .15s;
}
.nov-mini:hover { border-color: var(--faint); transform: translateX(2px); }
.nov-mini time { font-family: var(--mono); font-size: 11.5px; color: var(--faint); flex: none; }
.nov-mini span { font-size: 14.5px; }

.etq {
  display: inline-block; padding: 1px 7px; border-radius: 999px; flex: none;
  font-size: 10.5px; font-weight: 620; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid transparent;
}
.etq.nuevo   { color: var(--free);  background: color-mix(in oklab, var(--free) 13%, transparent);  border-color: color-mix(in oklab, var(--free) 28%, transparent); }
.etq.mejora  { color: var(--occ);   background: color-mix(in oklab, var(--occ) 13%, transparent);   border-color: color-mix(in oklab, var(--occ) 28%, transparent); }
.etq.arreglo { color: var(--inv);   background: color-mix(in oklab, var(--inv) 13%, transparent);   border-color: color-mix(in oklab, var(--inv) 28%, transparent); }

/* Cierre / CTA */
.cierre {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 38px 32px;
  background: var(--surface); box-shadow: var(--shadow-sm); text-align: center;
}
.cierre h2 { margin: 0 0 8px; font-size: clamp(22px, 3.2vw, 28px); letter-spacing: -.03em; font-weight: 640; }
.cierre p { margin: 0 auto 22px; color: var(--muted); max-width: 46ch; }
.cierre .acciones { justify-content: center; margin-top: 0; }

/* ───────────────────────── Ayuda ───────────────────────── */

.barra-busqueda { position: relative; margin-bottom: 14px; }
.barra-busqueda svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.barra-busqueda input {
  width: 100%; padding: 12px 14px 12px 38px; font: inherit; font-size: 15px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.barra-busqueda input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.barra-busqueda input::placeholder { color: var(--faint); }

.filtros { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.filtro {
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all .15s;
}
.filtro:hover { color: var(--text); border-color: var(--faint); }
.filtro.on { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

.sin-resultados { text-align: center; padding: 46px 0; color: var(--faint); }
.sin-resultados b { display: block; color: var(--muted); font-weight: 560; margin-bottom: 4px; }

/* Timeline de novedades */
.linea { position: relative; padding-left: 26px; }
.linea::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.nov { position: relative; padding-bottom: 26px; }
.nov::before {
  content: ''; position: absolute; left: -24px; top: 7px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--line);
}
.nov.nuevo::before   { border-color: var(--free); }
.nov.mejora::before  { border-color: var(--occ); }
.nov.arreglo::before { border-color: var(--inv); }
.nov .cab { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 4px; }
.nov time { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.nov h3 { margin: 0; font-size: 16.5px; font-weight: 600; letter-spacing: -.02em; width: 100%; }
.nov p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 62ch; }
.nov .ver {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 8px;
  background: none; border: 0; padding: 0; font: inherit; font-size: 13.5px; font-weight: 540;
  color: var(--accent); cursor: pointer;
}
.nov .ver:hover { text-decoration: underline; }
.nov .ver svg { width: 13px; height: 13px; }

/* ───────────────────────── Panel de detalle ───────────────────────── */

.velo {
  position: fixed; inset: 0; z-index: 90; background: oklch(0.2 0.01 85 / .38);
  backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .22s;
}
.velo.abierto { opacity: 1; pointer-events: auto; }

.panel {
  position: fixed; z-index: 100; top: 0; right: 0; bottom: 0; width: min(520px, 100%);
  background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.22,.9,.24,1);
  overscroll-behavior: contain;
}
.panel.abierto { transform: none; }

.panel-cab {
  display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 16px;
  border-bottom: 1px solid var(--line-soft); flex: none;
}
.panel-cab .ico {
  flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--bc) 13%, var(--surface));
  color: var(--bc); border: 1px solid color-mix(in oklab, var(--bc) 24%, transparent);
}
.panel-cab .ico svg { width: 19px; height: 19px; }
.panel-cab h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; font-weight: 640; }
.panel-cab .meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.rol {
  font-size: 10.5px; font-weight: 560; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); background: var(--chip); padding: 2px 7px; border-radius: 999px;
}
.cerrar {
  margin-left: auto; flex: none; width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--muted); cursor: pointer; transition: color .15s, border-color .15s;
}
.cerrar:hover { color: var(--text); border-color: var(--faint); }
.cerrar svg { width: 14px; height: 14px; }

.panel-cuerpo { overflow-y: auto; padding: 20px; flex: 1; }
.panel-cuerpo h5 {
  margin: 26px 0 10px; font-size: 11.5px; font-weight: 620; letter-spacing: .09em;
  text-transform: uppercase; color: var(--faint);
}
.panel-cuerpo h5:first-child { margin-top: 0; }

.lista-p { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.lista-p li { display: flex; gap: 9px; font-size: 14.5px; color: var(--muted); line-height: 1.55; }
.lista-p li::before {
  content: ''; flex: none; width: 5px; height: 5px; border-radius: 50%;
  background: var(--bc); margin-top: 8px; opacity: .8;
}

/* ── Tutoriales (acordeón) ──
   Cada tutorial es un <details>: teclado y lector de pantalla salen
   gratis. El objetivo es que la ficha se lea de una pasada y solo se
   abra lo que la persona vino a buscar. */
/* minmax(0,1fr) y no el 'auto' por defecto: si no, la pista de la
   grilla crece con el texto más largo y los pasos se salen del panel. */
.tuts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }

.tut { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.tut[open] { border-color: color-mix(in oklab, var(--bc) 32%, var(--line)); }

.tut summary {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  cursor: pointer; list-style: none; font-size: 14.5px; font-weight: 560;
  transition: background .15s;
}
.tut summary::-webkit-details-marker { display: none; }
.tut summary:hover { background: var(--surface-2); }
.tut summary span { flex: 1; }
.tut summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tut .chev { width: 14px; height: 14px; flex: none; color: var(--faint); transition: transform .2s; }
.tut[open] .chev { transform: rotate(180deg); }

.tut-cuerpo { padding: 2px 13px 13px; border-top: 1px solid var(--line-soft); }
.tut-cuerpo > * + * { margin-top: 12px; }
.tut-cuerpo .avisos { margin-top: 12px; }
.tut-cuerpo .media-slot { margin: 12px 0 0; }

.pasos { margin: 0; padding: 0; list-style: none; counter-reset: p; display: grid; gap: 2px; }
.pasos li { counter-increment: p; display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.pasos li:last-child { border-bottom: 0; }
.pasos li::before {
  content: counter(p); flex: none; width: 21px; height: 21px; border-radius: 50%;
  background: var(--chip); color: var(--muted); display: grid; place-items: center;
  font-size: 11px; font-weight: 640; font-family: var(--mono); margin-top: 1px;
}
.pasos li > div { min-width: 0; }
.pasos b { display: block; font-size: 14.5px; font-weight: 580; margin-bottom: 2px; }
.pasos span { font-size: 14px; color: var(--muted); line-height: 1.55; }

.avisos { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.avisos li {
  display: flex; gap: 9px; padding: 11px 13px; border-radius: var(--radius);
  background: color-mix(in oklab, var(--warn) 9%, var(--surface));
  border: 1px solid color-mix(in oklab, var(--warn) 26%, transparent);
  font-size: 14px; line-height: 1.5;
}
.avisos svg { width: 15px; height: 15px; flex: none; color: var(--warn); margin-top: 2px; }

.media-slot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 22px; background: var(--surface-2); }
.media-slot img { display: block; width: 100%; height: auto; }

/* ── Imágenes de un tutorial ──
   Viven dentro de un <details> cerrado y con loading="lazy": el
   navegador no las pide hasta que alguien abre ese tutorial. */
.figs { display: grid; gap: 14px; }
.fig { margin: 0; }
.fig a { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.fig a:hover { border-color: var(--faint); }
.fig img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.fig figcaption { margin-top: 6px; font-size: 12.5px; color: var(--faint); line-height: 1.45; }

/* Los GIF pesan megas: no se descargan hasta que lo pidan. */
.fig .clip {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; width: 100%; min-height: 108px; padding: 18px;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: var(--surface-2); color: var(--muted);
  font: inherit; cursor: pointer; transition: border-color .15s, color .15s;
}
.fig .clip:hover { border-color: var(--accent); color: var(--text); }
.fig .clip svg { width: 26px; height: 26px; color: var(--accent); }
.fig .clip span { font-size: 14px; font-weight: 560; }
.fig .clip small { font-size: 11.5px; color: var(--faint); }

.borrador {
  display: flex; gap: 8px; align-items: flex-start; margin-top: 12px;
  padding: 10px 12px; border-radius: var(--radius); font-size: 13px; line-height: 1.45;
  background: var(--surface-2); border: 1px dashed var(--line); color: var(--muted);
}
.borrador svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--faint); }

/* ───────────────────────── Pie ───────────────────────── */

.pie { border-top: 1px solid var(--line-soft); padding: 26px 0 34px; margin-top: 20px; }
.pie-in { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; font-size: 13px; color: var(--faint); }
.pie-in a { color: var(--muted); text-decoration: none; }
.pie-in a:hover { color: var(--text); text-decoration: underline; }
.pie-in .der { margin-left: auto; }

/* ───────────────────────── Responsive ───────────────────────── */

/* Nada puede ser más ancho que la pantalla. Los sospechosos de siempre:
   tablas, imágenes y bloques de código. */
img, svg, video { max-width: 100%; }

@media (max-width: 620px) {
  .env { padding-inline: 18px; }
  .hdr-in { gap: 10px; }
  .nav .opcional { display: none; }
  .hero { padding-top: 46px; }
  .tablero { margin-top: 32px; }
  .grilla { gap: 6px; padding: 11px; }
  .tablero-top .kpi { display: none; }
  section { padding: 48px 0; }
  .nav a { padding: 7px 8px; font-size: 13.5px; }
  .marca .mk { height: 22px; }
  .panel { top: auto; width: 100%; height: 88vh; border-left: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; transform: translateY(100%); }
  .panel.abierto { transform: none; }
  .nov-mini { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

.aparece { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.aparece.visible { opacity: 1; transform: none; }
