/* The wall of script cover pages (landing/black-list-scripts-what-happened.html),
   on top of formatter-page.css (the base, .wrap, .section, .pitch, .others,
   .btn). Copied to landing/black-list-scripts-what-happened/page.css by build.mjs.

   One board: cork, and on it a white index card for every script a list
   named, one row per December. Red ink has one meaning here, the rubber
   stamp that says a script was made; an unproduced card carries no stamp.
   Card titles are set in the mono face like a title page; Inter does the
   talking; Newsreader sets the year numerals. The colours are repeated in
   page.js (T) because the share image is drawn on a canvas that cannot read
   CSS. Change one, change both. See .claude/data-pages-registry.md. */

.bl {
  --paper: #fbf8f0;
  --paper-2: #f1ebdd;
  --paper-edge: #d9d0bd;
  --ink: #1f1a14;
  --ink-2: #4a423a;
  --muted: #7d7265;
  --cork: #c69a66;
  --cork-2: #b3874f;
  --cork-3: #a0743f;
  --cork-ink: #3a2a18;
  --red: #c2302a;
  --red-soft: rgba(194, 48, 42, 0.12);
  --pin: #2b231c;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ───────────────────── the opening ───────────────────── */
.bl-top { padding: 60px 0 30px; }
.bl-top h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 600; letter-spacing: -0.02em; line-height: 1.04;
  margin: 0; max-width: 20ch; text-wrap: balance;
}
.bl-lede { font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 20px 0 0; max-width: 62ch; }
.bl-lede a { color: var(--accent); font-weight: 600; }
.bl-figures {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px;
  margin: 30px 0 0;
}
.bl-fig {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 4px;
  padding: 16px 18px 14px;
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 10px 20px -16px rgba(40,25,10,0.35);
  position: relative;
}
.bl-fig::before {
  content: ""; position: absolute; left: 0; right: 0; top: 34px; height: 1px; background: rgba(194,48,42,0.25);
}
.bl-fig-n { font-family: var(--mono); font-size: clamp(26px, 3vw, 36px); font-weight: 500; letter-spacing: -0.02em; color: var(--ink); line-height: 1.2; min-height: 1.2em; }
.bl-fig-l { font-size: 13.5px; color: var(--muted); line-height: 1.4; }

/* ───────────────────── the board ───────────────────── */
.bl-board {
  margin-top: 26px;
  background-color: var(--cork);
  background-image:
    radial-gradient(rgba(60, 35, 10, 0.16) 0.8px, transparent 1.2px),
    radial-gradient(rgba(255, 240, 215, 0.14) 0.7px, transparent 1.1px);
  background-size: 7px 7px, 11px 11px;
  background-position: 0 0, 3px 5px;
  color: var(--cork-ink);
  padding: 26px 0 40px;
  box-shadow: inset 0 14px 30px -20px rgba(40, 20, 0, 0.6), inset 0 -14px 30px -20px rgba(40, 20, 0, 0.6);
}
.bl-board ::selection { background: var(--cork-ink); color: var(--paper); }

