/* Censos – página de búsqueda y exploración */
:root {
  --cz-ink: #1f2a33;
  --cz-muted: #5f6b75;
  --cz-line: #e3ded5;
  --cz-paper: #f8f5ef;
  --cz-accent: #7a3e1d;
  --cz-y1798: #8a5a00;  --cz-y1798-bg: #fbf1dc;
  --cz-y1816: #6d4a8c;  --cz-y1816-bg: #efe7f6;
  --cz-y1834: #1d6b58;  --cz-y1834-bg: #e2f2ed;
  --cz-y1850: #2a5a96;  --cz-y1850-bg: #e3ecf8;
  --cz-y1857: #7a3b78;  --cz-y1857-bg: #f4e6f3;
  --cz-y1767: #4f5d16;  --cz-y1767-bg: #eef2dc;
  --cz-y1881: #a3362b;  --cz-y1881-bg: #fbe8e5;
}

.cz-serif, .cz-hero h1, .cz-page h2, .cz-page h3 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--cz-ink);
}

/* Hero + búsqueda */
.cz-hero {
  background: var(--cz-paper);
  border-bottom: 1px solid var(--cz-line);
  padding: 2.5rem 0 2rem;
}
.cz-eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .8rem;
  color: var(--cz-accent);
  font-weight: 600;
  margin-bottom: .25rem;
}
.cz-hero h1 { font-size: 2.25rem; margin-bottom: .5rem; }
.cz-lead { font-size: 1.1rem; color: var(--cz-muted); max-width: 46rem; }
.cz-stats { color: var(--cz-ink); font-size: .95rem; margin: .75rem 0 1.25rem; }
.cz-stats strong { font-size: 1.15rem; }
.cz-stats span + span:before { content: "·"; margin: 0 .6rem; color: var(--cz-muted); }

