/* /novedades/ and /roadmap/ — the changelog and the roadmap
 * (scripts/product-updates.mjs).
 *
 * Open ruled rows, not a wall of cards: each release is one row with its
 * version and date on the left and what changed on the right; each roadmap
 * stage is one heading over a ruled list. Tokens come from site.css and the
 * hero from features.css; nothing here redefines a colour, a font or the
 * spacing scale. */

.pu-eyebrow {
  margin: var(--space-6) 0 0;
  color: var(--fx-accent);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pu-eyebrow + h1 {
  margin-top: var(--space-3);
}

.pu-body {
  padding: var(--space-12) 0 var(--space-20);
}

/* ------------------------------------------------------- version index */

.pu-versions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-12);
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--line);
}

.pu-versions__label {
  margin: 0;
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 600;
}

.pu-versions ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pu-versions a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-sm);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.pu-versions a:hover {
  border-color: var(--fx-accent);
  color: var(--fx-accent);
}

/* ------------------------------------------------------------ releases */

.pu-releases {
  display: grid;
}

.pu-release {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  gap: var(--space-4) var(--space-12);
  padding: var(--space-12) 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 96px;
}

.pu-release:first-child {
  padding-top: 0;
  border-top: 0;
}

.pu-release__head {
  display: contents;
}

.pu-release__meta {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  align-items: center;
  gap: var(--space-2);
}

.pu-release__version {
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.pu-release__anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -12px -8px -12px -12px;
  border-radius: 8px;
  color: var(--quiet);
}

.pu-release__anchor .fx-i {
  width: 16px;
  height: 16px;
}

.pu-release__anchor:hover,
.pu-release__anchor:focus-visible {
  color: var(--fx-accent);
}

.pu-release__date {
  flex-basis: 100%;
  color: var(--muted);
  font-size: var(--text-sm);
}

.pu-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--space-2);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.pu-badge--current {
  background: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.pu-badge--pre {
  border: 1px solid var(--line-strong);
  background: var(--surface-muted);
  color: var(--text);
}

.pu-release__title {
  grid-column: 2;
  margin: 0;
  color: var(--ink);
  font-size: var(--display-xs);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pu-release__summary {
  grid-column: 2;
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: var(--text-lg);
  line-height: 1.7;
}

.pu-release__groups {
  grid-column: 2;
  display: grid;
  gap: var(--space-8);
  margin-top: var(--space-4);
}

.pu-group__title {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 700;
}

.pu-group__title .fx-i {
  width: 18px;
  height: 18px;
  color: var(--fx-accent);
}

.pu-items,
.pu-roads {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pu-item {
  display: grid;
  /* A fixed first column, so every title in a group starts on one line
     whatever the length of the area name before it. */
  grid-template-columns: 128px minmax(0, 1fr);
  gap: var(--space-1) var(--space-4);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--line-soft);
}

.pu-item .pu-area {
  grid-row: 1 / span 2;
  max-width: 100%;
  white-space: normal;
}

.pu-item__title,
.pu-road__title {
  margin: 0;
  color: var(--ink);
  font-size: var(--text-lg);
  font-weight: 600;
  line-height: 1.5;
}

.pu-item__body,
.pu-road__body {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: var(--text-md);
  line-height: 1.65;
}

.pu-area {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  padding: 2px var(--space-2);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

/* --------------------------------------------------------------- roadmap */

.pu-stages {
  display: grid;
  gap: var(--space-16);
}

.pu-stage__head {
  max-width: 760px;
  margin-bottom: var(--space-6);
}

.pu-stage__head h2 {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  color: var(--ink);
  font-size: var(--display-xs);
  font-weight: 750;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.pu-stage__head h2 .fx-i {
  width: 24px;
  height: 24px;
  color: var(--fx-accent);
}

.pu-stage__head p {
  margin: var(--space-2) 0 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.6;
}

.pu-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 0 var(--space-2);
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: var(--text-sm);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.75;
}

.pu-roads {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-12);
}

.pu-road {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--line-soft);
}

/* One rule above the first row and one under every item, so an odd item
   out closes on the same line as its neighbour and no rule doubles up. */
.pu-road:nth-child(-n + 2) {
  border-top: 1px solid var(--line-soft);
}

.pu-road__body {
  grid-column: auto;
}

.pu-road.is-shipped .pu-road__title s {
  color: var(--muted);
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--quiet);
}

.pu-road__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
}

.pu-road__meta .fx-i {
  width: 16px;
  height: 16px;
  color: var(--fx-accent);
}

.pu-road__shipped {
  color: var(--text);
}

a.pu-road__shipped {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: -12px 0;
  color: var(--fx-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ----------------------------------------------------------- empty state */

.pu-empty {
  max-width: 640px;
  padding: var(--space-12) var(--space-8);
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
}

.pu-empty h2 {
  margin: 0;
  color: var(--ink);
  font-size: var(--display-xs);
  font-weight: 750;
  line-height: 1.2;
}

.pu-empty p {
  margin: var(--space-3) 0 0;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.65;
}

/* -------------------------------------------------- the other page, next */

.pu-next {
  padding: 0 0 var(--space-12);
}

.pu-next__card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6) var(--space-8);
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}

.pu-next__card:hover {
  border-color: var(--fx-accent);
}

.pu-next__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.pu-next__body {
  display: grid;
  gap: var(--space-1);
}

.pu-next__body strong {
  color: var(--ink);
  font-size: var(--text-xl);
  font-weight: 700;
}

.pu-next__body span {
  color: var(--muted);
}

.pu-next__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--fx-accent);
  font-weight: 600;
  white-space: nowrap;
}

/* -------------------------------------------------------------- narrow */

@media (max-width: 767px) {
  .pu-release {
    grid-template-columns: minmax(0, 1fr);
  }

  .pu-release__meta,
  .pu-release__title,
  .pu-release__summary,
  .pu-release__groups {
    grid-column: 1;
    grid-row: auto;
  }

  .pu-roads {
    grid-template-columns: minmax(0, 1fr);
  }

  .pu-road:nth-child(2) {
    border-top: 0;
  }

  .pu-next__card {
    grid-template-columns: auto minmax(0, 1fr);
    padding: var(--space-5);
  }

  .pu-next__link {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .pu-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .pu-item .pu-area {
    grid-row: auto;
  }

  .pu-item__body {
    grid-column: 1;
  }

  .pu-empty {
    padding: var(--space-8) var(--space-5);
  }
}
