/* THE STORY PAGE, version B (Bex, 24 Nov 2026: "Version B (OCCRP style)"; 25 Nov 2026: "Story layout: version B, for
   every story"). Built from the mock-up he chose (mockups/story-page/mock.css), with the same numbers. lib/p_storyb.py
   writes the page.

   EVERYTHING IS CENTRED ON THE PAGE; there is no side column anywhere.
   - The opening, on the page ground, centred: the red category, the headline, the standfirst. Then the featured
     photograph whole, large and centred, with nothing over it; directly under it, left-aligned to the photograph's
     edge, in small grey: "Credit: … | caption" (only what is recorded; nothing is invented).
   - Then the quiet lines, centred: who wrote it; the date and the reading time, "Listen", "Read in light". Nothing
     about a partner up here: a partner is named only at the end of the story (Bex, 25 Nov 2026).
   - Sizes are the site's seven steps (core.css): since Bex's answers to Q25 of 25 Nov 2026 the byline and the end
     credits are small text (15 px), "Key findings" and "More on this" are subheadings (26 px), the key findings
     themselves and the related titles are body text (21 px; the titles in bold).
   - Key findings, the text, the end credits and the related stories: ONE CENTRED COLUMN, paragraphs left-aligned.
     On a wide screen (992 px and more) it is 760 px wide and the text is 21 px (about 84 characters per line);
     below that 680 px at most and 18 px.
   - A wide photograph breaks out of the column on both sides equally (up to 1,240 px). The pull quote and the
     document card stay inside the column.

   Dark is the default, as on the live site. "Read in light" is a plain checkbox: it works without scripts. With
   scripts the choice is kept as one word in the browser, beside the reading options (Bex, 24 Nov 2026: "(b), one word
   kept in the browser"): assets/js/prefs.js sets it on <html> before the page is drawn, assets/js/story-b.js keeps
   the checkbox and the menu's reading options in step. Nothing else about a reader is kept (D-163). */
.sbwrap { background: #050505; }
.sb-sw { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.sb {
  --bg: #050505; --ink: #D2D2D2; --head: #FFFFFF; --soft: #9C9C9C; --rule: #2A2A2A; --red: #D71920; --redt: #F23B41;
  --measure: 42.5rem;                                              /* the text column below 992 px: 680 px at most, as in round 3 */
  --col: min(var(--measure), 100% - 2 * var(--gutter));           /* never wider than the screen less its gutters */
  --wide: min(77.5rem, 100vw - 2 * var(--gutter));                /* a wide photograph: up to 1,240 px, centred */
  padding-bottom: 6rem; background: var(--bg); color: var(--ink); color-scheme: dark;
}
@media (min-width: 62em) { .sb { --measure: 47.5rem; } }           /* a wide screen: the column is 760 px */
#sb-light:checked ~ .sb, html[data-theme="day"] .sb { --bg: #FFFFFF; --ink: #1C1C1C; --head: #000000; --soft: #5C5C5C; --rule: #DADADA; --redt: #D71920; color-scheme: light; }
.sb a { color: inherit; }

/* ------------------------------------------------------------------------------------------- the opening */
.sb-head { padding: 3rem var(--gutter) 0; text-align: center; }
.sb-kicker { font: 800 var(--ts-label)/1.3 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--redt); }
.sb h1 { max-width: 62rem; margin: .75rem auto 0; font: 800 var(--ts-headline)/var(--ts-headline-lh) var(--f-text); letter-spacing: -.03em; color: var(--head); text-wrap: balance; }
.sb-stand { max-width: 50rem; margin: 1.5rem auto 0; font: 400 var(--ts-stand)/1.45 var(--f-text); color: var(--head); text-wrap: balance; }
/* The featured photograph: as wide as the page's content, at most 1,280 px, and never higher than the screen (less the
   pinned bar), so that it can always be seen whole at once: a tall photograph is shown narrower, never cut. --ar is
   the photograph's own width divided by its height (a small style file per page gives it; inline styles are not allowed). */
.sb-photo { width: min(100% - 2 * var(--gutter), 80rem, calc(max(20rem, 100vh - var(--stick) - 2rem) * var(--ar, 1.5))); margin: 2.5rem auto 0; }
.sb-photo img { display: block; width: 100%; height: auto; }
.sb-photo figcaption { margin-top: .5rem; text-align: left; font: 400 var(--ts-small)/1.45 var(--f-text); color: var(--soft); }

/* ------------------------------------------------------------------------------------------- the quiet lines
   Who wrote it; for a partner's story, "First published by …" with a link to the original; the partners' logos (an
   EMPTY FRAME with the partner's name until M28 holds the files); then one line: the date and the reading time,
   "Listen", "Read in light". Centred; not a side column. */
/* the byline is small text (15 px): Bex, 25 Nov 2026, answer to Q25 */
.sb-facts { width: min(62rem, 100% - 2 * var(--gutter)); margin: 1.75rem auto 0; text-align: center; font: 400 var(--ts-small)/1.5 var(--f-text); color: var(--ink); }
.sb-who span { display: block; }
.sb-who span + span { margin-top: .125rem; }
.sb-who b { font-weight: 700; color: var(--head); }
.sb-who a, .sb-credits a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.sb-who a:hover, .sb-credits a:hover { color: var(--redt); }
.sb-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .625rem; }
.sb-logo { display: inline-flex; align-items: center; justify-content: center; min-width: 6.5rem; height: 2.5rem; padding-inline: .75rem; border: 1px dashed var(--soft); font-size: .8125rem; line-height: 1.2; color: var(--soft); }
.sb-tr { margin-top: .375rem; font-size: .9375rem; color: var(--soft); }
.sb-tr a { color: var(--redt); text-decoration: underline; text-underline-offset: .2em; }
.sb-line { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; column-gap: 1.75rem; margin-top: .25rem; font-size: .9375rem; color: var(--soft); }
.sb-date, .sb-mode { display: inline-flex; align-items: center; min-height: 2.75rem; }
.sb-listen summary { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; font: 600 1rem/1.3 var(--f-text); color: var(--head); cursor: pointer; list-style: none; }
.sb-listen summary::-webkit-details-marker { display: none; }
.sb-listen summary span { font-size: .75rem; color: var(--redt); }
.sb-listen summary:hover { text-decoration: underline; text-underline-offset: .25em; }
/* the opened player stands under the word "Listen", centred on it; the line itself does not move. (The panel takes no
   width in the line: its content is as wide as the player and hangs evenly to both sides.) */
