/* The Receipts hub (theme page-the-receipts.php; copied 10 Oct 2026 from the approved test page, stage 3, 9 Oct 2026).
   Rachel, 9 Oct: "let's just redesign the page and then we can go back and fix posts".
   Act X Part B is dropped, so the series is the introduction, Acts I to IX and Act X Part A.
   Every count and every year on the page comes from the series itself (pages/the-receipts.js).
   Motion: the shared registration snap and print-in; the timeline runs its clock from the first
   year to today as you scroll; the case files settle like papers set down. All of it is finished
   and still under Still, reduced motion, and with scripts off. */

/* ---------- 1. Opening ---------------------------------------------------- */
.rc-open { padding-block: clamp(3.5rem, 7vw, 6rem); }
.rc-open__grid {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 40px clamp(32px, 5vw, 72px); align-items: center;
}
.rc-open__text { min-width: 0; }
.rc-kicker { margin: 0 0 12px; }
.rc-title { margin: 0 0 18px; }
.rc-sub { margin: 0 0 22px; max-width: 24ch; font: 700 clamp(1.5rem, 1.15rem + 1.2vw, 2.125rem)/1.15 var(--font-body); color: var(--display); text-wrap: balance; }
.rc-intro { margin: 0 0 22px; max-width: 54ch; }
.rc-count { margin: 0 0 28px; }
.rc-open__actions { gap: 14px 28px; align-items: center; }
/* Rachel's own series picture (her ruling 9 Oct, over the stand-in). Cropped to 16:9 from the top, which
   leaves out the old white logo plaque baked into its lower right; the hour light sits on her desk lamp */
.rc-open__art { aspect-ratio: 16 / 9; --lamp-x: 84%; --lamp-y: 52%; }
.rc-open__art > img { height: 100%; object-fit: cover; object-position: 50% 0; }

/* ---------- 2. The years -------------------------------------------------- */
.rc-years__h { margin: 0 0 clamp(2rem, 4vw, 3rem); max-width: 18ch; position: relative; z-index: 1; }
.tl {
  --span: calc(var(--last) - var(--first) + 1);
  --tl-label: 300px; --tl-gap: 28px;
  position: relative;
}
/* where a year sits along a track: the start of that year */
.tl__ticks, .tl__track, .tl__over { position: relative; }
.tl__axis, .tl__link { display: grid; grid-template-columns: var(--tl-label) minmax(0, 1fr); gap: 0 var(--tl-gap); }
.tl__axis { position: relative; z-index: 1; height: 34px; }
.tl__tick { position: absolute; bottom: 0; left: calc((var(--y) - var(--first)) / var(--span) * 100%); height: 10px; border-left: 2px solid var(--bone); }
.tl__tick-l { position: absolute; bottom: 14px; left: 0; transform: translateX(-50%); font: 600 .875rem/1 var(--font-mono); letter-spacing: .06em; color: var(--text); white-space: nowrap; }
.tl__tick--first .tl__tick-l { transform: translateX(-2px); }
.tl__tick--last { left: 100%; border-left: 0; border-right: 2px solid var(--bone); transform: translateX(-2px); }
.tl__tick--last .tl__tick-l { left: auto; right: -2px; transform: none; }
.tl__tick--nolabel .tl__tick-l { display: none; }
@media (max-width: 1099px) { .tl__tick--minor .tl__tick-l { display: none; } }

.tl__body { position: relative; }
.tl__rows { list-style: none; position: relative; z-index: 1; border-top: 2px solid var(--bone); }
.tl__row { border-bottom: 1px solid var(--dusk-violet); }
.tl__link { align-items: center; padding: 12px 0; color: var(--text); text-decoration: none; }
.tl__link:focus-visible { outline-offset: 2px; }
.tl__label { display: grid; gap: 3px; min-width: 0; }
.tl__act { color: var(--label); }
.tl__yrs { margin-left: .5em; color: var(--text); }
.tl__name { font: 400 clamp(1.125rem, .95rem + .55vw, 1.5rem)/1.02 var(--font-display); text-transform: uppercase; color: var(--display); text-wrap: balance; }
.tl__link:hover .tl__name { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--accent); text-underline-offset: .12em; }
.tl__track { height: 22px; }
.tl__bar {
  position: absolute; top: 0; bottom: 0;
  left: calc((var(--from) - var(--first)) / var(--span) * 100%);
  width: max(8px, calc((var(--to) - var(--from) + 1) / var(--span) * 100%));
  background: var(--act-punch, var(--mustard)); border: 2px solid var(--bone); border-radius: 0;   /* 23 Oct: each act in its cover's colour */
  transform-origin: 0 50%; transform: scaleX(var(--g, 1));
}
.tl__link:hover .tl__bar, .tl__link:focus-visible .tl__bar { background: var(--bone); }
.tl__row--all .tl__bar { background: none; border-style: dashed; }
.tl__row--all .tl__link:hover .tl__bar, .tl__row--all .tl__link:focus-visible .tl__bar { background: none; border-color: var(--mustard); }
.tl__key { margin: 18px 0 0 calc(var(--tl-label) + var(--tl-gap)); }