/* the controls, pinned as a strip of paper along the top rail */
.bl-controls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  background: var(--paper); border-radius: 4px; padding: 12px 16px;
  box-shadow: 0 8px 18px -12px rgba(40, 20, 0, 0.7);
  margin: 0 0 22px;
}
.bl-field { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.bl-field > span:first-child { color: var(--muted); }
.bl-select, .bl-search {
  font: 13.5px var(--sans); color: var(--ink);
  border: 1px solid var(--paper-edge); border-radius: 4px; background: #fff;
  padding: 7px 9px;
}
.bl-select:focus-visible, .bl-search:focus-visible, .bl-chip input:focus-visible + span, .bl-switch input:focus-visible + .bl-knob { outline: 2px solid var(--red); outline-offset: 2px; }
.bl-search { min-width: 190px; }
.bl-chips { display: inline-flex; gap: 0; border: 1px solid var(--paper-edge); border-radius: 4px; padding: 2px; background: #fff; }
.bl-chip { position: relative; cursor: pointer; }
.bl-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bl-chip span { display: block; padding: 5px 11px; border-radius: 3px; font-size: 13px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.bl-chip input:checked + span { background: var(--ink); color: var(--paper); }
.bl-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.bl-switch input { position: absolute; opacity: 0; pointer-events: none; }
.bl-knob { width: 34px; height: 20px; border-radius: 10px; background: var(--paper-edge); position: relative; transition: background 0.15s; flex: none; }
.bl-knob::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.bl-switch input:checked + .bl-knob { background: var(--red); }
.bl-switch input:checked + .bl-knob::after { transform: translateX(14px); }
.bl-controls .bl-count { margin-left: auto; font: 500 13px var(--mono); color: var(--ink-2); }

/* one row per December */
.bl-year { margin: 0 0 18px; }
.bl-year-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px;
  margin: 0 0 10px;
}
.bl-year-btn {
  font-family: var(--serif); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; line-height: 1;
  color: var(--paper); background: none; border: 0; padding: 0; cursor: pointer;
  text-shadow: 0 1px 0 rgba(40, 20, 0, 0.5);
  display: inline-flex; align-items: baseline; gap: 8px;
}
.bl-year-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 2px; }
.bl-year-btn .bl-caret { font-family: var(--sans); font-size: 12px; color: rgba(251, 248, 240, 0.75); transform: translateY(-2px); transition: transform 0.15s; display: inline-block; }
.bl-year.is-closed .bl-year-btn .bl-caret { transform: translateY(-2px) rotate(-90deg); }
.bl-year-sum { font: 500 12.5px var(--mono); color: rgba(251, 248, 240, 0.92); text-shadow: 0 1px 0 rgba(40, 20, 0, 0.4); }
.bl-year-sum b { font-weight: 500; color: #fff; }
.bl-year-sum .bl-partial { color: rgba(251, 248, 240, 0.7); }

/* the count strip a closed row collapses to */
.bl-strip { display: none; height: 10px; border-radius: 2px; background: var(--paper); overflow: hidden; box-shadow: 0 3px 8px -4px rgba(40, 20, 0, 0.6); max-width: 720px; }
.bl-strip i { display: block; height: 100%; background: var(--red); }
.bl-year.is-closed .bl-strip { display: block; }
.bl-year.is-closed .bl-cards { display: none; }

.bl-cards { display: flex; flex-wrap: wrap; gap: 14px 12px; align-items: flex-start; }

/* the card: a white index card, pinned */
.bl-card {
  --vote: 0;
  position: relative;
  width: var(--w, 118px); min-height: var(--h, 74px);
  background: var(--paper); color: var(--ink);
  border: 0; border-radius: 2px; padding: 0; margin-top: 6px;
  text-align: left; cursor: pointer; font-family: var(--sans);
  box-shadow: 0 1px 1px rgba(40, 20, 0, 0.25), 0 8px 14px -8px rgba(40, 20, 0, 0.7);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s, box-shadow 0.18s, width 0.18s;
  perspective: 900px;
}
.bl-card.s1 { --w: 96px; --h: 62px; }
.bl-card.s2 { --w: 118px; --h: 74px; }
.bl-card.s3 { --w: 146px; --h: 90px; }
.bl-card.s4 { --w: 180px; --h: 108px; }
.bl-card:hover, .bl-card:focus-visible { transform: rotate(0deg) translateY(-2px); box-shadow: 0 1px 1px rgba(40,20,0,0.25), 0 14px 22px -10px rgba(40, 20, 0, 0.75); z-index: 2; }
.bl-card:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.bl-pin {
  position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; margin-left: -5px;
  border-radius: 50%; background: var(--pin);
  box-shadow: inset -2px -2px 3px rgba(0,0,0,0.5), inset 2px 2px 3px rgba(255,255,255,0.25), 0 2px 3px rgba(0,0,0,0.45);
  z-index: 3;
}
.bl-face {
  display: flex; flex-direction: column; justify-content: flex-start;
  min-height: var(--h, 74px); padding: 11px 9px 10px;
  position: relative;
}
.bl-face::after {
  /* the vote bar along the bottom edge: its length is the share of the year's top vote */
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--vote) * 100%);
  background: var(--ink-2); opacity: 0.55; border-radius: 0 2px 0 0;
}
.bl-card.no-votes .bl-face::after { display: none; }
.bl-ttl {
  font-family: var(--mono); font-size: 11px; font-weight: 500; line-height: 1.3; letter-spacing: 0.01em;
  text-transform: uppercase; color: var(--ink);
  overflow-wrap: anywhere;
}
.bl-card.s3 .bl-ttl { font-size: 12px; }
.bl-card.s4 .bl-ttl { font-size: 13px; }
.bl-by { font-size: 10.5px; color: var(--muted); line-height: 1.3; margin-top: 4px; }
.bl-card.s1 .bl-by { display: none; }
.bl-v { position: absolute; right: 8px; top: 7px; font: 500 10px var(--mono); color: var(--muted); }
.bl-stamp {
  position: absolute; right: -4px; bottom: 9px;
  font: 700 9.5px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; line-height: 1;
  color: var(--red); border: 1.5px solid var(--red); border-radius: 3px; padding: 3px 5px 2px;
  transform: rotate(-9deg); opacity: 0.86; mix-blend-mode: multiply;
  mask-image: radial-gradient(rgba(0,0,0,1) 60%, rgba(0,0,0,0.75) 100%);
  background: rgba(251, 248, 240, 0.5);
}
.bl-card.s3 .bl-stamp, .bl-card.s4 .bl-stamp { font-size: 11px; padding: 4px 6px 3px; }
.bl-card.s1 .bl-stamp { font-size: 8.5px; right: -2px; bottom: 6px; }
/* a stamped card keeps a clear strip at its foot, so the stamp covers no words */
.bl-card.made .bl-face { padding-bottom: 26px; }
.bl-card.s1.made .bl-face { padding-bottom: 20px; }
.bl-card.late .bl-stamp { opacity: 0.4; border-style: dashed; }
.bl-card.tv .bl-stamp { border-radius: 10px; }

