/* ════════════════════════════════════════════════════════════════
   STRANGE LOOP FACTORY · MARCO COMÚN

   Piel fija: negra (#06060e), el negro de la identidad: los logos
   sobre negro flotan sin recuadro. Para probar el
   grafito, basta con añadir class="grafito" al <html>.

   Esta hoja cubre el marco (cabecera, menú, pie), la portada, el
   panel y la página de herramientas. Cada proyecto con universo
   propio carga además su hoja en assets/universos/.

   Índice
     1. Variables          7. Rejillas            13. Calendario
     2. Base               8. Cajas y listas      14. Muro
     3. Cabecera y logo    9. Botones y etiquetas 15. Vitrina
     4. Buscador          10. Léeme              16. Visor
     5. Menú lateral      11. Repositorios       17. Panel
     6. Pestañas          12. Acerca de          18. Pie y ajustes
   ════════════════════════════════════════════════════════════════ */

/* ── 1. Variables ─────────────────────────────────────────────── */
:root {
  color-scheme: dark;
  /* Paleta S.A.C. (dossier de identidad) */
  --negro: #06060e;
  --grafito: #111113;
  --crema: #f0ede6;
  --oro: #c9a84a;
  --rosa: #f0287c;
  --turquesa: #18b8b0;
  --rojo: #d42428;
  --gris: #8e8b84;

  /* Piel */
  --fondo: #06060e;
  --cabecera: #06060e;
  --tarjeta: #0d0d16;
  --hueco: #161620;
  --borde: #22222d;
  --borde-fuerte: #34343f;
  --texto: #f0ede6;
  --texto-2: #cfccc5;
  --mudo: #9a978f;
  --acento: #d4b55a;
  --boton: #c9a84a;
  --boton-hover: #d9ba5f;
  --boton-texto: #06060e;
  /* Rampa del calendario y de las etiquetas, en oro */
  --n0: #17171f;
  --n1: #3a3120;
  --n2: #6e5c2c;
  --n3: #a6883c;
  --n4: #dcbc5e;

  /* Tipos de pieza del muro */
  --t-video: #5aa0f2;
  --t-foto: #4fc1d6;
  --t-render: #a884f3;
  --t-obra: #d1a23a;
  --t-cartel: #46d17e;
  --t-identidad: #f2716b;
  --t-nota: #e8e1cf;

  --sans: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono: 'Noto Sans Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --margen: clamp(16px, 2.4vw, 32px);
  --ancho: 1280px;
  --sombra: 0 16px 32px rgba(0, 0, 0, .55);
  --cruce: .7s;
}
:root.grafito {
  --fondo: #111113;
  --cabecera: #0b0b0d;
  --tarjeta: #18181b;
  --hueco: #202024;
  --borde: #2c2c31;
  --borde-fuerte: #3d3d43;
  --n0: #1f1f24;
}

/* ── 2. Base ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
html.sin-scroll { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fondo);
  color: var(--texto);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body > main { flex: 1 0 auto; }
img, video, svg, canvas { display: block; max-width: 100%; }
a { color: var(--acento); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
::selection { background: var(--oro); color: var(--negro); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.25; }
p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
code, kbd, pre, samp, .mono { font-family: var(--mono); }
[hidden] { display: none !important; }
.oculto {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.saltar {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 8px 14px; border-radius: 6px; background: var(--boton); color: var(--boton-texto); font-weight: 600;
}
.saltar:focus { top: 12px; text-decoration: none; }
.ico { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.mudo { color: var(--mudo); }
/* Enlaces dentro de texto corrido: subrayado fino */
.md p a, .md li a, .pieza-meta a, .repo-detalle-cuerpo a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em;
  text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
}

/* ── 3. Cabecera y logo vivo ──────────────────────────────────── */
.cab { background: var(--cabecera); border-bottom: 1px solid var(--borde); }
.cab-fila {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
  min-height: 64px; padding: 14px var(--margen);
}
.cab-izq { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cab-der { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.cab-logo { display: block; flex: 0 0 auto; border-radius: 6px; }
.logo-vivo {
  position: relative; display: block; flex: 0 0 auto;
  width: 64px; height: 36px; border-radius: 6px; overflow: hidden;
  background: var(--negro); transition: background-color var(--cruce) ease;
}
.logo-vivo img {
  position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px);
  object-fit: contain; transition: opacity var(--cruce) ease;
}
.logo-vivo img.fuera { opacity: 0; }
/* Con JS, nada asoma hasta saber qué logo toca */
.js .logo-vivo:not(.listo) img, .js .vitrina-lienzo:not(.listo) img { visibility: hidden; }
.logo-vivo-peq { width: 43px; height: 24px; border-radius: 4px; }
.logo-vivo-peq img { inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); }
.miga { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 14px; white-space: nowrap; }
.miga a { color: var(--texto); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.miga .sep { color: var(--mudo); flex: 0 0 auto; }
.miga b { font-weight: 600; }
.miga .corto { display: none; }
.btn-ico {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--borde-fuerte); border-radius: 6px;
  background: transparent; color: var(--mudo);
}
.btn-ico:hover { background: var(--hueco); color: var(--texto); }
.btn-ico svg { width: 16px; height: 16px; }