/* decade lines and the clock hand, laid over the track column only */
.tl__over {
  position: absolute; z-index: 0; top: 0; bottom: 0; left: calc(var(--tl-label) + var(--tl-gap)); right: 0;
  pointer-events: none;
  background:
    linear-gradient(var(--dusk-violet), var(--dusk-violet)) calc((1990 - var(--first)) / var(--span) * 100%) 0 / 1px 100% no-repeat,
    linear-gradient(var(--dusk-violet), var(--dusk-violet)) calc((2000 - var(--first)) / var(--span) * 100%) 0 / 1px 100% no-repeat,
    linear-gradient(var(--dusk-violet), var(--dusk-violet)) calc((2010 - var(--first)) / var(--span) * 100%) 0 / 1px 100% no-repeat;
}
.tl__head { display: none; position: absolute; top: 0; bottom: 0; left: calc(var(--p, 1) * 100%); width: 2px; margin-left: -1px; background: var(--bone); }
.tl__head-l {
  position: absolute; top: -30px; left: 6px; padding: 3px 7px;
  background: var(--bone); color: var(--ink-plum);
  font: 600 .875rem/1.1 var(--font-mono); letter-spacing: .06em; white-space: nowrap;
}
.tl.is-at-end .tl__head-l { left: auto; right: 6px; }
/* the year behind the chart: decorative, in the ground's own Memphis ink (1.6:1 or less), only while the clock runs */
.tl__ghost {
  position: absolute; z-index: 0; right: -.04em; top: -.62em; margin: 0;
  font: 400 clamp(7rem, 4rem + 14vw, 19rem)/1 var(--font-display); letter-spacing: -.01em;
  color: var(--mp-ink); pointer-events: none; user-select: none;
}
.tl:not(.is-live) .tl__ghost { display: none; }
.tl.is-live .tl__head { display: block; }

/* ---------- 3. The evidence: case files ------------------------------------ */
.rc-acts__h { margin: 0 0 1rem; }
.files { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 32px; }
.file { padding-top: 32px; --tab-x: 0%; }
.file:nth-child(4n+2) { --tab-x: 20%; --r0: 1.2deg; }
.file:nth-child(4n+3) { --tab-x: 40%; --r0: -1.4deg; }
.file:nth-child(4n)   { --tab-x: 60%; --r0: 1.8deg; }
.file:nth-child(4n+1) { --r0: -2deg; }
.file--intro { grid-column: 1 / -1; }
.file__in {
  position: relative; height: 100%;
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 26px 26px 24px; border: 2px solid var(--bone); background: var(--ground-black);
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out);
}
.file__tab { position: absolute; top: -32px; left: calc(var(--tab-x) * .9); }
.file__years { margin: 0; }
.file__name { font: 400 var(--fs-h2)/1.02 var(--font-display); text-transform: uppercase; color: var(--display); text-wrap: balance; }
.file__link { color: inherit; text-decoration: none; }
.file__link::after { content: ""; position: absolute; inset: -2px; z-index: 1; }
.file__title { margin: 0; max-width: 46ch; font: 700 var(--fs-h3)/1.3 var(--font-body); color: var(--text); text-wrap: pretty; }
.file__line { margin: 0; max-width: 46ch; }
.file__date { margin: auto 0 0; padding-top: 6px; }
.file__receipt { position: absolute; z-index: 2; top: -32px; right: 18px; }
.file:has(.file__receipt) { --tab-x: 0%; }  /* Act IX carries two tabs: its own on the left, the receipts on the right */
.file__in:has(.file__link:hover) { border-color: var(--act-punch, var(--mustard)); background: var(--wine); }
.file__in:has(.file__link:hover) .file__tab::before { background: var(--bone); }
.file__in:has(.file__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.file--intro .file__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 10px 40px; align-items: start; }
.file--intro .file__years, .file--intro .file__name { grid-column: 1; }
.file--intro .file__title, .file--intro .file__line, .file--intro .file__date { grid-column: 2; }
.file--intro .file__title { grid-row: 1 / span 2; align-self: end; }
.file--intro .file__date { margin-top: 0; }