/* the back: the film's facts, shown when a card is flipped */
.bl-back { display: none; }
.bl-card.is-flipped { width: 272px; --tilt: 0deg; z-index: 4; }
.bl-card.is-flipped .bl-face { display: none; }
.bl-card.is-flipped .bl-back {
  display: block; padding: 12px 12px 12px; min-height: var(--h, 74px);
  background: var(--paper-2); border-radius: 2px;
  background-image: repeating-linear-gradient(transparent 0 19px, rgba(31, 26, 20, 0.08) 19px 20px);
  background-position: 0 30px;
  animation: bl-flip 0.22s ease-out;
}
@keyframes bl-flip { from { transform: rotateY(-70deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bl-card.is-flipped .bl-back { animation: none; } .bl-card, .bl-knob, .bl-knob::after { transition: none; } }
.bl-back-ttl { font: 500 12px var(--mono); text-transform: uppercase; color: var(--ink); line-height: 1.3; }
.bl-back-film { font-size: 12.5px; color: var(--ink); margin: 6px 0 0; line-height: 1.4; }
.bl-back-film .bl-red { color: var(--red); font-weight: 600; }
.bl-back dl { margin: 6px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; font-size: 11.5px; line-height: 1.5; }
.bl-back dt { color: var(--muted); }
.bl-back dd { margin: 0; color: var(--ink-2); }
.bl-back .bl-un { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.45; }

.bl-empty { background: var(--paper); border-radius: 4px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); margin: 0; }
.bl-empty[hidden] { display: none; }

/* share row */
.bl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 26px 0 0; }
.bl-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 13.5px var(--sans); color: var(--ink);
  background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 4px; padding: 9px 14px; cursor: pointer;
  box-shadow: 0 6px 12px -8px rgba(40, 20, 0, 0.7);
  white-space: nowrap; flex: none;
}
.bl-btn:hover { border-color: var(--ink); }
.bl-btn:focus-visible { outline: 2px solid var(--paper); outline-offset: 3px; }
.bl-btn:disabled { opacity: 0.6; cursor: default; }
.bl-chapters .bl-btn { box-shadow: none; }
.bl-note { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--paper); text-shadow: 0 1px 0 rgba(40,20,0,0.5); }
.bl-chapters .bl-note { color: var(--accent); text-shadow: none; font-weight: 600; }