/* ── 4. Buscador ──────────────────────────────────────────────── */
.buscador { position: relative; }
.buscador-campo {
  display: flex; align-items: center; gap: 8px;
  width: min(300px, 34vw); height: 32px; padding: 0 6px 0 10px;
  border: 1px solid var(--borde-fuerte); border-radius: 6px;
  background: var(--fondo); color: var(--mudo); cursor: text;
}
.buscador-campo:focus-within { border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }
.buscador-campo svg { width: 14px; height: 14px; }
.buscador input {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0;
  border: 0; outline: none; background: transparent; color: var(--texto); font-size: 14px;
}
.buscador input::placeholder { color: var(--mudo); opacity: 1; }
.buscador input::-webkit-search-cancel-button { display: none; }
kbd {
  display: inline-block; min-width: 18px; padding: 0 5px;
  border: 1px solid var(--borde-fuerte); border-radius: 4px;
  font: 500 11px/16px var(--mono); color: var(--mudo); text-align: center;
}
.buscador-lista {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40;
  width: min(420px, 92vw); max-height: 70vh; overflow: auto;
  margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--borde-fuerte); border-radius: 8px;
  background: var(--tarjeta); box-shadow: var(--sombra);
}
.buscador-lista a { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 6px; color: var(--texto); }
.buscador-lista a:hover, .buscador-lista [aria-selected="true"] a { background: var(--hueco); text-decoration: none; }
.buscador-lista strong { font-weight: 600; }
.buscador-lista span { font-size: 12px; color: var(--mudo); }