.sb-listen__panel { width: 0; margin-inline: auto; }
.sb-listen__in { width: 22rem; margin-left: -11rem; padding-bottom: .75rem; text-align: center; }
.sb-listen audio { display: block; width: 100%; height: 2.5rem; margin-top: .25rem; }
/* the disclosure: always there when the player is open, directly under the controls, in the small grey style */
.sb-listen__ai { margin-top: .5rem; font-size: .9375rem; line-height: 1.45; color: var(--soft); }
.sb-mode label { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: .25em; cursor: pointer; }
.sb-mode__d { display: none; }
#sb-light:checked ~ .sb .sb-mode__l, html[data-theme="day"] .sb .sb-mode__l { display: none; }
#sb-light:checked ~ .sb .sb-mode__d, html[data-theme="day"] .sb .sb-mode__d { display: inline; }
#sb-light:focus-visible ~ .sb .sb-mode label { outline: 2px solid var(--head); outline-offset: 3px; }

/* ------------------------------------------------------------------------------------------- key findings
   No box. A heading in normal case; plain short paragraphs, a little larger than the text; a thin red line beside them. */
.sb-kf { position: relative; width: var(--col); margin: 3.5rem auto 0; }
.sb-kf::before { content: ""; position: absolute; left: -1.375rem; top: .35rem; bottom: .35rem; width: 2px; background: var(--red); }
.sb-kf h2 { font: 700 var(--ts-sub)/1.2 var(--f-text); color: var(--head); }           /* a subheading */
.sb-kf p { margin-top: .875rem; font: 400 var(--ts-body)/var(--ts-body-lh) var(--f-text); }      /* body text (Bex, 25 Nov 2026: "key findings as body text"; it was 22 px) */
.sb-kf p b { font-weight: 700; color: var(--head); }

/* ------------------------------------------------------------------------------------------- the text
   One centred column; paragraphs left-aligned; the red drop cap; red underlined links; bold subheadings.
   On a wide screen 21 px in a column of 760 px; below 992 px 18 px, as before. */
