/* The public changelog's own stylesheet: its list and its entries.
 *
 * The design of record is vaalbara's root
 * specs/product_surface_designs/ (Changelog Mockup, Changelog Boards),
 * under the shelf's masthead and footer since root roadmap 32.3b
 * (specs/product_surface_designs/shelf/, the record's R6). Every value
 * is a token: the page loads the savanna family's own sheets, the light
 * sheet derived from them and Shelf's stylesheet first (all generated
 * into this seed by vaalbara's `pnpm run shelf:changelog`), so a family
 * change reaches the changelog at the next `--update-site` and nothing
 * here copies a token. `.shelf a` colours every link the family's link
 * colour, so the list's own links say `.shelf` to keep theirs. */

html {
  background: var(--background);
}

.column {
  container-type: inline-size;
  max-width: calc(var(--measure-narrow) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

/* ── the masthead ── */
.masthead {
  padding-top: 64px;
  padding-bottom: 44px;
}
.masthead h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 7cqi, 44px);
  line-height: 1.15;
  margin: 14px 0 0;
  color: var(--foreground);
  text-wrap: balance;
}
.masthead .lede {
  font-size: 17px;
  line-height: 1.5;
  margin: 14px 0 0;
  color: var(--meta);
}
.list {
  padding-bottom: 96px;
}

/* ── one entry: a rail and a body that wrap without a breakpoint ── */
.entry {
  border-top: 1px solid var(--border-hairline);
  padding: 32px 0 36px;
  display: flex;
  flex-wrap: wrap;
  column-gap: 32px;
  row-gap: 16px;
  scroll-margin-top: 28px;
}
/* Arriving at /#<version>: the entry lifts onto a card, pulled outward
   so its text stays on the column's grid. Nothing marks a version as
   the reader's own — the site cannot know which one they run. */
.entry:target {
  margin: 4px calc(min(24px, 3cqi) * -1) 20px;
  padding: 22px min(24px, 3cqi) 28px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.entry-rail {
  flex: 1 1 148px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  align-items: baseline;
  column-gap: 14px;
  row-gap: 6px;
}
.shelf .entry-version {
  flex: 0 0 100%;
  font-size: 17px;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}
.shelf .entry-version:hover {
  text-decoration: underline;
}
.entry-date {
  font-size: 12.5px;
  color: var(--meta);
}

/* The platform tags: neutral, always on their own line. */
.tags {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  font-size: 12px;
  line-height: 18px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  color: var(--meta);
}

/* The body is plain markdown: h3 groups, ul > li bullets, and a p for
   the one-line "Internal improvements." entry. */
.entry-body {
  flex: 999 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--foreground-body);
}
.entry-body h3 {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--eyebrow);
}
.entry-body h3:first-child {
  margin-top: 0;
}
.entry-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.entry-body li,
.entry-body p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  text-wrap: pretty;
}
/* The dash sits outside the text's flow, so inline markdown (**bold**,
   _emphasis_) keeps flowing as one sentence: 8px of dash, then the
   design's 12px gap. 0.8em is the design's 13px at 16px and 14px at
   the entry page's 17px. */
.entry-body li {
  position: relative;
  padding-left: 20px;
}
.entry-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.8em;
  width: 8px;
  height: 1.5px;
  background: var(--faint);
}

/* ── the fold: entries older than six months ── */
.older {
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  padding: 6px 0;
}
.older summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 12px;
  row-gap: 2px;
  padding: 12px;
  margin: 0 -12px;
  border-radius: var(--radius);
  cursor: pointer;
}
.older summary::-webkit-details-marker {
  display: none;
}
.older summary:hover {
  background: var(--hover);
}
.older .caret {
  font-size: 12px;
  color: var(--faint);
  width: 10px;
  transition: transform 120ms ease;
}
.older[open] .caret {
  transform: rotate(90deg);
}
.older .fold-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--foreground);
}
.older .fold-count {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--meta);
}

/* ── an entry's own page ── */
.entry-page {
  padding-top: 40px;
  padding-bottom: 96px;
}
.shelf .back {
  font-size: 12.5px;
  color: var(--link);
  text-decoration: none;
}
.shelf .back:hover {
  text-decoration: underline;
}
.entry-page > .eyebrow {
  margin-top: 40px;
}
.entry-page h1 {
  margin: 12px 0 0;
  font-weight: 600;
  font-size: clamp(30px, 7cqi, 40px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.entry-page-meta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 16px;
  row-gap: 6px;
}
.entry-page-meta .entry-date {
  font-size: 13px;
}
.entry-page .entry-body {
  margin-top: 36px;
  padding-top: 36px;
  border-top: 1px solid var(--border-hairline);
  max-width: var(--measure-prose);
  gap: 12px;
}
.entry-page .entry-body h3 {
  margin-top: 16px;
}
.entry-page .entry-body h3:first-child {
  margin-top: 0;
}
.entry-page .entry-body ul {
  gap: 12px;
}
.entry-page .entry-body li,
.entry-page .entry-body p {
  font-size: 17px;
}
.neighbours {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.shelf .neighbour {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  color: inherit;
  text-decoration: none;
}
.shelf .neighbour:hover {
  background: var(--hover);
  text-decoration: none;
}
.neighbour.newer {
  align-items: flex-end;
  text-align: right;
}
.neighbour-version {
  font-size: 15px;
  font-weight: 500;
  color: var(--foreground);
}
.neighbour-date {
  font-size: 12.5px;
  color: var(--meta);
}
