/* «Por qué un púlsar»: cada fecha con el texto a la izquierda y su animación a la derecha (apiladas en el celular). */

.pz-head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: var(--gap);
  align-items: center;
  max-width: none;
}

.pz-head .lead {
  max-width: 30em;
}

.pz-index {
  margin: 34px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  max-width: 480px;
}

.pz-index li {
  border-bottom: 1px solid var(--line);
}

.pz-index a {
  display: flex;
  gap: 18px;
  align-items: baseline;
  padding: 12px 0;
  color: var(--ink-soft);
  font-size: 16px;
  border-radius: 3px;
  transition: color 150ms;
}

.pz-index a:hover {
  color: var(--ink-strong);
}

.pz-index .data {
  color: var(--lila-text);
  min-width: 3.2em;
}

/* El púlsar que late como CP 1919, con su traza. */
.pz-beat {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 18px;
}

.pz-beat-star {
  min-height: 150px;
  display: grid;
  place-items: center;
}

.pz-beat-trace {
  width: min(100%, 360px);
  height: 64px;
  display: block;
}

.pz-beat figcaption {
  font-size: 14px;
  color: var(--ink-muted);
  text-align: center;
}

.pz-beat figcaption .data {
  color: var(--ink-soft);
}

/* Cada fecha. */
.pz-chapter {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: calc(var(--gap) * 2.5);
  align-items: center;
  margin-top: 150px;
  scroll-margin-top: calc(var(--nav-h) + 32px);
}

.pz-year {
  display: inline-block;
  padding-bottom: 8px;
  margin-bottom: 18px;
  color: var(--lila-text);
  font-size: 15px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--wave);
}

.pz-text h2 {
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.1;
}

.pz-text h2 + p {
  margin-top: 22px;
}

.pz-text p + p {
  margin-top: 14px;
}

.pz-text > p:not(.pz-year) {
  max-width: 34em;
  font-size: 17px;
  line-height: 1.6;
}

.pz-figure {
  margin: 0;
  min-width: 0;
}

.pz-figure figcaption {
  margin-top: 14px;
  max-width: 46em;
}

.pz-figure canvas,
.pz-figure svg {
  display: block;
  width: 100%;
}

/* 1967: el papel. */
.pz-paper canvas {
  height: 270px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.pz-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.pz-toggle button {
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--ink-muted);
  font: 500 14px/1.2 var(--f-text);
  transition: color 150ms, background-color 150ms;
}

.pz-toggle button:hover {
  color: var(--ink-strong);
}

.pz-toggle button[aria-pressed='true'] {
  color: var(--ink-strong);
  background: rgba(169, 155, 255, 0.16);
}

/* 1968: el faro. */
.pz-lighthouse svg {
  height: auto;
  aspect-ratio: 600 / 340;
}

.pz-lighthouse canvas {
  height: 56px;
  margin-top: 6px;
}

.pz-svg-label {
  font: 400 13px var(--f-text);
  fill: var(--ink-muted);
}

.pz-svg-label--lila {
  fill: var(--lila-text);
}

/* 1972: el mapa, que se dibuja al entrar. */
.pz-map svg {
  height: auto;
  aspect-ratio: 172 / 120;
}

.pz-map .pz-map-label {
  font-family: var(--f-text);
  opacity: 0;
  transition: opacity 600ms 3400ms;
}

.pz-map svg.is-drawn .pz-map-label {
  opacity: 1;
}

.pz-map .pz-grow {
  stroke-dashoffset: var(--len);
}

.pz-map svg.is-drawn .pz-grow {
  stroke-dashoffset: 0;
  transition-property: stroke-dashoffset;
  transition-duration: 700ms;
  transition-timing-function: cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pz-map .pz-bit {
  opacity: 0;
}

.pz-map svg.is-drawn .pz-bit {
  opacity: 1;
  transition-property: opacity;
  transition-duration: 120ms;
}

.pz-map svg.is-still .pz-grow,
.pz-map svg.is-still .pz-bit,
.pz-map svg.is-still .pz-map-label {
  transition: none !important;
}

.pz-replay {
  font: inherit;
  margin-left: 6px;
  cursor: pointer;
}

/* 1979: los pulsos apilados. */
.pz-stack canvas {
  height: 470px;
}

/* Hoy: el púlsar de Lila escribe. */
.pz-speak {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding: 40px 0 10px;
}

.pz-speak-star {
  min-height: 120px;
  display: grid;
  place-items: center;
}

.pz-speak-line {
  min-height: 1.4em;
  max-width: 100%;
  color: var(--ink-strong);
  font: 400 clamp(22px, 2.4vw, 30px) / 1.3 var(--f-display);
  text-align: center;
}

.pz-speak-line .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: var(--wave);
  animation: pz-caret 1.06s steps(1) infinite;
}

@keyframes pz-caret {
  50% { opacity: 0; }
}

.pz-speak figcaption {
  text-align: center;
}

.pz-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

/* Fuentes. */
.pz-sources {
  margin-top: 140px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  max-width: 900px;
}

.pz-sources h2 {
  font-size: 20px;
}

.pz-sources ul {
  margin: 14px 0 0;
  padding: 0 0 0 18px;
}

.pz-sources li + li {
  margin-top: 6px;
}

@media (max-width: 960px) {
  .pz-head,
  .pz-chapter {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 40px;
  }

  .pz-beat {
    justify-items: start;
  }

  .pz-beat figcaption {
    text-align: left;
  }

  .pz-chapter {
    margin-top: 110px;
  }
}

@media (max-width: 640px) {
  .pz-chapter {
    margin-top: 88px;
    row-gap: 32px;
  }

  .pz-text > p:not(.pz-year) {
    font-size: 16px;
  }

  .pz-paper canvas {
    height: 220px;
  }

  .pz-stack canvas {
    height: 380px;
  }

  .pz-toggle button {
    padding: 7px 11px;
    font-size: 13px;
  }

  /* El faro se achica con la pantalla: sus nombres, un poco más grandes en unidades del dibujo. */
  .pz-lighthouse .pz-svg-label {
    font-size: 19px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pz-speak-line .caret {
    animation: none;
  }
}

/* Los botones de esta página, sin el estilo del navegador. */
.pz-toggle button,
.pz-replay {
  border: 0;
  background: none;
  cursor: pointer;
}

.pz-replay {
  padding: 0;
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(196, 187, 255, 0.45);
}

.pz-index a {
  text-decoration: none;
}
