/* closed-loop.css — period + source-card + board. Edit those files. */

/* Period marks — sage highlight in the sentence.
   Today's meaning: in-context popover (period-term.js + period-terms.json). */

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

.period-unit {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: .55rem;
  align-items: start;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1.25rem;
}

.lesson-list .period-unit,
.voices .period-unit,
figcaption .period-unit {
  margin-bottom: 0;
}

.period-unit h2,
.period-unit h3 {
  margin-top: 0;
}

.period-unit > :first-child {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
}

dfn.pmark {
  font-style: inherit;
  font-weight: inherit;
  background: color-mix(in srgb, var(--culture) 16%, var(--paper));
  padding: .04em .16em;
  border-radius: 1px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.beat.alt dfn.pmark,
.paper-alt dfn.pmark {
  background: color-mix(in srgb, var(--culture) 18%, var(--paper-alt));
}

/* Legacy inline notes — hidden when period-term.js loads (body.has-period-pop) */
.pnotes {
  min-width: 0;
  padding: .5rem 0 0;
  border-left: none;
  border-top: 1px solid color-mix(in srgb, var(--culture) 32%, var(--rule));
}

.pnotes-list { margin: 0; }
.pnotes-item { margin: 0 0 .35rem; }
.pnotes-item:last-child { margin-bottom: 0; }

.pnotes-item dt {
  margin: 0;
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: .82rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--culture);
}

.pnotes-item dd {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .75rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.pnotes-item dt,
.pnotes-item dd { display: inline; }

.pnotes-item dt::after {
  content: " — ";
  font-style: normal;
  color: var(--ink-soft);
}

/* Popover (was period-term.css). Keep both in this sheet so marked pages
   load one blocking request, not two. */

body.has-period-pop .pnotes {
  display: none;
}

dfn.pmark.pmark--term {
  cursor: help;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--culture) 40%, transparent);
  text-underline-offset: .16em;
  text-decoration-thickness: 1px;
  transition: background .15s ease, text-decoration-color .15s ease;
}

dfn.pmark.pmark--term.is-active,
dfn.pmark.pmark--term:focus-visible {
  background: color-mix(in srgb, var(--culture) 26%, var(--paper));
  text-decoration-color: var(--culture);
  outline: none;
}

dfn.pmark.pmark--term:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--culture) 35%, transparent);
}

.beat.alt dfn.pmark.pmark--term.is-active {
  background: color-mix(in srgb, var(--culture) 28%, var(--paper-alt));
}

.period-term-pop {
  position: fixed;
  z-index: 45;
  max-width: min(20rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: .85rem .95rem .9rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--culture);
  background: #fffcf7;
  box-shadow: 0 6px 22px rgba(61, 54, 48, .12);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}

/* color-mix() with var() is not dropped at parse time: Safari < 16.2 keeps it and computes transparent. */
@supports (color: color-mix(in srgb, red, blue)) {
  .period-term-pop {
    border: 1px solid color-mix(in srgb, var(--culture) 28%, var(--rule));
    border-left: 2px solid var(--culture);
    background: color-mix(in srgb, var(--paper) 96%, #fff);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--ink) 12%, transparent);
  }
}

.period-term-pop.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.period-term-pop[hidden] {
  display: block;
  visibility: hidden;
}

.period-term-pop.is-open[hidden] {
  visibility: visible;
}

.period-term-pop-label {
  margin: 0 0 .45rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.period-term-pop-def {
  margin: 0;
}

.period-term-word {
  margin: 0 0 .12rem;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}

.period-term-key {
  margin: 0 0 .28rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
  color: var(--culture);
}

.period-term-meaning {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  .period-term-pop {
    transition: none;
  }
}


/* Source citation overlay — same chrome as Today's meaning; click, not hover. */

.chip.is-source-open,
.hs-src.is-source-open {
  border-color: var(--culture);
  color: var(--culture);
}

.source-card-pop {
  position: fixed;
  z-index: 46;
  max-width: min(22rem, calc(100vw - 1.5rem));
  margin: 0;
  padding: .85rem 1.9rem .9rem .95rem;
  border: 1px solid var(--rule);
  border-left: 2px solid var(--culture);
  background: #fffcf7;
  box-shadow: 0 6px 22px rgba(61, 54, 48, .12);
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}

/* color-mix() with var() is not dropped at parse time: Safari < 16.2 keeps it and computes transparent. */
@supports (color: color-mix(in srgb, red, blue)) {
  .source-card-pop {
    border: 1px solid color-mix(in srgb, var(--culture) 28%, var(--rule));
    border-left: 2px solid var(--culture);
    background: color-mix(in srgb, var(--paper) 96%, #fff);
    box-shadow: 0 6px 22px color-mix(in srgb, var(--ink) 12%, transparent);
  }
}

.source-card-pop.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.source-card-pop[hidden] {
  display: block;
  visibility: hidden;
}

.source-card-pop.is-open[hidden] {
  visibility: visible;
}

.source-card-close {
  position: absolute;
  top: .35rem;
  right: .4rem;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.source-card-close:hover,
.source-card-close:focus-visible {
  color: var(--ink);
}

.source-card-close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--culture) 45%, transparent);
  outline-offset: 1px;
}

.source-card-label {
  margin: 0 0 .45rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.source-card-who {
  margin: 0 0 .12rem;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: var(--ink);
}

.source-card-key {
  margin: 0 0 .35rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
  color: var(--culture);
}

.source-card-img {
  display: block;
  width: 100%;
  max-height: 11rem;
  object-fit: contain;
  object-position: left top;
  margin: 0 0 .45rem;
  background: var(--paper-alt);
  border: 1px solid var(--rule);
}

.source-card-img[hidden] {
  display: none;
}

.source-card-pop:has(.source-card-board-wrap:not([hidden])) .source-card-img {
  margin-bottom: .25rem;
}

.source-card-board-wrap {
  margin: 0 0 .5rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .78rem;
  line-height: 1.4;
}

.source-card-board-wrap[hidden] {
  display: none;
}

.source-card-note {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.source-card-note[hidden] {
  display: none;
}

.source-card-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .3rem;
  margin: .55rem 0 0;
  padding-top: .45rem;
  border-top: 1px solid var(--rule);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .8rem;
  line-height: 1.4;
}

.source-card-open,
.source-card-board {
  color: var(--accent);
  text-decoration: none;
}

.source-card-open:hover,
.source-card-open:focus-visible,
.source-card-board:hover,
.source-card-board:focus-visible {
  text-decoration: underline;
}

.source-card-ext {
  font-size: .75em;
}

.source-card-held {
  color: var(--ink-soft);
  font-style: italic;
}

.source-card-held[hidden],
.source-card-open[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .source-card-pop {
    transition: none;
  }
}

/* Works-cited list (/sources) */
.sources-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  margin: 1.5rem 0 0;
}

.sources-item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  margin: 0;
  padding: 0 0 1.35rem;
  border-bottom: 1px solid var(--rule);
}