/* ── 5. Menú lateral ──────────────────────────────────────────── */
.cajon { position: fixed; inset: 0; z-index: 60; background: rgba(1, 1, 4, .66); }
.cajon-panel {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: min(320px, 86vw); padding: 16px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--borde); border-radius: 0 12px 12px 0;
  background: var(--tarjeta); box-shadow: var(--sombra);
  animation: cajon .2s cubic-bezier(.33, 1, .68, 1);
}
@keyframes cajon { from { transform: translateX(-100%); } }
.cajon-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; }
.nav-tit { margin: 12px 8px 4px; font-size: 12px; font-weight: 600; color: var(--mudo); }
.nav-lista { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.nav-lista a {
  position: relative; display: flex; align-items: center; gap: 10px;
  min-height: 34px; padding: 0 8px; border-radius: 6px; color: var(--texto);
}
.nav-lista a:hover { background: var(--hueco); text-decoration: none; }
.nav-lista a[aria-current="page"] { background: var(--hueco); font-weight: 600; }
.nav-lista a[aria-current="page"]::before {
  content: ""; position: absolute; left: -8px; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: var(--oro);
}
.nav-lista svg.ico { width: 16px; height: 16px; color: var(--mudo); }
.nav-lista .slf { color: var(--mudo); }
.cajon-sep { height: 1px; margin: 10px 0; background: var(--borde); border: 0; }
.cajon-pie { margin-top: auto; padding: 16px 8px 0; font-size: 12px; color: var(--mudo); }

/* Avatares de proyecto: un signo de su universo */
.avatar-proy { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; background: #121219; }
.avatar-proy svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.avatar-proy-24 { width: 24px; height: 24px; border-radius: 6px; }
.avatar-proy-24 svg { width: 16px; height: 16px; }
.avatar-org { display: block; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 6px; background: var(--negro); object-fit: contain; }

/* ── 6. Pestañas ──────────────────────────────────────────────── */
.pestanas {
  display: flex; gap: 8px; padding: 0 var(--margen); margin-bottom: -1px;
  overflow-x: auto; scrollbar-width: none;
}
.pestanas::-webkit-scrollbar { display: none; }
.pestanas a {
  position: relative; display: inline-flex; align-items: center; flex: 0 0 auto;
  height: 48px; color: var(--texto-2); white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.pestanas a:hover { text-decoration: none; }
.pestanas a > span { display: inline-flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 6px; }
.pestanas a:hover > span { background: var(--hueco); color: var(--texto); }
.pestanas a[aria-current] { color: var(--texto); font-weight: 600; border-bottom-color: var(--acento); }
.pestanas svg { width: 16px; height: 16px; color: var(--mudo); }
.contador {
  display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--hueco); color: var(--texto); font-size: 12px; font-weight: 500; line-height: 18px; text-align: center;
}

/* ── 7. Rejillas ──────────────────────────────────────────────── */
.ancho { width: 100%; max-width: var(--ancho); margin: 0 auto; padding-left: var(--margen); padding-right: var(--margen); }
.inicio {
  width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px var(--margen) 64px;
  display: grid; gap: 28px; align-items: start;
  grid-template-columns: 280px minmax(0, 1fr) 300px;
  grid-template-areas: "izq centro der";
}
.inicio-izq { grid-area: izq; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.inicio-centro { grid-area: centro; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.inicio-der { grid-area: der; display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.repo { padding-top: 24px; padding-bottom: 64px; }
.repo-tit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; }
.repo-nombre { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.repo-nombre h1 { font-size: 20px; white-space: nowrap; }
.repo-acc { display: flex; flex-wrap: wrap; gap: 8px; }
.repo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 296px; gap: 24px; align-items: start; margin-top: 16px; }
.repo-principal { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.pila { display: flex; flex-direction: column; gap: 12px; }
.fila { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* ── 8. Cajas y listas ────────────────────────────────────────── */
.caja { border: 1px solid var(--borde); border-radius: 8px; background: var(--fondo); }
.caja-cab {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  min-height: 48px; padding: 8px 16px;
  border-bottom: 1px solid var(--borde); border-radius: 7px 7px 0 0; background: var(--tarjeta);
}
.caja-cab h2, .caja-cab h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.caja-cab svg { width: 16px; height: 16px; color: var(--mudo); }
.caja-cuerpo { padding: 16px; }
.caja-pie { padding: 12px 16px; border-top: 1px solid var(--borde); font-size: 13px; color: var(--mudo); }
.tarjeta { border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); padding: 16px; }
.tarjeta h2 { font-size: 14px; }
.titulo-sec { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.titulo-sec h2 { font-size: 14px; }
.lista-sep { list-style: none; display: flex; flex-direction: column; }
.lista-sep > li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--borde); }
.lista-sep > li:last-child { border-bottom: 1px solid var(--borde); }
.fecha-mono { font: 400 11.5px/1.5 var(--mono); color: var(--mudo); }
.datos-lista { list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--texto-2); }
.datos-lista li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.datos-lista svg { width: 16px; height: 16px; color: var(--mudo); }
.proyectos-lista { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.proyectos-lista a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 0 6px; margin: 0 -6px; border-radius: 6px; color: var(--texto); }
.proyectos-lista a:hover { background: var(--hueco); text-decoration: none; }
.proyectos-lista .nombre { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proyectos-lista .slf { color: var(--mudo); }
.proyectos-lista b { font-weight: 600; }
.campo-filtro {
  width: 100%; height: 32px; padding: 0 10px;
  border: 1px solid var(--borde-fuerte); border-radius: 6px; background: var(--fondo); color: var(--texto); font-size: 13px;
}
.campo-filtro::placeholder { color: var(--mudo); opacity: 1; }
.campo-filtro:focus { outline: none; border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }

/* ── 9. Botones y etiquetas ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--borde-fuerte); border-radius: 6px;
  background: var(--hueco); color: var(--texto);
  font-size: 14px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.btn:hover { background: var(--borde); text-decoration: none; }
.btn svg { width: 16px; height: 16px; color: var(--mudo); }
.btn-primario { border-color: transparent; background: var(--boton); color: var(--boton-texto); font-weight: 600; }
.btn-primario:hover { background: var(--boton-hover); }
.btn-primario svg { color: currentColor; }
.btn-peq { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-bloque { display: flex; width: 100%; height: 40px; }
.btn-texto { border: 0; background: none; padding: 0; color: var(--acento); font-size: inherit; }
.btn-texto:hover { text-decoration: underline; text-underline-offset: .2em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.pill {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 7px;
  border: 1px solid var(--borde-fuerte); border-radius: 999px;
  color: var(--mudo); font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap;
}
.pill-acento { border-color: var(--n3); color: var(--n4); }
.pill-mono { font-family: var(--mono); font-size: 11.5px; font-weight: 400; }
.temas { display: flex; flex-wrap: wrap; gap: 6px; }
.tema {
  display: inline-block; padding: 0 10px; border-radius: 999px;
  background: var(--hueco); background: color-mix(in oklab, var(--acento) 14%, transparent);
  color: var(--acento); font-size: 12px; font-weight: 500; line-height: 22px;
}
.punto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: var(--c, var(--n3)); }
.c4 { --c: var(--n4); background: var(--n4); }
.c3 { --c: var(--n3); background: var(--n3); }
.c2 { --c: var(--n2); background: var(--n2); }
.c1 { --c: var(--n1); background: var(--n1); }

/* ── 10. Léeme ────────────────────────────────────────────────── */
.md { padding: 32px; font-size: 16px; line-height: 1.6; color: var(--texto); }
.md > *:first-child { margin-top: 0 !important; }
.md > *:last-child { margin-bottom: 0 !important; }
.md p, .md ul, .md ol, .md blockquote, .md pre, .md figure, .md .metricas { margin: 0 0 16px; }
.md h1 { margin: 0 0 16px; padding-bottom: .3em; border-bottom: 1px solid var(--borde); font-size: 2em; letter-spacing: -.01em; }
.md h2 { margin: 32px 0 16px; padding-bottom: .3em; border-bottom: 1px solid var(--borde); font-size: 1.5em; }
.md .antetitulo { margin: 0 0 8px; font: 500 12px/1.5 var(--mono); letter-spacing: .04em; color: var(--mudo); text-transform: uppercase; }
.md .entradilla { font-size: 1.2em; line-height: 1.5; color: var(--texto-2); }
.md strong { font-weight: 600; }
.md .cierre { font-size: 1.15em; font-weight: 600; }
.md .nota-pie { font-size: 14px; color: var(--mudo); }
.metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; border: 1px solid var(--borde); border-radius: 8px; background: var(--borde); overflow: hidden; }
.metricas > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--fondo); }
.metricas b { font: 600 22px/1.2 var(--mono); letter-spacing: -.02em; color: var(--texto); }
.metricas span { font-size: 12.5px; line-height: 1.4; color: var(--mudo); }
.barra { display: flex; gap: 2px; height: 8px; border-radius: 6px; overflow: hidden; }
.barra > span { flex: 1 1 0; min-width: 3px; }
.barra-ley { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-size: 12px; color: var(--mudo); }
.barra-ley li { display: inline-flex; align-items: center; gap: 6px; }
.barra-ley b { color: var(--texto); font-weight: 600; }
.barra-ley .punto { width: 8px; height: 8px; }

/* ── 11. Repositorios (herramientas) ──────────────────────────── */
.u-software {
  --acento: #6cb6ff; --n1: #12305a; --n2: #1f5aa6; --n3: #3d8bfd; --n4: #8ec5ff;
}
.grupo + .grupo { margin-top: 40px; }
.grupo-cab { display: flex; flex-direction: column; gap: 6px; padding-bottom: 16px; }
.grupo-cab h2 { font-size: 20px; }
.grupo-cab p { max-width: 75ch; color: var(--mudo); font-size: 15px; }
.repos { list-style: none; border-top: 1px solid var(--borde); }
.repos > li { padding: 22px 0; border-bottom: 1px solid var(--borde); }
.repo-fila { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.repo-fila h3 { font-size: 20px; font-weight: 600; }
.repo-fila h3 a { color: var(--acento); }
.repo-desc { margin-top: 6px; max-width: 75ch; font-size: 15px; color: var(--texto-2); }
.repo-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 10px; font-size: 12.5px; color: var(--mudo); }
.repo-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.repo-detalle { margin-top: 12px; }
.repo-detalle > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 13px; color: var(--acento);
}
.repo-detalle > summary::-webkit-details-marker { display: none; }
.repo-detalle > summary:hover { text-decoration: underline; text-underline-offset: .2em; }
.repo-detalle > summary svg { width: 14px; height: 14px; transition: transform .15s; }
.repo-detalle[open] > summary svg { transform: rotate(90deg); }
.repo-detalle-cuerpo { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding: 16px; border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); font-size: 15px; line-height: 1.6; color: var(--texto-2); }
.repo-detalle-cuerpo b, .repo-detalle-cuerpo strong { color: var(--texto); font-weight: 600; }

