/* M28 Investigates · v0.5 · section landing pages, archives with filters, case files, countries */
/* converted to the v0.5 design language by tools/restyle_v05.py; the parts drawn by hand for v0.5 follow at the end */

/* ---------------------------------------------------------------- landing head (dark): title, deck, numbers, then the newest story */
.lhead { padding-block: clamp(1.25rem, 1rem + 1.5vw, 2rem) clamp(2.5rem, 2rem + 3vw, 4.5rem); }
.lhead .crumbs { margin-bottom: clamp(2rem, 1.2rem + 3vw, 4rem); }
.lhead__top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(2rem, 5vw, 6rem); align-items: end; }
.lhead h1 { font: 600 var(--t-display)/.96 var(--f-serif); letter-spacing: -.028em; }
.lhead .kicker { margin-bottom: 1.1rem; }
.lhead__deck { font: 400 var(--t-deck)/1.42 var(--f-text); color: var(--ink); text-wrap: pretty; }
.lhead .stats { margin-top: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.lhead__lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(2rem, 4.5vw, 4.5rem); align-items: center; margin-top: clamp(2rem, 1.4rem + 2.4vw, 3.5rem); }
.lhead__lead h2 { margin-top: .9rem; font-size: clamp(2rem, 1.5rem + 1.7vw, 3rem); line-height: 1.04; letter-spacing: -.02em; }
.lhead__lead h2 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; text-decoration-color: var(--red); }
.lhead__lead .deck { margin-top: 1rem; }
.lhead__lead .meta { margin-top: 1rem; }
.lhead__lead .btnrow { margin-top: 1.6rem; }
@media (max-width: 61.99em) { .lhead__top, .lhead__lead { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- a project with its latest stories beside it */
.pblock { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(2rem, 4.5vw, 4.5rem); align-items: stretch; }
.pblock + .pblock { margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); padding-top: clamp(2rem, 1.5rem + 2vw, 3.5rem); border-top: 1px solid var(--line-2); }
.pblock__side { display: flex; flex-direction: column; }
.pblock__side > p.label { padding-bottom: .8rem; border-bottom: var(--bar) solid var(--accent); }
.pblock__side li { border-bottom: 1px solid var(--line-2); }
.pblock__side li a { display: grid; gap: .35rem; padding: .95rem 0; }
.pblock__side li b { font: 600 1.25rem/1.18 var(--f-serif); color: var(--head); letter-spacing: -.005em; }
.pblock__side li a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .16em; }
.pblock__side li span { font: 400 .75rem/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.pblock__side .more { align-self: flex-start; margin-top: 1.25rem; }
.pblock .pcard { min-height: clamp(22rem, 36vw, 28rem); }
@media (max-width: 61.99em) { .pblock { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- case file cards */
.cfc { position: relative; display: flex; flex-direction: column; gap: .9rem; padding-top: 1.1rem; border-top: var(--bar) solid var(--accent); }
.cfc__n { display: flex; justify-content: space-between; gap: 1rem; }
.cfc h3 { font-size: 1.75rem; line-height: 1.08; }
.cfc h3 a::after { content: ""; position: absolute; inset: 0; }
.cfc:hover h3 a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .16em; }
.cfc:hover .ph img { transform: scale(1.025); }
.cfc > p:not([class]) { font-size: var(--t-small); line-height: 1.5; color: var(--ink); }
.cfc .meta { margin-top: auto; }

/* ---------------------------------------------------------------- geography */
.geo { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(2rem, 5vw, 6rem); align-items: center; }
.geo .mp { max-height: 40rem; }
.geo__side .rank { margin-block: 1.25rem; }
@media (max-width: 61.99em) { .geo { grid-template-columns: 1fr; } }
.regions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.regions h3 { font: 500 var(--t-label)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--head); padding-bottom: .8rem; border-bottom: var(--bar) solid var(--accent); }
.regions li a { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--line-2); font: 500 .9375rem/1.3 var(--f-ui); color: var(--ink); }
.regions li a:hover span:first-child { text-decoration: underline; text-underline-offset: .2em; }
.regions b { font: 500 var(--t-mono)/1 var(--f-mono); color: var(--head); }
.regions i { font: 400 .6875rem/1 var(--f-mono); font-style: normal; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
@media (max-width: 61.99em) { .regions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 30em) { .regions { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- years */
.years { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); border-top: var(--bar) solid var(--accent); border-left: 1px solid var(--line-2); }
.years a { display: grid; gap: .4rem; padding: 1.1rem 1rem 1.2rem; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.years b { font: 600 2rem/1 var(--f-serif); color: var(--head); letter-spacing: -.02em; font-feature-settings: "lnum"; }
.years span { font: 400 .75rem/1.3 var(--f-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.years a:hover { background: var(--bg-2); }
.years a:hover b { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .14em; }

/* ---------------------------------------------------------------- archive with filters */
.arch { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: var(--gap) clamp(2rem, 4vw, 4rem); align-items: start; }
.filters { position: sticky; top: 1.5rem; display: grid; gap: 1.5rem; }
.filters fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.filters legend, .filters .flabel { display: block; padding: 0 0 .6rem; font: 500 var(--t-label)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.filters .chips { gap: .4rem; }
.filters select, .filters input[type="search"] { width: 100%; min-height: 2.75rem; padding: .5rem .7rem; border: 1px solid var(--field-line); border-radius: var(--radius); background-color: var(--field); color: var(--ink); font: 400 1rem/1.3 var(--f-text); }
.filters__reset { display: flex; gap: 1rem; align-items: center; }
.filters > summary { display: none; }
.filters__more { padding-top: 1.1rem; border-top: 1px solid var(--line-2); }
.arch__count { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: .9rem; margin-bottom: 1.5rem; border-bottom: var(--bar) solid var(--accent); font: 500 var(--t-mono)/1.3 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.arch__year { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line-2); }
.arch__year:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.arch__year h2 { font-size: 2rem; font-feature-settings: "lnum"; }
.arch__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 2.25rem var(--gap); }
.arch__empty { padding: 2rem 0; font-size: 1.125rem; color: var(--ink); }
details.filters > *:not(summary) { display: revert; }
.filters > label { display: block; }
details.filters > * + * { margin-top: 1.5rem; }       /* a details element lays its content out as blocks, so the groups are spaced with margins */
details.filters > summary + * { margin-top: 0; }
@media (max-width: 61.99em) {
  .arch { grid-template-columns: 1fr; }
  .filters { position: static; border: 1px solid var(--line-2); padding: 0 1rem; gap: 0; }
  .filters > summary { display: flex; justify-content: space-between; align-items: center; min-height: 3rem; font: 600 .9375rem/1 var(--f-ui); color: var(--head); list-style: none; }
  .filters > summary::-webkit-details-marker { display: none; }
  .filters > summary::after { content: "+"; font: 400 1.4rem/1 var(--f-mono); }
  .filters[open] > summary::after { content: "−"; }
  .filters[open] { padding-bottom: 1.25rem; }
  .filters[open] > summary { margin-bottom: .75rem; border-bottom: 1px solid var(--line-2); }
  .filters[open] > * + * { margin-top: 1.1rem; }
}
@media (max-width: 40em) {       /* the archive as a list: see the row rules in core.css */
  .arch__list { gap: 0; }
  .arch__year { margin-top: 1.75rem; padding-bottom: .35rem; }
  .arch__year:first-child { margin-top: 0; }
}

/* ---------------------------------------------------------------- case file and country pages */
.dhead { padding-block: clamp(1.25rem, 1rem + 1.5vw, 2rem) clamp(2rem, 1.5rem + 3vw, 3.5rem); border-bottom: 1px solid var(--line-2); }
.dhead .crumbs { margin-bottom: clamp(1.5rem, 1rem + 2.4vw, 3rem); }
.dhead__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(2rem, 5vw, 6rem); align-items: end; }
.dhead .kicker { margin-bottom: 1rem; }
.dhead .deck { margin-top: 1.25rem; }
.dhead .stats { margin-top: 2rem; }
.dhead .btnrow { margin-top: 1.75rem; }
.dhead__map .mp { max-height: 19rem; }
.dhead__map .mp__c--focus { fill: var(--red); stroke: var(--head); }
@media (max-width: 61.99em) { .dhead__grid { grid-template-columns: 1fr; } .dhead__map { max-width: 20rem; } }
.cols { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--gap) clamp(2rem, 5vw, 6rem); align-items: start; }
@media (max-width: 61.99em) { .cols { grid-template-columns: 1fr; } }
.chapters { counter-reset: ch; border-top: var(--bar) solid var(--accent); }
.chapters li { counter-increment: ch; position: relative; display: grid; grid-template-columns: 3rem minmax(0, 1fr) 9rem; gap: 1rem 1.25rem; align-items: start; padding-block: 1.35rem; border-bottom: 1px solid var(--line-2); }
.chapters li::before { content: counter(ch, decimal-leading-zero); font: 500 var(--t-mono)/2 var(--f-mono); color: var(--accent-ink); letter-spacing: .04em; }
.chapters h3 { font-size: 1.5rem; line-height: 1.12; }
.chapters h3 a::after { content: ""; position: absolute; inset: 0; }
.chapters li:hover h3 a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: .16em; }
.chapters p:not([class]) { margin-top: .5rem; font-size: var(--t-small); line-height: 1.5; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chapters .meta { margin-top: .6rem; }
.chapters .ph { aspect-ratio: 3 / 2; }
@media (max-width: 40em) { .chapters li { grid-template-columns: 2.25rem minmax(0, 1fr); } .chapters .ph { display: none; } }
.sidebox { border-top: var(--bar) solid var(--accent); padding-top: 1rem; }
.sidebox + .sidebox { margin-top: 2.5rem; }
.sidebox h2 { font: 500 var(--t-label)/1.3 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--head); margin-bottom: .9rem; }
.sidebox p { font-size: var(--t-small); line-height: 1.5; color: var(--ink); }
.sidebox .btnrow { margin-top: 1rem; }
.sidebox .mp { margin-top: .5rem; }
.zero { max-width: 44rem; padding-block: clamp(1rem, 3vw, 3rem); }
.zero h2 { font-size: var(--t-h2); }
.zero p { margin-top: 1.1rem; color: var(--ink-2); }
.zero .btnrow { margin-top: 1.75rem; }
.cta-band { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.5rem 3rem; align-items: center; }
.cta-band h2 { max-width: 22ch; }
.cta-band p { margin-top: .8rem; max-width: 40rem; color: var(--ink-2); }
@media (max-width: 54em) { .cta-band { grid-template-columns: 1fr; } }
.tl { border-left: 1px solid var(--line-2); margin-left: .35rem; }
.tl li { position: relative; padding: 0 0 1.6rem 1.6rem; }
.tl li::before { content: ""; position: absolute; left: -.33rem; top: .45rem; width: .6rem; height: .6rem; background: var(--bg); border: 1.5px solid var(--head); border-radius: 50%; }
.tl time { display: block; font: 500 var(--t-mono)/1.5 var(--f-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); }
.tl p { margin-top: .3rem; font-size: 1.0625rem; line-height: 1.5; }
.tl small { display: block; margin-top: .35rem; color: var(--ink-2); font-size: .8125rem; }
.tl small a { text-decoration: underline; text-underline-offset: .2em; }
.pblock__sum { margin-top: 1rem; font-size: var(--t-small); line-height: 1.55; color: var(--ink); }
.stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-block: 1.25rem 1rem; }
.stats--2 b { font-size: 2rem; }
.stack-l > * + * { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.regions--flat { grid-template-columns: 1fr; }
.regions--flat ul { columns: 4 12rem; column-gap: var(--gap); }
.regions--flat li { break-inside: avoid; }
.cfc--next { justify-content: center; border-top: 2px dashed var(--line-2); }
.cfc--next > p:not([class]) { font: 600 1.375rem/1.25 var(--f-serif); color: var(--head); }

/* ================================================================ v0.5, drawn by hand (brief §3.3, §2.6, §2.7) */
/* the landing head: the section's name at display size, its numbers in red, the newest investigation as a feature,
   then the dossier tabs sitting on the edge of the band */
.lhead { padding-bottom: 0; background: var(--charcoal); }
.lhead h1 { font-weight: var(--w-head); letter-spacing: -.03em; }
.lhead__lead { align-items: stretch; }
.lhead__lead > a { display: block; border-top: var(--bar) solid var(--accent); }
.lhead__lead > a .ph { height: 100%; min-height: 20rem; aspect-ratio: auto; }
.lhead__lead > div { display: flex; flex-direction: column; justify-content: center; padding-top: 1.25rem; border-top: var(--bar) solid var(--accent); }
.lhead__lead h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.5rem); line-height: 1; letter-spacing: -.024em; }
.lhead__lead h2 a:hover { text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.lhead__lead .deck { color: var(--ink); }
.lhead .subnav { margin-top: clamp(2rem, 1.5rem + 2.5vw, 3.5rem); margin-bottom: 0; }
@media (max-width: 61.99em) { .lhead__lead > a .ph { min-height: 0; aspect-ratio: 3 / 2; } }

/* a project with its facts beside it (the projects index) */
.pblock .pcard { min-height: clamp(26rem, 40vw, 34rem); }
.pblock__sum { margin-block: 1rem 1.5rem; font: 400 1.125rem/1.55 var(--f-text); color: var(--ink); }
.pblock__side .stats--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 1.25rem; }

