/* Open Shelf: the figures pages (figures/*.html). Loads after /os/css/site.css.
   These are reader-facing pages made by scripts/deepdive_figures.py: a headline, a standfirst, one to four
   chart images with caption, source line and a data table, references, a PDF link and a care note.
   Styled against the markup as the generator writes it, so nothing inside <main> changes.
   The charts are raster images drawn on a warm near-black canvas (#121310); each sits on a plate of that
   same colour, so image and plate read as one continuous dark surface. Caption and source sit below on paper. */
:root{--col:680px;--wide:1040px;--card:#FBF8F1;--plate:#121310}

.fig-page{max-width:1440px;margin-inline:auto;padding:calc(var(--nav-h) + clamp(44px,8vw,112px)) var(--inset) clamp(72px,10vw,130px);display:grid;grid-template-columns:minmax(0,1fr) minmax(0,var(--col)) minmax(0,1fr);color:var(--ink)}
.fig-page>*{grid-column:2;min-width:0}
.fig-page a{color:var(--forest);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.fig-page a:hover{color:var(--walnut)}

/* ---------- header ---------- */
.fig-page .eyebrow{display:flex;align-items:center;gap:12px;margin:0;font-family:var(--mono);font-size:calc(.78125rem * var(--scale));line-height:1.45;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.fig-page .eyebrow::before{content:"";flex:none;width:28px;height:1px;background:var(--brass)}
.fig-page h1{margin:18px 0 26px;padding-bottom:26px;border-bottom:1px solid var(--brass);font-family:var(--sans);font-weight:520;font-size:calc(2.125rem * var(--scale));line-height:1.08;letter-spacing:-.03em;text-wrap:balance;overflow-wrap:break-word}
@media (min-width:720px){.fig-page h1{font-size:calc(2.875rem * var(--scale));line-height:1.05}}
@media (min-width:1100px){.fig-page h1{font-size:calc(3.375rem * var(--scale));line-height:1.03;letter-spacing:-.034em}}
.fig-page .standfirst{margin:0 0 18px;font-family:var(--serif);font-size:calc(1.1875rem * var(--scale));line-height:1.6;color:var(--ink);text-wrap:pretty}
@media (min-width:1100px){.fig-page .standfirst{font-size:calc(1.3125rem * var(--scale))}}
.fig-page .meta{margin:0;font-family:var(--sans);font-size:calc(.9375rem * var(--scale));line-height:1.55;letter-spacing:0;color:var(--ink-2)}
.fig-page>hr{width:100%;height:0;margin:clamp(28px,4vw,48px) 0 0;border:0;border-top:1px solid var(--rule)}

/* ---------- a figure: image on the plate, then caption, source, data ---------- */
.fig-page .fig{grid-column:1 / -1;justify-self:center;width:min(100%,var(--wide));margin:clamp(40px,6vw,72px) 0 0;padding:0}
.fig-page .fig figure{margin:0;display:grid;gap:14px}
.fig-page .fig picture{display:block;background:var(--plate);padding:clamp(10px,2vw,22px);border-radius:14px}
.fig-page .fig img{display:block;width:100%;height:auto;margin-inline:auto;border:0;border-radius:3px;background:var(--plate)}
@media (min-width:720px){.fig-page .fig img{max-height:min(82vh,820px);object-fit:contain}}
.fig-page figcaption,.fig-page .src{max-width:var(--col);margin-inline:auto;width:100%;font-family:var(--sans);font-size:calc(.9375rem * var(--scale));line-height:1.55;letter-spacing:0;color:var(--ink-2);text-wrap:pretty}
.fig-page figcaption{margin-top:0}
.fig-page figcaption strong{font-weight:400;color:var(--ink)}
.fig-page .src{display:block;min-height:0;padding:0;cursor:auto;gap:0;text-transform:none;text-decoration:none;opacity:1;margin:10px auto 0}
.fig-page .src::before{content:none}
.fig-page .fig>.src:first-of-type{margin-top:12px}

/* the data table, folded away */
.fig-page .fig details{max-width:var(--col);margin:18px auto 0;border-top:1px solid var(--rule);padding:0}
.fig-page .fig summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;cursor:pointer;font-family:var(--mono);font-size:calc(.78125rem * var(--scale));letter-spacing:.08em;text-transform:uppercase;color:var(--ink-2)}
.fig-page .fig summary::-webkit-details-marker{display:none}
.fig-page .fig summary::after{content:"";flex:none;width:9px;height:9px;margin-right:4px;border-right:1px solid currentColor;border-bottom:1px solid currentColor;transform:translateY(-3px) rotate(45deg);transition:transform var(--t) var(--ease)}
.fig-page .fig details[open]>summary::after{transform:translateY(2px) rotate(-135deg)}
.fig-page .fig summary:hover{color:var(--ink)}
.fig-page .tbl-scroll{overflow-x:auto;margin:6px 0 4px}
.fig-page table.fig-data{width:100%;min-width:340px;border-collapse:collapse;font-family:var(--sans);font-size:calc(.9375rem * var(--scale));line-height:1.45}
.fig-page .fig-data caption{text-align:left;padding-bottom:8px;font-family:var(--mono);font-size:calc(.75rem * var(--scale));letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.fig-page .fig-data th{padding:10px 16px 10px 0;font-family:var(--mono);font-size:calc(.75rem * var(--scale));font-weight:400;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);text-align:left;vertical-align:bottom;border-bottom:1px solid var(--ink)}
.fig-page .fig-data td{padding:12px 16px 12px 0;text-align:left;vertical-align:top;border-bottom:1px solid var(--rule)}
.fig-page .fig-data :is(td,th):last-child{padding-right:0}

/* ---------- references, PDF link, care note ---------- */
.fig-page h2{margin:clamp(56px,8vw,96px) 0 18px;font-family:var(--sans);font-weight:520;font-size:calc(1.75rem * var(--scale));line-height:1.1;letter-spacing:-.025em;color:var(--ink)}
@media (min-width:1100px){.fig-page h2{font-size:calc(2.125rem * var(--scale))}}
.fig-page ol.cites{margin:0;padding-left:1.3em;max-width:var(--col);font-family:var(--serif);font-size:calc(1.03125rem * var(--scale));line-height:1.55;color:var(--ink)}
.fig-page ol.cites li{margin-bottom:12px;padding-left:4px;overflow-wrap:anywhere}
.fig-page .care{margin:clamp(36px,5vw,56px) 0 0;padding:20px 24px;max-width:var(--col);background:var(--card);border:0;border-left:1px solid var(--brass);border-radius:0 14px 14px 0;font-family:var(--sans);font-size:calc(.9375rem * var(--scale));line-height:1.55;color:var(--ink-2)}
.fig-page .care strong{color:var(--ink);font-weight:600}
.fig-page .back{margin-top:36px}
.fig-page .back a{display:inline-block;padding-block:10px}
.fig-page>p{font-family:var(--serif);font-size:calc(1.0625rem * var(--scale));line-height:1.6;overflow-wrap:anywhere}
.fig-page>p.care,.fig-page>p.eyebrow,.fig-page>p.meta{font-size:revert}
.fig-page>p.care{font-size:calc(.9375rem * var(--scale))}
.fig-page>p.eyebrow{font-size:calc(.78125rem * var(--scale))}
.fig-page>p.meta{font-size:calc(.9375rem * var(--scale))}
.fig-page>p.standfirst{font-size:calc(1.1875rem * var(--scale))}
@media (min-width:1100px){.fig-page>p.standfirst{font-size:calc(1.3125rem * var(--scale))}}

/* the action-plan stub (and any page that adds these blocks) */
.fig-page .doc{margin-top:48px;padding-top:32px;border-top:1px solid var(--rule)}
.fig-page .contents{margin:24px 0 0;padding:20px 24px;background:var(--card);border-left:1px solid var(--brass);border-radius:0 14px 14px 0}
.fig-page .dl{display:inline-flex;align-items:center;min-height:44px;padding:0 18px;border:1px solid var(--forest);border-radius:999px;text-decoration:none}

@media (prefers-reduced-motion:reduce){.fig-page *{animation:none!important;transition:none!important}}
html[data-motion="off"] .fig-page *{animation:none!important;transition:none!important}

/* one inline style on onc-apricot-laetrile carries a light-on-dark colour from the old site */
.fig-page [style*="#c4beb0"]{color:var(--ink-2)!important}
/* Nov. 26, 2026: the page itself spans the full width so its suede ground does too; the content measure is unchanged */
main.fig-page{max-width:none;padding-inline:max(var(--inset),calc((100% - 1440px) / 2 + var(--inset)))}
/* Nov. 26, 2026: redrawn SVG figures (picture.svg) are drawn on paper, so they drop the dark plate, the padding and the height cap; raster figures are unchanged */
.fig-page .fig picture.svg{background:none;padding:0;border-radius:0}
.fig-page .fig picture.svg img{background:none;border-radius:0;max-height:none;object-fit:fill}
/* Nov. 26, 2026 (decision 92): figure pages carry the suede one step softer, like articles */
:root{--suede:.32}
