/* ============================================================
   changelog.css — Linear-style changelog for HealthdeskAI
   Mobile-first. Scoped with .cl- prefix.
   ============================================================ */

:root {
  --cl-border: rgba(42, 40, 64, 0.08);
  --cl-border-strong: rgba(42, 40, 64, 0.14);
  --cl-text-muted: rgba(42, 40, 64, 0.62);
  --cl-text-body: rgba(42, 40, 64, 0.82);
  --cl-bg-soft: rgba(42, 40, 64, 0.03);
  --cl-grad: linear-gradient(135deg, #33C4E5, #6657CC);
}

.cl-page main { background: #fff; }

/* ---------- HERO ---------- */
.cl-hero {
  position: relative;
  background:
    radial-gradient(800px 280px at 8% -20%, rgba(0,161,214,0.10), transparent 70%),
    radial-gradient(700px 240px at 92% -10%, rgba(102,87,204,0.10), transparent 70%),
    #fff;
  padding: 56px 0 36px;
  border-bottom: 1px solid var(--cl-border);
}
.cl-hero-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
.cl-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cl-text-muted);
  margin-bottom: 16px;
}
.cl-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cl-grad);
  box-shadow: 0 0 0 4px rgba(102,87,204,0.10);
}
.cl-h1 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #2A2840;
  margin: 0 0 18px;
}
.cl-h1 em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  background: var(--cl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cl-lede {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.55;
  color: var(--cl-text-muted);
  max-width: 640px;
  margin: 0 0 28px;
}

/* ---------- Newsletter card ---------- */
.cl-news {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(51,196,229,0.07), rgba(102,87,204,0.07));
  border: 1px solid var(--cl-border);
  position: relative;
}
.cl-news-copy { flex: 1 1 300px; min-width: 0; }
.cl-news-h {
  font-weight: 700; font-size: 15px; color: #2A2840;
  margin: 0 0 3px;
}
.cl-news-sub {
  font-size: 13px; color: var(--cl-text-muted); margin: 0; line-height: 1.5;
}
.cl-news-form {
  display: flex; gap: 8px; flex: 1 1 260px; min-width: 240px;
  position: relative;
}
.cl-news-honeypot { position: absolute; left: -9999px; top: -9999px; }
.cl-news-form input[type="email"] {
  flex: 1; min-width: 0;
  padding: 11px 14px; font-size: 14px;
  border: 1px solid var(--cl-border-strong);
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  color: #2A2840;
}
.cl-news-form input[type="email"]:focus {
  outline: none;
  border-color: rgba(102,87,204,0.55);
  box-shadow: 0 0 0 3px rgba(102,87,204,0.12);
}
.cl-news-form button {
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  border: none; border-radius: 8px;
  background: var(--cl-grad); color: #fff;
  cursor: pointer; font-family: inherit;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.cl-news-form button:hover { transform: translateY(-1px); filter: brightness(1.05); }
.cl-news-form button:disabled { opacity: 0.6; cursor: wait; }
.cl-news-success {
  flex: 1 1 100%;
  font-size: 14px; font-weight: 600;
  color: #1E7A4F;
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(30, 122, 79, 0.08);
  border-radius: 10px;
  transform-origin: center;
}
.cl-news-success.is-visible { display: flex; }
.cl-news-error {
  font-size: 13px; color: #c43a3a; margin-top: 10px; min-height: 18px;
}

/* ---------- Celebration (matches Help Center + Blog) ---------- */
.cl-news-success.is-celebrating {
  animation: cl-success-pop 0.7s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes cl-success-pop {
  0%   { opacity: 0; transform: scale(.5) translateY(8px); }
  55%  { opacity: 1; transform: scale(1.08) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
.cl-news-success.is-celebrating svg {
  animation: cl-check-pulse 1.2s ease-out;
}
@keyframes cl-check-pulse {
  0%, 100% { transform: scale(1); }
  30%      { transform: scale(1.35) rotate(-8deg); }
  60%      { transform: scale(1.15) rotate(4deg); }
}

/* Confetti — particles burst from the success message on submit */
.cl-confetti {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  width: 0; height: 0;
}
.cl-confetti-piece {
  position: absolute;
  left: 0; top: 0;
  width: 9px; height: 9px;
  border-radius: 2px;
  transform: translate(-50%, -50%);
  animation: cl-confetti-fly 1100ms cubic-bezier(.18, .76, .3, 1) forwards;
  will-change: transform, opacity;
}
.cl-confetti-piece.round  { border-radius: 50%; }
.cl-confetti-piece.streak { width: 14px; height: 4px; border-radius: 2px; }
@keyframes cl-confetti-fly {
  0%   { transform: translate(-50%, -50%) rotate(0deg) scale(0.6); opacity: 1; }
  10%  { transform: translate(-50%, -50%) rotate(0deg) scale(1);   opacity: 1; }
  100% {
    transform:
      translate(calc(-50% + var(--dx)), calc(-50% + var(--dy)))
      rotate(var(--rot))
      scale(.7);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cl-news-success.is-celebrating,
  .cl-news-success.is-celebrating svg,
  .cl-confetti-piece { animation: none !important; }
  .cl-confetti { display: none !important; }
}

/* ---------- LIST OF UPDATES ---------- */
.cl-body {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.cl-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cl-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 40px;
  padding: 44px 0;
  border-bottom: 1px solid var(--cl-border);
}
.cl-row:first-child { padding-top: 0; }
.cl-row:last-child { border-bottom: none; }

.cl-row-meta {
  display: flex; flex-direction: column;
  gap: 8px;
  padding-top: 6px;
}
.cl-row-month {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 26px;
  background: var(--cl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}
.cl-row-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--cl-text-muted);
  letter-spacing: 0.02em;
}

.cl-row-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: 36px;
  align-items: start;
}
.cl-row-text { min-width: 0; }
.cl-row-title {
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
  color: #2A2840;
}
.cl-row-title a {
  color: inherit; text-decoration: none;
  background-image: var(--cl-grad);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.25s ease;
  padding-bottom: 1px;
}
.cl-row-title a:hover { background-size: 100% 2px; }
.cl-row-summary {
  font-size: 16px;
  line-height: 1.6;
  color: var(--cl-text-body);
  margin: 0 0 18px;
}
.cl-row-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 18px;
}
.cl-tag {
  display: inline-block;
  font-size: 11px;
  font-family: "JetBrains Mono", monospace;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--cl-bg-soft);
  color: rgba(42,40,64,0.72);
  border: 1px solid var(--cl-border);
}
.cl-row-link {
  font-size: 14px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  color: #6657CC;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  transition: gap 0.18s ease;
}
.cl-row-link:hover { gap: 10px; }

.cl-row-imgwrap {
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--cl-border);
  background: #f7f7fb;
  aspect-ratio: 16 / 10;
  position: relative;
  text-decoration: none;
}
.cl-row-imgwrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.cl-row:hover .cl-row-imgwrap img { transform: scale(1.02); }
.cl-row-imgwrap.cl-placeholder,
.cl-row-imgwrap img.cl-failed + .cl-placeholder-overlay {
  display: flex; align-items: center; justify-content: center;
}
.cl-row-imgwrap.cl-placeholder {
  background:
    linear-gradient(135deg, rgba(51,196,229,0.18), rgba(102,87,204,0.22)),
    radial-gradient(400px 200px at 30% 30%, rgba(255,255,255,0.45), transparent 60%);
}
.cl-placeholder-label {
  font-family: "Instrument Serif", serif; font-style: italic;
  font-size: clamp(28px, 4vw, 44px);
  color: rgba(42,40,64,0.45);
}

