/* Preppr Changelog — built on the Preppr design system tokens (colors_and_type.css) */

:root {
  --cl-accent: #3ABB91;        /* accent — Preppr green (eyebrow, unread, markers) */
  --cl-accent-soft: #e7f7f1;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: #fff;            /* changelog is light/white, unlike the dashboard bg */
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button { font-family: inherit; }
::selection { background: rgba(58,187,145,0.25); }
a { color: var(--ocean-600); text-decoration: none; }
a:hover { text-decoration: none; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 32px; }
.wrap-narrow { max-width: 1000px; margin: 0 auto; padding: 0 32px; }
.muted { color: var(--fg-muted); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .bar { height: 64px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; flex-shrink: 0; }
.brand img { height: 26px; }
.brand .tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-muted); padding-left: 12px; margin-left: 2px; border-left: 1px solid var(--border);
  align-self: center; line-height: 1;
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  font-size: 14px; font-weight: 600; color: var(--secondary-400); white-space: nowrap;
  padding: 8px 12px; border-radius: var(--radius-md); transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--neutral-100); }
.nav-links a.active { color: var(--primary-700); }
.nav-links a.nav-ext { color: var(--fg-muted); display: inline-flex; align-items: center; gap: 5px; }
.nav-links a.nav-ext svg { color: var(--fg-subtle); }
.nav-links a.nav-ext:hover svg { color: var(--primary-600); }
.nav-div { width: 1px; height: 22px; background: var(--border); margin: 0 4px; flex-shrink: 0; }
.nav-login { font-size: 14px; font-weight: 700; color: var(--secondary-400); padding: 8px 12px; border-radius: var(--radius-md); white-space: nowrap; transition: background .15s; }
.nav-login:hover { background: var(--neutral-100); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font-weight: 700; font-size: 14px; border-radius: var(--radius-md);
  padding: 9px 18px; cursor: pointer; border: 1px solid transparent;
  transition: background .15s, box-shadow .15s, transform .1s, border-color .15s; white-space: nowrap;
}
.btn-primary { background: var(--primary-500); color: #fff; }
.btn-primary:hover { background: var(--primary-600); }
.btn-navy { background: var(--secondary-400); color: #fff; }
.btn-navy:hover { background: var(--secondary-500); }
.btn-outline { background: #fff; color: var(--secondary-400); border-color: var(--border); }
.btn-outline:hover { background: var(--neutral-50); border-color: var(--neutral-300); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ============ HERO ============ */
.cl-hero { padding: 72px 0 40px; text-align: center; }
.cl-hero .wrap-narrow { max-width: 760px; }
.cl-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--cl-accent); margin-bottom: 18px;
}
.cl-hero-eyebrow svg { color: var(--cl-accent); }
.cl-hero h1 {
  font-family: var(--font-display); font-weight: 700; color: var(--fg-heading);
  font-size: 42px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 18px;
}
.cl-hero-intro { font-size: 17px; line-height: 1.6; color: var(--fg-muted); margin: 0 auto 28px; max-width: 660px; }
.cl-hero-find { display: inline-block; text-align: left; margin: 0 auto; }
.cl-find-label { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 12px; text-align: center; }
.cl-hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.cl-hero-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--fg); line-height: 1.45; }
.cl-hero-list li svg { color: var(--primary-600); flex-shrink: 0; margin-top: 2px; }
.cl-hero-sub { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.cl-hero-sub p { font-size: 18px; color: var(--fg-muted); margin: 0 0 18px; }

/* ============ SUBSCRIBE ============ */
.cl-subscribe { position: relative; display: inline-block; }
.cl-subscribe .btn-outline { border-radius: var(--radius-full); padding: 9px 20px; }
.cl-sub-pop {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(-6px);
  width: 280px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2xl); padding: 8px; z-index: 60;
  opacity: 0; visibility: hidden; transition: opacity .15s, transform .15s, visibility .15s;
}
.cl-subscribe.open .cl-sub-pop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.cl-sub-pop a { display: flex; gap: 12px; align-items: flex-start; padding: 11px 12px; border-radius: var(--radius-md); text-align: left; transition: background .12s; }
.cl-sub-pop a:hover { background: var(--neutral-50); }
.cl-sub-pop a svg { color: var(--primary-600); margin-top: 2px; flex-shrink: 0; }
.cl-sub-pop strong { display: block; font-size: 14px; color: var(--fg-heading); }
.cl-sub-pop span { display: block; font-size: 12.5px; color: var(--fg-muted); margin-top: 1px; }

