/* Copyright © 2026 BKRXY LLC. All rights reserved. */

.changelog-route { background: #fbf4e5; }

.changelog-wrap {
  width: min(48rem, calc(100% - 2.5rem));
  padding-block: clamp(3rem, 7vw, 5.75rem) 4rem;
}

.changelog-timeline { position: relative; }

.changelog-milestone {
  margin-bottom: clamp(3rem, 7vw, 5rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid #d4b472;
  border-radius: 1.5rem;
  background: radial-gradient(ellipse at top left, #fff9e8, #f0dfbb);
  box-shadow: 0 16px 36px -24px rgb(76 49 28 / 30%);
  color: #302538;
}
.changelog-milestone__date {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.5;
}
.changelog-milestone h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  text-wrap: balance;
}
.changelog-milestone h2 + p {
  max-width: 48ch;
  margin: 0 0 1rem;
  font-size: 1.1rem;
  line-height: 1.65;
}
.changelog-milestone__download { display: inline-block; padding: 12px; line-height: 0; }
.changelog-milestone__download img { display: block; width: auto; height: 48px; }
.changelog-milestone__download:focus-visible { outline: 3px solid #302538; outline-offset: 2px; border-radius: 6px; }

.changelog-entry {
  --entry-gap: clamp(4rem, 8vw, 6.5rem);
  display: grid;
  grid-template-columns: 10.5rem 1.5rem minmax(0, 1fr);
  padding-bottom: var(--entry-gap);
}

.changelog-entry:last-child { padding-bottom: 1rem; }

.changelog-entry__date {
  padding-top: 0.15rem;
  color: #5b5062;
}

.changelog-entry__date time {
  display: block;
  color: #3a2d43;
  font-family: var(--font-action);
  font-size: 1rem;
  line-height: 1.2;
}

.changelog-entry__date span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 1.3;
  text-transform: none;
}

.changelog-entry__marker {
  position: relative;
  min-height: 100%;
}

.changelog-entry__marker::before {
  position: absolute;
  top: 0.45rem;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgb(78 49 42 / 18%);
  content: "";
  transform: translateX(-50%);
}

.changelog-timeline .changelog-entry:not(:last-child) .changelog-entry__marker::before {
  bottom: calc(0rem - var(--entry-gap));
}

.changelog-entry__marker::after {
  position: absolute;
  top: 0.2rem;
  left: 50%;
  width: 0.72rem;
  height: 0.72rem;
  border: 0.16rem solid #fbf4e5;
  border-radius: 50%;
  background: #7a496f;
  box-shadow: 0 0 0 1px rgb(78 49 42 / 28%);
  content: "";
  transform: translateX(-50%);
}

.changelog-entry__content { padding-left: 1.35rem; }

.changelog-entry__content h2 {
  margin: 0.9rem 0 1rem;
  color: #302538;
  font-size: clamp(1.7rem, 3.7vw, 2.35rem);
  line-height: 1.15;
  text-wrap: balance;
}

.changelog-builds {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-builds li {
  padding: 0.12rem 0;
  color: #5d5064;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.2;
}
.changelog-builds li:not(:last-child)::after { content: "·"; margin-left: 0.45rem; color: #807486; }

.changelog-art { margin: 0 0 1.5rem; }
.changelog-art img { display: block; width: 100%; height: auto; border-radius: 0.9rem; }
.changelog-art figcaption { margin-top: 0.65rem; color: #62566c; font-size: 0.8rem; line-height: 1.5; }

@media (prefers-reduced-motion: no-preference) {
  .changelog-entry.is-revealed .changelog-entry__content,
  .changelog-entry.is-revealed .changelog-entry__date {
    animation: changelog-enter 650ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .changelog-entry.is-revealed .changelog-entry__marker::after {
    animation: changelog-marker 900ms ease-out;
  }
}
@keyframes changelog-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes changelog-marker {
  from { box-shadow: 0 0 0 7px rgb(122 73 111 / 18%); }
  to { box-shadow: 0 0 0 1px rgb(78 49 42 / 28%); }
}

.changelog-highlights {
  display: grid;
  margin: 0;
  padding-left: 1.15rem;
  gap: 0.62rem;
}

.changelog-highlights li {
  padding-left: 0.15rem;
  color: #4c4254;
  font-size: 1rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.changelog-highlights li::marker { color: #9d766a; }

@media (max-width: 43rem) {
  .changelog-wrap { width: min(100% - 1.5rem, 48rem); }

  .changelog-entry {
    --entry-gap: 4rem;
    grid-template-columns: 1.1rem minmax(0, 1fr);
    grid-template-areas:
      "marker date"
      "marker content";
    column-gap: 0.9rem;
    padding-bottom: 4rem;
  }

  .changelog-entry__date {
    grid-area: date;
    padding: 0 0 1.1rem;
  }

  .changelog-entry__date time { font-size: 1.05rem; }
  .changelog-entry__date span { margin-top: 0.28rem; }

  .changelog-entry__marker { grid-area: marker; }
  .changelog-entry__marker::before { top: 0.45rem; }
  .changelog-entry__marker::after { top: 0.15rem; }

  .changelog-entry__content {
    grid-area: content;
    padding-left: 0;
  }

  .changelog-entry__content h2 { margin-top: 0.9rem; }
}

@media (max-width: 39rem) {
  .changelog-wrap { width: min(100% - var(--mobile-content-gutter) * 2, 48rem); }
}

@media (prefers-reduced-motion: reduce) {
  .changelog-route * { scroll-behavior: auto !important; }
}