/* Tablet */
@media (max-width: 980px) {
  .cl-row { grid-template-columns: 1fr; gap: 18px; padding: 32px 0; }
  .cl-row-meta {
    flex-direction: row; align-items: baseline; gap: 14px; padding-top: 0;
  }
  .cl-row-body { grid-template-columns: 1fr; gap: 20px; }
  .cl-row-imgwrap { order: -1; aspect-ratio: 16 / 9; }
}

/* Mobile */
@media (max-width: 600px) {
  .cl-hero { padding: 40px 0 28px; }
  .cl-body { padding: 36px 16px 60px; }
  .cl-row { padding: 28px 0; }
  .cl-news { padding: 16px; }
  .cl-news-form { width: 100%; }
  .cl-row-month { font-size: 22px; }
}

/* ---------- ARTICLE PAGE ---------- */
.cl-art {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.cl-breadcrumb {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--cl-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 22px;
}
.cl-breadcrumb a {
  color: var(--cl-text-muted);
  text-decoration: none;
  transition: color 0.18s ease;
}
.cl-breadcrumb a:hover { color: #6657CC; }
.cl-breadcrumb .sep { margin: 0 8px; opacity: 0.5; }

.cl-art-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--cl-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.cl-art-date .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cl-grad);
}

.cl-art-h1 {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: clamp(32px, 4.8vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #2A2840;
  margin: 0 0 18px;
}
.cl-art-h1 em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  background: var(--cl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cl-art-lede {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: var(--cl-text-body);
  margin: 0 0 24px;
}

.cl-art-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 32px;
}

.cl-art-hero {
  display: block;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--cl-border);
  background: #f7f7fb;
  aspect-ratio: 16 / 10;
  margin: 0 0 48px;
  position: relative;
}
.cl-art-hero img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cl-art-hero.cl-placeholder {
  background:
    linear-gradient(135deg, rgba(51,196,229,0.18), rgba(102,87,204,0.22)),
    radial-gradient(500px 220px at 30% 30%, rgba(255,255,255,0.4), transparent 60%);
  display: flex; align-items: center; justify-content: center;
}
.cl-art-hero.cl-placeholder .cl-placeholder-label {
  font-size: clamp(40px, 7vw, 72px);
}