.sources-plate {
  flex: 0 0 6.5rem;
  width: 6.5rem;
  height: auto;
  max-height: 8.5rem;
  margin-left: auto;
  object-fit: contain;
  object-position: right top;
}

.sources-plate[hidden] {
  display: none;
}

.sources-copy {
  flex: 1;
  min-width: 0;
}

.sources-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sources-who {
  margin: 0 0 .15rem;
  font-family: Georgia, 'Iowan Old Style', serif;
  font-size: 1.05rem;
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
}

.sources-key {
  margin: 0 0 .35rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: lowercase;
  font-variant: small-caps;
  line-height: 1.35;
  color: var(--culture);
}

.sources-note {
  margin: 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.sources-open,
.sources-held {
  margin: .4rem 0 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
}

.sources-open a {
  color: var(--accent);
  text-decoration: none;
}

.sources-open a:hover,
.sources-open a:focus-visible {
  text-decoration: underline;
}

.sources-held {
  color: var(--ink-soft);
  font-style: italic;
}

.sources-used {
  margin: .4rem 0 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .86rem;
  line-height: 1.45;
}

.sources-used-label {
  color: var(--ink-soft);
}

.sources-used a {
  color: var(--accent);
  text-decoration: none;
}

.sources-used a:hover,
.sources-used a:focus-visible {
  text-decoration: underline;
}

.chip[id^="cite-"],
.hs-src[id^="cite-"] {
  scroll-margin-top: calc(var(--site-header-h, 2.7rem) + 1rem);
}

.chip.is-cite-target,
.hs-src.is-cite-target,
.chip[id^="cite-"]:target,
.hs-src[id^="cite-"]:target {
  border-color: var(--culture);
  color: var(--culture);
  background: #e8efec;
  background: color-mix(in srgb, var(--culture) 16%, #fff);
  box-shadow: 0 0 0 3px rgba(79, 122, 106, .35);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--culture) 35%, transparent);
}


/* Plate collage board prototype.
   Geometry constants (card padding 8px, caption block 50px) are mirrored
   in board.js — change both together.
   Closed-loop loads this via closed-loop.css (same folder, so era/tape urls hold). */

.board-page {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}
.board-intro {
  max-width: 46rem;
}
.board-intro h1 {
  font-size: 2rem;
  margin: .25rem 0 .75rem;
}
.board-lead {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}
.board-shuffle {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .84rem;
  letter-spacing: .05em;
  padding: .45rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.board-shuffle:hover,
.board-shuffle:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}
.board-fineprint {
  margin-top: 1.25rem;
}

/* ---- z-index strategy ----
   Site layers (root stacking context):
     0–39   page content        — the board lives here
     40     .site-header (sticky)
     45–60  popovers / nav overlays
     70     .lightbox
           inside it: stage 0 (slides stay in this context), zoom clone 1,
           close / count / prev / next 5
     (clone must live inside the lightbox or it covers the close control)
   `isolation: isolate` on .plate-board contains every card/tag z-index
   (cards 2–62, tags 320, era info 330, hover 600, open thought 800) inside the board's own
   stacking context, so nothing on the board can ever paint over site chrome. */

/* ---- the board ---- */
.board-stage {
  position: relative;
  margin-top: 1.5rem;
}

/* Plate record: every plate as text, written into the HTML by
   scripts/render-crawl-html.mjs. With script the board shows these plates,
   so the record is hidden. Without script the board and its filters cannot
   run, so they are hidden and the record shows. */