/* ───────────────────── the chapters ───────────────────── */
.bl-chapters { padding: 70px 0 10px; }
.bl-ch {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 28px 48px; align-items: start;
  padding: 36px 0; border-top: 1px solid var(--line);
}
.bl-ch:first-child { border-top: 0; padding-top: 0; }
.bl-ch-num { font-family: var(--serif); font-size: 15px; font-style: italic; color: var(--muted); margin: 0 0 8px; }
.bl-ch h2 { font-family: var(--serif); font-size: clamp(24px, 2.6vw, 32px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.18; margin: 0; min-height: 1.2em; text-wrap: balance; }
.bl-ch h2 .bl-mono { font-family: var(--mono); font-weight: 500; font-size: 0.92em; }
.bl-ch p { font-size: 16px; line-height: 1.62; color: var(--ink-2); margin: 14px 0 0; max-width: 56ch; }
.bl-ch-chart { min-width: 0; }
.bl-ch-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.bl-ch-chart .bl-share { margin-top: 12px; }

/* lists inside chapters: small cards in a row, read as text */
.bl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bl-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 8px 10px; background: var(--paper); border: 1px solid var(--paper-edge); border-radius: 3px; font-size: 14px; }
.bl-list .n { font: 500 13px var(--mono); color: var(--ink-2); }
.bl-list .t { font: 500 12.5px var(--mono); text-transform: uppercase; color: var(--ink); }
.bl-list .t small { font: 12.5px var(--sans); text-transform: none; color: var(--muted); }
.bl-list .s { font: 700 10px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); border: 1.5px solid var(--red); border-radius: 3px; padding: 3px 5px 2px; transform: rotate(-4deg); white-space: nowrap; }
.bl-list .s.un { color: var(--muted); border-color: transparent; transform: none; font-weight: 500; letter-spacing: 0.02em; }
.bl-list .d { grid-column: 2 / -1; font-size: 12.5px; color: var(--muted); }
.bl-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12.5px; color: var(--muted); margin: 8px 0 0; }
.bl-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }
.bl-legend .k1 { background: var(--red); }
.bl-legend .k2 { background: var(--ink-2); }
.bl-legend .k3 { background: var(--paper-edge); }

/* ───────────────────── about ───────────────────── */
.bl-about h2 { font-family: var(--serif); font-size: clamp(26px, 3vw, 34px); font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.bl-about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 48px; margin-top: 22px; }
.bl-about h3 { font-size: 15px; font-weight: 600; margin: 18px 0 6px; }
.bl-about p, .bl-about li { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin: 0 0 10px; }
.bl-about ul { padding-left: 18px; margin: 0; }
.bl-about a { color: var(--accent); font-weight: 600; }
.bl-about a:hover { text-decoration: underline; }
.bl-download { margin: 18px 0 10px; }
.bl-small { font-size: 13.5px; color: var(--muted); }

/* ───────────────────── narrow ───────────────────── */
@media (max-width: 900px) {
  .bl-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bl-ch { grid-template-columns: 1fr; gap: 18px; }
  .bl-about-grid { grid-template-columns: 1fr; }
  .bl-controls .bl-count { margin-left: 0; width: 100%; }
}
@media (max-width: 640px) {
  .bl-top { padding-top: 40px; }
  .bl-figures { gap: 10px; }
  .bl-fig { padding: 12px 12px 10px; }
  .bl-fig::before { top: 30px; }
  .bl-controls { padding: 12px; gap: 10px 12px; }
  .bl-search { min-width: 0; width: 100%; }
  .bl-field.bl-field-search { width: 100%; }
  .bl-year-btn { font-size: 28px; }
  /* cards become a list */
  .bl-cards { display: grid; gap: 8px; }
  .bl-card, .bl-card.s1, .bl-card.s2, .bl-card.s3, .bl-card.s4 { width: 100%; --h: auto; min-height: 0; --tilt: 0deg; margin-top: 0; }
  .bl-card.is-flipped { width: 100%; }
  .bl-pin { display: none; }
  .bl-face, .bl-card.made .bl-face, .bl-card.s1.made .bl-face { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; min-height: 0; }
  .bl-face::after { height: 2px; }
  .bl-ttl, .bl-card.s3 .bl-ttl, .bl-card.s4 .bl-ttl { font-size: 12px; flex: 1 1 auto; min-width: 40%; }
  .bl-by, .bl-card.s1 .bl-by { display: block; margin: 0; flex: 0 1 30%; text-align: right; font-size: 11px; }
  .bl-v { position: static; width: 26px; flex: none; }
  .bl-stamp, .bl-card.s3 .bl-stamp, .bl-card.s4 .bl-stamp { position: static; transform: rotate(-4deg); flex: none; font-size: 9.5px; }
  .bl-list li { grid-template-columns: 36px minmax(0, 1fr); }
  .bl-list .s { grid-column: 2; justify-self: start; }
}