/* case files are cards like any other: picture, bar, case number, name, what the file is about */
.cfc { gap: 0; padding-top: 0; border-top: 0; }
.cfc .card__deck { -webkit-line-clamp: 4; }
.cfc--next { justify-content: center; gap: 1rem; padding: 1.5rem; background: var(--bg-3); border-top: var(--bar) solid var(--accent); }
.cfc--next > p:not([class]) { font: 400 1.125rem/1.5 var(--f-text); color: var(--ink); }

/* geography: the map is large, the list beside it */
.geo { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 2rem clamp(2rem, 4vw, 4rem); }
.geo .mp { max-height: none; }
@media (max-width: 74.99em) { .geo { grid-template-columns: minmax(0, 1fr); } .geo > div:first-child { max-width: 52rem; } }
.regions b { font: 700 1.125rem/1 var(--f-serif); color: var(--accent-ink); }

/* years: the figure in red */
.years { border-left: 0; gap: var(--gap); border-top: 0; }
.years a { padding: 1.1rem 0 1.2rem; border: 0; border-top: var(--bar) solid var(--accent); }
.years b { font: 700 clamp(2.25rem, 1.8rem + 1.8vw, 3.5rem)/.9 var(--f-serif); letter-spacing: -.03em; color: var(--accent-ink); }
.years a:hover { background: none; }