/* ── 12. Acerca de ────────────────────────────────────────────── */
.acerca { display: flex; flex-direction: column; min-width: 0; }
.acerca > section { padding: 16px 0; border-top: 1px solid var(--borde); }
.acerca > section:first-child { padding-top: 0; border-top: 0; }
.acerca h2 { margin-bottom: 12px; font-size: 16px; }
.acerca .desc { font-size: 15px; line-height: 1.5; color: var(--texto); }
.acerca .temas { margin-top: 14px; }
.acerca .datos-lista { margin-top: 14px; font-size: 14px; }

/* ── 13. Calendario ───────────────────────────────────────────── */
.actividad { display: flex; flex-direction: column; gap: 12px; padding: 16px 16px 14px; }
.actividad-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; }
.actividad-cab h2 { font-size: 16px; font-weight: 400; }
.cal { overflow-x: auto; scrollbar-width: thin; }
.cal-in { width: max-content; display: flex; flex-direction: column; gap: 4px; }
.cal-meses { position: relative; height: 16px; margin-left: 35px; font-size: 11px; color: var(--mudo); }
.cal-meses span { position: absolute; top: 0; }
.cal-cuerpo { display: flex; gap: 7px; }
.cal-dias { display: grid; grid-template-rows: repeat(7, 13px); width: 28px; font-size: 10px; line-height: 13px; color: var(--mudo); }
.cal svg rect[data-n]:hover { stroke: var(--texto-2); stroke-width: 1; }
.cal svg rect.sel { stroke: var(--texto); stroke-width: 1.5; }
.d0 { fill: var(--n0); } .d1 { fill: var(--n1); } .d2 { fill: var(--n2); } .d3 { fill: var(--n3); } .d4 { fill: var(--n4); }
.cal-pie { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; font-size: 12px; color: var(--mudo); }
.cal-ley { display: inline-flex; align-items: center; gap: 4px; }
.cal-ley i { width: 10px; height: 10px; border-radius: 2px; }
.cal-tip {
  position: fixed; z-index: 70; pointer-events: none;
  padding: 4px 8px; border-radius: 6px; background: var(--crema); color: var(--negro);
  font-size: 12px; font-weight: 500; white-space: nowrap; transform: translate(-50%, calc(-100% - 8px));
}