html.has-js .plate-record {
  display: none;
}
html:not(.has-js) .file-controls-sentinel,
html:not(.has-js) .file-controls,
html:not(.has-js) .file-range-hint,
html:not(.has-js) .beat > .file-section-label,
html:not(.has-js) .board-stage {
  display: none;
}
.plate-record-quote {
  margin: 0 0 .35rem;
  font-style: italic;
}
.sources-stance-why,
.sources-influence {
  margin: .35rem 0 0;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .92rem;
  line-height: 1.45;
  color: var(--ink-soft);
}

/* Thought on a plate. The mark is a circle at one top corner.
   The open cloud is position:absolute, so it does not change card height.
   It may spill past the card. The board clips only at its own edge. */
.plate-thought {
  position: absolute;
  top: 8px;
  z-index: 4;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
  --thought: #4a3a31;
  --cloud-fill: rgba(255, 253, 248, .9);
}
.plate-thought[data-corner="tl"] { left: 10px; }
.plate-thought[data-corner="tr"] { right: 10px; }
.plate-thought[data-stance="anti"] { --thought: #4a3a31; }
.plate-thought[data-stance="dual"] { --thought: #a87a35; }
.plate-thought[data-stance="pro"] { --thought: #2d6a8a; }
.plate-thought[data-stance="neutral"] { --thought: #8f8372; }
.plate-thought.is-reading { --cloud-fill: #fffdf8; }
.plate-thought-nub {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 253, 248, .42);
  box-shadow: inset 0 0 0 1.5px var(--thought);
  opacity: .78;
  transform: scale(1);
  transform-origin: center;
  transition: transform .34s ease, background .34s ease, opacity .34s ease;
}
.plate-thought.is-glance .plate-thought-nub,
.plate-thought.is-reading .plate-thought-nub {
  transform: scale(var(--nub-scale, 0.8));
  background: var(--cloud-fill);
  opacity: .92;
}
.plate-thought-dot {
  position: absolute;
  z-index: 2;
  border-radius: 50%;
  background: var(--cloud-fill);
  box-shadow: inset 0 0 0 1.5px var(--thought);
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
}
.plate-thought-bubble {
  position: absolute;
  top: 22px;
  z-index: 3;
  width: var(--cloud-w, 12rem);
  height: var(--cloud-h, 8.4rem);
  pointer-events: none;
  translate: var(--nudge-x, 0px) var(--nudge-y, 0px);
}
.plate-thought[data-corner="tl"] .plate-thought-bubble { left: 18px; }
.plate-thought[data-corner="tr"] .plate-thought-bubble { right: 18px; }
.plate-thought-cloud {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
  opacity: 0;
  transform: scale(.28);
}
.plate-thought[data-corner="tl"] .plate-thought-cloud { transform-origin: 8% 6%; }
.plate-thought[data-corner="tr"] .plate-thought-cloud { transform-origin: 92% 6%; }
.plate-thought[data-from="left"] .plate-thought-cloud { transform-origin: 8% 6%; }
.plate-thought[data-from="right"] .plate-thought-cloud { transform-origin: 92% 6%; }
.plate-thought[data-from="left"][data-bloom="bottom"] .plate-thought-cloud { transform-origin: 8% 94%; }
.plate-thought[data-from="right"][data-bloom="bottom"] .plate-thought-cloud { transform-origin: 92% 94%; }
.plate-thought-cloud path,
.plate-thought-cloud ellipse {
  fill: var(--cloud-fill);
  stroke: var(--thought);
  stroke-width: 4.5;
  stroke-linejoin: round;
  pointer-events: none;
}
.plate-thought.is-reading .plate-thought-cloud path,
.plate-thought.is-reading .plate-thought-cloud ellipse { fill: #fffdf8; }
.plate-thought-copy {
  position: absolute;
  z-index: 2;
  left: 20%;
  right: 20%;
  top: 8%;
  bottom: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .06rem;
  pointer-events: none;
}
.plate-thought-line {
  position: relative;
  z-index: 1;
  opacity: 0;
  max-width: 100%;
  pointer-events: none;
}
.plate-thought-line {
  margin: 0;
  min-width: 0;
  width: 100%;
  font-size: 1.24rem;
  line-height: 1.16;
  text-align: center;
  color: #3d3630;
}
.plate-board[data-size="small"] .plate-thought-line { font-size: .98rem; }
.plate-board[data-size="xl"] .plate-thought-line { font-size: 1.47rem; }
/* One step up still fits. The next step would cross the stroke, so it stays here. */
.page-the-file:has(.file-controls.is-text-large) .plate-thought-line { font-size: 1.27rem; }
.page-the-file:has(.file-controls.is-text-large) .plate-board[data-size="small"] .plate-thought-line { font-size: 1rem; }
.page-the-file:has(.file-controls.is-text-large) .plate-board[data-size="xl"] .plate-thought-line { font-size: 1.5rem; }
.page-the-file:has(.file-controls.is-text-xlarge) .plate-thought-line { font-size: 1.27rem; }
.page-the-file:has(.file-controls.is-text-xlarge) .plate-board[data-size="small"] .plate-thought-line { font-size: 1rem; }
.page-the-file:has(.file-controls.is-text-xlarge) .plate-board[data-size="xl"] .plate-thought-line { font-size: 1.5rem; }
.plate-thought.is-glance .plate-thought-dot,
.plate-thought.is-reading .plate-thought-dot {
  animation: thought-dot-in .28s ease var(--dot-delay, 0s) forwards;
}
.plate-thought.is-glance .plate-thought-cloud,
.plate-thought.is-reading .plate-thought-cloud {
  animation: thought-bloom .46s cubic-bezier(.18, 1.25, .36, 1) var(--cloud-delay, .36s) forwards;
}
.plate-thought.is-glance .plate-thought-cloud path,
.plate-thought.is-reading .plate-thought-cloud path,
.plate-thought.is-closing .plate-thought-cloud path {
  pointer-events: none;
}
.plate-thought.is-glance .plate-thought-line,
.plate-thought.is-reading .plate-thought-line {
  animation: thought-text .22s ease calc(var(--cloud-delay, .36s) + .09s) forwards;
  pointer-events: none;
}
.plate-thought.is-closing .plate-thought-dot,
.plate-thought.is-closing .plate-thought-cloud,
.plate-thought.is-closing .plate-thought-line {
  transition: none;
  animation: thought-fade-out .32s ease forwards;
}
.plate-thought.is-closing .plate-thought-dot,
.plate-thought.is-closing .plate-thought-cloud {
  transform: scale(1);
}
@keyframes thought-dot-in {
  from { opacity: 0; transform: scale(.65); }
  to { opacity: .92; transform: scale(1); }
}
@keyframes thought-bloom {
  0% { opacity: 0; transform: scale(.28); }
  62% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes thought-text {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes thought-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
.plate-board[data-size="small"] { --cloud-w: 15.6rem; --cloud-h: 10.92rem; }
.plate-board[data-size="large"] { --cloud-w: 19.8rem; --cloud-h: 13.86rem; }
.plate-board[data-size="xl"] { --cloud-w: 23.4rem; --cloud-h: 16.38rem; }
@media (prefers-reduced-motion: reduce) {
  .plate-thought-nub,
  .plate-thought.is-glance .plate-thought-nub,
  .plate-thought.is-reading .plate-thought-nub { transition: none; }
  .plate-thought.is-glance .plate-thought-dot,
  .plate-thought.is-reading .plate-thought-dot,
  .plate-thought.is-glance .plate-thought-cloud,
  .plate-thought.is-reading .plate-thought-cloud,
  .plate-thought.is-glance .plate-thought-line,
  .plate-thought.is-reading .plate-thought-line {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .plate-thought.is-glance .plate-thought-cloud,
  .plate-thought.is-reading .plate-thought-cloud {
    pointer-events: none;
  }
  .plate-thought.is-glance .plate-thought-cloud path,
  .plate-thought.is-reading .plate-thought-cloud path {
    pointer-events: none;
  }
  .plate-thought.is-closing .plate-thought-cloud,
  .plate-thought.is-closing .plate-thought-dot,
  .plate-thought.is-closing .plate-thought-line {
    animation: none;
    opacity: 0;
  }
}
.board-era {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
  background-color: transparent;
  background-image: var(--era-img, none);
  background-size: cover;
  background-position: center 32%;
  background-repeat: no-repeat;
  opacity: .14;
  mix-blend-mode: multiply;
  filter: saturate(.4) contrast(.88);
}
/* Paths are set in board.js when the decade is near the viewport.
   Keep crop / pan rules here so a late load still lands on the same frame. */
.board-era[data-decade="1860"] {
  background-size: 158% auto;
  background-position: center 48%;
}
.board-era[data-decade="1910"] {
  background-size: 190% auto;
  background-position: 58% var(--era-y, 34%);
}
.board-era[data-decade="1940"] {
  background-position: center var(--era-y, 32%);
}
.board-era[data-decade="1990"] {
  background-position: center var(--era-y, 32%);
}
.board-era[data-decade="2010"] {
  transform: scaleX(-1);
}
.plate-board [hidden] {
  display: none !important;
}
.board-era-chrome {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 330;
  pointer-events: none;
}
.board-era-info {
  pointer-events: auto;
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 253, 246, .88);
  color: #5a524a;
  font: italic 700 .8rem/1 Georgia, 'Times New Roman', serif;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(61, 54, 48, .14);
}
.board-era-info:hover,
.board-era-info:focus-visible {
  color: var(--accent);
  background: #fffdf6;
}
.board-era-info:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.plate-board {
  position: relative;
  z-index: 0;
  isolation: isolate;
  overflow: hidden;
  margin-top: 0;
  border-radius: 16px;
  --cloud-w: 19.8rem;
  --cloud-h: 13.86rem;
  background:
    radial-gradient(120% 90% at 50% 0%, #f9f0e7 0%, #f3e6d8 55%, #eddbc8 100%);
  box-shadow:
    inset 0 0 0 1px #e2d0ba,
    inset 0 2px 22px rgba(122, 92, 62, .13);
}

/* Inset rail = the sticky containing block. 0.7rem in from the tan
   frame on top/right/bottom, so the pill cannot straddle the edge. */
.board-size-rail {
  position: absolute;
  top: .7rem;
  right: .7rem;
  bottom: .7rem;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  pointer-events: none;
}
.board-size {
  position: sticky;
  top: 5.25rem;
  pointer-events: auto;
  display: flex;
  padding: 3px;
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(61, 54, 48, .18);
  font: inherit;
  color: inherit;
}
.board-size-opt {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .7rem;
  border-radius: 999px;
  color: var(--ink-soft);
}
.board-size-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.board-size-mark {
  display: none;
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}
.board-size-opt.is-on {
  background: var(--ink);
  color: #fffdf8;
}

/* Thoughts toggle. Same sticky rail as plate size, anchored to the
   bottom so it does not follow scroll in script. */
.board-thought-rail {
  position: absolute;
  top: .7rem;
  left: .7rem;
  bottom: .7rem;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  width: max-content;
  pointer-events: none;
}
.board-thought {
  position: sticky;
  top: calc(100dvh - 2.4rem);
  pointer-events: auto;
}
.board-thought-opt {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  border: 1px solid var(--rule);
  background: #fffdf8;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(61, 54, 48, .18);
  cursor: pointer;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .35rem .55rem .35rem .7rem;
  color: var(--ink-soft);
  transition: gap .28s ease, padding .28s ease, background-color .28s ease, color .28s ease;
}
.board-thought-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.board-thought-opt.is-on {
  background: var(--ink);
  color: #fffdf8;
}
.board-thought-opt:not(.is-on) {
  gap: 0;
  padding-right: .7rem;
}
.board-thought-opt:not(.is-on) .board-thought-timer {
  width: 0;
  opacity: 0;
}
.board-thought-timer {
  display: block;
  width: .9rem;
  height: .9rem;
  min-width: 0;
  flex: none;
  overflow: hidden;
  opacity: 1;
  transition: width .28s ease, opacity .2s ease;
}
.board-thought-timer-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.board-thought-timer-track,
.board-thought-timer-fill {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
}
.board-thought-timer-track { opacity: .35; }
.board-thought-timer-fill {
  stroke-linecap: round;
  stroke-dasharray: 34.5575;
  stroke-dashoffset: 34.5575;
  transform: rotate(-90deg);
  transform-origin: 8px 8px;
}
.board-thought-opt.is-paused .board-thought-timer-fill { opacity: .45; }
.plate-board[data-size="small"] .board-card figcaption {
  height: 38px;
  font-size: .6rem;
}
.plate-board[data-stance-labels="on"] .board-card figcaption {
  height: 58px;
  overflow: visible;
  container-type: inline-size;
}
.plate-board[data-stance-labels="on"][data-size="small"] .board-card figcaption {
  height: 52px;
}

/* ---- cards (polaroid prints) ---- */
.board-card,
.board-card[data-lane="climate"] {
  position: absolute;
  scroll-margin-top: 8.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #fffdf9;
  background-image: none;
  border: 0;
  border-radius: 2px;
  box-shadow:
    0 1px 2px rgba(61, 54, 48, .18),
    0 7px 18px rgba(61, 54, 48, .17);
  /* translateZ keeps each card on its own layer so a sibling hover
     cannot re-raster small type on the rest of the board. */
  transform: rotate(var(--rot, 0deg)) translateZ(0);
  transition: transform .18s ease, background-color .32s ease;
  backface-visibility: hidden;
  cursor: zoom-in;
}
.board-card img {
  width: 100%;
  height: auto;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: cover;
  object-position: top;
  display: block;
  /* No filter() — a sibling filter re-rasters on hover and shifts small type. */
}
.board-card .plate-quote {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #f2ece1;
}
.board-card .plate-quote blockquote {
  margin: 0;
  padding: .5rem .6rem;
  font-size: .8rem;
  line-height: 1.35;
}
.board-card figcaption {
  flex: none;
  height: 44px;
  padding: 4px 2px 0;
  overflow: hidden;
  font-size: .68rem;
  line-height: 1.3;
}
/* Caption is a flex column: whole lines only. Large fits 2 title lines + date;
   small fits 1 title line + a date that may wrap to 2 lines. */
.board-card .plate-meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-shrink: 0;
  line-height: 1.25;
}
.board-card .plate-date {
  padding-top: 0;
  line-height: 1.1;
}
.plate-board[data-size="small"] .board-card figcaption {
  padding-top: 2px;
  container-type: inline-size;
}
.plate-board[data-size="small"] .board-card .plate-meta {
  -webkit-line-clamp: 1;
}
.plate-board[data-size="small"] .board-card .plate-date {
  line-height: 1;
}
/* Narrowest small cards (320px phones): keep "27 February 1954" to two lines. */
@container (max-width: 78px) {
  .plate-board[data-size="small"] .board-card .plate-date {
    font-size: .6rem;
  }
}
/* 14px line. layout() adds the same amount to caption height when labels are on. */
.board-card .plate-stance {
  display: none;
  position: relative;
  align-items: center;
  gap: .5em;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 2px;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .5rem;
  /* "Formula default" runs about 11.75em: shrink to fit the caption, and below
     6px wrap to two lines instead (2 × 6px still fits the 14px label line). */
  font-size: max(6px, min(.5rem, 8.1cqi));
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--stance, var(--ink-soft));
  cursor: help;
}
.plate-board[data-stance-labels="on"] .board-card .plate-stance {
  display: flex;
}
.board-card .plate-stance[data-stance="anti"] { --stance: #4a3a31; }
.board-card .plate-stance[data-stance="dual"] { --stance: #a87a35; }
.board-card .plate-stance[data-stance="pro"] { --stance: #2d6a8a; }
.board-card .plate-stance[data-stance="neutral"] { --stance: #8f8372; }
.board-card .plate-stance::before {
  content: '';
  width: .9em;
  height: .9em;
  border-radius: 1.5px;
  background: var(--stance);
  flex: none;
}
.board-card .plate-stance:hover::after,
.board-card:focus-visible .plate-stance::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 5;
  left: 0;
  bottom: calc(100% + 4px);
  width: max-content;
  max-width: 13rem;
  padding: .35rem .45rem;
  background: var(--ink);
  color: #fffdf8;
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  white-space: normal;
  border-radius: 6px;
  box-shadow: 0 6px 16px rgba(61, 54, 48, .28);
  pointer-events: none;
}
.board-card:hover,
.board-card:focus-visible {
  transform: rotate(0deg) scale(1.045) translateZ(0);
  box-shadow:
    0 4px 10px rgba(61, 54, 48, .2),
    0 20px 42px rgba(61, 54, 48, .28);
}
.board-card.is-recent {
  box-shadow:
    0 0 0 1px rgba(176, 122, 58, .5),
    0 0 16px 1px rgba(196, 138, 62, .34),
    0 1px 2px rgba(61, 54, 48, .18),
    0 7px 18px rgba(61, 54, 48, .17);
}
.board-card.is-recent:hover,
.board-card.is-recent:focus-visible {
  box-shadow:
    0 0 0 1px rgba(176, 122, 58, .6),
    0 0 20px 2px rgba(196, 138, 62, .4),
    0 4px 10px rgba(61, 54, 48, .2),
    0 20px 42px rgba(61, 54, 48, .28);
}
.board-card:hover,
.board-card:focus-visible,
.board-card.is-raised,
.board-card.is-thought-open {
  z-index: 600 !important; /* stay above neighbors until rotate-back finishes */
}
.board-card:has(.plate-thought.is-glance),
.board-card:has(.plate-thought.is-reading),
.board-card:has(.plate-thought.is-closing) {
  z-index: 800 !important;
}
.plate-board[data-thoughts="on"] .board-card:has(.plate-thought.is-glance) {
  --plate-live: #4a3a31;
  background-color: color-mix(in srgb, var(--plate-live) 12%, #fffdf9);
}
.plate-board[data-thoughts="on"] .board-card:has(.plate-thought.is-glance[data-stance="dual"]) { --plate-live: #a87a35; }
.plate-board[data-thoughts="on"] .board-card:has(.plate-thought.is-glance[data-stance="pro"]) { --plate-live: #2d6a8a; }
.plate-board[data-thoughts="on"] .board-card:has(.plate-thought.is-glance[data-stance="neutral"]) { --plate-live: #8f8372; }
.board-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .board-card {
    transition: none;
  }
}

/* ---- decade tape labels + era type ----
   Fonts are print/signage faces (Google Fonts, OFL), not cursive —
   Spencerian/Palmer scripts are hard for today's readers at this size.
   Same family on the tape and the plate caption/date. */
.board-tag {
  position: absolute;
  margin: 0;
  z-index: 320;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: lowercase;
  font-variant: normal;
  font-variant-caps: normal;
  font-feature-settings: "smcp" 0, "c2sc" 0;
  line-height: 1;
  white-space: nowrap;
  padding: .7rem 1.9rem .62rem;
  color: var(--decade, var(--ink-soft));
  background-color: #e6d2a0;
  background-image: url('tape.jpg');
  background-size: auto 100%;
  background-position: var(--tape-x, 30%) 50%;
  background-repeat: repeat-x;
  border: 0;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .4),
    inset 0 -1px 0 rgba(90, 70, 30, .1),
    0 1px 0 rgba(61, 54, 48, .08),
    0 3px 7px rgba(61, 54, 48, .16);
  transform: rotate(var(--rot, -2deg));
}
.board-tag-year,
.board-tag-s {
  text-transform: lowercase;
  font-variant-caps: normal;
}
.board-tag-s {
  font-size: .78em;
  font-weight: 600;
}
.board-card figcaption {
  font-family: inherit;
}
.board-tag[data-decade="1860"],
.board-card[data-decade="1860"] { --decade: #55534f; }
.board-tag[data-decade="1980"],
.board-card[data-decade="1980"] { --decade: #4a5878; }
.board-tag[data-decade="1990"],
.board-card[data-decade="1990"] { --decade: #45506e; }
.board-tag[data-decade="2000"],
.board-card[data-decade="2000"] { --decade: #3f4a62; }
.board-tag[data-decade="2010"],
.board-card[data-decade="2010"] { --decade: #3a4458; }
.board-tag[data-decade="2020"],
.board-card[data-decade="2020"] { --decade: #353e50; }
.board-tag[data-decade="1860"],
.board-card[data-decade="1860"] figcaption {
  font-family: 'Libre Baskerville', Georgia, serif;
  letter-spacing: .04em;
}
.board-tag[data-decade="1870"],
.board-tag[data-decade="1880"],
.board-tag[data-decade="1890"],
.board-card[data-decade="1870"] figcaption,
.board-card[data-decade="1880"] figcaption,
.board-card[data-decade="1890"] figcaption {
  font-family: 'Libre Baskerville', Georgia, serif;
  letter-spacing: .04em;
}
.board-tag[data-decade="1900"],
.board-tag[data-decade="1910"],
.board-card[data-decade="1900"] figcaption,
.board-card[data-decade="1910"] figcaption {
  font-family: 'Libre Caslon Text', 'Palatino Linotype', Georgia, serif;
  letter-spacing: .05em;
}
.board-tag[data-decade="1920"],
.board-card[data-decade="1920"] figcaption {
  font-family: 'Josefin Sans', 'Helvetica Neue', sans-serif;
  letter-spacing: .1em;
}
.board-tag[data-decade="1930"],
.board-card[data-decade="1930"] figcaption {
  font-family: Oswald, 'Arial Narrow', sans-serif;
  letter-spacing: .08em;
}
.board-tag[data-decade="1940"],
.board-card[data-decade="1940"] figcaption {
  font-family: Arvo, Georgia, serif;
  letter-spacing: .04em;
}
.board-tag[data-decade="1950"],
.board-card[data-decade="1950"] figcaption {
  font-family: Cabin, 'Trebuchet MS', sans-serif;
  letter-spacing: .06em;
}
.board-tag[data-decade="1960"],
.board-card[data-decade="1960"] figcaption {
  font-family: Barlow, 'Helvetica Neue', sans-serif;
  letter-spacing: .08em;
}
.board-tag[data-decade="1970"],
.board-card[data-decade="1970"] figcaption {
  font-family: 'Varela Round', 'Trebuchet MS', sans-serif;
  letter-spacing: .06em;
}
.board-tag[data-decade="1980"],
.board-tag[data-decade="1990"],
.board-tag[data-decade="2000"],
.board-tag[data-decade="2010"],
.board-tag[data-decade="2020"],
.board-card[data-decade="1980"] figcaption,
.board-card[data-decade="1990"] figcaption,
.board-card[data-decade="2000"] figcaption,
.board-card[data-decade="2010"] figcaption,
.board-card[data-decade="2020"] figcaption {
  font-family: Barlow, 'Helvetica Neue', sans-serif;
  letter-spacing: .08em;
}

/* ---- zoom into lightbox ---- */
:is(.proto-board, .is-board-gallery) .lightbox {
  background-color: rgba(30, 25, 20, 0);
  transition: background-color .3s cubic-bezier(.2, .7, .3, 1);
  min-height: 0;
  overflow: hidden;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-dimming {
  background-color: rgba(30, 25, 20, .92);
}
@media (prefers-reduced-motion: reduce) {
  :is(.proto-board, .is-board-gallery) .lightbox {
    transition: none;
    background-color: rgba(30, 25, 20, .92);
  }
}
.board-zoom-clone {
  position: fixed;
  z-index: 1; /* inside .lightbox; below .lightbox-close */
  margin: 0;
  object-fit: cover; /* match the plate; contain here shrinks the scan on the first frame */
  object-position: top;
  background: transparent;
  box-shadow: none;
  transition:
    left .3s cubic-bezier(.2, .7, .3, 1),
    top .3s cubic-bezier(.2, .7, .3, 1),
    width .3s cubic-bezier(.2, .7, .3, 1),
    height .3s cubic-bezier(.2, .7, .3, 1);
}
:is(.proto-board, .is-board-gallery) .lightbox img {
  background: transparent;
}
/* Instant hide/show — a fade here is the flash at the end of the zoom.
   Exclude the flying clone so it stays visible during the handoff. */
:is(.proto-board, .is-board-gallery) .lightbox.is-zooming .lightbox-stage,
:is(.proto-board, .is-board-gallery) .lightbox.is-zooming .lightbox-count,
:is(.proto-board, .is-board-gallery) .lightbox.is-zooming .lightbox-nav {
  opacity: 0;
}

/* Close control: light disc + a drawn cross (the × glyph sits off-center). */
:is(.proto-board, .is-board-gallery) .lightbox-close {
  top: 1rem;
  right: 1.4rem;
  z-index: 5;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  font-size: 0;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
:is(.proto-board, .is-board-gallery) .lightbox-close::before,
:is(.proto-board, .is-board-gallery) .lightbox-close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.9rem;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
:is(.proto-board, .is-board-gallery) .lightbox-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
:is(.proto-board, .is-board-gallery) .lightbox-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}
:is(.proto-board, .is-board-gallery) .lightbox-close:hover,
:is(.proto-board, .is-board-gallery) .lightbox-close:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
:is(.proto-board, .is-board-gallery) .lightbox-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Prev / next: same light disc as close. Stay in the lightbox; sequence
   follows the filtered board, not the full catalog. */
:is(.proto-board, .is-board-gallery) .lightbox:not([hidden]) {
  touch-action: pan-y;
}
:is(.proto-board, .is-board-gallery) .lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  font-size: 0;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  transform: translateY(-50%);
  cursor: pointer;
  touch-action: none; /* board.js turns a drag on an arrow into slide scroll */
}
:is(.proto-board, .is-board-gallery) .lightbox-nav[hidden] {
  display: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-prev {
  left: 1.4rem;
}
:is(.proto-board, .is-board-gallery) .lightbox-next {
  right: 1.4rem;
}
:is(.proto-board, .is-board-gallery) .lightbox-nav::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0.55rem;
  height: 0.55rem;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
:is(.proto-board, .is-board-gallery) .lightbox-prev::before {
  transform: translate(-35%, -50%) rotate(45deg);
}
:is(.proto-board, .is-board-gallery) .lightbox-next::before {
  transform: translate(-65%, -50%) rotate(-135deg);
}
:is(.proto-board, .is-board-gallery) .lightbox-nav:hover,
:is(.proto-board, .is-board-gallery) .lightbox-nav:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}
:is(.proto-board, .is-board-gallery) .lightbox-nav:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
:is(.proto-board, .is-board-gallery) .lightbox-nav:disabled {
  color: var(--ink);
  border-color: var(--rule);
  opacity: .35;
  cursor: default;
}

:is(.proto-board, .is-board-gallery) .lightbox-count {
  position: absolute;
  top: 1.15rem;
  left: 50%;
  z-index: 5;
  padding: .28rem .72rem;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
  pointer-events: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-count[hidden] {
  display: none;
}

:is(.proto-board, .is-board-gallery) .lightbox-stage {
  position: relative;
  z-index: 0;
  isolation: isolate;
  flex: 1 1 auto;
  align-self: stretch;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-dragging {
  cursor: grabbing;
  touch-action: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-settling {
  pointer-events: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-dragging > .lightbox-slide {
  transition: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  will-change: transform;
  pointer-events: none;
  /* Tall plate + caption scrolls inside the slide; vertical drags already
     yield to native scroll in bindLightboxSwipe. */
  justify-content: flex-start;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide::-webkit-scrollbar {
  display: none;
}
/* Flexible spacers keep short content centered but let tall content start at the top. */
:is(.proto-board, .is-board-gallery) .lightbox-slide::before,
:is(.proto-board, .is-board-gallery) .lightbox-slide::after {
  content: '';
  flex: 1 0 0;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide > * {
  flex-shrink: 0;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide.is-active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide:not(.is-active) {
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-dragging .lightbox-slide.is-drag-active,
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-settling .lightbox-slide.is-drag-active {
  z-index: 2;
  opacity: 1;
}
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-dragging .lightbox-slide.is-drag-peer,
:is(.proto-board, .is-board-gallery) .lightbox-stage.is-settling .lightbox-slide.is-drag-peer {
  z-index: 1;
  opacity: 1;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide img,
:is(.proto-board, .is-board-gallery) .lightbox-slide .lightbox-quote,
:is(.proto-board, .is-board-gallery) .lightbox-slide .lightbox-caption {
  pointer-events: auto;
}
:is(.proto-board, .is-board-gallery) .lightbox-slide img {
  -webkit-user-drag: none;
  user-select: none;
}
.lightbox-caption .lightbox-thought {
  margin: .45rem 0 .7rem;
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: #fffdf8;
}

/* ---- phones ---- */
@media (max-width: 640px) {
  .board-era {
    /* mix-blend + filter on a tall sticky-adjacent layer jitters Safari scroll */
    mix-blend-mode: normal;
    filter: none;
    opacity: .1;
  }
  .board-card,
  .board-card[data-lane="climate"] {
    transition: none;
    box-shadow: 0 1px 5px rgba(61, 54, 48, .14);
  }
  .board-size {
    top: calc(100dvh - 3.2rem);
  }
  .board-thought {
    /* Same bottom edge as the size pill on a phone. */
    top: calc(100dvh - 3.2rem + 11px);
  }
  .board-size-word {
    display: none;
  }
  .board-size-mark {
    display: block;
  }
  .board-size-opt {
    padding: .38rem .48rem;
  }
  .has-sheet-nav .board-size {
    top: calc(100dvh - 3.2rem - 2.85rem - env(safe-area-inset-bottom, 0px));
  }
  .has-sheet-nav .board-thought {
    top: calc(100dvh - 3.2rem - 2.85rem - env(safe-area-inset-bottom, 0px) + 11px);
  }
  .board-page {
    padding: 1.25rem .4rem 3rem;
  }
  .board-intro h1 {
    font-size: 1.5rem;
  }
  .plate-board {
    border-radius: 10px;
  }
  .board-card figcaption {
    font-size: .62rem;
  }
  .board-tag {
    font-size: 1.28rem;
    padding: .58rem 1.35rem .52rem;
  }
  .board-era-info {
    right: 8px;
    bottom: 8px;
  }
  :is(.proto-board, .is-board-gallery) .lightbox-nav {
    width: 2.2rem;
    height: 2.2rem;
  }
  :is(.proto-board, .is-board-gallery) .lightbox-prev {
    left: max(0.7rem, env(safe-area-inset-left, 0px));
  }
  :is(.proto-board, .is-board-gallery) .lightbox-next {
    right: max(0.7rem, env(safe-area-inset-right, 0px));
  }
}

/* Intro enlarge on this page shares #lightbox with the board.
   .is-simple restores the Home-style dimmed image, not the plate theater. */
:is(.proto-board, .is-board-gallery) .lightbox.is-simple {
  background-color: rgb(30, 25, 20);
  overflow: auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  touch-action: auto;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-nav,
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-count {
  display: none !important;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-stage {
  flex: 0 1 auto;
  align-self: center;
  width: auto;
  height: auto;
  min-height: 0;
  overflow: visible;
  display: flex;
  pointer-events: auto;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-slide {
  position: static;
  height: auto;
  width: auto;
  overflow: visible;
  transform: none !important;
  will-change: auto;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-slide:not(.is-active) {
  display: none;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple img {
  max-width: min(92vw, 60rem);
  max-height: 72vh;
  object-fit: contain;
  background: #fff;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-close {
  width: auto;
  height: auto;
  font-size: 2.2rem;
  line-height: 1;
  color: #eee3d5;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-close::before,
:is(.proto-board, .is-board-gallery) .lightbox.is-simple .lightbox-close::after {
  content: none;
}
