/* ============================================================
   How Democracies Die, case tables. Ty i Ja look, built 2026-08-04.
   Palette taken from the painting the user supplied (a washerman at
   his tub: vermilion sky band, ultramarine ground, saffron blouse,
   cream linen, teal water, warm brown-black outlines). It is
   PROVISIONAL and deliberately breaks the no-blues rule in
   copy/page_color_palettes.txt, at the user's instruction.
     cream  #F1E8D0  (paper, the hanging shirts)
     ink    #1A1410  (warm brown-black, the outlines)
     ultramarine #2340B8 (--lead, the background wall)
     vermilion   #E23B1E (--mic, the top band)
     saffron     #EFB420 (the blouse)
     teal        #17705F (the wash water)
   Severity ramp, 0 to 3, ordered light to dark, all four inks
   lifted from the canvas:
     0 teal      #17705F  (cream text)   democracy still breathing
     1 saffron   #EFB420  (ink text)
     2 vermilion #E23B1E  (cream text)
     3 oxblood   #8E2010  (cream text)   the painting's shadowed red
   Flat throughout: no gradients, no blurred shadows, square corners,
   offsets are solid ink. This :root is the single source of truth.
   ============================================================ */
:root {
  --bg: #f1e8d0;
  --ink: #1a1410;

  --lead: #2340b8;
  --mic: #e23b1e;
  --gold: #efb420;
  --teal: #17705f;

  /* cell shading, cream to oxblood: the one score ramp, used by the case
     tables (.sev-N) and the summary (.sN) alike, so a score looks the same everywhere */
  --sev1: #ecd3ae;
  --sev2: #cf7c53;
  --sev3: #7c1c0d;

  --s0-bg: var(--bg);   --s0-fg: var(--ink);
  --s1-bg: var(--sev1); --s1-fg: var(--ink);
  --s2-bg: var(--sev2); --s2-fg: var(--ink);
  --s3-bg: var(--sev3); --s3-fg: var(--bg);

  --muted: #6e6250;
  --line: #d9cba9;
  --band: #e7dbbd;
  --soft-ink: #a5987f;

  --serif: "Lora", Georgia, serif;
  --display: "Shrikhand", "Cooper Black", serif;
  --caps: "Anton", "Arial Narrow", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
}

/* paper grain: texture, not shading */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0.09 0 0 0 0 0.07 0 0 0 0 0.05 0 0 0 0.06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- shared magazine furniture ---------- */
.mag-label {
  font-family: var(--caps);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}
a.mag-label:hover { color: var(--ink); }

.mag-stamp {
  display: inline-block;
  font-family: var(--caps);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  padding: 5px 11px;
  transform: rotate(-2deg);
}
.mag-stamp.mic-stamp {
  border-color: var(--mic);
  color: var(--mic);
}

.paper-card {
  border: 2px solid var(--ink);
  background: var(--bg);
  box-shadow: 5px 5px 0 var(--ink);
}

.rule-zig {
  height: 8px;
  margin: 16px auto 0;
  max-width: 220px;
  background-repeat: repeat-x;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='8'%3E%3Cpath d='M0 7 L4 1 L8 7 L12 1 L16 7' fill='none' stroke='%23e23b1e' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------- header: the painting's ultramarine field ---------- */
.page-head {
  text-align: center;
  padding: 26px 16px 30px;
  background: var(--lead);
  color: var(--bg);
  border-bottom: 6px solid var(--gold);
}
.page-head .mag-label { color: #b9c6ef; }
.page-head a.mag-label:hover { color: var(--bg); }
/* case pages carry the site name as .site-title so the case name can be their h1;
   font-weight matches the h1 default so both render the same */
.page-head h1,
.page-head .site-title {
  font-weight: bold;
  font-family: var(--caps);
  font-size: clamp(30px, 5.5vw, 52px);
  line-height: 1.02;
  text-transform: uppercase;
  margin-top: 12px;
}
.page-sub {
  margin: 14px auto 0;
  max-width: 640px;
  font-size: 14.5px;
  font-style: italic;
  color: #d9e0f6;
  line-height: 1.55;
}
.page-sub strong { color: var(--gold); font-style: normal; font-weight: 700; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 26px 16px 56px; }

/* ---------- case heading ---------- */
.case-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 3px solid var(--lead);
  padding-bottom: 8px;
  margin-bottom: 18px;
}
/* h1 on the standalone case pages, h2 inside index.html */
.case-head h1,
.case-head h2 {
  font-weight: bold;
  font-family: var(--caps);
  font-size: clamp(22px, 3.4vw, 32px);
  line-height: 1.06;
  text-transform: uppercase;
}
.case-head .case-years {
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lead);
}

