/* changelog: the catalogue drawer. Each release is a cream catalogue card on the desk, the version typed in
   Courier Prime as its call number with the date beside it, a teal rule under the heading and the rod hole
   punched at the foot. Changes are typed lines with a call mark: New in teal, Improved in brass, Fixed in oak. */

main.doc.changelog { max-width: 1020px; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 40px; align-items: start; }
.changelog > h1, .changelog > .lede { grid-column: 1 / -1; }

.rel-index { margin: 4px 0 26px; background: var(--drawer); border-radius: var(--radius); }
.rel-index ul { display: flex; gap: 18px; overflow-x: auto; margin: 0; padding: 10px 14px; list-style: none; }
.rel-index li { flex: none; display: flex; align-items: baseline; gap: 8px; margin: 0; }
.rel-index a { font-family: var(--type); font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.rel-index a:hover, .rel-index a:focus-visible { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.rel-index time { font-family: var(--type); font-size: 13px; color: var(--muted); white-space: nowrap; }

.changelog .release { position: relative; margin: 0 0 30px; padding: 18px 22px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 24px; }
.changelog .release::after { content: ""; position: absolute; left: 50%; bottom: 12px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--bg); box-shadow: inset 0 1px 2px rgba(29, 36, 51, 0.25); }
.rel-head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--rule); }
.rel-head .ver { font-family: var(--type); font-weight: 700; font-size: 24px; line-height: 1.1; color: var(--ink); text-decoration: none; }
.rel-head .ver:hover, .rel-head .ver:focus-visible { color: var(--link); }
.rel-head .date { margin-left: auto; font-family: var(--type); font-size: 14px; color: var(--muted); white-space: nowrap; }

.changelog .entries { list-style: none; margin: 0; padding: 0; max-width: none; }
.changelog .entry { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 2px 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.55; }
.changelog .entry:last-child { border-bottom: 0; }
.changelog .kind { align-self: start; margin-top: 2px; font-family: var(--type); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.entry--new .kind { color: var(--accent); }
.entry--improved .kind { color: var(--brass); }
.entry--fixed .kind { color: var(--oak); }
.changelog .from-review { display: inline-block; margin-left: 8px; font-family: var(--type); font-size: 12px; color: var(--muted); white-space: nowrap; }

@media (max-width: 560px) {
  .changelog .release { padding: 14px 14px 32px; }
  .changelog .entry { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 940px) {
  main.doc.changelog { grid-template-columns: 180px minmax(0, 1fr); }
  .rel-index { grid-column: 1; grid-row: 3 / span 200; position: sticky; top: 24px; margin: 0; }
  .rel-index ul { flex-direction: column; gap: 0; overflow: visible; padding: 6px 12px; }
  .rel-index li { justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .rel-index li:last-child { border-bottom: 0; }
  .changelog .release { grid-column: 2; }
}
