/* ============================================================================
   /changelog — what's new in Capsule.

   Loaded after video-skills.css, which supplies the hero wash, the bands, the
   headline and lede type and .closer-ctas; the pill above the headline is
   .uc-tag from use-case.css. What's here is the page's own: the month rail,
   the kind filter, the featured cards and the Dia-style list of small changes.

   Surfaces are /mcp's — white cards via --cu-card at its 32px radius, Roobert
   Mono for labels. video-skills.css resets every margin and padding, so
   everything here sets its own.
   ============================================================================ */

:root {
  --cl-rail: 232px;
  --cl-gap: 72px;
  /* The categories' colours, all the site's own: five from /learn's category
     palette (CAT_COLORS in scripts/lib/render.mjs), and the skill palette's
     amber for the sixth. */
  --cl-cat-new: var(--accent);        /* green — Product Update */
  --cl-cat-sharing: var(--blue);      /* blue — Event Recap */
  --cl-cat-looks: #FD7161;            /* coral — Thought Leadership */
  --cl-cat-everywhere: #742DF8;       /* purple — Comparisons */
  --cl-cat-plans: #2DDAF8;            /* cyan — Best Practices */
  --cl-cat-app: var(--c-amber);       /* amber — the skill palette */
}

/* ── FULL NAV ── same restore as mcp.css: video-skills.css reduces the shared
   nav to the logo and one button, and this page wants the whole thing. */
#site-nav .nav { grid-template-columns: 1fr auto 1fr; }
#site-nav .nav-links { display: flex !important; }
#site-nav .nav-actions .btn-outline { display: inline-flex !important; }
#site-nav .nav-menu { display: flex !important; }
@media (max-width: 700px) {
  #site-nav .nav { grid-template-columns: 1fr auto; }
  #site-nav .nav-links,
  #site-nav .nav-actions { display: none !important; }
  #site-nav .nav:not(.nav-at-bottom):not(.nav-over-footer) .nav-burger { display: inline-flex !important; }
}

/* ── HERO ── shorter than the family's: the entries are the page, so they
   start sooner. */
.cl-hero .hero-inner { padding-bottom: 72px; }
.cl-tag {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.cl-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(50, 255, 8, 0.25);
}

/* The family's 32px hero gap, plus the 8px /mcp puts above its CTA row. */
.cl-hero-cta { margin-top: 8px; }

/* ── LAYOUT ── rail | feed, the rail sticky beside the entries. */
.cl-band { padding-top: 24px; }
.cl-layout {
  /* The site's widest content measure — the footer's. */
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--cl-rail) minmax(0, 1fr);
  gap: var(--cl-gap);
  align-items: start;
}

/* ── RAIL ── the filter, then the months. */
.cl-rail {
  position: sticky;
  top: 112px;
  display: flex;
  flex-direction: column;
  gap: var(--cu-mid);
}
.cl-rail-months { display: flex; flex-direction: column; gap: 28px; }
/* The rail is the blog index's filter (blog/articles.html): a mono heading —
   "Filter (n)", then the year — over a list of radios in the same mono. The
   months are links dressed the same way, the current one's radio filled. */
.cl-rail-label {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink);
  margin: 0 0 24px;
  /* Roobert Mono would draw "(33)" as a circled-number ligature. */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0;
}
.cl-rail ol,
.cl-filters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.cl-filter,
.cl-rail-months a {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink);
  text-decoration: none;
}
.cl-filter input { position: absolute; opacity: 0; pointer-events: none; }
.cl-radio {
  width: 18px;
  height: 18px;
  border: 1.5px solid #b8b8b8;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  transition: border-color 0.18s ease;
}
.cl-radio::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--ink);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.cl-filter:hover .cl-radio,
.cl-rail-months a:hover .cl-radio,
.cl-filter input:checked + .cl-radio,
.cl-rail-months a[aria-current="true"] .cl-radio { border-color: var(--ink); }
.cl-filter input:checked + .cl-radio::after,
.cl-rail-months a[aria-current="true"] .cl-radio::after { opacity: 1; }
.cl-filter input:focus-visible + .cl-radio,
.cl-rail-months a:focus-visible .cl-radio { outline: 2px solid var(--blue); outline-offset: 3px; }
.cl-rail-months a:focus-visible { outline: none; }

/* ── WEEKS ── each headed by its date. Months carry no heading; a month
   section is only what the rail jumps to, so weeks space the same either side
   of a month boundary. */
.cl-feed { min-width: 0; }
.cl-month { scroll-margin-top: 112px; }
.cl-month + .cl-month,
.cl-week + .cl-week { margin-top: 96px; }
.cl-week-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 56px;
  line-height: 52px;
  color: #080808;
  margin-bottom: 32px;
}

/* ── TAGS ── a section's category heading: the blog's card tag
   (.cat-tag in blog/articles.html) — a 12×24 capsule in the category's
   colour, then the name in mono capitals. */