/* ---------- legend ---------- */
.legend-block { margin-bottom: 14px; }
.legend-block .mag-label { display: block; margin-bottom: 8px; }
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.legend-note {
  margin-top: 10px;
  max-width: 74ch;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.legend-note strong { color: var(--ink); }
.scroll-hint {
  display: block;
  margin-top: 10px;
  color: var(--mic);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
  font-family: var(--caps);
  font-size: 15px;
  line-height: 1;
}
.s0 { background: var(--s0-bg); color: var(--s0-fg); }
.s1 { background: var(--s1-bg); color: var(--s1-fg); }
.s2 { background: var(--s2-bg); color: var(--s2-fg); }
.s3 { background: var(--s3-bg); color: var(--s3-fg); }

/* the severity ramp, now carried by the cell itself: cream to oxblood */
.sev-0 { background: var(--bg); }
.sev-1 { background: var(--sev1); }
.sev-2 { background: var(--sev2); }
.sev-3 { background: var(--sev3); color: var(--bg); }

.swatch {
  display: inline-block;
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  border: 2px solid var(--ink);
}

/* screen reader only: the number is still there for anyone not seeing colour */
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- the table ---------- */
/* position: relative makes the scroller the containing block of the hidden
   .sr score spans, so they scroll and clip with the table instead of widening
   the whole page on a phone */
.table-scroller {
  position: relative;
  overflow-x: auto;
  border: 2px solid var(--ink);
  background: var(--bg);
  box-shadow: 5px 5px 0 var(--ink);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 1440px;
}
thead th {
  font-family: var(--caps);
  text-align: left;
  vertical-align: bottom;
  padding: 12px 12px 9px;
  border-bottom: 3px solid var(--ink);
  background: var(--band);
  text-transform: uppercase;
}
thead th .yr {
  display: block;
  font-size: 17px;
  letter-spacing: 0.02em;
}
thead th .since {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 3px;
}
thead th:first-child {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--band);
  box-shadow: 2px 0 0 var(--ink);
  font-size: 11px;
  letter-spacing: 0.18em;
}

tbody th {
  text-align: left;
  vertical-align: top;
  padding: 14px 14px 16px;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg);
  box-shadow: 2px 0 0 var(--ink);
}
tbody th .num {
  display: block;
  font-family: var(--caps);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lead);
  margin-bottom: 5px;
}
tbody th .name {
  display: block;
  font-family: var(--caps);
  font-size: 15px;
  line-height: 1.2;
  text-transform: uppercase;
}

/* the indicator symbol: a flat cut-paper glyph in a stamped square */
/* the mark is a linocut tile served from Cloudinary, printed to the edge of
   its frame: the icon carries its own paper, in the same cream as --bg */
.ind-mark {
  display: block;
  width: 68px;
  height: 68px;
  margin-bottom: 10px;
  border: 2px solid var(--ink);
  background: var(--bg);
  box-shadow: 3px 3px 0 var(--ink);
}
.ind-mark img { width: 100%; height: 100%; display: block; }

/* the fifth indicator is an addition, not from the book */
/* The tint is laid over an opaque --bg: this cell is sticky, and a see-through
   background let the cells scrolled under it show through its text */
tbody tr.added th { background: linear-gradient(rgba(226, 59, 30, 0.05), rgba(226, 59, 30, 0.05)), var(--bg); }
tbody tr.added th .num { color: var(--mic); }
.ind-tag {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--caps);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mic);
  border: 2px solid var(--mic);
  padding: 2px 6px;
}
/* the added indicator is framed in vermilion, like its tag below it */
tbody tr.added .ind-mark { border-color: var(--mic); }
tbody td {
  vertical-align: top;
  padding: 14px 12px 16px;
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  min-width: 178px;
}
tbody tr:last-child th,
tbody tr:last-child td { border-bottom: none; }

td .events {
  list-style: none;
  margin-top: 9px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
}
td .events li {
  position: relative;
  padding-left: 12px;
  margin-bottom: 7px;
}
td .events li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  background: var(--soft-ink);
}
td .events li:last-child { margin-bottom: 0; }

