/* Changelog: one typographic table of every release, newest first. Builds on style.css
   (header, footer, buttons); everything here is scoped to .changelog-page. */
.changelog-page {
  --cl-ink: #1d1d1f;
  --cl-ink-2: #6e6e73;
  --cl-rule: rgba(0, 0, 0, 0.1);
  --cl-plate: #f5f5f7;
  --cl-date: 84px;
  --cl-version: 148px;
  --cl-gap: 32px;
  background: #fff;
  color: var(--cl-ink);
}
.changelog-page main {
  width: min(1000px, calc(100% - 48px));
  margin-inline: auto;
  padding: 96px 0 120px;
}
.changelog-page .footer {
  border-top: 1px solid var(--cl-rule);
}

/* Filtered-out entries and empty months. */
.changelog-page [hidden] {
  display: none !important;
}

/* ---------- Intro ---------- */
.cl-intro h1 {
  max-width: 760px;
}
.cl-eyebrow {
  margin: 0 0 16px;
  color: var(--cl-ink-2);
  font-size: 15px;
  font-weight: 500;
}
.cl-intro h1 {
  margin: 0;
  font-size: clamp(44px, 5.4vw + 12px, 80px);
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.cl-lead {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--cl-ink-2);
  font-size: 21px;
  line-height: 1.45;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

/* Four figures, set like a table header: numbers large, labels small above them. */
.cl-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 64px 0 0;
  border-top: 1px solid var(--cl-ink);
}
.cl-stats > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 16px 24px 0 0;
}
.cl-stats > div + div {
  padding-left: 24px;
  border-left: 1px solid var(--cl-rule);
}
.cl-stats dt {
  color: var(--cl-ink-2);
  font-size: 13px;
}
.cl-stats dd {
  margin: 0;
  font-size: 44px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}
.cl-stats dd small {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--cl-ink-2);
}

/* ---------- Filter ---------- */
.cl-filter {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 72px 0 0;
  padding: 4px;
  border-radius: 999px;
  background: var(--cl-plate);
}
.cl-filter button {
  min-height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cl-ink-2);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.cl-filter button:hover {
  color: var(--cl-ink);
}
.cl-filter button[aria-pressed='true'] {
  background: #fff;
  color: var(--cl-ink);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.cl-filter button:focus-visible {
  outline: 2px solid var(--cl-ink);
  outline-offset: 2px;
}

/* ---------- The log ---------- */
.cl-month {
  margin-top: 64px;
}
.cl-month h2 {
  margin: 0;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--cl-ink);
  font-size: 28px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
/* Three columns: date, version, what changed. */
.cl-entry {
  display: grid;
  grid-template-columns: var(--cl-date) var(--cl-version) minmax(0, 1fr);
  column-gap: var(--cl-gap);
  padding: 30px 0 32px;
  scroll-margin-top: 140px;
}
.cl-entry + .cl-entry {
  border-top: 1px solid var(--cl-rule);
}
.cl-entry time {
  padding-top: 5px;
  color: var(--cl-ink-2);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cl-version {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: flex-start;
  align-self: start;
  gap: 2px 8px;
  margin: 0;
}
.cl-platform {
  flex-basis: 100%;
  color: var(--cl-ink-2);
  font-size: 13px;
  font-weight: 500;
}
.cl-number {
  font-size: 21px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.cl-latest {
  align-self: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--cl-ink);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.cl-body h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
/* The big ones (1.0, the cloud library, iPhone) read a size up. */
.cl-milestone .cl-body h3 {
  font-size: 32px;
  letter-spacing: -0.035em;
}
.cl-body ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.cl-body li {
  position: relative;
  padding-left: 20px;
  color: #424245;
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.cl-body li + li {
  margin-top: 6px;
}
.cl-body li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.68em;
  width: 6px;
  height: 1.5px;
  border-radius: 1px;
  background: #86868b;
}

/* ---------- Get the latest ---------- */
.cl-get {
  margin-top: 96px;
  padding: 56px 48px;
  border-radius: 28px;
  background: var(--cl-plate);
  text-align: center;
}
.cl-get h2 {
  margin: 0;
  font-size: 44px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.04em;
}
.cl-get p {
  margin: 14px 0 0;
  color: var(--cl-ink-2);
  font-size: 17px;
}
.cl-get .cl-get-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 28px;
  margin-top: 28px;
}
.cl-get .text-link {
  color: var(--cl-ink);
  font-weight: 500;
}
.cl-get .text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Narrow ---------- */
@media (max-width: 860px) {
  .changelog-page {
    --cl-date: 64px;
    --cl-version: 108px;
    --cl-gap: 20px;
  }
}
@media (max-width: 734px) {
  .changelog-page main {
    width: calc(100% - 40px);
    padding-top: 64px;
  }
  .cl-lead {
    font-size: 19px;
  }
  .cl-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 24px;
  }
  .cl-stats > div:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .cl-stats dd {
    font-size: 36px;
  }
  .cl-filter {
    margin-top: 56px;
  }
  /* One column: date and version share a line above the notes. */
  .cl-entry {
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
    padding: 24px 0 26px;
  }
  .cl-entry time {
    padding-top: 0;
    align-self: baseline;
  }
  .cl-version {
    flex-wrap: nowrap;
  }
  .cl-platform {
    flex-basis: auto;
    font-size: 15px;
  }
  .cl-platform::after {
    content: ' ·';
  }
  .cl-number {
    font-size: 15px;
    font-weight: 600;
  }
  .cl-body {
    grid-column: 1 / -1;
  }
  .cl-body h3 {
    font-size: 21px;
  }
  .cl-milestone .cl-body h3 {
    font-size: 26px;
  }
  .cl-get {
    padding: 44px 24px;
  }
  .cl-get h2 {
    font-size: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl-filter button {
    transition: none;
  }
}