/* ---------- 4. Show the receipt -------------------------------------------- */
.rc-how__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px clamp(32px, 5vw, 72px); align-items: start; }
.rc-how__lede { margin: 18px 0 0; max-width: 44ch; }
.rc-kinds { list-style: none; display: grid; gap: 20px; margin-top: 30px; }
.rc-kinds li { display: grid; gap: 8px; justify-items: start; }
.rc-kinds__d { max-width: 40ch; }
.rc-demo__from { margin: 0 0 10px; }
.rc-demo__from a { color: var(--label); text-decoration-color: var(--accent); text-underline-offset: .25em; }
.rc-demo__claim { margin: 0; font: 700 var(--fs-h3)/1.45 var(--font-body); color: var(--cream); }
.rc-demo__sent { text-decoration: underline dotted var(--mustard); text-decoration-thickness: 2px; text-underline-offset: .3em; }
.rc-demo__tab { margin: 18px 0 0; }
.rc-demo__receipt { margin-top: 14px; }
.rc-demo__more { margin-top: 18px; }

/* ---------- 5. Subscribe ---------------------------------------------------- */
.rc-sub-band__inner { display: grid; gap: 16px; justify-items: start; }
.rc-sub-band__inner p { margin: 0; max-width: 48ch; }

/* ---------- Motion ----------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* case files settle like papers set down on a desk; the words never fade */
  :root:not([data-motion="still"]) .file__in {
    animation: rc-file-in linear both; animation-timeline: view(); animation-range: entry 0% cover 22%;
  }
}
@keyframes rc-file-in { from { transform: translateY(44px) rotate(var(--r0, -1deg)); } to { transform: none; } }

/* ---------- Phone and tablet -------------------------------------------------- */
@media (max-width: 1099px) {
  .tl { --tl-label: 240px; --tl-gap: 20px; }
}
@media (max-width: 899px) {
  .rc-open__grid, .rc-how__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .rc-open__art { margin-inline: calc(-1 * var(--gutter) + 6px); }
  .tl { --tl-label: 0px; --tl-gap: 0px; }
  .tl__axis, .tl__link { grid-template-columns: minmax(0, 1fr); }
  .tl__axis-pad { display: none; }
  .tl__link { gap: 8px; padding: 12px 0 14px; }
  .tl__track { height: 16px; }
  .tl__key { margin-left: 0; }
  .files { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .file--intro .file__in { display: flex; }
  .file__in { padding: 22px 20px 20px; }
  .file__receipt { right: 12px; }
}

/* ---------- The Receipts look (23 Oct 2026) -----------------------------------
   As on the twelve parts (pages/article.css, section 9): black grounds with the blue-grey shape inks like
   the covers' navy night, The evidence on slate teal (the template), and each act's bar and folder tab in
   its cover's punch colour (--act-punch on each row and file, from data/receipts-series.json). The opening
   keeps the hour light on her picture but no longer changes its ground with the hour. */
.rc-page {
  --clay: #B36849;             /* the GriftMatrix punch colours (her sheet, 23 Oct); 4.71 on ground black */
  --light-heart-red: #DB786F;  /* 6.54 */
  --light-mulberry: #C58486;   /* 6.63 */
}
.rc-page .rc-open,
.rc-page .rc-years,
.rc-page .rc-how { --ground: var(--ground-black); --mp-ink: #243036; --mp-ink-2: #2A343C; }
.rc-page .rc-open {
  --punch: var(--lift-teal); --label: var(--bone); --accent: var(--mustard);
  --reg-a: var(--mustard); --reg-b: var(--lift-teal);
}
.file__tab { color: var(--ground-black); }
.file__tab::before { background: var(--act-punch, var(--mustard)); }
