/* Pulse website: the changelog (/changelog). Loaded after site.css + pages.css on that page only.
   A dated timeline: the date and a dot on a rail on the left, one card per release on the right.
   On phones the rail moves to the left edge and the date sits above each card. The markup comes from
   renderChangelog() in src/site/changelog.js. */

/* ---------- header ---------- */
.cl-head-sec { padding-bottom: clamp(20px, 3vw, 36px); }
.cl-head-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px clamp(24px, 4vw, 56px); align-items: end; }
.cl-head-sec .page-title { font-size: clamp(2.2rem, 5.4vw, 4rem); }
.cl-head-sec .page-lede { max-width: 36em; }
.cl-head-sec .eyebrow { margin-bottom: 12px; }
.cl-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 18px; font-size: .92rem; color: var(--text-2); }
.cl-meta a { color: var(--sky); font-weight: 700; text-decoration: underline; text-decoration-color: rgba(76, 201, 255, .35); text-underline-offset: 4px; }
.cl-meta a:hover { text-decoration-color: var(--sky); }
.cl-mascot { display: flex; flex-direction: column; align-items: center; padding-right: 8px; }
.cl-blip, .cl-blip .blip { width: 112px; height: auto; }
.cl-mascot .hand-note { margin-top: 4px; font-size: 21px; rotate: -4deg; }

/* ---------- timeline ---------- */
.cl-body { --cl-date: 150px; --cl-rail: 56px; --cl-max: 1000px; padding-bottom: clamp(56px, 8vw, 110px); }
.cl-feed { position: relative; max-width: var(--cl-max); margin-top: clamp(8px, 2vw, 20px); }
.cl-feed::before { /* the rail */
  content: ''; position: absolute; top: 30px; bottom: 24px; width: 2px; border-radius: 2px; pointer-events: none;
  left: calc(var(--cl-date) + var(--cl-rail) / 2 - 1px);
  background: linear-gradient(180deg, rgba(61, 245, 176, .55), var(--line-strong) 160px, var(--line-strong) calc(100% - 120px), transparent);
}
.cl-entry { position: relative; display: grid; grid-template-columns: var(--cl-date) minmax(0, 1fr); column-gap: var(--cl-rail); padding-bottom: 22px; } /* html's scroll-padding-top keeps a /changelog#id target clear of the nav */
.cl-entry::after { /* the dot */
  content: ''; position: absolute; top: 26px; left: calc(var(--cl-date) + var(--cl-rail) / 2 - 7px); width: 14px; height: 14px; border-radius: 50%;
  background: var(--ink-900); border: 2px solid var(--violet-2); box-shadow: 0 0 0 5px var(--ink-900);
}
.cl-entry:first-child::after { background: var(--mint); border-color: var(--mint); box-shadow: 0 0 0 5px var(--ink-900), 0 0 18px 3px rgba(61, 245, 176, .45); }
.cl-entry.is-same-day::after { top: 28px; left: calc(var(--cl-date) + var(--cl-rail) / 2 - 5px); width: 10px; height: 10px; border-color: var(--line-strong); }

.cl-when { padding-top: 22px; text-align: right; }
.cl-when time { display: block; }
.cl-day { display: block; font: 700 1rem/1.2 var(--font-display); letter-spacing: -.02em; color: var(--text); }
.cl-year { display: block; margin-top: 4px; font: 500 .8rem/1.2 var(--font-mono); color: var(--text-2); }
/* A second release on the same day: the date stays for screen readers, the rail shows the grouping. */
.cl-entry.is-same-day .cl-when time { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* one release */
.cl-card { position: relative; min-width: 0; padding: 20px clamp(18px, 2.4vw, 28px) 18px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 120px), var(--ink-850); box-shadow: var(--shadow-site, var(--shadow-craft)); transition: border-color var(--dur-2); }
.cl-card:hover { border-color: var(--line-strong); }
.cl-entry:target .cl-card { border-color: rgba(255, 210, 122, .5); box-shadow: 0 0 0 3px rgba(255, 210, 122, .18), var(--shadow-site, var(--shadow-craft)); }
.cl-head { display: flex; align-items: flex-start; gap: 8px 12px; }
.cl-title { flex: 1 1 auto; min-width: 0; padding-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.4rem); letter-spacing: -.025em; line-height: 1.2; }
.cl-latest { flex: none; margin-top: 4px; }
.cl-anchor { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; margin: -2px -8px 0 0; border-radius: 10px; color: var(--text-2); text-decoration: none; font: 600 1.05rem var(--font-mono); opacity: .7; transition: opacity var(--dur-1), color var(--dur-1), background var(--dur-1); }
.cl-card:hover .cl-anchor, .cl-anchor:focus-visible { opacity: 1; }
.cl-anchor:hover { color: var(--mint); background: rgba(61, 245, 176, .08); }
.cl-anchor:focus-visible { color: var(--mint); outline: 2px solid var(--mint); outline-offset: 2px; border-radius: 10px; }
@media (hover: none) { .cl-anchor { opacity: 1; } }

