﻿/* The timeline uses real links and buttons on a ruled surface so every clip works with a keyboard. */
body:has(.history-page) { background: #101010; }
.history-page {
  --paper: #f0efea;
  --ink: #141413;
  --red: #ff655a;
  --muted: #bdbbb7;
  --line: #393837;
  --mono: Plex, "IBM Plex Mono", monospace;
  --history-header: var(--site-header-height, 84px);
  width: min(100%, 1660px);
  margin: 0 auto;
  padding: clamp(42px, 5.3vw, 84px) var(--gutter) clamp(64px, 8vw, 125px);
  color: var(--paper);
}
.history-page :is(h1, h2, h3, h4, p, ul, figure) { margin: 0; }
.history-page :is(a, button, select, input, summary):focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}
.history-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, .48fr); align-items: center; gap: 12px 36px; }
.history-intro h1 {
  font-size: clamp(3rem, 6.6vw, 7rem);
  font-weight: 540;
  line-height: .97;
  letter-spacing: -.072em;
}
.history-intro h1 span { color: var(--red); }
.history-description { max-width: 52ch; color: var(--muted); line-height: 1.55; }
.history-intro__aside a, .history-help a, .history-entry__links a, .history-fallback a, .history-status a {
  text-decoration: underline;
  text-underline-offset: .28em;
  text-decoration-color: #787470;
}
.history-intro__aside a { display: inline-flex; align-items: center; min-height: 44px; font-size: .875rem; }
.history-intro__aside a:hover, .history-help a:hover, .history-entry__links a:hover { text-decoration-color: var(--red); color: var(--paper); }

