/* The case study (2026-11-04). The page's markup is the approved page's own (tools/gen_case.mjs runs it), so this file
   styles its sd-* and cs-* pieces in this design's paper language. Fable's signature: Figure 1 in register, the
   September reading printed on a base sheet and the October readings on a tissue laid over it, held in register by the
   red marks; lift the tissue (its tab, a click, or Space) and September stands alone. Shared pieces: page.css. */

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.page--case-study .sd-wrap { width: var(--wrap); margin-inline: auto; }

/* ---------- head ---------- */
.cs-head .cs-main { position: relative; z-index: 3; max-width: min(72rem, 74vw); }
.sd-casehead__meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: clamp(10px, 2svh, 20px) 0 0; }
.sd-label { font: 600 .74rem/1.4 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--ink-red); }
/* 2026-11-06: 42u to 36u, so the head with Figure 1's object beside it stays near its old height */
.cs-title { margin: calc(12 * var(--u)) 0 calc(12 * var(--u)); font-size: calc(36 * var(--u)); line-height: 1.04; letter-spacing: -.02em; color: var(--hd); max-width: 26ch; }
.cs-intro { font: 400 calc(14 * var(--u)) / 1.45 var(--read); color: var(--ink); max-width: 60ch; }

/* ---------- Figure 1 in register ----------
   2026-11-06 (Fable's comparison with the live site, which shows its bars on the first screen): the register object sits in
   the head's right column beside the claim, one sheet behind it; the figure's words are the first row under the head.
   Was: words and object side by side in this row, the source line under both. */
.cs-headgrid { position: relative; z-index: 3; display: grid; grid-template-columns: 55fr 45fr; gap: clamp(28px, 4.4vw, 100px); align-items: center; }
.cs-head .cs-headgrid .cs-main { max-width: none; }
.cs-headfig { margin: 0; position: relative; }
.cs-headsheet { top: 8%; right: -3%; }
/* on the first screen September has to read through the tissue: the shared tissue rule (.86 opaque) left the 6% at a
   whisper, so this one sheet is thinner; the October readings are printed on it and stay full strength */
