/* NIGHTS (Room A's history): what is specific to this page, in the tokens of ../../ad/roomc.css (Room C's art direction; load
   that first). Black ground and white at the steps of the alpha stair. The one colour scale is the quantity colour map of the
   number of individuals alive (inferno, with its scale bar), drawn by history.js, as on the GENESIS and TIME SCALES pages.
   The pictures are each night's film as it is, with no frame but the thinnest line. No external resources. */

.ah { margin: 0 var(--rc-margin); }
.ah-lead { max-width: var(--rc-measure); margin: calc(20 * var(--u)) 0 0; color: var(--rc-fg-sub); font-size: var(--rc-fs-read); line-height: var(--rc-lh-read); }
.ah-meta { display: flex; flex-wrap: wrap; gap: calc(6 * var(--u)) calc(14 * var(--u)); margin-top: calc(18 * var(--u)); color: var(--rc-fg-head); font-family: var(--rc-mono); font-size: var(--rc-fs-mono); letter-spacing: var(--rc-ls-sub); font-variant-numeric: tabular-nums; }
.ah-meta > span + span::before { content: "·"; margin-right: calc(14 * var(--u)); color: var(--rc-dim); }
.ah-state { margin-top: calc(18 * var(--u)); color: var(--rc-fg-foot); font-size: var(--rc-fs-credit); line-height: 1.7; }
.ah-state:empty { display: none; }

/* all nights: one row per night, the number alive over the five minutes in inferno; the date at the left, the peak at the right */
.ah-all, .ah-list-sec, .ah-about { margin-top: calc(40 * var(--u)); padding-top: calc(24 * var(--u)); border-top: var(--rc-w) solid var(--rc-aux); }
.ah-all .rc-label, .ah-list-sec .rc-label, .ah-about .rc-label { margin-bottom: calc(14 * var(--u)); }
.ah-rows { display: grid; row-gap: calc(3 * var(--u)); }
.ah-row { display: grid; grid-template-columns: calc(84 * var(--u)) minmax(0, 1fr) calc(48 * var(--u)); align-items: center; column-gap: calc(12 * var(--u)); color: var(--rc-fg-head); font-family: var(--rc-mono); font-size: var(--rc-fs-mono); line-height: 1; font-variant-numeric: tabular-nums; }
.ah-row:hover, .ah-row:focus-visible { color: var(--rc-fg-now); text-decoration: none; }
.ah-row-track { display: block; height: calc(12 * var(--u)); }
.ah-row-track canvas { display: block; height: 100%; }
.ah-row-peak { text-align: right; }
.ah-axis { position: relative; height: calc(18 * var(--u)); margin: calc(6 * var(--u)) calc(60 * var(--u)) 0 calc(96 * var(--u)); border-top: var(--rc-w) solid var(--rc-aux); }
.ah-axis span { position: absolute; top: calc(5 * var(--u)); transform: translateX(-50%); color: var(--rc-fg-foot); font-family: var(--rc-mono); font-size: var(--rc-fs-foot); line-height: 1; white-space: nowrap; }
.ah-axis span:first-child { transform: none; }
.ah-axis span:last-child { transform: translateX(-100%); }
.ah-scale { display: flex; align-items: center; gap: calc(8 * var(--u)); margin-top: calc(12 * var(--u)); color: var(--rc-fg-foot); font-family: var(--rc-mono); font-size: var(--rc-fs-foot); letter-spacing: var(--rc-ls-foot); line-height: 1; }
.ah-scale canvas { order: 1; width: calc(160 * var(--u)); height: calc(8 * var(--u)); }
.ah-scale span:nth-of-type(2) { order: 2; }
.ah-scale span:nth-of-type(3) { order: 3; margin-left: calc(6 * var(--u)); }

/* night by night: the picture (its thumbnail; the full size behind it), the night and its seed, the curve, the numbers */
.ah-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, calc(420 * var(--u))), 1fr)); gap: calc(44 * var(--u)) calc(28 * var(--u)); }
.ah-night { min-width: 0; scroll-margin-top: calc(24 * var(--u)); }
.ah-shot { display: block; aspect-ratio: 16 / 9; border: var(--rc-w) solid var(--rc-aux); background: var(--rc-bg); }
.ah-shot img { width: 100%; height: 100%; object-fit: cover; }
.ah-shot:hover, .ah-shot:focus-visible { border-color: var(--rc-fg-head); }
.ah-night-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: calc(4 * var(--u)) calc(14 * var(--u)); margin-top: calc(12 * var(--u)); color: var(--rc-fg); font-family: var(--rc-mono); font-size: var(--rc-fs-label); letter-spacing: var(--rc-ls-sub); line-height: 1.4; font-variant-numeric: tabular-nums; }
.ah-night-head span { color: var(--rc-fg-head); }
.ah-spark { display: block; width: 100%; height: calc(36 * var(--u)); margin-top: calc(10 * var(--u)); overflow: visible; }
.ah-spark-line { fill: none; stroke: var(--rc-fg-sub); stroke-width: var(--rc-w); stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ah-spark-base { stroke: var(--rc-aux); stroke-width: var(--rc-w); vector-effect: non-scaling-stroke; }
.ah-spark-mark { stroke: var(--rc-line); stroke-width: var(--rc-w); stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.ah-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 calc(16 * var(--u)); margin-top: calc(10 * var(--u)); }
.ah-facts > div { display: flex; justify-content: space-between; align-items: baseline; gap: calc(8 * var(--u)); padding: calc(6 * var(--u)) 0; border-top: var(--rc-w) solid var(--rc-aux); }
.ah-facts dt { color: var(--rc-fg-head); font-size: var(--rc-fs-foot); letter-spacing: var(--rc-ls-sub); line-height: 1.4; text-transform: uppercase; }
.ah-facts dd { margin: 0; color: var(--rc-fg); font-family: var(--rc-mono); font-size: var(--rc-fs-label); line-height: 1.4; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ah-more { margin-top: calc(36 * var(--u)); }

/* how to read it */
.ah-about { max-width: var(--rc-measure); }
.ah-prose p { color: var(--rc-fg-sub); font-size: var(--rc-fs-read); line-height: var(--rc-lh-read); }
.ah-prose p + p { margin-top: calc(14 * var(--u)); }
.ah-about .note { margin-top: calc(18 * var(--u)); color: var(--rc-fg-foot); font-size: var(--rc-fs-credit); line-height: 1.7; }
.ah + .rc-foot { margin-top: calc(48 * var(--u)); }

@media (max-width: 700px) {
  .ah-row { grid-template-columns: calc(72 * var(--u)) minmax(0, 1fr) calc(40 * var(--u)); column-gap: calc(8 * var(--u)); }
  .ah-axis { margin: calc(6 * var(--u)) calc(48 * var(--u)) 0 calc(80 * var(--u)); }
  .ah-facts { grid-template-columns: minmax(0, 1fr); }
}
.ah-day-link { display: inline-block; margin-top: calc(14 * var(--u)); font-family: var(--rc-mono); font-size: var(--rc-fs-mono); line-height: 1.6; }