/* turning points: the events that did the real damage */
td .events li.key { font-weight: 700; }
td .events li.key::before { background: var(--mic); width: 6px; height: 6px; top: 6px; }
.sev-2 .events, .sev-3 .events { color: inherit; }
.sev-2 .events li::before { background: #6b2a12; }
.sev-3 .events li::before { background: #c9997f; }
.sev-2 .events li.key::before { background: #7c1c0d; }
.sev-3 .events li.key::before { background: var(--gold); }

/* ---------- the picture reel: one photograph per column ---------- */
.reel-block { margin-top: 38px; }
.reel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.reel-head h3 {
  font-family: var(--caps);
  font-size: clamp(18px, 2.6vw, 26px);
  text-transform: uppercase;
}
.reel {
  border: 2px solid var(--ink);
  background: var(--bg);
  box-shadow: 5px 5px 0 var(--ink);
  max-height: 560px;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}
.reel-panel {
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 26px;
  align-items: center;
  padding: 24px 26px;
  border-bottom: 1px solid var(--line);
}
.reel-panel:last-child { border-bottom: none; }
.reel-panel:nth-child(even) { background: rgba(35, 64, 184, 0.04); }
.reel-art {
  border: 2px solid var(--ink);
  background: var(--ink);
  line-height: 0;
}
.reel-art img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.04);
}
/* document scans, a ballot or a printed law, must not be centre cropped */
.reel-art img.doc {
  object-fit: contain;
  background: var(--bg);
  filter: none;
}
.reel-yr {
  font-family: var(--caps);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lead);
  margin-bottom: 8px;
}
.reel-cap {
  font-size: 16px;
  line-height: 1.5;
  max-width: 46ch;
}
.reel-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-family: var(--caps);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.reel-credit {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}
.reel-credit:hover { color: var(--lead); text-decoration: underline; }

@media (max-width: 720px) {
  .reel-panel { grid-template-columns: 1fr; gap: 16px; }
  .reel { max-height: 74vh; }
  .reel-art img { height: 190px; }
}

/* ---------- footnotes ---------- */
.reading {
  max-width: 74ch;
  margin: 30px 0 0;
  font-size: 14px;
  line-height: 1.6;
}
.reading .mag-label { display: block; margin-bottom: 8px; }
.reading .lead-word { color: var(--lead); font-weight: 700; }

.caveat-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 3px solid var(--lead);
  flex-wrap: wrap;
}
.caveat {
  flex: 1 1 420px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.caveat strong { color: var(--ink); }

.colophon {
  margin-top: 30px;
  font-size: 12px;
  color: var(--muted);
}
.colophon a { color: var(--lead); }

@media (max-width: 640px) {
  tbody th { width: 148px; min-width: 148px; max-width: 148px; }
}


/* ---------- the case shell: left menu, one case at a time ---------- */
.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  max-width: 1420px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.case-menu {
  position: sticky;
  top: 18px;
  border: 2px solid var(--ink);
  background: var(--bg);
  box-shadow: 5px 5px 0 var(--ink);
}
.case-menu .cm-head {
  display: block;
  padding: 10px 14px;
  border-bottom: 2px solid var(--ink);
  background: var(--band);
}
.case-menu ol { list-style: none; }
.case-menu a {
  display: block;
  padding: 11px 14px 12px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.case-menu li:last-child a { border-bottom: none; }
.case-menu a:hover { background: var(--band); }
.cm-country {
  display: block;
  font-family: var(--caps);
  font-size: 15px;
  line-height: 1.1;
  text-transform: uppercase;
}
.cm-leader { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.cm-years {
  display: block;
  font-family: var(--caps);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--lead);
  margin-top: 4px;
}
.case-menu a[aria-current="true"] { background: var(--lead); color: var(--bg); }
.case-menu a[aria-current="true"] .cm-leader { color: #cdd6f2; }
.case-menu a[aria-current="true"] .cm-years { color: var(--gold); }

.case-body { max-width: none; margin: 0; padding: 0; }
.case-intro {
  max-width: 68ch;
  font-size: 15px;
  font-style: italic;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 18px;
}
.case-intro strong { color: var(--ink); font-style: normal; }
/* index.html: link from each case section to its standalone page */
.case-page { margin: -8px 0 18px; }
.case-page .mag-label { text-decoration: underline; text-underline-offset: 3px; }

/* without scripting every case simply stacks */
html.js .case { display: none; }
html.js .case.is-active { display: block; }

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .case-menu { position: static; display: flex; overflow-x: auto; }
  .case-menu .cm-head { display: none; }
  .case-menu ol { display: flex; }
  .case-menu a { border-bottom: none; border-right: 1px solid var(--line); white-space: nowrap; }
  .cm-leader { display: none; }
}

/* ---------- menu: summary entry and the near misses list ---------- */
.case-menu .cm-summary a { background: var(--band); border-bottom: 2px solid var(--ink); }
.case-menu .cm-summary a[aria-current="true"] { background: var(--lead); }
.case-menu .cm-summary .cm-country { font-size: 16px; }
.case-menu .cm-near-head { border-top: 2px solid var(--ink); }

/* the case cell opened from the summary */
td.is-picked { outline: 4px solid var(--lead); outline-offset: -4px; }

/* ---------- summary: every case on one time axis ---------- */
.sum-question { font-size: clamp(17px, 2.2vw, 21px); font-weight: 600; max-width: 62ch; margin-bottom: 8px; }
.sum-how { color: var(--muted); max-width: 74ch; margin-bottom: 16px; font-size: 14.5px; line-height: 1.55; }
.sum-legend { margin-bottom: 16px; }
.sum-sw { display: inline-block; width: 18px; height: 14px; border: 1px solid var(--ink); }
.sum-lead { background: var(--lead); }
.gapfill { background: repeating-linear-gradient(135deg, transparent 0 3px, var(--line) 3px 4px); }
.sum-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; align-items: center; }
.sum-gap { width: 10px; }
.sum-btns button {
  font-family: var(--caps); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--bg); color: var(--ink); border: 2px solid var(--ink); padding: 6px 10px; cursor: pointer;
}
.sum-btns button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.sum-panel { background: var(--bg); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); padding: 14px; }
.sum-notes { margin-top: 26px; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 78ch; }
.sum-notes li { margin: 0 0 6px 18px; }

