/* GriftMatrix investigation (topic) test page (stage 3, 9 Oct 2026). Page-only styles on top of shared/ratc.css.
   One page shows any of the eight investigations, chosen by its address (topic.html#cover-ups). Her line for it
   from the live GriftMatrix page, a generated count, its months as a strip of squares (the hub's matrix row),
   then every piece in it newest first, each with its own picture and excerpt. */

/* ---------- 1. Opening ---------------------------------------------------- */
.tp-open { padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.tp-open__inner { display: grid; gap: 14px; justify-items: start; }
.tp-kicker, .tp-title { margin: 0; }
.tp-kicker a { color: var(--label); text-decoration-color: var(--accent); text-underline-offset: .25em; }
.tp-line { margin: 4px 0 0; max-width: 46ch; font: 700 var(--fs-h3)/1.4 var(--font-body); color: var(--text); text-wrap: pretty; }
.tp-count { margin: 0; }
.tp-strip { width: 100%; max-width: 760px; margin-top: 8px; }
.tp-strip__ends { display: flex; justify-content: space-between; margin: 8px 0 0; }
.mx__cells { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 4px; }
.mx__c { display: block; aspect-ratio: 1; border-radius: 2px; }
.mx__c[data-t="0"] { box-shadow: inset 0 0 0 1px var(--scene-mp-2, rgb(232 195 146 / .3)); }
.mx__c[data-t="1"] { background: rgb(217 140 66 / .4); }
.mx__c[data-t="2"] { background: rgb(217 140 66 / .7); }
.mx__c[data-t="3"] { background: var(--mustard); }
.mx__c[data-t="4"] { background: var(--bone); }

/* ---------- 2. The list -------------------------------------------------- */
.tp-rows { list-style: none; }
.tp-row {
  display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 28px; align-items: start;
  padding: 22px 0; border-top: 1px solid var(--dusk-violet);
  content-visibility: auto; contain-intrinsic-size: auto 170px;
}
.tp-row:first-child { border-top: 2px solid var(--bone); }
.tp-row__pic {
  display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 3px;
  background-color: var(--ground-black); background-repeat: no-repeat;
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
  background-position: calc(var(--c) / max(var(--cols) - 1, 1) * 100%) calc(var(--r) / max(var(--rows) - 1, 1) * 100%);
}
.tp-row__pic--none {
  background-image: linear-gradient(var(--mustard), var(--mustard)), linear-gradient(var(--bone), var(--bone)), linear-gradient(var(--mustard), var(--mustard));
  background-size: 12px 12px; background-position: 44% 40%, 56% 40%, 44% 62%;
  outline: 1px solid var(--dusk-violet); outline-offset: -1px;
}
.tp-row__text { display: grid; gap: 6px; min-width: 0; }
.tp-row__date { margin: 0; }
.tp-row__h { margin: 0; font: 700 clamp(1.25rem, 1.1rem + .5vw, 1.5rem)/1.25 var(--font-body); text-wrap: pretty; }
.tp-row__h a { color: var(--cream); text-decoration: none; }
.tp-row__h a:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .18em; }
.tp-row__ex { margin: 2px 0 0; max-width: 66ch; }

/* ---------- 3. Every investigation ------------------------------------------ */
.tp-more__h { margin: 0 0 16px; }
.tp-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.tp-nav__a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
  border: 2px solid var(--bone); border-radius: 24px; color: var(--cream); text-decoration: none;
  font: 600 var(--fs-label)/1.2 var(--font-mono); letter-spacing: .08em; text-transform: uppercase;
}
.tp-nav__a:hover { background: var(--wine); }
.tp-nav__a[aria-current="page"] { background: var(--bone); color: var(--ink-plum); }
.tp-more__all { margin: 22px 0 0; }

/* ---------- Motion: a new investigation folds in over the old one (same-page folder open) ---------- */
@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="still"]) .tp-open__inner { view-transition-name: tp-head; }
}

/* ---------- Phone ------------------------------------------------------------- */
@media (max-width: 899px) {
  .mx__cells { gap: 2px; }
  .tp-row { grid-template-columns: 112px minmax(0, 1fr); gap: 0 14px; padding: 16px 0; contain-intrinsic-size: auto 150px; }
  .tp-row__h { font-size: 1.125rem; }
  .tp-row__ex { font-size: 1rem; }
}