/* ============ TWO-COLUMN HOME (sticky intro · scrollable feed) ============ */
.cl-layout-section { padding: 48px 0 64px; }
.cl-layout {
  display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  gap: 50px; align-items: start;
}
.cl-left { position: sticky; top: 88px; text-align: left; }
.cl-left h1 {
  font-family: var(--font-display); font-weight: 700; color: var(--fg-heading);
  font-size: 34px; line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px;
}
.cl-left .cl-hero-eyebrow { margin-bottom: 16px; }
.cl-left .cl-hero-intro { margin: 0 0 24px; max-width: none; font-size: 16px; }
.cl-left .cl-hero-find { display: block; }
.cl-left .cl-find-label { text-align: left; }
.cl-left .cl-hero-sub { margin-top: 28px; padding-top: 24px; text-align: left; }
.cl-left .cl-hero-sub p { font-size: 16px; }
.cl-left .cl-subscribe .cl-sub-pop { left: 0; transform: translateX(0) translateY(-6px); }
.cl-left .cl-subscribe.open .cl-sub-pop { transform: translateX(0) translateY(0); }
.cl-left .cl-count { justify-content: flex-start; margin: 22px 0 0; }

/* right column is the fixed-height scroller; the timeline inside keeps its natural
   height so the dashed rail spans the full content (not just the visible area). */
.cl-right {
  min-width: 0; height: calc(100vh - 168px); min-height: 440px;
  overflow-y: auto; overscroll-behavior: contain; padding: 14px 6px 12px 18px;
  scrollbar-width: thin; scrollbar-color: var(--neutral-300) transparent;
}
.cl-right::-webkit-scrollbar { width: 8px; }
.cl-right::-webkit-scrollbar-thumb { background: var(--neutral-300); border-radius: 8px; }
.cl-right::-webkit-scrollbar-track { background: transparent; }
.cl-right .cl-timeline { padding: 4px 18px 8px 0; }
.cl-right .cl-timeline::before { left: 6px; top: 12px; bottom: 24px; }
.cl-right .cl-release { grid-template-columns: 1fr; gap: 12px; padding-left: 30px; padding-bottom: 40px; }
.cl-right .cl-dot { left: 6px; top: 8px; }

/* ============ TIMELINE ============ */
.cl-main { padding: 8px 0 72px; }
.cl-count {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 13px; font-weight: 700; color: var(--fg-subtle); margin: 0 0 40px;
}
.cl-count-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary-500); animation: statpulse 2.4s infinite; }

.cl-timeline { position: relative; }
/* continuous dashed rail */
.cl-timeline::before {
  content: ''; position: absolute; left: 240px; top: 10px; bottom: 30px;
  border-left: 2px dashed var(--neutral-300);
}
.cl-release {
  display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 56px;
  position: relative; padding-bottom: 64px;
}
.cl-release:last-child { padding-bottom: 0; }
.cl-dot {
  position: absolute; left: 240px; top: 7px; width: 13px; height: 13px; margin-left: -7px;
  border-radius: 50%; background: var(--primary-500);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(58,187,145,0.30);
  animation: cldotpulse 2.2s ease-out infinite;
}
/* white ring (4px) stays put to mask the rail; the green ring pulses outward */
@keyframes cldotpulse {
  0%   { box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(58,187,145,0.45); }
  70%  { box-shadow: 0 0 0 4px #fff, 0 0 0 13px rgba(58,187,145,0); }
  100% { box-shadow: 0 0 0 4px #fff, 0 0 0 13px rgba(58,187,145,0); }
}
.cl-aside { position: relative; }
.cl-unread {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--cl-accent); background: var(--cl-accent-soft);
  border: 1px solid #bfe8db; padding: 3px 9px 3px 7px; border-radius: var(--radius-full);
}
.cl-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cl-accent); }
.cl-date { font-size: 13px; font-weight: 600; color: var(--fg-subtle); margin-bottom: 6px; }
.cl-title {
  font-family: var(--font-display); font-size: 27px; line-height: 1.15; font-weight: 700;
  color: var(--fg-heading); margin: 0; letter-spacing: -0.01em;
}
.cl-title a { color: inherit; }
.cl-title a:hover { color: var(--primary-700); }

/* release body (rendered Markdown) */
.cl-body { font-size: 15.5px; line-height: 1.65; color: var(--fg-muted); padding-top: 4px; }
.cl-body h2 {
  font-family: var(--font-display); font-size: 14px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--fg-heading);
  margin: 34px 0 16px; padding-bottom: 9px; border-bottom: 1px solid var(--border);
}
.cl-body h2:first-child { margin-top: 0; }
.cl-body h3 {
  font-family: var(--font-sans); font-size: 17px; font-weight: 700; line-height: 1.35;
  color: var(--fg-heading); margin: 22px 0 7px;
}
.cl-body h3:first-child { margin-top: 0; }
.cl-body h2 + h3 { margin-top: 4px; }
.cl-body p { margin: 0 0 14px; }
.cl-body ul, .cl-body ol { margin: 0 0 14px; padding-left: 20px; }
.cl-body li { margin: 0 0 6px; }
.cl-body li::marker { color: var(--cl-accent); }
.cl-body strong { font-weight: 700; color: var(--fg-heading); }
.cl-body a { color: var(--ocean-600); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(10,132,201,0.3); text-underline-offset: 2px; }
.cl-body a:hover { text-decoration-color: var(--ocean-600); }
.cl-body code { font-family: var(--font-mono); font-size: 0.875em; background: var(--neutral-100); border: 1px solid var(--border); padding: 1px 6px; border-radius: var(--radius-sm); color: var(--secondary-500); }