.cz-search { max-width: 40rem; }
.cz-search .form-control { border-color: #cfc8bc; }
.cz-search .btn { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; }
.cz-search .btn:hover { background: #63311a; border-color: #63311a; }
.cz-hint { font-size: .875rem; color: var(--cz-muted); margin-top: .5rem; max-width: 40rem; }

.cz-page { padding: 2rem 0 3rem; }
.cz-page h2 { font-size: 1.6rem; margin-bottom: .25rem; }
.cz-sub { color: var(--cz-muted); margin-bottom: 1.25rem; }

/* Pasos */
.cz-steps { display: flex; flex-wrap: wrap; gap: 1rem; margin: 0 0 2rem; padding: 0; list-style: none; counter-reset: cz; }
.cz-steps li { flex: 1 1 14rem; counter-increment: cz; padding-left: 2.4rem; position: relative; color: var(--cz-muted); font-size: .95rem; }
.cz-steps li:before {
  content: counter(cz); position: absolute; left: 0; top: 0;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--cz-accent); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.cz-steps strong { color: var(--cz-ink); display: block; }

/* Chips de año */
.cz-y { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .45rem; border-radius: .25rem; line-height: 1.4; }
.cz-y-1798 { color: var(--cz-y1798); background: var(--cz-y1798-bg); }
.cz-y-1816 { color: var(--cz-y1816); background: var(--cz-y1816-bg); }
.cz-y-1834 { color: var(--cz-y1834); background: var(--cz-y1834-bg); }
.cz-y-1850 { color: var(--cz-y1850); background: var(--cz-y1850-bg); }
.cz-y-1857 { color: var(--cz-y1857); background: var(--cz-y1857-bg); }
.cz-y-1767 { color: var(--cz-y1767); background: var(--cz-y1767-bg); }
.cz-y-1881 { color: var(--cz-y1881); background: var(--cz-y1881-bg); }

/* Filtro por censo */
.cz-years { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.cz-year {
  text-align: left; background: #fff; border: 1px solid var(--cz-line); border-top: 4px solid var(--cz-line);
  border-radius: .35rem; padding: .75rem .9rem; cursor: pointer; color: var(--cz-ink); width: 100%;
}
.cz-year:hover { border-color: #c9c1b4; }
.cz-year:focus { outline: 2px solid var(--cz-accent); outline-offset: 2px; }
.cz-year .cz-year-n { font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; display: block; }
.cz-year .cz-year-t { font-size: .85rem; color: var(--cz-muted); display: block; margin: .15rem 0 .35rem; }
.cz-year .cz-year-c { font-size: .8rem; color: var(--cz-ink); }
.cz-year[data-year="all"] { border-top-color: var(--cz-ink); }
.cz-year[data-year="1798"] { border-top-color: var(--cz-y1798); }
.cz-year[data-year="1816"] { border-top-color: var(--cz-y1816); }
.cz-year[data-year="1834"] { border-top-color: var(--cz-y1834); }
.cz-year[data-year="1850"] { border-top-color: var(--cz-y1850); }
.cz-year[data-year="1857"] { border-top-color: var(--cz-y1857); }
.cz-year[data-year="1767"] { border-top-color: var(--cz-y1767); }
.cz-year[data-year="1881"] { border-top-color: var(--cz-y1881); }
.cz-year.active { background: var(--cz-paper); box-shadow: inset 0 0 0 2px var(--cz-ink); }

/* Barra de filtro */
.cz-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-bottom: 1rem; }
.cz-toolbar .form-control { max-width: 20rem; }
.cz-count { color: var(--cz-muted); font-size: .9rem; }

/* Grilla de colonias */
.cz-colonies { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .6rem; }
.cz-colony {
  display: block; background: #fff; border: 1px solid var(--cz-line); border-radius: .35rem;
  padding: .65rem .8rem; color: var(--cz-ink); text-decoration: none;
}
.cz-colony:hover, .cz-colony:focus { border-color: var(--cz-accent); text-decoration: none; color: var(--cz-ink); box-shadow: 0 2px 6px rgba(0,0,0,.06); }
.cz-colony-name { font-weight: 600; font-size: 1.05rem; display: block; }
.cz-colony-meta { font-size: .8rem; color: var(--cz-muted); display: block; margin: .1rem 0 .4rem; }
.cz-colony .cz-y { margin-right: .2rem; }
.cz-empty { display: none; color: var(--cz-muted); padding: 1rem 0; }

/* Letras A–Z */
.cz-letters { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; }
.cz-letters a, .cz-letters span {
  min-width: 1.9rem; text-align: center; padding: .2rem .35rem; border-radius: .25rem;
  font-weight: 600; font-size: .9rem;
}
.cz-letters a { color: var(--cz-accent); border: 1px solid var(--cz-line); background: #fff; }
.cz-letters a:hover { background: var(--cz-paper); text-decoration: none; }
.cz-letters span { color: #c3bdb3; }

/* Tabla apellido × censo */
.cz-matrix { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.cz-matrix th, .cz-matrix td { border-bottom: 1px solid var(--cz-line); padding: .35rem .6rem; vertical-align: middle; }
.cz-matrix thead th {
  position: sticky; top: 56px; z-index: 2; background: #fff;
  border-bottom: 2px solid var(--cz-ink); font-size: .85rem; white-space: nowrap;
}
.cz-matrix thead th.cz-col { text-align: center; width: 7rem; }
.cz-matrix td.cz-name { font-weight: 600; }
.cz-matrix td.cz-cell { text-align: center; padding: 0; }
.cz-matrix td.cz-cell a {
  display: block; padding: .35rem .5rem; font-weight: 600; text-decoration: none; border-radius: .2rem;
}
.cz-matrix td.cz-cell a small { font-weight: 400; color: var(--cz-muted); }
.cz-matrix td.cz-cell.y1798 a { color: var(--cz-y1798); } .cz-matrix td.cz-cell.y1798 a:hover { background: var(--cz-y1798-bg); }
.cz-matrix td.cz-cell.y1816 a { color: var(--cz-y1816); } .cz-matrix td.cz-cell.y1816 a:hover { background: var(--cz-y1816-bg); }
.cz-matrix td.cz-cell.y1834 a { color: var(--cz-y1834); } .cz-matrix td.cz-cell.y1834 a:hover { background: var(--cz-y1834-bg); }
.cz-matrix td.cz-cell.y1850 a { color: var(--cz-y1850); } .cz-matrix td.cz-cell.y1850 a:hover { background: var(--cz-y1850-bg); }
.cz-matrix td.cz-cell.y1857 a { color: var(--cz-y1857); } .cz-matrix td.cz-cell.y1857 a:hover { background: var(--cz-y1857-bg); }
.cz-matrix td.cz-cell.y1767 a { color: var(--cz-y1767); } .cz-matrix td.cz-cell.y1767 a:hover { background: var(--cz-y1767-bg); }
.cz-matrix td.cz-cell.y1881 a { color: var(--cz-y1881); } .cz-matrix td.cz-cell.y1881 a:hover { background: var(--cz-y1881-bg); }
.cz-matrix td.cz-none { color: #cdc6bb; text-align: center; }
.cz-matrix tbody tr:not(.cz-letter):hover td { background: #fcfbf8; }
.cz-matrix tr.cz-letter td {
  background: var(--cz-paper); font-family: Georgia, serif; font-weight: 700; color: var(--cz-accent);
  font-size: 1.05rem; padding-top: .5rem; scroll-margin-top: 100px;
}
.cz-note { font-size: .875rem; color: var(--cz-muted); }

/* Resultados de búsqueda */
.cz-result { border: 1px solid var(--cz-line); border-radius: .35rem; margin-bottom: 1.25rem; overflow: hidden; background: #fff; }
.cz-result-h { background: var(--cz-paper); padding: .6rem .8rem; border-bottom: 1px solid var(--cz-line); }
.cz-result-h h3 { font-size: 1.25rem; margin: 0; display: inline; }
.cz-result-h .cz-count { margin-left: .5rem; }
.cz-result .cz-matrix thead th { position: static; }

/* Suscripción */
.cz-subscribe { background: var(--cz-paper); border: 1px solid var(--cz-line); border-radius: .35rem; padding: 1.25rem; margin-top: 2.5rem; }
.cz-subscribe h3 { font-size: 1.15rem; margin-bottom: .25rem; }
.cz-subscribe p { color: var(--cz-muted); font-size: .9rem; }
.cz-subscribe .input-group { max-width: 28rem; }

/* En las vistas de colonia y búsqueda el encabezado se reduce para que el contenido quede a la vista */
.cz-hero-compact { padding: 1.25rem 0 1.25rem; }
.cz-hero-compact h1 { font-size: 1.35rem; margin-bottom: .75rem; }
.cz-hero-compact .cz-eyebrow, .cz-hero-compact .cz-lead,
.cz-hero-compact .cz-stats, .cz-hero-compact .cz-hint { display: none; }

@media (max-width: 575px) {
  .cz-hero h1 { font-size: 1.7rem; }
  .cz-hero-compact h1 { font-size: 1.2rem; }
  .cz-hide-xs { display: none; }
  .cz-matrix { font-size: .9rem; }
  .cz-matrix td.cz-name { word-break: break-word; }
  .cz-matrix th, .cz-matrix td { padding: .3rem .35rem; }
  .cz-matrix thead th.cz-col { width: auto; }
  .cz-matrix td.cz-cell a small { display: none; }
}

/* ================= Listado de familias (censosDetails.php) ================= */
.cz-title { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.cz-title .cz-y { font-size: .9rem; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; }
.cz-title + .cz-sub { margin-bottom: 1.25rem; }
.cz-muted { color: var(--cz-muted); }

/* Recuadro "Otros censos" */
.cz-others {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1.5rem;
  background: #fff; border: 1px solid var(--cz-line); border-radius: .35rem;
  padding: .75rem 1.1rem; margin-bottom: .75rem; font-size: .9rem;
}
.cz-others-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.cz-others-label { color: var(--cz-ink); font-weight: 600; margin-right: .25rem; }
.cz-chip-link { font-size: .85rem; padding: .25rem .6rem; text-decoration: none; }
.cz-chip-link:hover { text-decoration: none; filter: brightness(.95); box-shadow: inset 0 0 0 1px currentColor; }

.cz-help { background: var(--cz-paper); border: 1px solid var(--cz-line); border-radius: .35rem; padding: .7rem 1.1rem; margin-bottom: 2rem; font-size: .9rem; }
.cz-help summary { cursor: pointer; font-weight: 600; color: var(--cz-accent); }
.cz-help[open] summary { margin-bottom: .6rem; }
.cz-help p, .cz-help ul { margin-bottom: .6rem; color: var(--cz-ink); line-height: 1.55; }
.cz-dead-key { font-weight: 600; color: #6b6259; }

.cz-legend { font-size: .85rem; color: var(--cz-muted); margin: 0 0 .6rem; display: flex; align-items: center; gap: .5rem; }
.cz-legend-bar { display: inline-block; width: 4px; height: 1.1em; background: var(--cz-accent); border-radius: 1px; }

/* Tarjeta de familia */
.cz-hh { background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; margin-bottom: 2rem; overflow: hidden; box-shadow: 0 1px 3px rgba(60, 40, 20, .06); }
.cz-hh-h { background: var(--cz-paper); border-bottom: 1px solid #d9d2c6; padding: .85rem 1.1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.cz-hh-h h3 { font-size: 1.2rem; margin: 0; }
.cz-hh-of { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .95rem; font-weight: 400; color: var(--cz-muted); margin-left: .35rem; }
.cz-hh-meta { font-size: .85rem; color: var(--cz-muted); margin-left: auto; }

/* Tabla de integrantes: bordes en todas las celdas, filas alternadas */
.cz-members { width: 100%; border-collapse: collapse; }
.cz-members th, .cz-members td { padding: .65rem 1.1rem; border: 1px solid #e6e0d6; vertical-align: top; line-height: 1.4; }
.cz-members tr > :first-child { border-left: 0; }
.cz-members tr > :last-child { border-right: 0; }
.cz-members thead th { border-top: 0; }
.cz-members tbody tr:last-child td { border-bottom: 0; }
.cz-members thead th {
  background: #f1ece3; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em;
  color: #4d4640; font-weight: 700; white-space: nowrap; border-bottom: 2px solid #d9d2c6;
}
.cz-members tbody tr:nth-child(even) td { background: #fbf9f5; }
.cz-members tbody tr:hover td { background: #f6f1e8; }
.cz-members .cz-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cz-person { font-weight: 500; }
.cz-dash { color: #cdc6bb; }
.cz-circa { color: var(--cz-muted); font-size: .85em; }
.cz-notes { font-size: .875rem; color: #4a5560; min-width: 12rem; }
.cz-notes [lang="en"] { font-style: italic; }

/* Persona con el apellido buscado */
.cz-members tr.cz-match td:first-child { box-shadow: inset 4px 0 0 var(--cz-accent); }
.cz-members tr.cz-match .cz-ln { font-weight: 700; }

/* Fallecidos y quienes ya no figuran */
.cz-members tr.cz-dead td, .cz-members tr.cz-gone td { color: #7d756c; }
.cz-death { font-weight: 600; white-space: nowrap; }

@media (max-width: 767px) {
  .cz-hh-meta { margin-left: 0; }
  .cz-members thead { display: none; }
  .cz-members, .cz-members tbody, .cz-members tr, .cz-members td { display: block; width: 100%; }
  .cz-members tr { padding: .75rem 1rem; border-bottom: 1px solid #e6e0d6; display: flex; flex-wrap: wrap; gap: .2rem 1rem; }
  .cz-members tbody tr:last-child { border-bottom: 0; }
  .cz-members tbody tr:nth-child(even) { background: #fbf9f5; }
  .cz-members tbody tr:nth-child(even) td, .cz-members tbody tr:hover td { background: transparent; }
  .cz-members td { border: 0; padding: 0; width: auto; min-width: 0; text-align: left !important; font-size: .9rem; }
  .cz-members td:empty, .cz-members td.cz-blank { display: none; }
  .cz-members td.cz-person { flex-basis: 100%; font-size: 1rem; }
  .cz-members td.cz-notes { flex-basis: 100%; }
  .cz-members td:not(.cz-person):before { content: attr(data-label) ": "; color: var(--cz-muted); font-size: .8rem; }
  .cz-members tr.cz-match td:first-child { box-shadow: none; }
  .cz-members tr.cz-match { box-shadow: inset 4px 0 0 var(--cz-accent); }
}

/* Secciones por país en la grilla de colonias */
.cz-country + .cz-country { margin-top: 2rem; }
.cz-country-h { font-size: 1.2rem; margin-bottom: .75rem; padding-bottom: .4rem; border-bottom: 1px solid var(--cz-line); }
.cz-country-h .cz-count { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .85rem; font-weight: 400; margin-left: .4rem; }

/* Datos de la familia (1767) y del grupo (1881) */
.cz-hh-facts { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; padding: .7rem 1.1rem; border-bottom: 1px solid #e6e0d6; font-size: .875rem; background: #fdfcf9; margin: 0; }
.cz-hh-facts div { display: flex; gap: .35rem; }
.cz-hh-facts dt { font-weight: 600; color: var(--cz-muted); }
.cz-hh-facts dd { margin: 0; color: var(--cz-ink); }
.cz-hh-note { font-size: .85rem; color: var(--cz-muted); margin: -.25rem 0 1rem; }

/* ================= Pasajeros ================= */
.cz-voyages td.cz-date { white-space: nowrap; color: var(--cz-muted); font-variant-numeric: tabular-nums; width: 8rem; }
.cz-voyages td.cz-cell a { color: var(--cz-accent); }
.cz-voyages td.cz-cell a:hover { background: var(--cz-paper); }
.cz-voyages tr.cz-letter .cz-count { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .8rem; font-weight: 400; margin-left: .4rem; }

/* ================= Cementerios ================= */
.cz-cem-cover { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: .4rem; overflow: hidden; box-shadow: 0 4px 16px rgba(60, 40, 20, .18); }
.cz-cem-cover img { display: block; width: 100%; height: auto; }
.cz-graves tbody tr { cursor: pointer; }
.cz-graves .cz-thumb-col { width: 96px; text-align: center; }
.cz-graves td.cz-thumb-col { padding-top: .4rem; padding-bottom: .4rem; }
.cz-thumb { display: block; padding: 0; border: 1px solid var(--cz-line); border-radius: .25rem; background: #f1ece3; cursor: zoom-in; overflow: hidden; width: 72px; height: 54px; }
.cz-thumb img { display: block; width: 72px; height: 54px; object-fit: cover; transition: transform .15s; }
.cz-thumb:hover img, .cz-thumb:focus img { transform: scale(1.06); }
.cz-thumb:focus { outline: 2px solid var(--cz-accent); outline-offset: 2px; }

/* Visor de fotos */
body.cz-lb-open { overflow: hidden; }
.cz-lightbox { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.cz-lightbox[hidden] { display: none; }
.cz-lb-backdrop { position: absolute; inset: 0; background: rgba(20, 16, 12, .86); }
.cz-lb-frame { position: relative; margin: 0; max-width: min(960px, 100%); width: 100%; background: #fff; border-radius: .5rem; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.cz-lb-imgwrap { position: relative; background: #1d1a17; display: flex; align-items: center; justify-content: center; }
.cz-lb-imgwrap img { display: block; max-width: 100%; max-height: calc(100vh - 9rem); width: auto; height: auto; }
.cz-lightbox figcaption { padding: .8rem 1.1rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem; }
.cz-lightbox figcaption strong { font-family: Georgia, serif; font-size: 1.15rem; color: var(--cz-ink); }
#czLbDates { color: var(--cz-ink); white-space: pre; }
.cz-lb-meta { margin-left: auto; font-size: .85rem; color: var(--cz-muted); }
.cz-lb-close { position: absolute; top: .5rem; right: .5rem; z-index: 2; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #222; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.cz-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 2.8rem; height: 3.6rem; border: 0; border-radius: .3rem;
  background: rgba(255,255,255,.85); color: #222; font-size: 2.2rem; line-height: 1; cursor: pointer; }
.cz-lb-prev { left: .5rem; } .cz-lb-next { right: .5rem; }
.cz-lb-close:hover, .cz-lb-nav:hover { background: #fff; }
.cz-lb-close:focus, .cz-lb-nav:focus { outline: 2px solid var(--cz-accent); outline-offset: 2px; }

/* ================= Recursos ================= */
.cz-res-toc { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.cz-res-toc a { background: #fff; border: 1px solid var(--cz-line); border-radius: 2rem; padding: .3rem .85rem; font-size: .9rem; color: var(--cz-accent); }
.cz-res-toc a:hover { text-decoration: none; border-color: var(--cz-accent); }
.cz-res-section { margin-bottom: 2.75rem; scroll-margin-top: 80px; }
.cz-res-section > h2 { margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 1px solid var(--cz-line); }
.cz-res-section > h2 + .cz-sub { margin-top: -.5rem; }
.cz-res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.cz-res-card { display: flex; flex-direction: column; background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; padding: 1rem 1.15rem; box-shadow: 0 1px 3px rgba(60, 40, 20, .05); }
.cz-res-card h3 { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 1.02rem; font-weight: 600; margin-bottom: .4rem; line-height: 1.35; }
.cz-res-card h3 a { color: var(--cz-ink); }
.cz-res-card h3 a:hover { color: var(--cz-accent); }
.cz-res-card p { font-size: .9rem; color: #4a5560; margin-bottom: .6rem; line-height: 1.5; }
.cz-ext { color: var(--cz-accent); font-size: .85em; }
.cz-res-domain { margin-top: auto; font-size: .8rem; color: var(--cz-muted); }
.cz-res-site { border-top: 4px solid var(--cz-accent); color: inherit; }
.cz-res-site:hover { text-decoration: none; border-color: var(--cz-accent); box-shadow: 0 3px 10px rgba(60, 40, 20, .1); }
.cz-res-site h3 { color: var(--cz-accent); }
.cz-res-site p { margin-bottom: 0; }
.cz-res-wide { grid-column: 1 / -1; }
.cz-res-chips { list-style: none; padding: 0; margin: 0 0 .75rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.cz-res-chips a { display: inline-block; background: var(--cz-paper); border: 1px solid var(--cz-line); border-radius: .25rem; padding: .25rem .6rem; font-size: .85rem; color: var(--cz-ink); }
.cz-res-chips a:hover { border-color: var(--cz-accent); color: var(--cz-accent); text-decoration: none; }
@media (max-width: 767px) {
  .cz-graves td.cz-thumb-col:before { content: none; }
  .cz-graves td.cz-thumb-col { width: auto; order: -1; }
  .cz-graves td.cz-person { flex-basis: auto; align-self: center; }
}
@media (max-width: 767px) {
  .cz-members.cz-graves tr { display: grid; grid-template-columns: 76px 1fr; column-gap: .9rem; row-gap: .1rem; align-items: start; }
  .cz-graves td.cz-thumb-col { grid-row: 1 / span 4; grid-column: 1; padding: 0; }
  .cz-graves td { grid-column: 2; }
  .cz-graves td.cz-person { font-size: 1.05rem; }
  .cz-graves td.cz-first { margin-top: -.15rem; }
  .cz-graves td.cz-first:before { content: none; }
}

/* ---------- Pasajeros: lista detallada ---------- */
.cz-badge {
  display: inline-block; font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: .7rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase;
  color: var(--cz-accent); background: #f6e9de; border-radius: 999px; padding: .1rem .5rem; vertical-align: middle; white-space: nowrap;
}
.cz-twin {
  background: var(--cz-paper); border: 1px solid var(--cz-line); border-left: 4px solid var(--cz-accent);
  border-radius: .3rem; padding: .6rem .9rem; font-size: .925rem; margin: .5rem 0 1.25rem;
}

/* ---------- Matrimonios ---------- */
.cz-m-list { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 992px) { .cz-m-list { grid-template-columns: 1fr 1fr; } }
.cz-m-card { background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; overflow: hidden; box-shadow: 0 1px 3px rgba(60, 40, 20, .06); }
.cz-m-h {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1rem;
  background: var(--cz-paper); border-bottom: 1px solid var(--cz-line); padding: .75rem 1.1rem;
}
.cz-m-h h2 { font-size: 1.2rem; margin: 0; }
.cz-m-h time { margin-left: auto; font-size: .875rem; color: var(--cz-muted); }
.cz-m-body { display: grid; grid-template-columns: 1fr 1fr; }
.cz-m-side { padding: .9rem 1.1rem 1rem; }
.cz-m-side + .cz-m-side { border-left: 1px solid var(--cz-line); }
.cz-m-side h3 {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .72rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--cz-muted); margin: 0 0 .35rem;
}
.cz-m-side > p { margin: 0 0 .75rem; }
.cz-m-name { font-weight: 600; color: var(--cz-ink); }
.cz-m-meta { display: block; font-size: .85rem; color: var(--cz-muted); }
.cz-m-parents { margin: 0; padding-top: .6rem; border-top: 1px dashed var(--cz-line); font-size: .9rem; }
.cz-m-parents dt { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--cz-muted); margin-top: .35rem; }
.cz-m-parents dd { margin: 0; }
.cz-m-parents .cz-m-name { font-weight: 500; }
@media (max-width: 575px) {
  .cz-m-body { grid-template-columns: 1fr; }
  .cz-m-side + .cz-m-side { border-left: 0; border-top: 1px solid var(--cz-line); }
}

/* =====================================================================
   Sitio: encabezado, pie, cuentas, suscripción, artículos, portada
   ===================================================================== */
label { min-width: 0 !important; }   /* style1.css forzaba 250px y desbordaba en celulares */
.av-skip { position: absolute; left: -999px; top: 0; z-index: 2000; background: #fff; padding: .5rem 1rem; }
.av-skip:focus { left: 1rem; top: .5rem; }
.av-nav .navbar-brand { font-weight: 600; letter-spacing: .01em; }
.av-brand-tld { opacity: .6; font-weight: 400; }
.av-nav .nav-link { font-size: .95rem; }
.av-nav-cta { background: var(--cz-accent); color: #fff !important; border-radius: .3rem; padding-left: .8rem !important; padding-right: .8rem !important; }
.av-nav-cta:hover { background: #8f4a24; }
@media (min-width: 992px) { .av-nav-right { margin-left: .5rem; } }
.av-banner { background: #2b2118 url("/images/web/tree.jpg") center 40% / cover no-repeat; background: #2b2118 image-set(url("/images/web/tree.webp") type("image/webp"), url("/images/web/tree.jpg") type("image/jpeg")) center 40% / cover no-repeat; text-align: center; padding: 1.1rem 1rem; }
.av-banner img { max-width: 100%; height: auto; width: 300px; }

.cz-hero-title { font-family: Georgia, serif; font-size: 1.2rem; color: var(--cz-ink); margin-bottom: .6rem; }
.cz-h1-sm { font-size: 1.75rem; margin-bottom: .35rem; }
h1.cz-title { font-size: 1.75rem; }
.cz-result-h .cz-result-name { font-size: 1.25rem; margin: 0; display: inline; }
.cz-hh-h .cz-hh-title { font-size: 1.2rem; margin: 0; }
.cz-intro { max-width: 52rem; margin-bottom: 1.25rem; }
.cz-about { max-width: 52rem; margin: 2.5rem 0 1rem; }
.av-elsewhere { margin: 0 0 1.25rem; font-size: .95rem; }
.av-chip { display: inline-block; background: var(--cz-paper); border: 1px solid var(--cz-line); border-radius: 999px; padding: .15rem .7rem; margin: .15rem .15rem .15rem 0; font-size: .9rem; }

/* Botón principal */
.av-btn { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; font-weight: 600; }
.av-btn:hover, .av-btn:focus { background: #8f4a24; color: #fff; }
.av-btn:disabled { opacity: .5; }

/* ---------- Contenido bloqueado (sin suscripción) ---------- */
.av-locked-wrap { position: relative; margin-top: 1rem; min-height: 22rem; }
.av-locked { filter: blur(5px); opacity: .55; user-select: none; pointer-events: none; }
tr.av-locked td { color: var(--cz-muted); }
.av-locked-wrap > .av-paywall { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 2rem;
  background: linear-gradient(to bottom, rgba(255,255,255,.2), rgba(255,255,255,.92) 35%); }
.av-paywall-inner { background: #fff; border: 1px solid #d9d2c6; border-top: 4px solid var(--cz-accent); border-radius: .5rem; box-shadow: 0 10px 30px rgba(60,40,20,.15);
  max-width: 30rem; padding: 1.5rem 1.75rem; text-align: center; margin: 0 1rem; }
.av-paywall-inner h3 { font-family: Georgia, serif; font-size: 1.35rem; margin-bottom: .5rem; }
.av-paywall-lock { font-size: 1.6rem; margin: 0; }
.av-paywall-small { font-size: .875rem; color: var(--cz-muted); margin-bottom: .25rem; }

/* ---------- Formularios de cuenta ---------- */
.av-auth { max-width: 30rem; margin: 0 auto; }
.av-form label { font-weight: 600; font-size: .925rem; }
.av-form-links { text-align: center; margin-top: 1rem; font-size: .925rem; }
.av-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.av-card { background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: 0 1px 3px rgba(60,40,20,.06); }
.av-card h2 { font-size: 1.3rem; margin-bottom: .9rem; }
.av-card-h { font-weight: 600; margin-bottom: .5rem; }
.av-account { display: grid; grid-template-columns: 1fr; gap: 0 1.25rem; }
@media (min-width: 992px) { .av-account { grid-template-columns: 1fr 1fr; } .av-account > .av-card:first-child { grid-column: 1 / -1; } }
.av-dl { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin-bottom: 1rem; }
.av-dl dt { font-weight: 600; color: var(--cz-muted); font-size: .9rem; }
.av-dl dd { margin: 0; }
.av-status { display: inline-block; font-size: .8rem; font-weight: 600; border-radius: 999px; padding: .1rem .6rem; background: #eee; color: #555; }
.av-status-active { background: #e2f2ed; color: #1d6b58; }
.av-status-cancelled, .av-status-expired { background: #fbe8e5; color: #a3362b; }
.av-status-suspended { background: #fbf1dc; color: #8a5a00; }
.av-cancel summary { color: #a3362b; cursor: pointer; font-size: .925rem; }
.av-cancel form { margin-top: .75rem; }

/* ---------- Planes ---------- */
.av-plans { display: grid; grid-template-columns: 1fr; gap: 1.25rem; max-width: 46rem; margin: 0 auto 1.5rem; }
@media (min-width: 768px) { .av-plans { grid-template-columns: 1fr 1fr; } }
.av-plan { position: relative; background: #fff; border: 1px solid #d9d2c6; border-radius: .5rem; padding: 1.5rem; display: flex; flex-direction: column; }
.av-plan h2 { font-size: 1.35rem; margin-bottom: .25rem; }
.av-plan ul { padding-left: 1.1rem; flex: 1; }
.av-plan-best { border: 2px solid var(--cz-accent); }
.av-plan-tag { position: absolute; top: -.8rem; right: 1rem; background: var(--cz-accent); color: #fff; font-size: .8rem; font-weight: 600; border-radius: 999px; padding: .15rem .7rem; margin: 0; }
.av-price { font-size: 2rem; font-weight: 700; color: var(--cz-ink); margin-bottom: .75rem; }
.av-price span { font-size: 1rem; font-weight: 400; color: var(--cz-muted); }
.av-faq { max-width: 46rem; margin: 2.5rem auto 0; }
.av-faq h3 { font-size: 1.05rem; margin-top: 1.25rem; }

/* ---------- Pie ---------- */
.av-footer { background: #241c15; color: #d8cfc3; padding: 3rem 0 1.5rem; margin-top: 3rem; font-size: .925rem; }
.av-footer a { color: #f1e6d6; }
.av-footer ul { list-style: none; padding: 0; margin: 0; }
.av-footer li { margin-bottom: .35rem; }
.av-footer-brand { font-family: Georgia, serif; font-size: 1.25rem; color: #fff; margin-bottom: .5rem; }
.av-footer-h { font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; margin-bottom: .75rem; }
.av-footer-langs a { margin-right: .6rem; }
.av-footer-copy { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; margin: 1rem 0 0; font-size: .85rem; color: #a99d8f; }

/* ---------- Artículos ---------- */
.av-agrid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 576px) { .av-agrid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .av-agrid { grid-template-columns: 1fr 1fr 1fr; } }
.av-acard { background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; overflow: hidden; display: flex; flex-direction: column; }
.av-acard-img img, .av-card-noimg { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.av-card-noimg { background: var(--cz-paper) url("/images/web/tree.jpg") center / cover; opacity: .5; }
.av-acard-body { padding: 1rem 1.1rem 1.1rem; }
.av-acard-body h2, .av-acard-body h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.av-acard-body p { font-size: .925rem; color: #444; margin-bottom: 0; }
.av-acard-body .av-acard-meta { color: var(--cz-muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .35rem; }
.av-section-h { margin: 2.5rem 0 1rem; font-size: 1.4rem; }
.av-article { max-width: 44rem; margin: 0 auto; font-size: 1.1rem; line-height: 1.7; }
.av-article h1 { font-family: Georgia, serif; font-size: 2.2rem; line-height: 1.2; }
.av-article h2 { font-size: 1.5rem; margin-top: 2rem; }
.av-article h3 { font-size: 1.2rem; margin-top: 1.5rem; }
.av-article-meta { color: var(--cz-muted); font-size: .9rem; }
.av-article-lead { font-size: 1.2rem; color: #444; }
.av-article blockquote { border-left: 4px solid var(--cz-line); padding-left: 1rem; color: #555; font-style: italic; }
.av-figure { margin: 1.75rem 0; }
.av-figure img { width: 100%; height: auto; border-radius: .3rem; }
.av-figure figcaption { font-size: .875rem; color: var(--cz-muted); margin-top: .4rem; }
.av-article-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.av-article-cta { max-width: 44rem; margin: 2.5rem auto; background: var(--cz-paper); border: 1px solid var(--cz-line); border-radius: .5rem; padding: 1.5rem; }
.av-article-cta h2 { font-size: 1.3rem; }
.av-more { margin-top: 3rem; }

/* ---------- Admin ---------- */
.av-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.av-stats > div { background: #fff; border: 1px solid #d9d2c6; border-radius: .4rem; padding: 1rem; }
.av-stats strong { display: block; font-size: 1.6rem; font-family: Georgia, serif; }
.av-stats span { color: var(--cz-muted); font-size: .875rem; }
.av-admin-nav .btn { margin: 0 .4rem .5rem 0; }
.av-thumb { object-fit: cover; border-radius: .2rem; }
.av-body { font-family: Consolas, Menlo, monospace; font-size: .925rem; line-height: 1.5; }
.av-photo-card img { border-radius: .3rem; }

/* ---------- Portada ---------- */
.av-home-hero { position: relative; color: #fff; padding: 4.5rem 0 3.5rem;
  background: linear-gradient(rgba(36,28,21,.72), rgba(36,28,21,.86)), url("/images/web/volga.jpg") center / cover no-repeat; }
.av-home-hero .cz-eyebrow { color: #f0c9a6; }
.av-home-hero h1 { font-family: Georgia, serif; font-size: 3rem; line-height: 1.1; max-width: 40rem; color: #fff; }
.av-home-lead { font-size: 1.2rem; max-width: 42rem; color: #eadfce; margin: 1rem 0 1.5rem; }
.av-home-search { max-width: 40rem; }
.av-home-try { margin-top: .75rem; font-size: .925rem; color: #d8cfc3; }
.av-home-try a { color: #fff; text-decoration: underline; margin-right: .4rem; }
.av-home-stats { list-style: none; padding: 0; margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; }
.av-home-stats li { color: #d8cfc3; font-size: .925rem; }
.av-home-stats strong { display: block; color: #fff; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 400; }
@media (max-width: 575px) { .av-home-hero { padding: 2.5rem 0; } .av-home-hero h1 { font-size: 2rem; } }
.av-home-sec { margin: 3rem 0; }
.av-home-sec > h2, .av-home-history h2, .av-home-plan h2 { font-size: 1.75rem; margin-bottom: 1rem; }
.av-tiles { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 576px) { .av-tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .av-tiles { grid-template-columns: repeat(3, 1fr); } .av-tile-main { grid-row: span 2; } }
.av-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid #d9d2c6; border-radius: .5rem; padding: 1.25rem 1.35rem; color: var(--cz-ink);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.av-tile:hover, .av-tile:focus { text-decoration: none; color: var(--cz-ink); border-color: var(--cz-accent); box-shadow: 0 6px 18px rgba(60,40,20,.1); transform: translateY(-2px); }
.av-tile h3 { font-size: 1.25rem; margin: .25rem 0 .5rem; }
.av-tile p { color: #555; flex: 1; font-size: .95rem; }
.av-tile-k { text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; color: var(--cz-accent); }
.av-tile-n { font-weight: 600; color: var(--cz-accent); }
.av-tile-main { background: var(--cz-paper); border-color: var(--cz-accent); border-width: 2px; }
.av-tile-main h3 { font-size: 1.6rem; }
.av-home-plan { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; background: #fff; border: 1px solid #d9d2c6;
  border-left: 6px solid var(--cz-accent); border-radius: .5rem; padding: 1.75rem 2rem; }
.av-home-plan > div:first-child { max-width: 40rem; }
.av-home-plan-cta { text-align: center; }
.av-colony-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.av-colony-chips a { background: #fff; border: 1px solid #d9d2c6; border-radius: 999px; padding: .35rem .9rem; color: var(--cz-ink); }
.av-colony-chips a span { color: var(--cz-muted); font-size: .8rem; margin-left: .2rem; }
.av-colony-chips a:hover { border-color: var(--cz-accent); text-decoration: none; }
.av-colony-chips .av-chip-all { background: var(--cz-accent); border-color: var(--cz-accent); color: #fff; font-weight: 600; }
.av-home-history { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; margin: 3rem 0; }
@media (min-width: 992px) { .av-home-history { grid-template-columns: 3fr 2fr; } }
.av-home-history-text p { font-size: 1.05rem; line-height: 1.7; }
.av-home-map img { width: 100%; height: auto; border: 1px solid #d9d2c6; border-radius: .4rem; }
.av-home-map figcaption { font-size: .85rem; color: var(--cz-muted); margin-top: .4rem; }
.cz-page h1 { font-family: Georgia, "Times New Roman", serif; color: var(--cz-ink); }
@media (max-width: 575px) { .cz-result { overflow-x: auto; } .cz-voyages td, .cz-voyages th { padding-left: .35rem; padding-right: .35rem; } .cz-voyages { word-break: break-word; } }
/* Páginas antiguas (section.py-5): tablas anchas y botones de acordeón en celulares */
.container table:not(.cz-members):not(.cz-matrix):not(.av-admin-table), body > table { display: block; max-width: 100%; overflow-x: auto; }
section.py-5 .btn-link { white-space: normal; text-align: left; }
@media (max-width: 575px) { table.cz-voyages { display: block; overflow-x: auto; } }

/* ---------- Obituarios: avisos fúnebres ---------- */
.av-ob-list { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 992px) { .av-ob-list { grid-template-columns: 1fr 1fr; } }
.av-ob-card { background: #fff; border: 1px solid #d9d2c6; border-left: 4px solid #5f6b75; border-radius: .4rem; padding: 1rem 1.2rem; }
.av-ob-card h3 { font-size: 1.15rem; margin: 0 0 .2rem; }
.av-ob-card .cz-m-name { font-weight: 600; }
.av-ob-maiden { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; font-size: .875rem; color: var(--cz-muted); font-weight: 400; }
.av-ob-facts { font-size: .9rem; color: var(--cz-muted); margin: 0 0 .5rem; }
.av-ob-death { color: var(--cz-ink); font-weight: 600; }
.av-ob-spouse { font-size: .925rem; margin-bottom: .5rem; }
.av-ob-text { font-size: .925rem; line-height: 1.55; color: #333; margin-bottom: .5rem; }
.av-ob-source { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cz-muted); margin: 0; }
.av-ob-card:target { box-shadow: 0 0 0 3px rgba(122,62,29,.35); }
.av-logout { margin: 0; }
.av-logout .dropdown-item { cursor: pointer; }
.cz-variants { margin: -.25rem 0 1rem; font-size: .925rem; }

/* ---------- Vínculos entre censos ---------- */
.av-links-cell { white-space: normal; }
.av-link-chip { display: inline-block; font-size: .78rem; margin: .1rem .15rem .1rem 0; white-space: nowrap; }
.av-link-prob { background: transparent !important; border: 1px dashed currentColor; }
.cz-members tr:target td { background: #fff4d6 !important; }
.cz-members tr:target td:first-child { box-shadow: inset 4px 0 0 var(--cz-accent); }
.cz-members tr[id] { scroll-margin-top: 90px; }   /* que el menú fijo no tape la fila al seguir un vínculo */