/* Sections */
.cl-art-section {
  margin: 56px 0;
  scroll-margin-top: 80px;
}
.cl-art-section-head {
  display: flex; align-items: baseline; gap: 14px;
  border-bottom: 1px solid var(--cl-border);
  padding-bottom: 14px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.cl-art-section-kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cl-text-muted);
}
.cl-art-section h2 {
  font-size: clamp(22px, 2.8vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  color: #2A2840;
}

/* Highlight card */
.cl-art-highlight {
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--cl-bg-soft);
  border: 1px solid var(--cl-border);
  margin-bottom: 14px;
  transition: border-color 0.18s ease;
}
.cl-art-highlight:hover { border-color: var(--cl-border-strong); }
.cl-art-highlight:last-child { margin-bottom: 0; }
.cl-art-highlight-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 8px;
}
.cl-art-highlight h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #2A2840;
  letter-spacing: -0.005em;
}
.cl-art-highlight .cl-tag { font-size: 10px; }
.cl-art-highlight p {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--cl-text-body);
  margin: 0;
}
.cl-art-highlight p + p { margin-top: 10px; }
.cl-art-highlight code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.86em;
  background: rgba(102,87,204,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  color: #4f43a3;
  white-space: nowrap;
}

/* Token grid (used in February article) */
.cl-token-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 12px;
}
.cl-token {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  background: rgba(102,87,204,0.08);
  color: #4f43a3;
  border: 1px solid rgba(102,87,204,0.16);
}

/* Bullet list */
.cl-art-list {
  list-style: none;
  padding: 0; margin: 0;
}
.cl-art-list > li {
  position: relative;
  padding: 10px 0 10px 22px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--cl-text-body);
  border-bottom: 1px solid var(--cl-border);
}
.cl-art-list > li:last-child { border-bottom: none; }
.cl-art-list > li::before {
  content: '';
  position: absolute;
  left: 4px; top: 19px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cl-grad);
  opacity: 0.85;
}
.cl-art-list > li strong {
  color: #2A2840;
  font-weight: 700;
}

/* Group within section (e.g., "Inbox", "Tasks", "Lists") */
.cl-art-group { margin-bottom: 24px; }
.cl-art-group:last-child { margin-bottom: 0; }
.cl-art-group-h {
  font-size: 13px;
  font-weight: 600;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #2A2840;
  margin: 0 0 8px;
  opacity: 0.78;
}
.cl-art-group .cl-art-list > li {
  padding: 7px 0 7px 22px;
  font-size: 14.5px;
  border-bottom: none;
  color: var(--cl-text-body);
}
.cl-art-group .cl-art-list > li::before { top: 14px; }

/* Related */
.cl-art-related {
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--cl-border);
}
.cl-art-related-h {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cl-text-muted);
  margin: 0 0 18px;
}
.cl-art-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.cl-art-related-card {
  display: block;
  padding: 18px 20px;
  border: 1px solid var(--cl-border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cl-art-related-card:hover {
  border-color: rgba(102,87,204,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -16px rgba(102,87,204,0.4);
}
.cl-art-related-card-month {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-size: 19px;
  background: var(--cl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 6px;
  line-height: 1;
}
.cl-art-related-card-title {
  font-size: 14.5px;
  font-weight: 600;
  color: #2A2840;
  line-height: 1.4;
}
.cl-art-related-card-arrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: #6657CC;
  margin-top: 8px;
}

/* Dark CTA banner */
.cl-art-cta {
  margin-top: 64px;
  background: #2A2840;
  color: #fff;
  border-radius: 18px;
  padding: 40px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cl-art-cta::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: radial-gradient(600px 220px at 20% -10%, rgba(0,161,214,0.20), transparent 60%),
              radial-gradient(500px 220px at 100% 100%, rgba(102,87,204,0.22), transparent 60%);
  pointer-events: none;
}
.cl-art-cta > * { position: relative; }
.cl-art-cta h3 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.cl-art-cta h3 em {
  font-family: "Instrument Serif", serif;
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, #67E0FF, #B5A8FF);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.cl-art-cta p {
  color: rgba(255,255,255,0.72);
  font-size: 15.5px;
  margin: 0 0 22px;
}
.cl-art-cta .cl-cta-row {
  display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}
.cl-art-cta .btn { padding: 12px 22px; font-size: 14px; }

/* Mobile article */
@media (max-width: 600px) {
  .cl-art { padding: 32px 16px 48px; }
  .cl-art-section { margin: 40px 0; }
  .cl-art-highlight { padding: 18px 20px; }
  .cl-art-cta { padding: 30px 22px; }
}