.sb-body { width: var(--col); margin: 3.5rem auto 0; font: 400 var(--ts-body)/var(--ts-body-lh) var(--f-text); overflow-wrap: break-word; }
.sb-body > * + * { margin-top: 1.35em; }
.sb-body > p:first-of-type::first-letter { float: left; margin: .06em .1em 0 0; font: 800 5.1em/.78 var(--f-text); color: var(--red); }
.sb-body a { color: var(--redt); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.sb-body h2 { margin-top: 2.2em; font: 700 var(--ts-sub)/1.2 var(--f-text); color: var(--head); }
.sb-body h3 { margin-top: 2em; font: 700 1.3125rem/1.25 var(--f-text); color: var(--head); }
.sb-body strong, .sb-body b { font-weight: 700; color: var(--head); }
.sb-body ul, .sb-body ol { padding-left: 1.3em; }
.sb-body ul { list-style: disc; }
.sb-body ol { list-style: decimal; }
/* a photograph inside the text: the column's width; its caption and credit in plain small grey under it.
   WIDE (an editor marks it): up to 1,240 px, centred: it breaks out of the column on both sides equally. On a phone a
   wide photograph runs from edge to edge. */
.sb-body figure, .sb-pull, .sb-doc { scroll-margin-top: 6.5rem; }
.sb-body figure { margin: 2.2em 0; }
.sb-body figure img { display: block; width: 100%; height: auto; }
.sb-body figcaption { max-width: var(--measure); margin-top: .5rem; font: 400 var(--ts-small)/1.45 var(--f-text); color: var(--soft); }
.sb-body figcaption span + span { margin-left: .4em; }
.sb-body figure.is-wide { width: var(--wide); margin-left: calc((100% - var(--wide)) / 2); }
/* a tall picture is shown no higher than the screen (as the featured photograph is), centred, its caption under it;
   a small picture (narrower than the column) is shown at its own size, never enlarged */
.sb-body figure.is-tall img { width: auto; max-width: 100%; max-height: max(20rem, calc(100vh - var(--stick) - 3rem)); margin-inline: auto; }
.sb-body figure.is-small img { width: auto; max-width: 100%; margin-inline: auto; }
.sb-body figure.is-tall figcaption, .sb-body figure.is-small figcaption { margin-inline: auto; text-align: center; }

/* a pull quote: one sentence of the story's own text, marked by an editor. Inside the column; larger type; a red rule
   above; the speaker in small grey; no box. */
.sb-pull { margin: 2.6em 0; }
.sb-pull::before { content: ""; display: block; width: 3rem; height: 2px; margin-bottom: 1rem; background: var(--red); }
.sb-pull p { font: 700 clamp(1.625rem, 1.3rem + 1.2vw, 2.125rem)/1.2 var(--f-text); letter-spacing: -.015em; color: var(--head); text-wrap: balance; }
.sb-pull cite { display: block; margin-top: .75rem; font: 400 var(--ts-small)/1.45 var(--f-text); font-style: normal; color: var(--soft); }

/* a public document: the picture of its first page, its title, who published it and when, and a link to the file.
   Not a box: a thin rule above and below. The picture is held on our own site; where M28 holds no file yet, an empty
   frame stands in its place. */
.sb-doc { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); column-gap: 1.25rem; align-items: start; margin: 2.2em 0; padding-block: 1.25rem; border-block: 1px solid var(--rule); font: 400 var(--ts-small)/1.45 var(--f-text); color: var(--soft); }
.sb-doc__page { display: grid; place-items: center; aspect-ratio: 210 / 297; padding: .5rem; border: 1px dashed var(--soft); font-size: .75rem; line-height: 1.3; text-align: center; }
.sb-doc__page--img { display: block; aspect-ratio: auto; padding: 0; border: 1px solid var(--rule); }
.sb-doc__page--img img { display: block; width: 100%; height: auto; }
.sb-doc__title { margin-top: .125rem; font: 700 1.3125rem/1.25 var(--f-text); color: var(--head); }
.sb-doc__src { margin-top: .25rem; }
.sb-doc__go { margin-top: .5rem; }
.sb-doc__go a { display: inline-block; padding-block: .5rem; font-size: 1rem; }

/* the end: the credits in plain lines (who reported; for a partner's story "First published by …"; a writer's
   biography), then three related stories as plain links */
.sb-end { width: var(--col); margin: 4rem auto 0; padding-top: 1.25rem; border-top: 1px solid var(--rule); font: 400 var(--ts-small)/1.45 var(--f-text); }
.sb-credits { color: var(--soft); }
.sb-credits + .sb-credits, .sb-credits + .sb-partner, .sb-partner + .sb-credits { margin-top: .5rem; }
.sb-credits + .sb-rel, .sb-partner + .sb-rel { margin-top: 2.5rem; }
/* THE PARTNER LINE (Bex, 25 Nov 2026, update to D-180): a partner is named only here, at the end of the story: the
   line with its link and its date, and next to it the partner's frame (its name until M28 holds the logo file). */
