/* Changelog page */

[hidden] {
  display: none !important;
}

.cl-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 680px;
  padding: 72px 0 8px;
}

.cl-hero h1 {
  font-size: clamp(40px, 6vw, 64px);
}

.cl-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.cl-stats div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.cl-stats b {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.cl-stats span {
  color: var(--muted);
  font-size: 13px;
}

/* Filters */
.cl-tools {
  position: sticky;
  top: 65px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 36px 0 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.cl-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font: 500 13px Inter, sans-serif;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.cl-chip small {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cl-chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.cl-chip.on {
  color: var(--accent);
  border-color: rgba(214, 199, 168, 0.4);
  background: var(--accent-soft);
}

.cl-chip.on small {
  color: var(--accent);
}

.cl-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.cl-search svg {
  position: absolute;
  left: 12px;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--faint);
  stroke-width: 1.8;
  stroke-linecap: round;
  pointer-events: none;
}

.cl-search input {
  width: 240px;
  height: 36px;
  padding-left: 36px;
  font-size: 14px;
  border-radius: 10px;
}

/* Layout */
.cl-layout {
  display: block;
  margin: 8px 0 64px;
}

.cl-layout.has-index {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.cl-index {
  position: sticky;
  top: 140px;
  padding-top: 32px;
}

.cl-index-title {
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cl-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
}

.cl-index a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 8px;
  padding: 8px 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  transition: color 0.15s, border-color 0.15s;
}

.cl-index a b {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cl-index a small {
  grid-column: 1 / -1;
  color: var(--faint);
  font-size: 12px;
}

.cl-index a .rel-latest {
  justify-self: start;
  padding: 0 7px;
  font-size: 10.5px;
}

.cl-index a:hover {
  color: var(--text);
}

.cl-index a.on {
  color: var(--text);
  border-left-color: var(--accent);
}

.cl-index li.dim a {
  opacity: 0.4;
}

/* Timeline */
.cl-list {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.release {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px 36px;
  padding: 32px 0 8px 28px;
  scroll-margin-top: 140px;
}

.release::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line-strong);
}

.release:first-child::before {
  top: 40px;
}

.release:last-child::before {
  bottom: auto;
  height: 40px;
}

.release:only-child::before {
  display: none;
}

.rel-dot {
  position: absolute;
  left: 0;
  top: 40px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line-strong);
}

.is-latest .rel-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.rel-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 2px;
}

.rel-version {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.rel-version:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.is-latest .rel-version {
  color: var(--accent);
}

.rel-latest {
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.rel-meta time {
  color: var(--muted);
  font-size: 14px;
}

.rel-copy {
  padding: 0;
  border: 0;
  background: none;
  color: var(--faint);
  font: 500 12px Inter, sans-serif;
  cursor: pointer;
}

.rel-copy:hover {
  color: var(--text);
}

.rel-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.is-latest .rel-card {
  border-color: rgba(214, 199, 168, 0.22);
  background:
    radial-gradient(420px 160px at 100% 0%, rgba(214, 199, 168, 0.06), transparent 70%),
    var(--surface);
}

.rel-card h2 {
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.2;
}

.rel-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -6px;
}

.rel-counts .tag {
  min-width: 0;
}

.rel-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rel-group + .rel-group {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.rel-group-title {
  margin: 0;
  font-size: inherit;
}

.rel-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rel-notes li {
  position: relative;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.rel-notes li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.cl-empty {
  padding: 40px 0 8px;
  color: var(--muted);
}

.skeleton {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 32px 0 24px;
}

.skeleton::before,
.skeleton .rel-dot {
  display: none;
}

.skeleton i {
  height: 14px;
  border-radius: 6px;
  background: var(--surface-2);
}

.skeleton i:first-child {
  width: 28%;
}

.skeleton i:nth-child(2) {
  width: 46%;
  height: 22px;
}

.skeleton i:nth-child(3) {
  width: 80%;
}

body:has(.cl-hero) > .footer {
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

@media (max-width: 960px) {
  .cl-layout.has-index {
    display: block;
  }

  .cl-index {
    display: none;
  }
}

@media (max-width: 700px) {
  .cl-hero {
    padding-top: 48px;
  }

  .cl-search {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .cl-search input {
    width: 100%;
  }

  .release {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 0 4px 24px;
  }

  .rel-dot {
    top: 31px;
  }

  .release:first-child::before {
    top: 31px;
  }

  .rel-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 12px;
  }

  .rel-copy {
    margin-left: auto;
  }

  .rel-card {
    padding: 20px;
  }
}
