:root {
  --tinta: #172231;
  --suave: #5d6878;
  --papel: #f3efe6;
  --blanco: #fffdf9;
  --marino: #10284a;
  --marino-2: #0b1d37;
  --ambar: #f2b33d;
  --ambar-claro: #fdf0d2;
  --borde: #ddd5c4;
  --enlace: #1f5f9e;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 16px/1.5 "IBM Plex Sans", "Segoe UI", Roboto, sans-serif;
}

a { color: var(--enlace); }

.cabezal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px clamp(12px, 3vw, 28px);
  background: var(--marino);
}

.logo {
  color: #fff;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(20px, 3.4vw, 26px);
  letter-spacing: -.01em;
  text-decoration: none;
}

.logo span { color: var(--ambar); }

.mayor {
  flex: none;
  padding: 2px 9px;
  border: 2px solid var(--ambar);
  border-radius: 6px;
  color: var(--ambar);
  font-weight: 600;
  font-size: 13px;
}

.indice {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--marino-2);
}

.indice a {
  padding: 5px 11px;
  border-radius: 999px;
  color: #dfe7f3;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.indice a:hover { background: rgba(255, 255, 255, .08); }

.indice a[aria-current="page"] { background: var(--ambar); color: var(--marino-2); font-weight: 600; }

.columna {
  position: relative;
  width: min(1000px, calc(100% - 24px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.portadilla { margin-bottom: 10px; }

.portadilla h1 {
  margin: 0;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--marino);
}

.estado {
  margin: 8px 0 0;
  color: var(--suave);
  font-size: 14.5px;
}

.estado b { color: var(--tinta); font-weight: 600; }

.advertencia {
  margin: 12px 0 16px;
  padding: 7px 12px;
  border-left: 4px solid var(--ambar);
  background: var(--ambar-claro);
  font-size: 13.5px;
}

.marco {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 16px;
}

.cuadro {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--blanco);
  border: 1px solid var(--borde);
}

.cuadro caption {
  padding: 0 2px 8px;
  text-align: left;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--marino);
}

.cuadro thead th {
  padding: 8px 2px 6px;
  background: var(--marino);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  text-align: center;
  vertical-align: bottom;
}

.cuadro thead th:first-child { width: 22%; text-align: left; padding-left: 10px; }

.cuadro thead a { color: #fff; text-decoration: none; }

.cuadro thead small { display: block; color: #a9bad3; font-weight: 400; font-size: 11.5px; }

.cuadro .corto { display: none; }

.cuadro tbody th {
  padding: 7px 4px 7px 10px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.cuadro tbody th a { color: var(--marino); text-decoration-color: var(--ambar); text-underline-offset: 3px; }

.cuadro tbody td {
  padding: 6px 2px;
  text-align: center;
  vertical-align: middle;
}

.cuadro tbody tr:nth-child(even) > * { background: #f7f3ea; }

.cuadro tbody tr > * { border-top: 1px solid #ece5d6; }

.cuadro .cifra {
  display: block;
  color: var(--tinta);
  font-weight: 600;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  text-decoration: none;
}

.cuadro .cifra.lista { color: var(--marino); }

.cuadro .cifra.falta { color: #a6adb8; font-weight: 500; }

.cuadro td small {
  display: block;
  margin: 6px 0 0;
  color: var(--suave);
  font-size: 11px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.cuadro td small:first-child { margin-top: 0; }

.cuadro td.nada { color: #b9bfc8; }

.planchas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.planchas > .recuadro { grid-column: 1 / -1; }

.tramo {
  grid-column: 1 / -1;
  margin: 18px 0 0;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--ambar);
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--marino);
  scroll-margin-top: 12px;
}

.plancha {
  min-width: 0;
  scroll-margin-top: 12px;
}

.plancha table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--blanco);
  border: 1px solid var(--borde);
}

.plancha caption {
  padding: 9px 12px;
  background: var(--marino);
  color: #fff;
  text-align: left;
  font-size: 14px;
  line-height: 1.35;
}

.plancha caption b { font-weight: 600; font-size: 15px; }

.plancha caption span { color: var(--ambar); }

.plancha caption em { display: block; color: #a9bad3; font-style: normal; font-size: 12.5px; }

.plancha caption em:empty { display: none; }

.plancha th {
  padding: 5px 8px;
  background: #ece5d6;
  color: var(--suave);
  font-weight: 500;
  font-size: 12px;
  text-align: left;
}

.plancha td {
  padding: 5px 8px;
  border-top: 1px solid #ece5d6;
  font-variant-numeric: tabular-nums;
}

.plancha .pos { color: var(--suave); font-size: 13px; width: 22%; }

.plancha .num { font-weight: 600; font-size: 16px; letter-spacing: .03em; }

.plancha tbody tr:first-child td:nth-child(-n+2) { background: var(--ambar-claro); }

.plancha tbody tr:first-child td:nth-child(2) { font-size: 20px; color: var(--marino); }

.plancha:target table { outline: 3px solid var(--ambar); }

.origen {
  margin: 6px 2px 0;
  color: var(--suave);
  font-size: 12.5px;
  line-height: 1.4;
}

.lectura {
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.62;
}

.lectura h2 {
  margin: 1.5em 0 .45em;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.2;
  color: var(--marino);
}

.lectura p { margin: .7em 0; }

.lectura ol { margin: .6em 0 1em; padding-left: 1.3em; }

.lectura li { margin: .35em 0; }

.guia {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: var(--blanco);
  font-size: 15px;
  line-height: 1.4;
}

.guia caption {
  caption-side: bottom;
  padding-top: 7px;
  text-align: left;
  color: var(--suave);
  font-size: 13px;
}

.guia th, .guia td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--borde);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.guia th { background: var(--marino); color: #fff; font-weight: 600; }

.colofon {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 2px solid var(--marino);
  color: var(--suave);
  font-size: 14px;
}

.colofon nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }

.colofon p { margin: 6px 0; }

.recuadro { width: min(420px, 100%); margin: 16px auto; }

.recuadro[hidden] { display: none !important; }

.recuadro a { display: block; }

.recuadro img { display: block; width: 100%; height: auto; border-radius: 8px; }

@media (min-width: 1400px) {
  .columna > .recuadro {
    position: absolute;
    top: 22px;
    bottom: 0;
    left: calc(100% + 24px);
    width: min(300px, calc((100vw - 1000px) / 2 - 48px));
    margin: 0;
  }

  .columna > .recuadro a { position: sticky; top: 16px; }
}

@media (max-width: 760px) {
  .planchas { grid-template-columns: minmax(0, 1fr); }
  .lectura { font-size: 16.5px; }
}

@media (max-width: 560px) {
  .columna { width: calc(100% - 16px); padding-top: 16px; }
  .cuadro thead th { font-size: 12px; padding: 7px 1px 5px; }
  .cuadro thead th:first-child { width: 25%; padding-left: 6px; }
  .cuadro .largo { display: none; }
  .cuadro .corto { display: inline; }
  .cuadro thead small { font-size: 10px; }
  .cuadro tbody th { padding-left: 6px; font-size: 12.5px; }
  .cuadro .cifra { font-size: 14.5px; letter-spacing: 0; }
  .cuadro td small { font-size: 9.5px; }
  .plancha td { padding: 5px 6px; }
  .indice a { padding: 4px 9px; font-size: 13px; }
}

.solapa[hidden] { display: none !important; }

.solapa {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 14px;
  container-type: inline-size;
}

.solapa-velo { position: absolute; inset: 0; background: rgba(9, 20, 38, .72); }

.solapa-marco {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: 100%;
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
}

.solapa-marco a { display: block; line-height: 0; }

.solapa-marco img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(460px, 100cqi);
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  border-radius: 10px;
}

.solapa-cruz {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--marino);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
}
