/* Changelog (WWR-100). Layers on /styles.css and reuses its brand tokens
   (--fg, --muted, --border, --card, --terracotta, --max, --ease). Linear-style:
   a single continuous vertical rail with a dot + date per entry in the left
   gutter, a wide gap to a content column that leads with the title, and bundled
   changes tucked into expandable sections at the bottom. */

/* ---- page header ---- */
.changelog-head {
  max-width: 60rem;
  margin: 1rem auto 0;
  padding: 3rem 1.5rem 2rem;
}
.changelog-head h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: -0.01em;
  line-height: 1.05;
  text-wrap: balance;
}

/* ---- timeline ---- */
.timeline {
  position: relative;
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}
/* One uninterrupted vertical line down the gutter; per-entry dots sit on it. */
.timeline::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: 2.75rem;
  bottom: 5rem;
  width: 1px;
  background: var(--border);
}

/* Two columns: a date gutter carrying the rail, and the content. The rail's
   left border is the continuous vertical line; stacked entries with no gap keep
   it unbroken. */
.entry-timeline {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 8rem;
  padding: 2.75rem 0;
  scroll-margin-top: 5rem;
}
.entry-rail {
  position: relative;
  padding-left: 1.5rem;
}
/* Dot marker centered on the timeline line, aligned to the date. */
.entry-rail::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 0.5rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 3px var(--bg);
}
/* Newest entry gets an accent dot. */
.entry-timeline:first-child .entry-rail::before {
  background: var(--terracotta);
}

.entry-date {
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- content ---- */
.entry-main {
  position: relative;
  min-width: 0;
}
.entry-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  font-size: 1.7rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.entry-title a {
  transition: color 0.15s var(--ease);
}
.entry-title a:hover {
  color: var(--teal);
}

.entry-image {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

/* ---- body prose ---- */
.entry-body {
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
}
.entry-body > * + * {
  margin-top: 0.9rem;
}
.entry-body strong {
  color: var(--fg);
  font-weight: 600;
}
.entry-body a {
  color: var(--terracotta);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-body ul {
  padding-left: 1.1rem;
  list-style: disc;
}
.entry-body li + li {
  margin-top: 0.35rem;
}
.entry-body code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.85em;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.05rem 0.35rem;
  border-radius: 0.35rem;
}

/* ---- collapsible sections (bundled changes) ---- */
.entry-sections {
  margin-top: 1.75rem;
}
.entry-section {
  border-top: 1px solid var(--border);
}
/* No divider between the body and the first section; keep them between sections. */
.entry-section:first-child {
  border-top: none;
}
.entry-section summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
}
.entry-section summary::-webkit-details-marker {
  display: none;
}
.entry-section summary::after {
  content: "›";
  font-family: "Space Mono", ui-monospace, monospace;
  color: var(--muted);
  transition: transform 0.15s var(--ease);
}
.entry-section[open] summary::after {
  transform: rotate(90deg);
}
.entry-section ul {
  padding: 0 0 1rem 1.1rem;
  list-style: disc;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.entry-section li + li {
  margin-top: 0.4rem;
}

/* ---- share button (single-entry page only) ---- */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s var(--ease);
}
.share-btn:hover {
  color: var(--fg);
}
.share-btn svg {
  opacity: 0.85;
}

/* ---- copy toast ---- */
.toast {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: var(--card);
  color: var(--fg);
  font-size: 0.85rem;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 0.2s var(--ease),
    transform 0.2s var(--ease);
  z-index: 50;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- single-entry page ---- */
.timeline-single {
  max-width: 42rem;
  padding-top: 1.5rem;
}
/* No timeline rail on the single-entry page. */
.timeline-single::before {
  display: none;
}
.entry-pagehead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.changelog-back {
  display: inline-block;
  margin-bottom: 2rem;
  font-family: "Space Mono", ui-monospace, monospace;
  font-size: 0.8rem;
  color: var(--muted);
  transition: color 0.15s var(--ease);
}
.changelog-back:hover {
  color: var(--fg);
}
.entry-page .entry-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

/* ---- responsive: collapse the gutter, keep the rail line ---- */
@media (max-width: 680px) {
  .entry-timeline {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .timeline::before {
    display: none;
  }
  .entry-rail {
    padding-left: 0;
    padding-bottom: 0.75rem;
  }
  .entry-rail::before {
    display: none;
  }
}