.cl-summary { margin-top: 10px; max-width: 62ch; color: var(--text); font-size: 1.02rem; font-weight: 600; line-height: 1.55; }
.cl-items { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 7px; max-width: 70ch; }
.cl-items li { padding-left: 2px; color: var(--text-2); font-size: .97rem; line-height: 1.65; }
.cl-items li::marker { color: var(--mint); }
.cl-card b { color: var(--text); font-weight: 700; }
.cl-card code { font: 500 .88em var(--font-mono); color: var(--mint); background: rgba(61, 245, 176, .08); padding: 1px 6px; border-radius: 6px; white-space: nowrap; }

.cl-tags { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px; }
.cl-tag { --c: var(--violet-2); display: inline-flex; align-items: center; gap: 7px; min-height: 26px; padding: 0 10px; border-radius: 999px; font: 600 .72rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--c); background: color-mix(in srgb, var(--c) 9%, transparent); border: 1px solid color-mix(in srgb, var(--c) 28%, transparent); }
.cl-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cl-tag[data-tag="safety"] { --c: var(--ember); }
.cl-tag[data-tag="community"], .cl-tag[data-tag="privacy"] { --c: var(--mint); }
.cl-tag[data-tag="alerts"] { --c: var(--violet-2); }
.cl-tag[data-tag="tickets"], .cl-tag[data-tag="dashboard"] { --c: var(--sky); }
.cl-tag[data-tag="premium"] { --c: var(--amber); }
.cl-tag[data-tag="website"] { --c: var(--text-2); }

/* the end of the list */
.cl-end { display: flex; align-items: center; gap: 14px; max-width: calc(var(--cl-max) - var(--cl-date) - var(--cl-rail)); margin: 6px 0 0 calc(var(--cl-date) + var(--cl-rail)); padding: 16px 20px; border-radius: 18px; border: 1px dashed var(--line-strong); color: var(--text-2); }
.cl-end p { margin: 0; max-width: 52ch; }
.cl-end-blip { flex: none; display: inline-block; width: 56px; }
.cl-end-blip .blip { width: 56px; height: auto; }

/* footer: the link under the "What's new" list */
.whatsnew-more { margin-top: 14px; font-size: .9rem; }

/* ---------- narrower screens ---------- */
@media (max-width: 960px) {
  .cl-body { --cl-date: 118px; --cl-rail: 44px; }
}
@media (max-width: 720px) {
  .cl-head-grid { grid-template-columns: minmax(0, 1fr); }
  .cl-mascot { position: absolute; right: var(--gutter); top: 0; padding: 0; }
  .cl-mascot .hand-note { display: none; }
  .cl-blip, .cl-blip .blip { width: 70px; }
  .cl-head-sec .page-title, .cl-head-sec .eyebrow { padding-right: 78px; }
  /* "Changelog" is one long word and cannot wrap: on the narrowest screens (and with a large text size) it follows the
     screen width, so it stays clear of Blip */
  .cl-head-sec .page-title { font-size: min(clamp(2.2rem, 5.4vw, 4rem), 10vw); }

  .cl-body { --cl-rail: 26px; }
  .cl-feed::before { left: 6px; top: 8px; }
  .cl-entry { grid-template-columns: minmax(0, 1fr); padding-left: var(--cl-rail); padding-bottom: 18px; }
  .cl-entry::after { left: 0; top: 2px; }
  .cl-entry.is-same-day::after { left: 2px; top: 22px; }
  .cl-when { padding: 0 0 10px; text-align: left; }
  .cl-day, .cl-year { display: inline; }
  .cl-year { margin: 0 0 0 4px; }
  .cl-end { margin-left: var(--cl-rail); max-width: none; }
  .cl-card code { white-space: normal; }
}
@media (max-width: 360px) {
  .cl-blip, .cl-blip .blip { width: 56px; }
  .cl-head-sec .page-title, .cl-head-sec .eyebrow { padding-right: 64px; }
}
@media (max-width: 420px) {
  .cl-card { padding-inline: 16px; }
  .cl-anchor { margin-right: -6px; }
}
@media print {
  .nav, .footer, .cl-mascot, .cl-anchor, .cl-end-blip { display: none !important; }
  .cl-feed::before, .cl-entry::after { display: none; }
  .cl-entry { display: block; break-inside: avoid; }
  .cl-entry.is-same-day .cl-when time { position: static; width: auto; height: auto; clip: auto; }
  .cl-card, .cl-end { margin: 0; box-shadow: none; }
  body { background: #fff; color: #000; }
}