.cl-cat {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  height: 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--ink);
  white-space: nowrap;
}
.cl-dot { flex: 0 0 auto; width: 12px; height: 24px; border-radius: 9999px; }
.cl-dot--new { background: var(--cl-cat-new); }
.cl-dot--sharing { background: var(--cl-cat-sharing); }
.cl-dot--looks { background: var(--cl-cat-looks); }
.cl-dot--everywhere { background: var(--cl-cat-everywhere); }
.cl-dot--plans { background: var(--cl-cat-plans); }
.cl-dot--app { background: var(--cl-cat-app); }

/* ── FEATURED CARD ── */
.cl-card {
  background: var(--cu-card);
  border-radius: 32px;
  overflow: hidden;
}
.cl-card + .cl-card { margin-top: 24px; }
.cl-card-media {
  aspect-ratio: 16 / 9;
  background: #e6e6e3;
}
.cl-card-media img,
.cl-card-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cl-card-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 32px 40px 40px;
}
.cl-card-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: var(--h3-size);
  line-height: var(--h3-lh);
  color: #080808;
  text-wrap: balance;
}
.cl-card-body {
  font-size: 18px;
  line-height: 26px;
  color: var(--cu-label);
  text-wrap: pretty;
}
.cl-card-link,
.cl-item-link {
  display: inline-flex;
  gap: 6px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.cl-card-link { font-size: 16px; line-height: 24px; margin-top: 4px; }
.cl-card-link:hover,
.cl-item-link:hover { text-decoration-color: currentColor; }

/* ── SECTIONS ── a week's picks under their category headings: the pill,
   then Dia's two columns of title + sentence. */
.cl-card + .cl-section { margin-top: var(--cu-medium); }
.cl-section + .cl-section { margin-top: var(--cu-medium); }
.cl-section-label { margin-bottom: var(--cu-small); line-height: 0; }
.cl-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--cu-mid) var(--cu-medium);
}
.cl-item { display: flex; flex-direction: column; gap: 12px; }
/* The title is the site's small Serrif — /use-case's feature-card title
   (.uc-feature h3), 0.8 of H3. The sentence is the 18/26 the card's
   paragraph and /mcp's notes use. */
.cl-item-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: calc(var(--h3-size) * 0.8);
  line-height: 1;
  color: #080808;
  text-wrap: balance;
}
.cl-item-body {
  font-size: 18px;
  line-height: 26px;
  color: var(--cu-label);
  text-wrap: pretty;
}
.cl-item-link { font-size: 16px; line-height: 24px; }

/* What's left after a filter: a short fade-and-rise (changelog.js staggers
   it). The scroll reveal's easing, quicker and without the blur. */
@keyframes cl-enter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.cl-enter { animation: cl-enter 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both; animation-delay: var(--cl-enter-delay, 0ms); }
@media (prefers-reduced-motion: reduce) { .cl-enter { animation: none; } }

/* Filtered out, and anything left with nothing in it. */
.cl-feed .cl-section.is-filtered,
.cl-feed .cl-card--video.is-filtered,
.cl-feed .cl-week.is-empty,
.cl-feed .cl-month.is-empty { display: none; }
.cl-empty { font-size: 18px; color: var(--cu-label); }

/* ── CLOSER ── */
.cl-closer .band-inner { gap: 40px; padding: 40px 0 24px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  :root { --cl-rail: 200px; --cl-gap: 48px; }
  .cl-filter { white-space: normal; }
}
/* No room for the rail beside the entries: the months become a row that
   scrolls sideways above the filter. */
@media (max-width: 860px) {
  .cl-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cl-rail { position: static; gap: 20px; }
  .cl-rail-filter,
  .cl-rail-year { display: flex; align-items: center; gap: 24px; flex: none; }
  .cl-filters { flex-direction: row; gap: 24px; flex: none; }
  .cl-filter, .cl-rail-months a { white-space: nowrap; }
  /* Both rows are one line — label, then capsules — that scroll sideways
     when they run past the edge. */
  .cl-rail-filter,
  .cl-rail-months {
    flex-direction: row;
    gap: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -20px;
    padding: 0 20px;
  }
  .cl-rail-filter::-webkit-scrollbar,
  .cl-rail-months::-webkit-scrollbar { display: none; }
  .cl-rail-filter { gap: 24px; }
  .cl-rail-label { margin: 0; white-space: nowrap; }
  .cl-rail ol { flex-direction: row; gap: 24px; }
}
@media (max-width: 768px) {
  .cl-week-label { font-size: 44px; line-height: 40px; margin-bottom: 24px; }
  .cl-month + .cl-month,
  .cl-week + .cl-week { margin-top: 72px; }
  .cl-card { border-radius: 24px; }
  .cl-card-text { padding: 24px 24px 28px; }
  .cl-card-body { font-size: 17px; line-height: 24px; }
}
@media (max-width: 640px) {
  .cl-list { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}
