/* ==========================================================================
   Changelog page — a vertical timeline of dated release entries. Reuses
   the site's existing .home-topbar/.hero-badge/.home-footer chrome (from
   home.css) so it looks native, adding only the timeline/card/tag/icon
   styling that's unique to this page.
   ========================================================================== */

.changelog-main {
  width: min(760px, calc(100% - 36px));
  margin: 40px auto 60px;
}

.changelog-hero {
  margin-bottom: 40px;
  text-align: center;
}

.changelog-hero h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 900;
  line-height: 1.08;
}

.changelog-subtitle {
  max-width: 480px;
  margin: 14px auto 0;
  color: #52627a;
  font-size: 1rem;
  line-height: 1.6;
}

.changelog-timeline {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-entry {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
}

/* Date, dot, and version live stacked in the left margin (outside the
   card) — the connecting line starts below the version chip and runs
   down to the next entry's date, so it reads as one continuous rail. */
.changelog-entry-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.changelog-date {
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.changelog-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px currentColor;
}

.changelog-dot--added {
  color: var(--blue, #2563eb);
  background: var(--blue, #2563eb);
}

.changelog-dot--improved {
  color: #0d9488;
  background: #0d9488;
}

.changelog-dot--fixed {
  color: #d97706;
  background: #d97706;
}

.changelog-version {
  margin-top: 8px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-soft, #f8fafc);
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
}

.changelog-line {
  flex: 1 1 auto;
  width: 2px;
  min-height: 24px;
  margin-top: 10px;
  background: linear-gradient(#e2e8f0, #e2e8f0 90%, transparent);
}

.changelog-entry:last-child .changelog-line {
  display: none;
}

.changelog-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  min-width: 0;
  padding: 20px 22px 22px;
  margin-bottom: 22px;
  border: 1px solid #e4eaf2;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(23, 32, 51, 0.07);
  transition: box-shadow .2s ease, transform .2s ease;
}

.changelog-card:hover {
  box-shadow: 0 20px 44px rgba(23, 32, 51, 0.11);
  transform: translateY(-2px);
}

.changelog-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
}

.changelog-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.changelog-icon--added {
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue, #2563eb);
}

.changelog-icon--improved {
  background: rgba(13, 148, 136, 0.1);
  color: #0d9488;
}

.changelog-icon--fixed {
  background: rgba(217, 119, 6, 0.1);
  color: #d97706;
}

.changelog-card-body {
  min-width: 0;
  flex: 1 1 auto;
}

.changelog-card h2 {
  margin: 0 0 12px;
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1.3;
}

.changelog-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.changelog-points li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #435066;
  font-size: 0.92rem;
  line-height: 1.55;
}

.changelog-tag {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.changelog-tag--added {
  background: rgba(37, 99, 235, 0.12);
  color: var(--blue, #2563eb);
}

.changelog-tag--improved {
  background: rgba(13, 148, 136, 0.12);
  color: #0d9488;
}

.changelog-tag--fixed {
  background: rgba(217, 119, 6, 0.12);
  color: #d97706;
}

/* ---- Mobile shell variant ---- */
.m-body .changelog-main {
  width: auto;
  margin: 0;
  padding: 16px 16px 8px;
}

.m-body .changelog-timeline {
  margin-top: 6px;
}

.m-body .changelog-entry {
  grid-template-columns: 74px 1fr;
  gap: 12px;
}

.m-body .changelog-date {
  font-size: 0.64rem;
}

.m-body .changelog-dot {
  width: 12px;
  height: 12px;
}

.m-body .changelog-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.m-body .changelog-icon svg {
  width: 18px;
  height: 18px;
}

.m-body .changelog-card {
  padding: 14px 16px 16px;
  gap: 12px;
  margin-bottom: 14px;
  border-radius: 14px;
}

.m-body .changelog-card h2 {
  font-size: 1rem;
}

@media (max-width: 560px) {
  .changelog-entry {
    grid-template-columns: 74px 1fr;
    gap: 12px;
  }

  .changelog-card {
    padding: 14px 16px 16px;
  }
}

/* ---- RTL ---- */
[dir="rtl"] .changelog-tag {
  letter-spacing: 0;
}
