/* PixelTools Release Notes — editorial two-column changelog.
   Dark, quiet, type-driven. One accent (brand blue) reserved for links and
   the "Latest" marker. Solid hairlines, no gradients, no glows. */

:root {
  --bg: #0d0e10;
  --line: #ffffff12;
  --line-strong: #ffffff24;
  --ink: #f4f6f9;
  --muted: #ffffffb3;
  --soft: #ffffff80;
  --subtle: #ffffff4d;
  --brand: #187cbf;
  --brand-aa: #4ea7e8;
  --site: "Jost", "Century Gothic", "Futura", sans-serif;
  --app: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max-width: 880px;
  --rail-width: 176px;
  --rail-gap: 48px;
  --label-width: 84px;
  --header-height: 72px;
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--app);
  font-feature-settings: "cv11", "ss01";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

::selection { background: color-mix(in srgb, var(--brand) 45%, transparent); color: #fff; }

a { color: var(--brand-aa); }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-aa);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------- Header ---------- */

.page-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.page-top {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { display: block; line-height: 0; }
.brand svg { display: block; width: auto; height: 24px; }

nav { display: flex; gap: 18px; font: 400 13.5px var(--site); }
nav a { color: var(--muted); text-decoration: none; }
nav a[aria-current] { color: var(--ink); }

/* ---------- Intro ---------- */

main { padding-block: 64px 72px; }

.page-intro {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line-strong);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--soft);
  font: 500 11px var(--site);
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font: 300 clamp(2.2rem, 6vw, 3rem)/1.05 var(--site);
  letter-spacing: -.02em;
}

.page-intro .lede {
  max-width: 48ch;
  margin: 0;
  color: var(--muted);
  font-size: 15.5px;
}

/* ---------- Month sections ---------- */

.month-section { margin-top: 44px; }

.month-heading {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--soft);
  font: 500 12px var(--site);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ---------- Release: left rail + notes column ---------- */

.release {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  column-gap: var(--rail-gap);
  padding: 36px 0 40px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.release-rail {
  position: sticky;
  top: calc(var(--header-height) + 28px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.release-version {
  position: relative;
  margin: 0;
  font: 400 26px/1.1 var(--site);
  letter-spacing: -.01em;
  font-variant-numeric: tabular-nums;
}

.release-version a {
  color: var(--ink);
  text-decoration: none;
}

/* Permalink glyph sits in the left margin and only shows on hover/focus. */
.release-version a::before {
  content: "#";
  position: absolute;
  right: 100%;
  margin-right: 10px;
  color: var(--subtle);
  font: 400 18px/1.45 var(--mono);
  opacity: 0;
  transition: opacity .15s ease;
}

.release-version a:hover::before,
.release-version a:focus-visible::before,
.release:target .release-version a::before { opacity: 1; }

.release:target .release-version a { color: var(--brand-aa); }

.release-date {
  color: var(--subtle);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.latest-marker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--brand-aa);
  font: 400 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.latest-marker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-aa);
}

.release-body { min-width: 0; }

.release-title {
  margin: 2px 0 18px;
  color: var(--ink);
  font: 500 18px/1.35 var(--site);
  letter-spacing: -.01em;
}

.release-subheading {
  margin: 20px 0 8px;
  color: var(--soft);
  font: 500 11px var(--site);
  letter-spacing: .12em;
  text-transform: uppercase;
}

.release-detail {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14.5px;
}

/* ---------- Typed change rows ---------- */

.release-notes {
  margin: 0;
  padding: 0;
  list-style: none;
}

.release-notes > li {
  display: grid;
  grid-template-columns: var(--label-width) minmax(0, 1fr);
  column-gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14.5px;
}

.release-notes > li:first-child { border-top: 0; padding-top: 0; }

.change-label {
  padding-top: 3px;
  color: var(--soft);
  font: 500 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Rows with no recognised prefix keep a small quiet tick in the label column. */
.change-label:empty::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 1px;
  vertical-align: middle;
  background: var(--subtle);
}

.numbered-notes { counter-reset: step; }
.numbered-notes > li .change-label::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  width: auto;
  height: auto;
  background: none;
}

.release-notes ul {
  margin: 6px 0 0;
  padding: 0 0 0 14px;
  list-style: none;
}

.release-notes ul li {
  position: relative;
  padding-left: 12px;
  color: var(--soft);
  font-size: 13.5px;
}

.release-notes ul li::before {
  content: "";
  position: absolute;
  top: .7em;
  left: 0;
  width: 5px;
  height: 1px;
  background: var(--subtle);
}

code {
  padding: .08em .3em;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #ffffff0a;
  color: var(--ink);
  font: 400 .88em var(--mono);
}

/* ---------- Loading / empty / error ---------- */

.skeleton { display: grid; gap: 18px; padding: 44px 0 14px; }

