/* ═══════════════════════════════════════════════════════
   Changelog Page — Article / Document Style
   ═══════════════════════════════════════════════════════ */
body { background: #fff; }

/* ── Hero ─────────────────────────────────────────────── */
.cl-hero {
  background: #fff;
  color: #1a1a1a;
  padding: 10rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}
.cl-hero-inner { max-width: 640px; margin: 0 auto; }
.cl-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.875rem;
  border-radius: 100px;
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 1.25rem;
}
.cl-hero-badge i {
  color: #1a1a1a;
  display: inline-block;
  animation: cl-rocket 3s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes cl-rocket {
  0%   { transform: translateX(0) rotate(0deg); }
  30%  { transform: translateX(6px) rotate(0deg); }
  38%  { transform: translateX(8px) rotate(0deg) scale(1.1); }
  44%  { transform: translateX(-4px) rotate(-15deg) scale(1); }
  52%  { transform: translateX(2px) rotate(8deg); }
  60%  { transform: translateX(-1px) rotate(-4deg); }
  70%  { transform: translateX(0) rotate(0deg); }
  100% { transform: translateX(0) rotate(0deg); }
}
.cl-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: #1a1a1a;
}
.cl-subtitle {
  font-size: 1.0625rem;
  color: #999;
  font-weight: 500;
  line-height: 1.7;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Stats row ────────────────────────────────────────── */
.cl-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}
.cl-stat { text-align: center; }
.cl-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
}
.cl-stat-label {
  font-size: 0.75rem;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.125rem;
}

/* ── Main layout ──────────────────────────────────────── */
.cl-body {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  gap: 4rem;
  padding: 3rem 2rem 6rem;
}

/* ── Sidebar ──────────────────────────────────────────── */
.cl-sidebar {
  position: sticky;
  top: 5rem;
  flex-shrink: 0;
  width: 180px;
  align-self: flex-start;
  padding: 0.5rem 0;
}
.cl-sidebar-title {
  font-size: 0.6875rem;
  font-weight: 700;
  color: #bbb;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
}
.cl-sidebar-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cl-sidebar-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  text-decoration: none;
  color: #999;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: all 0.15s;
}
.cl-sidebar-list a:hover { background: #f7f7f7; color: #1a1a1a; }
.cl-sidebar-list a.active {
  color: #1a1a1a;
  background: #f5f5f5;
  font-weight: 700;
}
.cl-sidebar-list .cl-sb-ver { font-weight: inherit; }
.cl-sidebar-list .cl-sb-date { font-size: 0.75rem; color: #ccc; font-weight: 500; margin-left: auto; }
.cl-sidebar-list a.active .cl-sb-date { color: #aaa; }

/* ── Content area ─────────────────────────────────────── */
.cl-content { flex: 1; min-width: 0; }

/* ── Article prose (PWA guide, etc.) ──────────────────── */
.cl-content article h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  margin: 2.5rem 0 1rem;
}
.cl-content article h2:first-child { margin-top: 0; }
.cl-content article p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.85;
  font-weight: 500;
  margin-bottom: 0.9rem;
}
.cl-content article ul,
.cl-content article ol {
  margin: 0.75rem 0 1rem 1.25rem;
  padding: 0;
}
.cl-content article li {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.85;
  font-weight: 500;
}
.cl-content article li + li {
  margin-top: 0.35rem;
}
.cl-content article a {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.15);
  text-underline-offset: 2px;
}
.cl-content article a:visited {
  color: #1a1a1a;
}
.cl-content article a:hover {
  text-decoration-color: #000;
}
.cl-content article strong {
  color: #1a1a1a;
  font-weight: 700;
}

/* ── Entry (article style) ────────────────────────────── */
.cl-entry {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid #f0f0f0;
  scroll-margin-top: 5rem;
}
.cl-entry:last-child { border-bottom: none; margin-bottom: 0; }

.cl-entry-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.cl-version-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  background: #f5f5f5;
  color: #1a1a1a;
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  letter-spacing: 0.02em;
}
.cl-date {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #bbb;
}
.cl-version-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1a1a1a;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  line-height: 1.35;
}