.sb-partner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; }
.sb-partner .sb-credits { flex: 1 1 18rem; }
.sb-partner .sb-logos { margin-top: 0; justify-content: flex-start; }
.sb-rel h2 { font: 700 var(--ts-sub)/1.2 var(--f-text); color: var(--head); }
.sb-rel li { display: grid; padding-block: .5rem .75rem; border-bottom: 1px solid var(--rule); }
.sb-rel a { display: block; padding-block: .3rem; font: 700 var(--ts-body)/1.3 var(--f-text); color: var(--head); text-decoration: none; }      /* body text in bold */
.sb-rel a:hover { color: var(--redt); text-decoration: underline; text-underline-offset: .2em; }
.sb-rel span { font-size: .9375rem; color: var(--soft); }

@media (max-width: 61.99em) {
  .sb-head { padding-top: 2rem; }
  .sb-photo { margin-top: 1.75rem; }
  .sb-kf { margin-top: 3rem; }
  .sb-body { margin-top: 3rem; }
  .sb-body figure.is-wide { width: calc(100% + 2 * var(--gutter)); margin-left: calc(-1 * var(--gutter)); }
  .sb-body figure.is-wide figcaption { margin-inline: var(--gutter); }
  .sb-doc { grid-template-columns: 4.75rem minmax(0, 1fr); column-gap: 1rem; }
}
@media (max-width: 47.99em) {
  /* the thin red line of the key findings needs room on a phone: the findings stand a little further in */
  .sb-kf { width: calc(100% - 2 * var(--gutter) - 1.125rem); margin-left: calc(var(--gutter) + 1.125rem); }
  .sb-kf::before { left: -1.125rem; }
  /* "Listen" on a line of its own, its player under it */
  .sb-line { column-gap: 1.25rem; }
  .sb-listen { flex: 0 0 100%; order: 3; }
  .sb-listen__panel { width: auto; }
  .sb-listen__in { width: auto; max-width: 22rem; margin: 0 auto; }
}

/* ------------------------------------------------------------------------------------------- films inside a story
   CLICK-TO-PLAY (Bex, 25 Nov 2026): our own still picture and a play button. Nothing is asked of YouTube before the
   reader presses the button; then the film loads from youtube-nocookie.com (assets/js/player.js). Without scripts
   the button is a plain link to the film on YouTube. */
.sb-body .sb-video { margin: 2.2em 0; }
.sb-body .player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.sb-body .player .ph, .sb-body .player img, .sb-body .player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sb-body .player img { object-fit: cover; }
.sb-body .player .ph--none span { display: none; }
.sb-body .player__btn { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: linear-gradient(rgba(0, 0, 0, .12), rgba(0, 0, 0, .34)); color: #fff; }
.sb-body .player__btn span.pm { display: grid; place-items: center; width: clamp(3.75rem, 8vw, 5.75rem); height: clamp(3.75rem, 8vw, 5.75rem); border-radius: 50%; background: var(--red); transition: transform .15s; }
.sb-body .player__btn:hover span.pm, .sb-body .player__btn:focus-visible span.pm { transform: scale(1.06); }
.sb-body .player__btn .icon { width: 38%; height: 38%; transform: translateX(6%); }
.sb-body .player__note { margin-top: .5rem; font: 400 var(--ts-small)/1.45 var(--f-text); color: var(--soft); }
.sb-body .player__note a { color: inherit; }
/* A FILM CLIP held on our own server (a file the partner outlet published with its story): the browser's own player,
   which asks for the file only when the reader presses play. Caption and credit under it, like a photograph's. A tall
   clip is shown no higher than the screen. */
.sb-body .sb-clip { margin: 2.2em 0; }
.sb-body .sb-clip video { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 16 / 9); background: #000; }
.sb-body .sb-clip.is-tall video { width: min(100%, calc(max(20rem, 100vh - var(--stick) - 3rem) * var(--ar, .5625))); margin-inline: auto; }
.sb-body .sb-clip.is-tall figcaption { margin-inline: auto; text-align: center; }
/* a table of a story: scrolls sideways inside the column, never the page */
.sb-body .table-wrap { overflow-x: auto; }
.sb-body table { border-collapse: collapse; font-size: .85em; }
.sb-body td, .sb-body th { padding: .4em .6em; border: 1px solid var(--rule); text-align: left; vertical-align: top; }
.sb-body blockquote { padding-left: 1.1em; border-left: 2px solid var(--red); }
.sb-body blockquote p + p { margin-top: .6em; font-size: .9375rem; color: var(--soft); }
/* the line a preview in the back end carries (a story that is not published) */
.sb-hold { margin: 0; padding: .75rem var(--gutter); background: var(--red); color: #fff; font: 700 1rem/1.4 var(--f-text); text-align: center; }