/* ── 14. Muro ─────────────────────────────────────────────────── */
.muro-cab { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; padding-bottom: 12px; }
.muro-cab h2 { font-size: 16px; }
.muro-aviso { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; padding: 8px 12px; border: 1px solid var(--borde); border-radius: 6px; background: var(--tarjeta); font-size: 13px; color: var(--texto-2); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-lista {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30;
  min-width: 200px; margin: 0; padding: 6px; list-style: none;
  border: 1px solid var(--borde-fuerte); border-radius: 8px; background: var(--tarjeta); box-shadow: var(--sombra);
}
.menu-lista button {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px;
  border: 0; border-radius: 6px; background: none; color: var(--texto); text-align: left; font-size: 14px;
}
.menu-lista button:hover { background: var(--hueco); }
.menu-lista .check { width: 16px; height: 16px; color: var(--n4); visibility: hidden; }
.menu-lista button[aria-checked="true"] .check { visibility: visible; }
.menu-lista .num { margin-left: auto; font-size: 12px; color: var(--mudo); }
.pieza { display: flex; gap: 12px; padding: 16px 0; border-top: 1px solid var(--borde); }
.pieza-cuerpo { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
/* Cabecera fina de cada pieza: el título y una línea discreta */
.pieza-logo { flex: none; margin-top: 2px; }
.pieza-cab { display: flex; flex-direction: column; gap: 2px; }
.pieza-titulo { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.35; }
.pieza-titulo a { color: var(--texto); }
.pieza-linea { margin: 0; font-size: 12.5px; color: var(--mudo); }
.pieza-linea a { color: var(--mudo); }
.pieza-linea a:hover { color: var(--acento); }
.pieza-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; color: var(--mudo); }
.pieza-meta b { color: var(--texto); font-weight: 600; }
.pieza-meta time { font-size: 12px; white-space: nowrap; }
.pieza-caja { border: 1px solid var(--borde); border-radius: 8px; background: var(--tarjeta); overflow: hidden; }
.pieza-media {
  position: relative; display: block; width: 100%; max-height: min(72vh, 760px); padding: 0; border: 0;
  background: #000; cursor: zoom-in; aspect-ratio: 16 / 9;
}
.pieza-media img, .pieza-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pieza-media .marca-video {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff;
}
.pieza-media .marca-video svg { width: 9px; height: 9px; margin-left: 1px; }
.pieza-texto { padding: 12px 14px; font-size: 14px; line-height: 1.55; color: var(--texto-2); white-space: pre-line; overflow-wrap: anywhere; }
/* Nota: una pieza de solo texto */
.pieza-nota { padding: 16px 18px; font-size: 16px; line-height: 1.6; color: var(--texto); white-space: pre-line; overflow-wrap: anywhere; }
.pieza-nota + .pieza-pie { padding-top: 8px; }
/* Los enlaces dentro de un texto se distinguen también sin color */
.pieza-texto a, .pieza-nota a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.pieza.destacada .pieza-caja { box-shadow: 0 0 0 2px var(--acento); }
.pieza-caja { transition: box-shadow .4s ease; }
.pieza-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; padding: 10px 14px; font-size: 12px; color: var(--mudo); }
.pieza-media + .pieza-pie { border-top: 1px solid var(--borde); }
.tipo { display: inline-flex; align-items: center; gap: 6px; }
.hash { font-family: var(--mono); color: var(--mudo); }
.pieza-pie .ver { margin-left: auto; }
.muro-vacio { padding: 32px 16px; border-top: 1px solid var(--borde); color: var(--mudo); text-align: center; }