.skeleton span {
  display: block;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffffff0a, #ffffff1a, #ffffff0a);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton span:nth-child(1) { width: 34%; }
.skeleton span:nth-child(2) { width: 82%; }
.skeleton span:nth-child(3) { width: 64%; }

.error-state,
.empty-state {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 64px 20px 56px;
  text-align: center;
  color: var(--muted);
}

.error-state p,
.empty-state p { max-width: 32ch; margin: 0; }

.retry-button {
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font: 500 13px var(--app);
}

.retry-button:hover { background: color-mix(in srgb, var(--brand) 85%, #fff); }

.empty-mark { width: 44px; fill: var(--subtle); }

.sign-off {
  margin-top: 40px;
  color: var(--subtle);
  font: 400 12px var(--mono);
}

/* ---------- Footer ---------- */

.page-footer { padding: 0 0 48px; color: var(--subtle); font-size: 13px; }
.page-footer p { margin: 0; }

/* ---------- Motion ---------- */

@keyframes shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: no-preference) {
  #release-feed:not([aria-busy="true"]) { animation: fade .4s ease both; }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ---------- Narrow screens: rail collapses above the notes ---------- */

@media (max-width: 680px) {
  .container { padding-inline: 18px; }
  main { padding-block: 36px 48px; }
  .page-top { min-height: 62px; }
  .release { grid-template-columns: 1fr; row-gap: 14px; padding: 28px 0 30px; }
  .release-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 14px;
  }
  .release-version { font-size: 24px; }
  .release-version a::before { display: none; }
  .latest-marker { margin-top: 0; }
  .release-notes > li { grid-template-columns: 1fr; row-gap: 2px; }
  .change-label:empty { display: none; }
}

/* ---------- Header: latest release shortcut ---------- */

.latest-link {
  color: var(--soft) !important;
  font: 400 11.5px var(--mono) !important;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}

/* ---------- Titles and rows wrap cleanly ---------- */

h1, .release-title, .month-heading { text-wrap: balance; }
.change-text, .release-detail, .lede { text-wrap: pretty; }

/* ---------- Milestone releases (x.y.0) ---------- */

.milestone .release-version { font-size: 34px; }
.milestone .release-title { font-size: 22px; }

.milestone-marker {
  margin-top: 6px;
  color: var(--soft);
  font: 400 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ---------- Latest release: store button in the rail ---------- */

.get-button {
  display: inline-block;
  align-self: flex-start;
  margin-top: 16px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  text-decoration: none;
  font: 500 13px var(--app);
  transition: background .15s ease;
}

.get-button:hover { background: color-mix(in srgb, var(--brand) 85%, #fff); }

/* ---------- Permalink copied feedback ---------- */

.release-version a[data-copied]::after {
  content: "Copied";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 12px;
  color: var(--soft);
  font: 400 11px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Since-your-version mode (?from=) ---------- */

.since-banner {
  margin: 18px 0 0;
  color: var(--soft);
  font-size: 13.5px;
}

.since-banner a { margin-left: 4px; }

.has-since .release:not(.since-new) { opacity: .5; }
.has-since .release:not(.since-new):hover,
.has-since .release:not(.since-new):focus-within { opacity: 1; }

.since-divider {
  margin: 0;
  padding: 28px 0 0;
  color: var(--subtle);
  font: 400 11px var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ---------- Older releases fold ---------- */

.show-older {
  display: block;
  margin: 44px auto 0;
  padding: 9px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: 500 13px var(--app);
  transition: border-color .15s ease, color .15s ease;
}

.show-older:hover { border-color: var(--soft); color: var(--ink); }

/* ---------- Version index (wide viewports only) ---------- */

.version-index {
  display: none;
  position: fixed;
  top: calc(var(--header-height) + 64px);
  left: calc(50% - var(--max-width) / 2 - 136px);
  width: 120px;
  max-height: calc(100vh - var(--header-height) - 96px);
  overflow-y: auto;
  scrollbar-width: none;
}

.version-index::-webkit-scrollbar { display: none; }

.version-index-month {
  margin: 18px 0 6px;
  color: var(--subtle);
  font: 500 10.5px var(--site);
  letter-spacing: .14em;
  text-transform: uppercase;
}

.version-index-month:first-child { margin-top: 0; }

.version-index ul { margin: 0; padding: 0; list-style: none; }

.version-index a {
  position: relative;
  display: block;
  padding: 3px 0 3px 14px;
  color: var(--subtle);
  text-decoration: none;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  transition: color .15s ease;
}

.version-index a:hover { color: var(--muted); }

.version-index a[aria-current] { color: var(--ink); }

.version-index a[aria-current]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 6px;
  height: 1px;
  background: var(--brand-aa);
}

@media (min-width: 1280px) {
  .version-index { display: block; }
}

@media (max-width: 680px) {
  .latest-link { display: none; }
  .release-version a[data-copied]::after { display: none; }
  .milestone .release-version { font-size: 30px; }
}
