/* ══════════════════════════════════════════════
   SERIES DE MMARIA · estilo común y fila de tarjetas
   Lo usan todas las páginas de cada serie (Noticias, Bibliografía).
   La lista de páginas de cada serie está en series.js.
   12 nov 2026
══════════════════════════════════════════════ */

/* Color de la serie por defecto (series.js lo cambia en cada página) */
:root { --serie: #ff702c; }

/* ── ESTILO BASE: editorial en blanco y negro (páginas con tema: no se aplica a las que conservan su diseño original) ── */
body.serie-tema {
  --milk: #ffffff;
  --milk-warm: #f3f3f3;
  --chai: #dedede;
  --cacao: #222222;
  --cacao-mid: #555555;
  --nesquik: #8a8a8a;
  --caramel: #111111;
  --caramel-lt: #bbbbbb;
  --mandarina: #111111;
  --mandarina-lt: #cccccc;
  --pistacho-lt: #ffffff;
  --mm-brown: #111111;
  --gold: #555555;
  --mpi-green: #111111;
}
body.serie-tema { background: #ffffff; color: #111111; }
body.serie-tema a { color: #111111; text-decoration-thickness: 1px; text-underline-offset: 2px; }
body.serie-tema .mmaria-bar .mm-crumb { color: var(--serie); }

body.serie-tema h1, body.serie-tema .opcion-titulo, body.serie-tema .ficha-cab h3, body.serie-tema .supuesto h3, body.serie-tema .destacado h4, body.serie-tema .subtitle, body.serie-tema .cierre p, body.serie-tema .puente h3, body.serie-tema .idea-caja h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
}
body.serie-tema h1 { font-weight: 800; }
body.serie-tema h1 .ti { font-size: 1.35em; vertical-align: -0.2em; margin-right: 4px; }
body.serie-tema .cierre-adorno .ti { font-size: 30px; }
body.serie-tema h1 .emoji-serie { font-size: 1.15em; vertical-align: -0.06em; margin-right: 8px; }
body.serie-tema .subtitle, body.serie-tema .cierre p { font-weight: 400; }
body.serie-tema .opcion-titulo { font-size: 30px; line-height: 1.15; border-bottom: 1px solid #111111; padding-bottom: 10px; margin-bottom: 12px; }
body.serie-tema .opcion-label { letter-spacing: 3px; color: #111111; }
body.serie-tema .ficha-cab h3 { font-size: 23px; }
body.serie-tema .divider { border-top: 1px solid #111111; }

body.serie-tema .toc a { border-radius: 0; border-color: #111111; }
body.serie-tema .toc a:hover { background: #111111; color: #ffffff; border-color: #111111; }

/* La fila de tarjetas sustituye a los conmutadores de antes */
body.serie-tema .paginas-switch { display: none !important; }

body.serie-tema .cod { background: #111111; color: #ffffff; border-radius: 0; }
body.serie-tema .eff { background: #ffffff !important; color: #111111 !important; border: 1px solid #111111; border-radius: 0; }
body.serie-tema .anadido { border-radius: 0; }

body.serie-tema .ficha {
  border-radius: 0;
  box-shadow: none;
  border-top: 3px solid #111111;
  padding: 20px 0 22px;
  background: transparent;
}
body.serie-tema .ficha-anadida { border-left: none; }
body.serie-tema #n-16 { background: #eff2f8; padding: 20px 20px 22px; border-top-color: var(--denim); }
body.serie-tema .porque, body.serie-tema .okbox, body.serie-tema .supuesto, body.serie-tema .destacado, body.serie-tema .microcopy, body.serie-tema .resumen, body.serie-tema .tabla-mini, body.serie-tema .leyenda div, body.serie-tema .captura { border-radius: 0; }
body.serie-tema .porque { background: #f3f3f3; color: #333333; }
body.serie-tema .okbox { background: #ffffff; color: #111111; border: 1px solid #111111; }
body.serie-tema .okbox > b { color: #111111; }
body.serie-tema .ya-esta span { color: #111111; }
body.serie-tema .resumen { box-shadow: none; border: 1px solid #111111; }
body.serie-tema .resumen th { background: #111111; color: #ffffff; }
body.serie-tema .leyenda div { border-color: #111111; }
body.serie-tema .supuesto { border: 1px dashed #111111; background: #ffffff; }
body.serie-tema .destacado { background: #ffffff; border: 1px solid #111111; border-left: 5px solid #111111; }
body.serie-tema .destacado-cap { color: #111111; }
body.serie-tema .nota-dev { background: #111111; border-radius: 0; }
body.serie-tema .nota-dev-cap, body.serie-tema .nota-dev li::before { color: #ffffff; }
body.serie-tema .nota-dev code { color: #ffffff; background: rgba(255,255,255,.14); }
body.serie-tema .puente { background: #111111; border-radius: 0; }
body.serie-tema .puente-btn { border-radius: 0; color: #111111; }
body.serie-tema .volver-arriba { border-radius: 0; border-color: #111111; box-shadow: none; }


/* ── FONDO GRIS CLARO (páginas de lectura; las enmiendas siguen en blanco) ── */
body.serie-gris { background: #f4f4f3; }
body.serie-gris .ficha { background: #ffffff; padding: 20px 24px 22px; }
body.serie-gris .indice-serie { background: #ffffff; }
body.serie-gris .indice-serie a, body.serie-gris .indice-serie .sin-enlace { padding-left: 12px; padding-right: 12px; }
body.serie-gris .porque { background: #f4f4f3; }

/* ── FILA DE TARJETAS DE LA SERIE ── */
.serie-rail {
  background: #ffffff;
  border-bottom: 1px solid #111111;
  padding: 14px 20px 16px;
  font-family: 'DM Sans', sans-serif;
}
.serie-wrap { max-width: 860px; margin: 0 auto; }
.serie-cab {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #111111;
  margin: 0 0 10px;
}
.serie-cab a { color: #111111; text-decoration: none; }
.serie-cab a:hover { text-decoration: underline; }
.serie-punto { width: 9px; height: 9px; background: var(--serie); display: inline-block; flex-shrink: 0; }
.serie-lista {
  list-style: none;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 4px;
  margin: 0;
  scrollbar-width: thin;
}
.serie-lista li { flex: 1 0 112px; max-width: 160px; margin: 0; padding: 0; background: none; border: 0; }
.serie-lista li::before, .serie-lista li::after { content: none; }
.serie-tarjeta {
  display: block;
  height: 100%;
  border: 1px solid #111111;
  padding: 8px 10px 9px;
  background: #ffffff;
  color: #111111;
  text-decoration: none;
  line-height: 1.3;
  transition: background .15s;
}
a.serie-tarjeta:hover { background: #f3f3f3; }
.serie-tarjeta .n { display: block; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 18px; line-height: 1; }
.serie-tarjeta .t { display: block; font-size: 12.5px; font-weight: 500; margin: 4px 0 2px; }
.serie-tarjeta .k { display: block; font-size: 11px; color: #666666; }
.serie-tarjeta.serie-inicio { border-color: var(--serie); }
.serie-tarjeta.actual { background: var(--serie); border-color: var(--serie); color: #ffffff; }
.serie-tarjeta.actual .k { color: rgba(255,255,255,.85); }
a.serie-tarjeta.actual:hover { background: var(--serie); }
.serie-tarjeta.pronto { border-style: dashed; color: #8a8a8a; }
.serie-tarjeta.pronto .k { color: #9a9a9a; }

/* ── HOJA DE TRABAJO (solo en las páginas «Para desarrollo») ── */
.hoja-trabajo .okbox li { padding-left: 26px; cursor: pointer; margin-top: 6px; user-select: none; }
.hoja-trabajo .okbox li::before {
  content: "";
  left: 0;
  top: 3px;
  width: 14px;
  height: 14px;
  border: 1.5px solid #111111;
  background: #ffffff;
  color: #ffffff;
  font-size: 11px;
  line-height: 13px;
  text-align: center;
}
.hoja-trabajo .okbox li:hover::before { background: #eeeeee; }
.hoja-trabajo .okbox li.hecho { text-decoration: line-through; color: #9a9a9a; }
.hoja-trabajo .okbox li.hecho::before { content: "✓"; background: #111111; }
.hoja-trabajo .ficha.ficha-hecha .ficha-cab h3 { text-decoration: line-through; text-decoration-thickness: 1.5px; color: #9a9a9a; }
.hoja-trabajo .resumen tr.hecha td a { text-decoration: line-through; color: #9a9a9a; }
.hoja-trabajo .resumen tr.hecha td:first-child .cod { background: #9a9a9a; }

.progreso { display: flex; align-items: center; gap: 12px; margin: -2px 0 14px; font-family: 'DM Sans', sans-serif; }
.progreso-barra { flex: 1; height: 3px; background: #e6e6e6; }
.progreso-barra span { display: block; height: 3px; width: 0; background: var(--serie); transition: width .25s; }
.progreso-num { font-size: 11px; letter-spacing: 1.5px; color: #111111; white-space: nowrap; }

.progreso-global {
  border-top: 3px solid #111111;
  border-bottom: 1px solid #111111;
  padding: 16px 0 14px;
  margin: -24px 0 48px;
  font-family: 'DM Sans', sans-serif;
}
.progreso-global .fila { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.progreso-global .cifra { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 34px; line-height: 1; color: #111111; }
.progreso-global .texto { font-size: 14px; color: #111111; }
.progreso-global button {
  margin-left: auto;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  background: #ffffff;
  border: 1px solid #111111;
  padding: 5px 12px;
  cursor: pointer;
  color: #111111;
}
.progreso-global button:hover { background: #111111; color: #ffffff; }
.progreso-global .progreso-barra, .progreso-global .progreso-barra span { height: 4px; }
.progreso-global .nota { font-size: 12.5px; line-height: 1.55; color: #555555; margin-top: 12px; max-width: 720px; }
.progreso-global .nota b { color: #111111; }

/* ── ÍNDICE DE SERIE (página 0) ── */
.indice-serie { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--mm-brown, #111111); }
.indice-serie li { border-bottom: 1px solid var(--chai, #dedede); }
.indice-serie a, .indice-serie .sin-enlace {
  display: grid;
  grid-template-columns: 26px 150px 190px 1fr;
  gap: 0 14px;
  align-items: baseline;
  padding: 8px 0;
  color: var(--mm-brown, #111111);
  text-decoration: none;
}
.indice-serie a:hover { background: rgba(0,0,0,.03); }
.indice-serie .n { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 18px; line-height: 1; color: var(--serie); }
.indice-serie .t { font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 16px; line-height: 1.3; }
.indice-serie .d { font-family: 'DM Sans', sans-serif; font-size: 13px; line-height: 1.45; color: var(--cacao-mid, #555555); }
.indice-serie .k { font-family: 'DM Sans', sans-serif; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; white-space: nowrap; color: var(--cacao-mid, #555555); }
.indice-serie .sin-enlace, .indice-serie .sin-enlace .t, .indice-serie .sin-enlace .k { color: #8a8a8a; }

@media (max-width: 768px) {
  .serie-rail { padding: 12px 14px 14px; }
  .serie-lista li { flex: 0 0 128px; }
  .serie-sep, .serie-num { display: none; }
  .indice-serie a, .indice-serie .sin-enlace { grid-template-columns: 26px 1fr auto; }
  .indice-serie .d { grid-column: 2 / 4; }
}