.rg > .rg__tissue.tissue { background-color: rgb(250 246 240 / .42); }
.cs-headfig .rg-bars__l { font-size: max(.95rem, calc(9 * var(--u))); }
.cs-headfig .rg-bars__t b { font-size: max(1.15rem, calc(14 * var(--u))); }
@media (min-width: 761px) { .cs-headfig .rg-bars li { grid-template-columns: max(14rem, calc(140 * var(--u))) 1fr; } }
/* the lead bar in the Results cards' blue, not the near-black deep texture (Jonah 2026-11-05 on the Results band: "black box") */
.cs-headfig .rg-bars li.is-lead .rg-bars__t i { background: #1D4E5F var(--strip-tex); background-size: 900px; background-blend-mode: multiply; }
.cs-register { padding-top: clamp(40px, 7svh, 84px); }
.cs-fig1 { display: grid; grid-template-columns: minmax(280px, 4fr) 8fr; grid-template-areas: "words read"; gap: clamp(24px, 3svh, 36px) clamp(28px, 4vw, 90px); align-items: start; }
.cs-fig1__words { grid-area: words; }
.cs-fig1__read { grid-area: read; display: grid; gap: clamp(16px, 2.4svh, 26px); }
.cs-fig1__num { margin: clamp(12px, 2svh, 22px) 0 10px; }
.cs-numeral { display: block; font: 600 clamp(4.6rem, 2rem + 6vw, 9rem)/.9 var(--display); color: #14191B; letter-spacing: -.03em; }
.cs-unit { display: block; margin-top: 6px; font: italic 1.05rem var(--serif); color: var(--ink-2); }
.cs-fig1__title { font: 600 clamp(1.2rem, .95rem + .7vw, 1.75rem)/1.25 var(--display); color: #14191B; max-width: 34ch; }
.cs-fig1__src { padding-top: 16px; border-top: 1px solid var(--rule); display: grid; gap: 8px; max-width: 70rem; }
.cs-fig1__src .cs-source__lead, .cs-source__lead { font-size: 1rem; line-height: 1.55; color: var(--ink-2); }
.cs-fig1__src strong, .cs-source__lead strong { color: var(--ink); }
.sd-caption { font: italic .92rem/1.5 var(--serif); color: var(--ink-2); }
.rg { grid-area: reg; position: relative; display: grid; perspective: 1600px; }
.rg > .rg__base, .rg > .rg__tissue { grid-area: 1 / 1; padding: clamp(36px, 3.6vw, 60px) clamp(28px, 3vw, 54px); }
.rg__tissue { z-index: 2; background: rgb(252 248 243 / .55); transform-origin: 50% 0; transition: transform .7s steps(8, end); }
.rg__tissue::before { opacity: .28; }
/* 2026-11-06: lifted further and up (was rotateX(-74deg) alone), so the folded tissue clears the September row it is lifted
   to show; at -74deg its folded edge lay across "Sep 10, 2026 6%" (a critic found it; the live page has it too) */
.rg.is-lifted .rg__tissue { transform: translateY(calc(-1 * clamp(18px, 1.6vw, 34px))) rotateX(-82deg); }
.rg-bars { display: grid; gap: clamp(14px, 2.4svh, 22px); }
.rg-bars li { display: grid; grid-template-columns: 13rem 1fr; gap: 16px; align-items: center; }
.rg-bars__l { font: 500 .95rem var(--sans); color: var(--ink-2); }
.rg__tissue .rg-bars__l { color: var(--ink-2); }
.rg__base .rg-bars__l { color: var(--ink-2); }
.rg-bars__t { position: relative; display: flex; align-items: center; height: clamp(34px, 5svh, 46px); }
.rg-bars__t i { height: 100%; width: calc(var(--v) * 1%); max-width: calc(100% - 4rem); background: #D7CFBF var(--strip-tex); background-size: 900px; background-blend-mode: multiply; box-shadow: var(--edge), 2px 4px 6px -3px rgb(18 27 30 / .3); }
.rg-bars li.is-lead .rg-bars__t i { background: #234048 var(--deep-tex); background-size: 300px; }
.rg-bars__t b { margin-left: 12px; font: 600 1.15rem var(--display); color: #14191B; }
.rg__tab { position: absolute; z-index: 3; left: 50%; bottom: -22px; width: 52px; height: 44px; margin-left: -26px; border: 0; border-radius: 0 0 10px 10px; cursor: pointer; color: var(--ivory);
  background: #234048 var(--deep-tex); background-size: 300px; box-shadow: 0 6px 12px -4px rgb(13 22 25 / .45); display: grid; place-items: center; }
.rg__tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s steps(3, end); }
.rg.is-lifted .rg__tab svg { transform: rotate(180deg); }
.rg__tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cs-note { right: -2%; top: -46px; }

/* ---------- the facts and the rest of the lede ---------- */
.cs-more { padding-block: clamp(40px, 7svh, 84px); }
.cs-more__grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 110px); align-items: start; }
.sd-facts { padding: clamp(22px, 2.4vw, 40px); background: var(--ivory) var(--sheet-a); background-size: 700px; box-shadow: var(--edge), 8px 18px 28px -16px rgb(13 22 25 / .45); transform: rotate(-.5deg); }
.sd-facts__row { display: grid; grid-template-columns: 8rem 1fr; gap: 14px; padding: 10px 0; border-top: 1px solid var(--rule); }
.sd-facts__row:first-child { border-top: 0; }
.sd-facts dt { font: 600 .74rem/1.6 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-red); }
.sd-facts dd { margin: 0; font-size: 1rem; line-height: 1.5; }
.cs-lede { display: grid; gap: 1em; }
.cs-lede .sd-lede { font-size: clamp(1.05rem, 1rem + .25vw, 1.25rem); line-height: 1.55; color: var(--ink-2); }

/* ---------- numbered sections, set as a manuscript ---------- */
.cs-sec { position: relative; padding-block: clamp(36px, 6svh, 72px); }
.cs-sec + .cs-sec:not(.band)::before { content: ""; position: absolute; top: 0; left: 50%; width: var(--wrap); transform: translateX(-50%); height: 1px; background: var(--rule); }
.cs-sec__grid { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 90px); align-items: start; }
.cs-h2 { font: 600 clamp(1.5rem, 1.1rem + 1vw, 2.3rem)/1.12 var(--display); color: #14191B; }
.sd-prose, .cs-prose { display: grid; gap: 1em; font-size: 1.06rem; line-height: 1.65; max-width: 68ch; }
.sd-prose strong { font-weight: 600; }
.sd-list { display: grid; gap: 10px; padding-left: 1.2em; list-style: disc; font-size: 1.06rem; line-height: 1.6; }
.sd-list li::marker { color: var(--ink-red); }
.cs-after { margin-top: clamp(20px, 3.4svh, 32px); }
.cs-prose-wide { grid-column: 1; }
/* Figures 2 and 3: paper cards with strips of paper for bars */
.sd-figure { margin-top: clamp(22px, 3.6svh, 36px); padding: clamp(24px, 2.8vw, 48px); background: var(--ivory) var(--sheet-a); background-size: 800px; box-shadow: var(--edge), 10px 22px 36px -18px rgb(13 22 25 / .5); }
.sd-figure--wide { display: grid; grid-template-columns: 4fr 8fr; gap: 20px clamp(24px, 3vw, 64px); }
.sd-figure--wide .sd-figure__source { grid-column: 1 / -1; }
.sd-figure__title { margin: 10px 0 16px; font: 600 clamp(1.1rem, .95rem + .45vw, 1.45rem)/1.3 var(--display); color: #14191B; max-width: 40ch; }
.sd-numeral { display: block; margin-top: 10px; font: 600 clamp(3rem, 1.6rem + 3vw, 5.4rem)/.95 var(--display); color: #14191B; }
.sd-numeral__unit { display: block; margin-top: 6px; font: italic 1rem var(--serif); color: var(--ink-2); }
.cs-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2vw, 36px); }
.sd-figure__group .sd-label { margin-bottom: 10px; }
.sd-bars { display: grid; gap: 10px; }
.sd-bar { display: grid; gap: 4px; }
.sd-bar__label { font: 500 .85rem var(--sans); color: var(--ink-2); }
.sd-bar__track { display: flex; align-items: center; gap: 10px; height: 26px; }
.sd-bar__fill { height: 100%; width: calc(var(--v) * 1%); max-width: calc(100% - 3.6rem); background: #D7CFBF var(--strip-tex); background-size: 900px; background-blend-mode: multiply; box-shadow: var(--edge); }
.sd-bar--lead .sd-bar__fill { background: #234048 var(--deep-tex); background-size: 300px; }
.sd-bar__value { font: 600 .98rem var(--display); }
.sd-figure__source { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
/* the city tables, on ruled paper */
.sd-table { width: 100%; margin-top: clamp(20px, 3.4svh, 32px); border-collapse: collapse; background: #FBF8F2 repeating-linear-gradient(transparent 0 41px, rgb(68 116 131 / .12) 41px 42px); box-shadow: var(--edge), 6px 14px 22px -14px rgb(13 22 25 / .4); font-size: 1rem; }
.sd-table caption { caption-side: top; text-align: left; padding: 0 0 10px; }
.sd-table th, .sd-table td { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--rule); }
.sd-table thead th { font: 600 .74rem var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); }
.sd-table tbody th { font: 600 1rem var(--display); }
.cs-note:not(.note) { font-style: italic; color: var(--ink-2); }

/* ---------- the limits, on the dark band ---------- */
.cs-limits .cs-h2 { color: var(--ivory); }
.cs-limits .sd-prose, .cs-limits .cs-prose { color: var(--deep-2); }
.cs-limits strong { color: var(--ivory); }
.cs-limits a { color: var(--ivory); }

/* ---------- the close ---------- */
.cs-cta { display: grid; grid-template-columns: 6fr 6fr; gap: clamp(28px, 5vw, 110px); align-items: end; }
.cs-cta .sd-display-m { font: 600 clamp(2.2rem, 1.2rem + 2.4vw, min(4.4rem, 9svh))/1 var(--display); letter-spacing: -.02em; color: #14191B; max-width: 18ch; }
.cs-cta__side { display: grid; gap: 18px; justify-items: start; font-size: 1.06rem; line-height: 1.6; color: var(--ink-2); }
.cs-cta__side a:not(.ticket) { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page--case-study main > .sd-section:last-child { padding-block: clamp(56px, 9svh, 110px); }

@media (max-width: 1100px) {
  .cs-fig1, .cs-more__grid, .cs-sec__grid, .sd-figure--wide, .cs-cta { grid-template-columns: 1fr; }
  .cs-fig1 { grid-template-areas: "words" "read"; }
  .cs-headgrid { grid-template-columns: 1fr; }
  .cs-headsheet { display: none; }
  .cs-head .cs-main { max-width: none; }
  .cs-note { display: none; }
}
@media (max-width: 760px) {
  .rg-bars li { grid-template-columns: 1fr; gap: 4px; }
  .rg__tissue .rg-bars__l { display: block; }
  .cs-groups { grid-template-columns: 1fr; }
  .sd-facts__row { grid-template-columns: 1fr; gap: 2px; }
  .sd-table th, .sd-table td { padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .rg__tissue { transition: none; } }
@media (max-width: 1100px) { .cs-title { font-size: 2.1rem; } .cs-intro { font-size: 1.05rem; } }
.cs-who { display: flex; align-items: center; gap: 10px; }
.cs-who .mark { width: calc(18 * var(--u)); height: calc(18 * var(--u)); }