/* ── Change list ──────────────────────────────────────── */
.cl-changes {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.cl-changes li {
  display: block;
  line-height: 1.6;
}
.cl-changes li .cl-change-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
}
.cl-changes li .cl-change-head strong {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #1a1a1a;
}
.cl-changes li .cl-change-desc {
  font-size: 0.8125rem;
  color: #888;
  font-weight: 500;
  line-height: 1.65;
  padding-left: 0.125rem;
}
.cl-changes li .cl-change-text {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
  line-height: 1.7;
}
.cl-changes a,
.cl-changes a:visited {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.15);
  text-underline-offset: 2px;
}
.cl-changes a:hover {
  text-decoration-color: #000;
}
.cl-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}
.cl-tag-new { background: #f5f5f5; color: #1a1a1a; }
.cl-tag-improved { background: #f0f0f0; color: #333; }
.cl-tag-fixed { background: #f0f0f0; color: #555; }

/* ── Developer diary (inside version entry) ───────────── */
.cl-diary {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
}
.cl-diary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  user-select: none;
  padding: 0.5rem 0;
}
.cl-diary-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.cl-diary-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
}
.cl-diary-title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.cl-diary-toggle {
  margin-left: auto;
  font-size: 1.125rem;
  color: #999;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.cl-diary.cl-diary-collapsed .cl-diary-toggle { transform: rotate(180deg); }
.cl-diary-body {
  transition: max-height 0.4s ease, opacity 0.3s ease;
}
.cl-diary.cl-diary-collapsed .cl-diary-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
.cl-diary-body p {
  font-size: 0.9375rem;
  color: #555;
  line-height: 1.85;
  font-weight: 500;
  margin-bottom: 0.875rem;
}
.cl-diary-body p:first-child { margin-top: 0.75rem; }
.cl-diary-body p:last-child { margin-bottom: 0; }
.cl-diary-body a {
  color: #1a1a1a;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.15);
  text-underline-offset: 2px;
}
.cl-diary-body a:hover { text-decoration-color: #000; }

/* ── Footer ───────────────────────────────────────────── */
.cl-footer {
  text-align: center;
  padding: 2.5rem 2rem;
  color: #bbb;
  font-size: 0.8125rem;
  font-weight: 600;
  border-top: 1px solid #eee;
}
.cl-footer a { color: #888; text-decoration: none; font-weight: 700; }
.cl-footer a:hover { color: #1a1a1a; }

/* ── Mobile version pills ─────────────────────────────── */
.cl-mobile-versions {
  display: none;
  overflow-x: auto;
  flex-wrap: nowrap;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 3.5rem;
  z-index: 50;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.cl-mobile-versions::-webkit-scrollbar { display: none; }
.cl-mobile-versions a {
  flex-shrink: 0;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: #f5f5f5;
  color: #999;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 700;
  transition: all 0.15s;
  white-space: nowrap;
}
.cl-mobile-versions a.active { background: #1a1a1a; color: #fff; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .cl-sidebar { display: none; }
  .cl-mobile-versions { display: flex; }
  .cl-body { padding: 2rem 1.5rem 4rem; gap: 0; }
}
@media (max-width: 768px) {
  .cl-hero { padding: 8rem 1.5rem 2.5rem; }
  .cl-stats { gap: 1.5rem; }
  .cl-stat-num { font-size: 1.25rem; }
  .cl-version-title { font-size: 1.25rem; }
  .cl-diary-title { font-size: 1rem; }
}
@media (max-width: 480px) {
  .cl-hero { padding: 7rem 1.25rem 2rem; }
  .cl-hero-badge { font-size: 0.75rem; }
  .cl-subtitle { font-size: 0.9375rem; }
  .cl-stats { gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; }
  body[data-legal-page] .cl-stats { flex-direction: column; align-items: center; gap: 0.75rem; }
  .cl-stat-num { font-size: 1.125rem; }
  .cl-stat-label { font-size: 0.6875rem; }
  .cl-body { padding: 1.5rem 1.25rem 3rem; }
  .cl-entry { padding-bottom: 2rem; margin-bottom: 2rem; }
  .cl-version-title { font-size: 1.125rem; margin-bottom: 1rem; }
  .cl-changes li .cl-change-head strong { font-size: 0.875rem; }
  .cl-changes li .cl-change-desc { font-size: 0.8125rem; }
  .cl-diary-body p { font-size: 0.875rem; }
}
