/* ==========================================================================
   i.css — lo que solo usa /i
   Extraído tal cual del <style> inline de /i: la entrada escalonada de la
   portada (html:not(.home-visited) .homepage …) y el subrayado a mano de la
   etiqueta «New», que en /i es magenta. Se carga DESPUÉS de base.css.
   Las páginas de trabajo no cargan este fichero.
   ========================================================================== */

/* Staggered Entrance Animations */
@keyframes staggerIn {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html:not(.home-visited) .homepage > .article > * {
  animation: staggerIn 0.5s ease both;
}
html:not(.home-visited) .homepage > .article > :first-child { animation-delay: 0s; }
html:not(.home-visited) .homepage > .article > :nth-child(2) { animation-delay: 0.05s; }
html:not(.home-visited) .homepage > .article > :nth-child(3) { animation-delay: 0.1s; }
html:not(.home-visited) .homepage > .article > :nth-child(4) { animation-delay: 0.15s; }
html:not(.home-visited) .homepage > .article > :nth-child(5) { animation-delay: 0.2s; }
html:not(.home-visited) .homepage > .article > :nth-child(6) { animation-delay: 0.25s; }
html:not(.home-visited) .homepage > .article > :nth-child(7) { animation-delay: 0.3s; }
html:not(.home-visited) .homepage > .article > :nth-child(8) { animation-delay: 0.35s; }
html:not(.home-visited) .homepage > .article > :nth-child(n+9) { animation-delay: 0.4s; }

html:not(.home-visited) .homepage > section,
html:not(.home-visited) .homepage > footer {
  animation: staggerIn 0.5s ease both;
}
html:not(.home-visited) .homepage > section:nth-of-type(1) { animation-delay: 0.4s; }
html:not(.home-visited) .homepage > section:nth-of-type(2) { animation-delay: 0.48s; }
html:not(.home-visited) .homepage > footer { animation-delay: 0.55s; }

/* El reloj del pie: solo el texto del reloj sube al atenuado legible
   (--mute-read, rgba(0,0,0,.6) → 5,71:1 sobre #fdfdfc) para pasar el mínimo de
   4,5:1 de AA. El conejo, la línea y los enlaces del pie se quedan igual. */
#clock-wrap {
  color: var(--mute-read);
}

/* Hand-drawn Rough Circle Annotation ("New") */
.badge-new {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  color: rgb(255, 0, 170);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  padding: 2px 6px;
}

.badge-new svg {
  position: absolute;
  inset: -3px -5px;
  width: calc(100% + 10px);
  height: calc(100% + 6px);
  pointer-events: none;
  overflow: visible;
}

.badge-new path {
  fill: none;
  stroke: rgb(255, 0, 170);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: drawCircle 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.9s forwards;
}

@keyframes drawCircle {
  to {
    stroke-dashoffset: 0;
  }
}

/* Fechas de la lista por debajo de 360 px: la fecha/tipo baja de línea.
   En base.css el <time> de cada entrada de la lista lleva `white-space: nowrap`
   (la fecha se lee de un tirón a la derecha del título), y el enlace es un flex
   sin `wrap`. A 320–340 px no caben título + fecha en la misma línea: el título
   se queda en su ancho mínimo y la fecha se sale por la derecha (scrollWidth 349
   con clientWidth 320). Por debajo de 360 px se permite que el enlace envuelva
   —la fecha pasa a su propia línea, debajo del título— y `row-gap: 0` para que
   las dos líneas queden tan juntas como antes; la fecha además puede partirse
   si alguna vez no cupiera entera en la línea. A 360 px o más no se aplica
   ninguna de estas reglas: /i queda exactamente igual que antes. */
@media screen and (max-width: 359.98px) {
  .post-list > ul > li > ul > li > a {
    flex-wrap: wrap;
    row-gap: 0;
  }

  .post-list > ul > li > ul > li > a time {
    white-space: normal;
  }
}