/* ---- lazy-load placeholders (body fetched on scroll) ---- */
.cl-teaser { color: var(--fg-muted); font-size: 15.5px; line-height: 1.65; margin: 0; }
.cl-skeleton {
  height: 12px; border-radius: 6px; margin-top: 14px; max-width: 78%;
  background: linear-gradient(90deg, var(--neutral-100) 25%, var(--neutral-50) 37%, var(--neutral-100) 63%);
  background-size: 400% 100%; animation: clshimmer 1.3s ease-in-out infinite;
}
@keyframes clshimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .cl-skeleton { animation: none; } }

/* ============ SINGLE RELEASE PAGE ============ */
.cl-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--fg-muted); margin: 8px 0 28px; }
.cl-back:hover { color: var(--primary-700); }
.cl-release-solo { padding-bottom: 32px; }
.cl-release-solo .cl-title { font-size: 32px; }
.cl-prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; padding-top: 28px; border-top: 1px solid var(--border); }
.cl-pn { display: inline-flex; align-items: center; gap: 12px; max-width: 48%; color: var(--secondary-400); }
.cl-pn small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fg-subtle); margin-bottom: 2px; }
.cl-pn span { font-size: 14px; font-weight: 700; color: var(--fg-heading); line-height: 1.3; }
.cl-pn-next { margin-left: auto; text-align: right; }
.cl-pn:hover span { color: var(--primary-700); }
.cl-pn svg { color: var(--fg-subtle); flex-shrink: 0; }

/* ============ FOOTER ============ */
.site-footer { background: var(--secondary-500); color: rgba(255,255,255,0.7); margin-top: 8px; }
.footer-top { display: grid; grid-template-columns: 1.25fr 2.75fr; gap: 56px; padding: 56px 0 40px; align-items: start; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.footer-brand img { height: 26px; margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.6); margin: 0 0 18px; max-width: 280px; }
.footer-col h5 { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin: 0 0 14px; }
.footer-col a { display: block; font-size: 14px; color: rgba(255,255,255,0.75); padding: 6px 0; transition: color .12s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 12px; }
.footer-bottom .fb-links { display: flex; gap: 20px; }
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-bottom a:hover { color: #fff; }
.status-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.8); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary-400); animation: statpulse 2.4s infinite; }
@keyframes statpulse { 0% { box-shadow: 0 0 0 0 rgba(58,187,145,0.5); } 70% { box-shadow: 0 0 0 6px rgba(58,187,145,0); } 100% { box-shadow: 0 0 0 0 rgba(58,187,145,0); } }

/* ============ VIEW FADE / LOADING / 404 ============ */
.view { animation: fadeUp .28s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; } html { scroll-behavior: auto; }
  .cl-dot, .cl-count-dot, .status-dot { animation: none; }
}
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 62vh; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary-500); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.no-results { text-align: center; padding: 60px 20px; }
.no-results img { width: 150px; margin: 0 auto 20px; opacity: .95; }
.no-results h3 { font-size: 20px; color: var(--fg-heading); margin: 0 0 8px; }
.no-results p { font-size: 15px; color: var(--fg-muted); margin: 0 auto 20px; max-width: 420px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .cl-layout { grid-template-columns: 1fr; gap: 4px; }
  .cl-left { position: static; }
  .cl-left .cl-hero-sub { margin-top: 24px; }
  .cl-right { height: auto; min-height: 0; overflow: visible; padding-right: 0; }
  .cl-right .cl-timeline { padding-right: 0; }
}
@media (max-width: 820px) {
  .wrap, .wrap-narrow { padding: 0 20px; }
  .cl-hero { padding: 48px 0 32px; }
  .cl-hero h1 { font-size: 32px; }
  .cl-timeline::before { left: 6px; }
  .cl-release { grid-template-columns: 1fr; gap: 16px; padding-left: 30px; padding-bottom: 48px; }
  .cl-dot { left: 6px; top: 8px; }
  .cl-release-solo { padding-left: 30px; }
  .nav-links a.nav-ext, .nav-div, .nav-login { display: none; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 28px; }
}
@media (max-width: 560px) {
  .brand .tag { display: none; }
  .wrap, .wrap-narrow { padding: 0 16px; }
  .site-header .bar { gap: 12px; }
  /* phones: show only the primary button in the nav — the logo returns to the changelog home */
  .nav-links a:not(.btn) { display: none; }
  .nav-links .btn-sm { padding: 6px 10px; font-size: 12.5px; }
  .cl-prevnext { flex-direction: column; }
  .cl-pn, .cl-pn-next { max-width: 100%; margin-left: 0; text-align: left; }
}