.history-timeline {
  margin-top: clamp(24px, 3vw, 46px);
  color-scheme: light;
  color: var(--ink);
  background: var(--paper);
  --rule: #c6c5bf;
  --clip: #fbfaf6;
  --lane: 1.75rem;
}
.history-timeline__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px clamp(12px, 1.6vw, 24px);
  gap: 12px;
  border-bottom: 1px solid var(--ink);
}
.history-timeline__header h2 { font-size: 1.125rem; font-weight: 580; letter-spacing: -.025em; }
.history-timeline__header button {
  font: .8125rem/1.4 var(--mono);
  min-height: 38px;
  padding: 6px 14px;
  border: 1px solid #76746e;
  background: transparent;
  color: inherit;
  border-radius: 2px;
}
.history-timeline__header button:is(:hover, [aria-pressed=true]) { background: var(--ink); color: var(--paper); }
.history-timeline :is(button, a):focus-visible { outline: 2px solid #9c271c; outline-offset: -3px; }
.history-timeline__scroll {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #8d8a83 var(--paper);
  border-bottom: 1px solid #98958f;
}
.history-days {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(14rem, 1fr);
  width: 100%;
  isolation: isolate;
}
.history-day { min-width: 0; display: flex; flex-direction: column; border-right: 1px solid #afada7; }
.history-day:last-child { border-right: 0; }
.history-day__button {
  order: 1;
  display: flex;
  position: relative;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  width: 100%;
  min-height: 54px;
  padding: 16px 13px 8px;
  text-align: start;
  border: 0;
  border-top: 1px solid var(--ink);
  background-color: var(--paper);
  background-image: repeating-linear-gradient(90deg, #9d9a94 0 1px, transparent 1px 12px);
  background-size: 100% 5px;
  background-repeat: no-repeat;
  color: var(--ink);
}
.history-day__stamp { font: 500 .9375rem/1.3 var(--mono); }
.history-day__count { font: .75rem/1.4 var(--mono); color: #55534e; }
.history-day__button:hover { background-color: #dedcd5; }
.history-day__button[aria-pressed=true] {
  background-color: #b53227;
  background-image: repeating-linear-gradient(90deg, #fba79d 0 1px, transparent 1px 12px);
  color: white;
}
.history-day__button[aria-pressed=true] .history-day__count { color: #ffede8; }
.history-day__button[aria-pressed=true]:focus-visible { outline-color: white; }
.history-day__clips {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 4px;
  padding: 12px clamp(7px, 1vw, 14px) 0;
  border-bottom: 7px solid transparent;
  background:
    repeating-linear-gradient(0deg, #cfcdc7 0 1px, transparent 1px var(--lane)),
    repeating-linear-gradient(90deg, #dad8d1 0 1px, transparent 1px 24px), #e6e5df;
}
.history-day[data-selected=true] .history-day__clips {
  background:
    repeating-linear-gradient(0deg, #d3b6ae 0 1px, transparent 1px var(--lane)),
    repeating-linear-gradient(90deg, #dfc5bb 0 1px, transparent 1px 24px), #eddbd2;
}
.history-clip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: calc(var(--lane) - 4px);
  padding: 3px 9px;
  background: var(--clip);
  border: 1px solid #8f8d86;
  border-inline-start: 3px solid #68655e;
  border-radius: 2px;
}
.history-clip__name { font: 550 .8125rem/1.15 Archivo, Arial, sans-serif; overflow-wrap: anywhere; }
.history-clip__version { font: .75rem/1.3 var(--mono); }
.history-day[data-selected=true] .history-clip { border-color: #a36d60; border-inline-start-color: #b53227; }
.history-clip:hover, .history-clip:focus-visible { background: var(--ink); color: #fff; }
.history-clip:focus-visible { outline: 2px solid var(--red) !important; }
.history-layout {
  display: grid;
  grid-template-columns: minmax(12rem, .28fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 80px);
  margin-top: clamp(30px, 4vw, 60px);
}
.history-sidebar { min-width: 0; }
.history-search-panel > summary, .history-current-panel summary { cursor: pointer; font-size: 1rem; font-weight: 550; letter-spacing: -.025em; }
.history-search-panel > summary { padding-block: 6px 14px; }
.history-filters { display: grid; gap: 16px; }
.history-field { display: grid; gap: 6px; min-width: 0; }
.history-field label { font: .8125rem/1.5 var(--mono); color: var(--muted); }
.history-field input, .history-field select {
  appearance: none;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #686561;
  border-radius: 2px;
  background-color: #1b1b1a;
  color: var(--paper);
  font: inherit;
}
.history-field:has(select) { position: relative; }
.history-field:has(select)::after {
  content: "";
  position: absolute;
  right: 16px; bottom: 19px;
  width: 7px; height: 7px;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  pointer-events: none;
}
.history-field select { padding-right: 36px; }
.history-field input::placeholder { color: #a5a19d; }
.history-clear {
  justify-self: start;
  min-height: 36px;
  padding: 3px 0;
  background: none;
  border: 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: .875rem;
}
.history-current-panel { border-top: 1px solid var(--line); margin-top: 16px; }
.history-current-panel summary { cursor: pointer; padding: 16px 3px; }
.history-current { display: grid; }
.history-current__item {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 10px;
  width: 100%; min-height: 44px; padding: 8px; text-align: left;
  border: 0; border-inline-start: 2px solid transparent; background: transparent; color: var(--paper);
}
.history-current__name { font-size: .8125rem; }
.history-current__meta { display: flex; gap: 8px; color: var(--muted); font: .75rem/1.5 var(--mono); }
.history-current__item:hover, .history-current__item[aria-pressed=true] { background: #242221; }
.history-current__item[aria-pressed=true] { border-color: var(--red); }

.history-archive { min-width: 0; }
.history-results-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; padding-bottom: 19px; border-bottom: 1px solid #777470; }
.history-results-head h2 { font-size: clamp(1.6rem, 2.9vw, 3rem); line-height: 1.12; letter-spacing: -.05em; font-weight: 490; }
.history-status { color: var(--muted); font: .8125rem/1.6 var(--mono); }
.history-entry { border-bottom: 1px solid var(--line); scroll-margin-top: 8px; }
.history-entry:target, .history-entry[data-linked=true] { border-color: var(--red); }
.history-entry__toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 25px;
  align-items: center;
  gap: 10px 20px;
  padding: clamp(16px, 1.8vw, 26px) 1px;
  list-style: none;
  cursor: pointer;
}
.history-entry__toggle::-webkit-details-marker { display: none; }
.history-entry__heading { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 13px; font-size: clamp(1.35rem, 2vw, 2.2rem); font-weight: 500; letter-spacing: -.035em; overflow-wrap: anywhere; }
.history-entry__version-line { display: inline-flex; align-items: center; gap: 8px; letter-spacing: 0; font: .8125rem/1.5 var(--mono); }
.history-version, .history-stage { color: var(--muted); }
.history-entry__aside { grid-column: 2; grid-row: 1; display: grid; gap: 2px; text-align: right; font: .75rem/1.5 var(--mono); }
.history-date, .history-badge { color: var(--muted); }
.history-badge--current, .history-disclosure[open] .history-expand { color: var(--red); }
.history-expand { grid-column: 3; grid-row: 1; justify-self: center; color: var(--muted); font: 300 1.6rem/1 Archivo, Arial, sans-serif; }
.history-disclosure[open] .history-expand { transform: rotate(45deg); }
.history-entry__toggle:hover .history-expand { color: white; }
.history-entry__body { max-width: 85ch; padding: 0 0 clamp(24px, 3vw, 43px); }
.history-entry__intro { display: grid; gap: 16px; }
.history-entry__intro:has(.history-figure:not([hidden])) { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: clamp(16px, 3vw, 36px); }
.history-summary { color: #e2dfd9; font-size: 1.0625rem; line-height: 1.6; }
.history-figure { width: min(100%, 36rem); }
.history-figure img { display: block; width: 100%; height: auto; max-height: 265px; object-fit: contain; background: #171716; border: 1px solid var(--line); padding: 10px; }
.history-figure figcaption { margin-top: 6px; font: .75rem/1.5 var(--mono); color: var(--muted); }
.history-changes { display: grid; gap: 18px; margin-top: 24px; }
.history-change-group { display: grid; grid-template-columns: 6ch minmax(0, 1fr); gap: 16px; }
.history-change-group h4 { padding-top: 2px; font: .8125rem/1.6 var(--mono); color: var(--red); }
.history-change-group ul { display: grid; gap: 6px; padding-left: 18px; color: #dedbd5; font-size: 1rem; line-height: 1.6; }
.history-change-group li::marker { color: #9e9991; }
.history-notes { display: grid; gap: 6px; margin-top: 22px; font-size: .875rem; line-height: 1.55; color: var(--muted); }
.history-downloads { margin-top: 21px; }
.history-download, .history-entry__links, .history-help { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.history-download__main { display: inline-flex; align-items: center; min-height: 42px; padding: 8px 14px; border-radius: 2px; background: var(--paper); color: var(--ink); font-size: .875rem; font-weight: 550; }
.history-download__main:hover { background: white; }
.history-download__meta, .history-download__checksum { font: .75rem/1.5 var(--mono); color: var(--muted); }
.history-entry__links, .history-help, .history-fallback { font-size: .875rem; line-height: 1.6; color: var(--muted); }
.history-entry__links { margin-top: 17px; }
.history-entry__links a { padding-block: 6px; }
.history-help { justify-content: space-between; padding-top: 24px; }

.history-layout:has(#history-static:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.history-layout:has(#history-static:not([hidden])) .history-sidebar { display: none; }
#history-static nav { display: flex; flex-wrap: wrap; gap: 5px 24px; padding: 16px 0; }
#history-static nav a { padding-block: 8px; text-decoration: underline; text-underline-offset: .25em; }
.history-static-day { margin-block: clamp(20px, 3vw, 40px); }
.history-static-day h3 { font-size: clamp(1.45rem, 2.5vw, 2.3rem); letter-spacing: -.04em; margin-bottom: 10px; }
.history-static-release { border-block-start: 1px solid var(--line); }
.history-static-release summary { padding: 12px 0; cursor: pointer; }
.history-static-release summary span { font: .8125rem/1.5 var(--mono); color: var(--muted); }
.history-static-release__body { max-width: 82ch; padding: 4px 0 20px; }

@media (max-width: 1000px) {
  .history-layout { gap: 32px; }
  .history-entry__toggle { grid-template-columns: minmax(0, 1fr) 24px; gap: 7px; }
  .history-entry__aside { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 3px 12px; text-align: left; }
  .history-expand { grid-column: 2; grid-row: 1 / 3; }
}
@media (max-width: 760px) {
  .history-page { padding-inline: clamp(16px, 4vw, 28px); }
  .history-intro { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .history-layout { grid-template-columns: 100%; gap: 26px; }
  .history-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
  .history-search-panel { border-block: 1px solid var(--line); }
  .history-search-panel > summary { min-height: 44px; padding-block: 12px; }
  .history-clear { grid-column: 1 / -1; justify-self: start; }
  .history-current-panel { margin-top: 12px; }
  .history-current-panel summary { font-size: .875rem; padding-block: 10px; }
  .history-current { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
  .history-results-head { padding-bottom: 13px; }
  .history-entry__intro:has(.history-figure:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
  .history-figure img { height: auto; max-height: 225px; }
}
@media (max-width: 450px) {
  .history-days { grid-auto-columns: minmax(13.5rem, 78%); }
  .history-day__count { font-size: .75rem; }
  .history-field input, .history-field select { padding-left: 8px; }
  .history-change-group { grid-template-columns: 1fr; gap: 3px; }
}
@media (forced-colors: active) {
  .history-day__button[aria-pressed=true], .history-timeline__header button[aria-pressed=true] { outline: 3px solid Highlight; outline-offset: -3px; }
}
