/* Per-version release note pages and the release archive on /releases.
   Generated by website/scripts/prerender.js - see that file for context. */

/* ---------------------------------------------------------------------------
   Markdown body

   .notes-content sets white-space: pre-wrap for the plain-text fallback that
   renders when marked/DOMPurify fail to load. Real markup must opt back out or
   every block element inherits the source file's blank lines.
   --------------------------------------------------------------------------- */
.notes-markdown {
  white-space: normal;
}

.notes-markdown > *:first-child { margin-top: 0; }
.notes-markdown > *:last-child { margin-bottom: 0; }

.notes-markdown h2,
.notes-markdown h3,
.notes-markdown h4,
.notes-markdown h5,
.notes-markdown h6 {
  color: #111827;
  font-weight: 700;
  line-height: 1.35;
  margin: 1.75rem 0 0.75rem;
}

.notes-markdown h2 { font-size: 1.35rem; }
.notes-markdown h3 { font-size: 1.125rem; }
.notes-markdown h4,
.notes-markdown h5,
.notes-markdown h6 { font-size: 1rem; }

.notes-markdown p { margin: 0 0 1rem; }

.notes-markdown ul,
.notes-markdown ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.notes-markdown li { margin-bottom: 0.4rem; }

.notes-markdown strong { color: #1f2937; font-weight: 600; }

.notes-markdown code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 0.35rem;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  color: #047857;
}

.notes-markdown pre {
  margin: 0 0 1rem;
  padding: 1rem;
  overflow-x: auto;
  border-radius: 0.6rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.notes-markdown pre code {
  padding: 0;
  border: 0;
  background: none;
  color: #374151;
}

.notes-markdown hr {
  margin: 1.75rem 0;
  border: 0;
  border-top: 1px solid #e5e7eb;
}

.notes-markdown a { color: #059669; text-decoration: underline; }
.notes-markdown a:hover { color: #047857; }

/* ---------------------------------------------------------------------------
   "Read the full notes" link on a release card
   --------------------------------------------------------------------------- */
.release-notes-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #059669;
  text-decoration: none;
}

.release-notes-link:hover { color: #047857; }
.release-notes-link i { font-size: 0.75rem; transition: transform 0.2s ease; }
.release-notes-link:hover i { transform: translateX(3px); }

/* Download links are anchors in the prerendered markup and buttons once the
   client script takes over; keep the two looking identical. */
.release-downloads a.download-btn { text-decoration: none; }

/* ---------------------------------------------------------------------------
   Release archive (all versions) on /releases
   --------------------------------------------------------------------------- */
.release-archive {
  max-width: 900px;
  margin: 3.5rem auto 0;
  padding: 2rem;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  background: #ffffff;
}

.release-archive-title {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
}

.release-archive-intro {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  color: #6b7280;
}

.release-archive-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-archive-list a,
.release-archive-list .archive-plain {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s ease;
}

.release-archive-list a:hover {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.release-archive-list .archive-plain {
  color: #9ca3af;
  font-weight: 500;
  background: #fafafa;
}

.archive-date {
  font-size: 0.75rem;
  font-weight: 400;
  color: #9ca3af;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------
   Version page
   --------------------------------------------------------------------------- */
.version-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.version-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.version-breadcrumb a { color: #6b7280; text-decoration: none; }
.version-breadcrumb a:hover { color: #059669; }
.version-breadcrumb i { font-size: 0.6rem; }

.version-header {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

.version-title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

.version-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.version-meta .release-date {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.version-notes {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: #4b5563;
}

.version-page .release-downloads {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.85rem;
  background: #f9fafb;
}

.version-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 2.5rem;
}

.version-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1 1 220px;
  padding: 0.85rem 1.1rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  background: #ffffff;
  color: #1f2937;
  text-decoration: none;
  transition: all 0.2s ease;
}

.version-nav-link:hover {
  border-color: #10b981;
  background: #ecfdf5;
}

.version-nav-link.next { justify-content: flex-end; text-align: right; }

.version-nav-link span {
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.version-nav-link strong {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #1f2937;
}

.version-nav-link i { color: #10b981; }

.version-back {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.version-back a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #059669;
  font-weight: 600;
  text-decoration: none;
}

.version-back a:hover { color: #047857; }

@media (max-width: 640px) {
  .release-archive { padding: 1.5rem 1.25rem; }
  .version-page { padding: 2rem 1.25rem 3rem; }
  .version-nav-link { flex: 1 1 100%; }
}