/* the archive */
.arch__year h2 { font: 700 clamp(2.5rem, 2rem + 2vw, 4rem)/.9 var(--f-serif); letter-spacing: -.035em; color: var(--accent-ink); }
.arch__year { border-top: var(--bar) solid var(--accent); padding-top: 1.1rem; }
.arch__year:first-child { border-top: var(--bar) solid var(--accent); padding-top: 1.1rem; }
.filters legend, .filters .flabel { color: var(--head); }
.filters { top: calc(var(--stick) + 1.5rem); }

/* case file and country pages: the head on warm grey, numbers in red, chapters with pictures */
.dhead { background: var(--grey); border-bottom: 0; }
:root[data-theme="night"] .dhead { background: var(--charcoal-t04); }
.dhead h1 { font-size: var(--t-h1); line-height: 1; }
.dhead .deck { color: var(--ink); }
.chapters li { grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 15rem); padding-block: 1.6rem; }
.chapters h3 { font-size: clamp(1.5rem, 1.3rem + .9vw, 2rem); line-height: 1.08; }
.chapters .ph { border-top: var(--bar) solid var(--accent); }
@media (max-width: 40em) { .chapters li { grid-template-columns: 2.25rem minmax(0, 1fr) 6rem; } .chapters .ph { display: block; aspect-ratio: 1; } }
.zero p { color: var(--ink); }
.cta-band p { color: var(--ink); font-size: 1.125rem; }