/* ── 15. Vitrina (el logo en grande) ──────────────────────────── */
.vitrina { position: relative; margin: 0; }
.vitrina-lienzo {
  position: relative; display: block; width: 100%; aspect-ratio: 2 / 1; padding: 0; border: 0;
  background: var(--negro); cursor: zoom-in; overflow: hidden;
  transition: background-color var(--cruce) ease;
}
.vitrina-lienzo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--cruce) ease; }
.vitrina-lienzo img.fuera { opacity: 0; }
.vitrina-sac .vitrina-lienzo { aspect-ratio: 1600 / 750; }
.vitrina-pie { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px 20px; padding: 12px 16px 14px; }
.vitrina-txt { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vitrina-txt strong { font-size: 14px; font-weight: 600; color: var(--texto); }
.vitrina-txt span { font-size: 13px; line-height: 1.5; color: var(--mudo); min-height: 3em; }
.vitrina-ctrl { display: flex; align-items: center; gap: 6px; }
.vitrina-ctrl .mono { min-width: 52px; margin-right: 4px; font-size: 12px; color: var(--mudo); text-align: right; }
.vitrina-ctrl button {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0;
  border: 1px solid var(--borde-fuerte); border-radius: 6px; background: transparent; color: var(--texto-2);
}
.vitrina-ctrl button:hover { background: var(--hueco); color: var(--texto); }
.vitrina-ctrl svg.ico { width: 15px; height: 15px; }
.vitrina-barra { position: absolute; left: 0; right: 0; height: 2px; background: transparent; }
.vitrina-barra i {
  display: block; height: 100%; background: var(--oro); transform-origin: left center; transform: scaleX(0);
  animation: vitrina-avance 4s linear infinite;
}
.vitrina.parada .vitrina-barra i { animation-play-state: paused; }
@keyframes vitrina-avance { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.caja > .vitrina:first-child .vitrina-lienzo { border-radius: 7px 7px 0 0; }
.caja > .vitrina { border-bottom: 1px solid var(--borde); }

/* ── 16. Visor ────────────────────────────────────────────────── */
.visor {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: rgba(2, 2, 6, .97); color: var(--texto);
}
.visor::backdrop { background: rgba(2, 2, 6, .6); }
.visor[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.visor-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--margen); }
.visor-tit { min-width: 0; }
.visor-tit strong { display: block; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.visor-tit span { font-size: 12.5px; color: var(--mudo); }
.visor-media { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 var(--margen); }
.visor-media img, .visor-media video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.visor-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px var(--margen) 18px; font-size: 13px; color: var(--mudo); }
.visor-pie .fila { gap: 8px; }
.visor-texto { max-width: 70ch; color: var(--texto-2); }

/* ── 17. Panel ────────────────────────────────────────────────── */
.panel { width: 100%; max-width: 1080px; margin: 0 auto; padding: 28px var(--margen) 64px; display: flex; flex-direction: column; gap: 24px; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.panel-acceso { width: 100%; max-width: 420px; margin: 24px auto 0; }
.form { display: flex; flex-direction: column; gap: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label { font-size: 14px; font-weight: 600; }
.campo .ayuda { font-size: 12px; color: var(--mudo); }
.campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.entrada {
  width: 100%; height: 32px; padding: 0 12px;
  border: 1px solid var(--borde-fuerte); border-radius: 6px; background: var(--fondo); color: var(--texto); font-size: 14px;
}
textarea.entrada { height: auto; min-height: 76px; padding: 8px 12px; line-height: 1.5; resize: vertical; }
select.entrada { padding-right: 32px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mudo) 50%), linear-gradient(135deg, var(--mudo) 50%, transparent 50%); background-position: calc(100% - 16px) 13px, calc(100% - 11px) 13px; background-size: 5px 5px; background-repeat: no-repeat; }
.entrada:focus { outline: none; border-color: var(--acento); box-shadow: inset 0 0 0 1px var(--acento); }
.entrada::placeholder { color: var(--mudo); opacity: 1; }
.soltar {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 180px; padding: 24px; border: 1px dashed var(--borde-fuerte); border-radius: 8px;
  background: var(--fondo); color: var(--mudo); text-align: center; cursor: pointer;
}
.soltar:hover, .soltar.encima { border-color: var(--acento); background: var(--tarjeta); color: var(--texto-2); }
.soltar svg { width: 24px; height: 24px; }
.soltar strong { color: var(--texto); font-weight: 600; }
.vista { position: relative; border: 1px solid var(--borde); border-radius: 8px; overflow: hidden; background: #000; }
.vista img, .vista video { width: 100%; max-height: 420px; object-fit: contain; }
.vista .btn { position: absolute; right: 10px; top: 10px; }
.progreso { height: 6px; border-radius: 999px; background: var(--hueco); overflow: hidden; }
.progreso > i { display: block; height: 100%; width: 0; background: var(--oro); transition: width .2s; }
.flash { padding: 12px 16px; border: 1px solid var(--n2); border-radius: 6px; background: var(--tarjeta); color: var(--texto); font-size: 14px; }
.flash-error { border-color: #8e3b3b; background: #231111; color: #f6c9c9; }
.lista-panel { list-style: none; }
.lista-panel li { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-top: 1px solid var(--borde); }
.lista-panel li:first-child { border-top: 0; }
.lista-panel .mini { width: 56px; height: 42px; border-radius: 4px; overflow: hidden; background: #000; }
.lista-panel .mini img, .lista-panel .mini video { width: 100%; height: 100%; object-fit: cover; }
.lista-panel .fila-error { display: block; margin-top: 4px; color: #f2716b; font-size: 12.5px; line-height: 1.45; }
.panel-aviso { border-color: var(--oro); }
.panel-aviso h2 { color: var(--oro); }
.lista-panel .mini-nota { display: grid; place-items: center; width: 100%; height: 100%; background: var(--hueco); font: 600 18px/1 var(--mono); color: var(--mudo); }
.lista-panel strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lista-panel span { font-size: 12px; color: var(--mudo); }
.lista-panel .fila { flex-wrap: nowrap; }
.pasos { padding-left: 1.4em; display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--texto-2); }

/* ── 18. Pie y ajustes ────────────────────────────────────────── */
.pie { border-top: 1px solid var(--borde); }
.pie-in {
  width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px var(--margen) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  font-size: 12px; color: var(--mudo);
}
.pie-marca { display: inline-flex; align-items: center; gap: 10px; }
.pie nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ── 19. Entrada (portada) ─────────────────────────────────────
   El nudo dorado sobre el negro del estudio. Solo con html.con-umbral,
   que pone el script del <head> de la portada (ver assets/entrada.js). */
.umbral { display: none; }
html.con-umbral { overflow: hidden; }
.con-umbral .umbral {
  position: fixed; inset: 0; z-index: 300; display: block;
  background: var(--negro); color: var(--crema); transition: opacity .9s ease;
}
.umbral.fuera { opacity: 0; pointer-events: none; }
.umbral-lienzo { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.umbral.con-3d .umbral-lienzo { opacity: 1; }
.umbral-quieta { display: none; }
.umbral.sin-3d .umbral-quieta { display: block; position: absolute; left: 50%; top: 40%; width: min(58vh, 84vw); height: auto; transform: translate(-50%, -50%); }
/* El nudo es grande y su parte baja puede quedar detrás del nombre: un
   degradado negro (alto calculado en entrada.js) lo funde para leerlo bien */
.umbral.con-3d::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--sombra, 45%); pointer-events: none;
  background: linear-gradient(to top, var(--negro) 0%, rgba(6, 6, 14, .9) 42%, rgba(6, 6, 14, 0) 100%);
  transition: opacity .4s ease;
}
.umbral.rompe::after { opacity: 0; }
.umbral-txt {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: max(64px, 11vh);
  display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 0 24px; text-align: center;
  transition: opacity .4s ease;
}
.umbral.rompe .umbral-txt, .umbral.rompe .umbral-pie { opacity: 0; }
.umbral-eye { font: 400 11px/1.6 'Michroma', var(--sans); letter-spacing: .42em; text-transform: uppercase; color: var(--oro); }
.umbral-nombre { font: 400 clamp(19px, 3vw, 38px)/1.3 'Michroma', var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--crema); text-wrap: balance; }
.umbral-sub { font: 400 12px/1.6 'IBM Plex Mono', var(--mono); letter-spacing: .06em; color: var(--mudo); }
.umbral-boton {
  margin-top: 14px; display: inline-flex; align-items: center; gap: 12px; padding: 15px 30px;
  border: 1px solid var(--oro); color: var(--oro);
  font: 400 11px/1 'Michroma', var(--sans); letter-spacing: .3em; text-transform: uppercase;
  transition: background-color .3s, color .3s, letter-spacing .3s;
}
.umbral-boton:hover, .umbral-boton:focus-visible { background: var(--oro); color: var(--negro); text-decoration: none; letter-spacing: .36em; }
.umbral-pie {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 22px; text-align: center;
  font: 400 10px/1 'IBM Plex Mono', var(--mono); letter-spacing: .22em; color: var(--mudo);
  animation: umbral-latido 3s ease-in-out infinite;
}
@keyframes umbral-latido { 50% { opacity: .35; } }
@media (max-width: 480px) {
  .umbral-eye { font-size: 9.5px; letter-spacing: .28em; }
}
@media (max-height: 560px) {
  .umbral-txt { bottom: 40px; gap: 8px; }
  .umbral-sub, .umbral-pie { display: none; }
  .umbral-boton { margin-top: 6px; padding: 12px 24px; }
}

@media (max-width: 1180px) {
  .inicio { grid-template-columns: 260px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "izq centro" "der centro"; }
}
@media (max-width: 1012px) {
  .repo-grid { grid-template-columns: minmax(0, 1fr); }
  .acerca { order: -1; }
  .acerca > section:not(:first-child) { display: none; }
  .acerca > section:first-child { padding-bottom: 0; }
  .panel-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .inicio { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "centro" "izq" "der"; }
}
@media (max-width: 640px) {
  .buscador { display: none; }
  .cab-fila { padding-top: 12px; padding-bottom: 12px; min-height: 56px; }
  .miga .largo { display: none; }
  .miga .corto { display: inline; }
  .md { padding: 22px 16px; font-size: 15px; }
  .md h1 { font-size: 1.75em; }
  .md h2 { font-size: 1.35em; }
  .panel .entrada { font-size: 16px; height: 40px; }
  .panel textarea.entrada { height: auto; }
  .panel .btn { height: 40px; }
  .panel .btn-peq { height: 32px; }
  .lista-panel li { grid-template-columns: 48px minmax(0, 1fr); }
  .lista-panel li > .fila { grid-column: 1 / -1; justify-content: flex-end; }
  .vitrina-ctrl .mono { display: none; }
}
@media (max-width: 420px) {
  .cab-der .btn-primario { padding: 0 10px; }
  .miga .dueno { display: none; }
  .miga .dueno + .sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  :root { --cruce: 0s; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .vitrina-barra { display: none; }
}
@media print {
  .cab, .pie, .cajon, .visor { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ── 20. Detalles de la portada ───────────────────────────────────
   Léeme justificado y homogéneo; el nombre como un letrero de neón
   que cambia de color; el menú se hace notar hasta que se abre. */
.leeme p { font-size: 16px; line-height: 1.65; color: var(--texto); text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.neon {
  color: #ffd76a; border-bottom-color: var(--borde);
  text-shadow: 0 0 1px #fff, 0 0 6px currentColor, 0 0 16px currentColor, 0 0 34px currentColor;
  animation: neon-color 14s linear infinite, neon-parpadeo 9s steps(1, end) infinite;
}
@keyframes neon-color {
  0%, 100% { color: #ffd76a; }
  20% { color: #ff4fa3; }
  40% { color: #7c6cff; }
  60% { color: #36e2d6; }
  80% { color: #ff7a3d; }
}
@keyframes neon-parpadeo {
  0%, 100% { opacity: 1; }
  41% { opacity: .45; } 42% { opacity: 1; } 43.5% { opacity: .7; } 44.5% { opacity: 1; }
  88% { opacity: .55; } 89% { opacity: 1; }
}
html:not(.menu-visto) .cab [data-menu] { animation: menu-llama 2.8s ease-in-out infinite; }
@keyframes menu-llama {
  0%, 100% { color: var(--oro); border-color: var(--oro); box-shadow: 0 0 0 0 rgba(212, 181, 90, 0); }
  33% { color: #ff4fa3; border-color: #ff4fa3; box-shadow: 0 0 12px 1px rgba(255, 79, 163, .45); }
  66% { color: #36e2d6; border-color: #36e2d6; box-shadow: 0 0 12px 1px rgba(54, 226, 214, .45); }
}
.neon-lema { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: .01em; line-height: 1.3; animation-delay: -7s, -4s; }
@media (prefers-reduced-motion: reduce) {
  .neon { animation: none; }
  html:not(.menu-visto) .cab [data-menu] { animation: none; color: var(--oro); border-color: var(--oro); }
}