.clock { display: grid; grid-template-columns: 130px minmax(0, 1fr) 150px; column-gap: 12px; row-gap: 16px; align-items: center; }
.clock .hd { font-family: var(--caps); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.clock .name { font-family: var(--caps); font-size: 18px; line-height: 1.1; text-transform: uppercase; }
.clock .name a { text-decoration: none; color: var(--ink); }
.clock .name a:hover { text-decoration: underline; }
.clock .name small { display: block; font-family: var(--serif); font-size: 12px; color: var(--muted); letter-spacing: 0; text-transform: none; }
.clock .band { position: relative; height: 50px; overflow: hidden; }
.clock .lane { position: absolute; height: 9px; }
.clock .row { position: absolute; left: 0; right: 0; height: 9px; }
.clock .cell { position: absolute; top: 0; bottom: 0; display: block; border-right: 1px solid var(--bg); }
/* score 0 is the page colour, as in the tables; a hairline keeps it visible on the band */
.clock .cell.s0 { box-shadow: inset 0 0 0 1px var(--line); }
.clock .cell:hover { outline: 2px solid var(--ink); z-index: 2; }
.clock .cell:focus-visible { outline: 3px solid var(--lead); outline-offset: 1px; z-index: 3; }
.clock .mark { position: absolute; top: -2px; bottom: -2px; width: 0; border-left: 3px solid var(--lead); z-index: 3; pointer-events: none; }
.clock .zero { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--ink); z-index: 1; pointer-events: none; }
.clock .when { font-size: 13.5px; line-height: 1.25; }
.clock .when b { font-family: var(--caps); font-weight: 400; font-size: 16px; color: var(--lead); display: block; letter-spacing: 0.02em; }
.clock .when.never b { color: var(--muted); }
.clock .axis { grid-column: 2; position: relative; height: 22px; border-top: 2px solid var(--ink); }
.clock .axis span { position: absolute; top: 3px; font-size: 11px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.clock .axis span::before { content: ""; position: absolute; left: 50%; top: -7px; height: 5px; border-left: 2px solid var(--ink); }
.clock .axis span.last { transform: translateX(-100%); }
.clock .axis span.last::before { left: auto; right: 0; }

#tip { position: fixed; z-index: 90; pointer-events: none; max-width: 300px; background: var(--ink); color: var(--bg); padding: 8px 10px; font-size: 13px; line-height: 1.35; display: none; }
#tip b { font-family: var(--caps); font-weight: 400; letter-spacing: 0.06em; display: block; font-size: 13px; }
#tip .k { margin-top: 4px; color: var(--gold); }

@media (max-width: 700px) {
  .clock { grid-template-columns: 1fr auto; row-gap: 6px; grid-auto-flow: row dense; }
  .clock .name { grid-column: 1; margin-top: 12px; }
  .clock .when { grid-column: 2; margin-top: 12px; text-align: right; }
  .clock .band, .clock .axis { grid-column: 1 / -1; }
  .clock .hd.h1, .clock .hd.h3 { display: none; }
  .clock .hd.h2 { grid-column: 1 / -1; }
  .clock .when b { display: inline; font-size: 15px; }
}
@media (max-width: 900px) {
  .case-menu .cm-near-head { display: flex; align-items: center; border-top: none; border-left: 2px solid var(--ink); white-space: nowrap; }
}

/* ---------- people and votes: "Who ended it", "Who warned first", "The votes
   that let it happen". One section per case, below the photo reel. Added
   2026-09-28; markup contract in PEOPLE-TEMPLATE.md. Each group gets one quiet
   accent: oxblood for those responsible, teal for those who warned, ultramarine
   for the votes. The accent is a top rule, the label and the flag, nothing more. ---------- */
.people-block { margin-top: 44px; container-type: inline-size; }
.people-block > h3 {
  font-family: var(--caps);
  font-size: clamp(18px, 2.6vw, 26px);
  text-transform: uppercase;
}
.people-block > .pp-lede { margin-top: 6px; max-width: 70ch; font-size: 14.5px; line-height: 1.55; color: var(--muted); }

.pp-group { --pp: var(--ink); margin-top: 28px; }
.pp-ended  { --pp: #6b1608; }
.pp-warned { --pp: var(--teal); }
.pp-votes  { --pp: var(--lead); }

.pp-group > h4 {
  font-family: var(--caps);
  font-weight: 400;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pp);
  border-top: 4px solid var(--pp);
  padding-top: 8px;
}
.pp-group > .pp-how { margin: 4px 0 14px; max-width: 74ch; font-size: 14px; line-height: 1.55; }

.pp-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; list-style: none; }
.pp-grid.pp-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@container (max-width: 980px) { .pp-grid.pp-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (max-width: 640px) { .pp-grid, .pp-grid.pp-4 { grid-template-columns: minmax(0, 1fr); } }

.pp-card {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--ink);
  border-top: 6px solid var(--pp);
  background: var(--bg);
  box-shadow: 3px 3px 0 var(--ink);
}
.pp-photo { margin: 0; background: var(--ink); line-height: 0; border-bottom: 2px solid var(--ink); }
.pp-photo img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;
  object-position: 50% 22%;
  filter: grayscale(0.15) contrast(1.04);
}
.pp-photo img.doc { object-fit: contain; background: var(--band); filter: none; }
.pp-nophoto {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  background: var(--band);
  border-bottom: 2px solid var(--ink);
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.pp-text { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.pp-rank {
  font-family: var(--caps);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pp);
}
.pp-name { font-family: var(--caps); font-weight: 400; font-size: 22px; line-height: 1.1; margin-top: 4px; }
.pp-role { font-size: 13.5px; font-style: italic; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.pp-did, .pp-cost, .pp-why { font-size: 14.5px; line-height: 1.5; margin-top: 10px; }
.pp-cost b, .pp-why b { font-family: var(--caps); font-weight: 400; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pp); margin-right: 4px; }
.pp-when {
  font-family: var(--caps);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: 12px;
}
.pp-result { margin-top: 10px; font-size: 14.5px; line-height: 1.45; }
.pp-result strong { font-family: var(--caps); font-weight: 400; font-size: 24px; letter-spacing: 0.01em; color: var(--pp); display: block; }
.pp-flag {
  align-self: flex-start;
  margin-top: 10px;
  font-family: var(--caps);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pp);
  border: 2px solid var(--pp);
  padding: 3px 8px;
}
.pp-credit {
  margin-top: auto;
  padding-top: 12px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
  text-decoration: none;
}
.pp-credit:hover { color: var(--lead); text-decoration: underline; }
span.pp-credit:hover { color: var(--muted); text-decoration: none; }
@container (max-width: 640px) { .pp-photo img, .pp-nophoto { height: 220px; } }
/* a small or tall original (a 180px scan, a banner) is shown whole on ink, not cropped */
.pp-photo img.fit { object-fit: contain; }
