@font-face {
  font-family: 'Gorton Perfected';
  src: url('fonts/GortonPerfectedVF.ttf') format('truetype');
  font-weight: 100 700;
  font-display: block;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('fonts/JetBrainsMono-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* Theme overrides: these variables are what reveal's themes are built from */
:root {
  --r-main-font: 'Gorton Perfected', sans-serif;
  --r-main-font-size: 38px;
  --r-main-color: #222;
  --r-background-color: #fff;
  --r-heading-font: 'Gorton Perfected', sans-serif;
  --r-heading-color: #111;
  --r-heading-font-weight: 700;
  --r-heading-text-transform: none;
  --r-heading-letter-spacing: -0.02em;
  --r-link-color: #2a6fdb;
  --r-link-color-hover: #174ea6;
  --r-code-font: 'JetBrains Mono', monospace;
  --privacy-highlight: #974418;
  --epistemic-highlight: #086d69;
}

/* margin: 0 in the config lets images bleed to the edge, so ordinary slides need their own gutter */
.reveal .slides > section {
  --gutter: 56px;
  box-sizing: border-box;
  padding: 0 var(--gutter);
}

/* A slide with a footnote fills the canvas so the note can sit at the bottom; content stays centred */
.reveal .slides > section:has(> .footnote) {
  top: 0 !important;
  height: 100%;
  align-content: center;
}

.reveal .footnote {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 32px;
  margin: 0;
  text-align: left;
  font-size: 0.45em;
  font-weight: 100;
  opacity: 0.6;
}

.reveal .footnote.fragment.visible {
  opacity: 0.6;
}

/* Two columns: text on the left, a full-height image bleeding off the right edge */
.reveal .slides > section.split {
  top: 0 !important;
  height: 100%;
  padding: 0;
}

.reveal .split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  height: 100%;
  text-align: left;
}

.reveal .split-text {
  padding: 0 1.5em;
}

.reveal .split-text h1 {
  font-size: 1.7em;
  line-height: 1.05;
  text-wrap: balance;
}

/* Whole image, not cropped: for line art on white that should sit on the slide rather than bleed */
.reveal .split-image.contain {
  height: auto;
  box-sizing: border-box;
  padding-right: var(--gutter);
}

/* A statement beside an image: more room for the text, slightly smaller type */
.reveal .split.statement .split-grid {
  grid-template-columns: 1.7fr 1fr;
}

/* With the image first (on the left), the text keeps the wider column */
.reveal .split.statement .split-grid:has(> :first-child:is(.split-image, .slide-image-credit)) {
  grid-template-columns: 1fr 1.7fr;
}

.reveal #after-frame-disputes-infrastructure h2 {
  font-size: 1.5em;
}

.reveal #after-frame-disputes-infrastructure .split-text p.fragment {
  font-size: 0.85em;
}

.reveal #after-epistemic-capture .split-grid {
  grid-template-columns: 1fr 1.7fr;
}

.reveal #after-epistemic-capture .split-text p.fragment {
  font-size: 0.72em;
}

.reveal .split-image.lighthouse-dawn {
  object-position: 82% center;
}

.reveal .slide-image-credit {
  position: relative;
  height: 100%;
  margin: 0;
}

/* An image on the left keeps its credit at the slide's edge, away from the text */
.reveal .split-grid > .slide-image-credit:first-child figcaption {
  right: auto;
  left: 12px;
}

.reveal .split-image.activist-roller {
  object-position: 25% center;
}

.reveal .split-image.what-to-do-mop {
  object-position: left center;
}

.reveal #after-contest-results .split-text p.fragment {
  font-size: 0.75em;
  margin: 0.7em 0;
  line-height: 1.25;
}

.reveal #paper-privacy .split-grid {
  grid-template-rows: minmax(0, 1fr);
}

.reveal #paper-privacy .split-text {
  padding: 0 1em;
}

.reveal #paper-privacy .privacy-title-highlight,
.reveal #epistemic-capture .epistemic-title-highlight {
  color: #fff;
  background-color: var(--title-highlight);
  box-shadow: 0 0 0 6px var(--title-highlight);
  border-radius: 2px;
}

.reveal #paper-privacy .privacy-title-highlight {
  --title-highlight: var(--privacy-highlight);
}

.reveal #epistemic-capture .epistemic-title-highlight {
  --title-highlight: var(--epistemic-highlight);
  /* One painted box rather than a background plus a shadow: at some scales those two leave a hairline between
     them, and the paint (capture.js) runs from this box's lower edge */
  margin: 0 -6px;
  padding: 6px;
  border-radius: 8px;
  box-shadow: none;
}

/* Epistemic capture (capture.js): paint runs down from the title's box, a drip at a time and then in earnest, pools
   on the floor of the slide and rises to take the whole slide. The slide fills the canvas so the paint has its floor, and
   has its own white ground and pure black text, which are what the paint is blended with (below). */
.reveal .slides > section#epistemic-capture {
  top: 0 !important;
  height: 100%;
  align-content: center;
  isolation: isolate;
  background: #fff;
  color: #000;
}

/* The title stays above the paint, which runs out from under its box */
.reveal #epistemic-capture h2 {
  position: relative;
  z-index: 1;
}

/* The paint: two canvases with the same shape drawn on each (capture.js). The first, in white, inverts whatever is
   under the paint: the white ground goes black, black text goes white. The second, in the title's colour, lightens
   that black to the colour and leaves the white text white. */
.reveal #epistemic-capture .capture-paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.reveal #epistemic-capture .capture-invert {
  mix-blend-mode: difference;
}

.reveal #epistemic-capture .capture-tint {
  mix-blend-mode: screen;
}

/* Once the paint has the slide, the slide itself is the paint (below) */
.reveal.overview #epistemic-capture .capture-paint,
.reveal #epistemic-capture.capture-done .capture-paint {
  visibility: hidden;
}

/* The end state: the paint has the whole slide */
.reveal .slides > section#epistemic-capture.capture-done {
  background: var(--epistemic-highlight);
  color: #fff;
}

.reveal #epistemic-capture p {
  font-size: 0.75em;
  line-height: 1.25;
  margin: 0.65em 0;
}

/* reveal fades every property of a fragment. Here only its appearing may fade: when the paint has the slide, the
   text's colour has to change in the same instant as the ground under it, or it shows dark for a moment */
.reveal #epistemic-capture .fragment {
  transition-property: opacity, visibility;
}

.reveal #paper-privacy .split-text p.fragment {
  font-size: 0.72em;
  margin: 0.6em 0;
  line-height: 1.25;
}

.reveal #after-contest-results .what-to-do-highlight {
  border-radius: 2px;
  transition: color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
}

.reveal #after-contest-results .split-text:has(.what-to-do-emphasis.visible) .what-to-do-highlight {
  color: #fff;
  background-color: var(--question-highlight);
  box-shadow: 0 0 0 6px var(--question-highlight);
}

.reveal #after-contest-results .what-to-do-highlight:first-of-type {
  --question-highlight: var(--epistemic-highlight);
}

.reveal #after-contest-results .what-to-do-highlight:nth-of-type(4) {
  --question-highlight: var(--privacy-highlight);
}

.reveal .split.statement h2 {
  font-size: 1.7em;
  margin-bottom: 0.45em;
}

.reveal .split.statement .split-text p.fragment {
  font-size: 0.95em;
  margin: 0.4em 0;
}

.reveal #scenario .split-text {
  font-size: 0.9em;
}

.reveal #ways-of-knowing-workload .workload-quote {
  padding: 0.6em 0.8em;
  background: #822e32;
  color: #fff;
  text-align: left;
}

.reveal #ways-of-knowing-workload .split-text {
  font-size: 0.85em;
}

.reveal #after-ways-of-knowing {
  font-size: 0.85em;
}

.reveal .inline-quote {
  background: #f4e9d8;
  color: inherit;
  box-decoration-break: clone;
}

/* Keep clear of the footnote */
.reveal .split:has(> .footnote) .split-text {
  padding-bottom: 40px;
}

.reveal .split-image {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  object-fit: cover;
}

.reveal .split-image.cold-frame {
  object-position: 45% center;
}

.reveal .split-image.end-image {
  object-position: left center;
}

.reveal .end-languages {
  display: grid;
  overflow: hidden;
  padding: 1em 0;
}

.reveal .end-language {
  grid-area: 1 / 1;
}

.reveal .end-english {
  visibility: hidden;
}

.reveal section.present .end-welsh {
  animation: slide-welsh 16s ease-in-out infinite;
}

.reveal section.present .end-english {
  animation: slide-english 16s ease-in-out infinite;
}

@keyframes slide-welsh {
  0%, 37% { visibility: visible; transform: translateX(0); }
  44%, 87% { visibility: hidden; transform: translateX(100%); }
  94%, 100% { visibility: visible; transform: translateX(0); }
}

@keyframes slide-english {
  0%, 37% { visibility: hidden; transform: translateX(-100%); }
  44%, 87% { visibility: visible; transform: translateX(0); }
  94%, 100% { visibility: hidden; transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal section.present .end-language {
    animation: none;
  }

  .reveal .end-languages {
    display: block;
  }

  .reveal .end-english {
    visibility: visible;
    margin-top: 1.2em;
  }
}

/* Left-aligned narrative slide: small label, big line, then supporting lines */
.reveal .statement {
  text-align: left;
}

.reveal #after-frame-disputes,
.reveal #after-frame-disputes h2,
.reveal #frame-disputes-infrastructure,
.reveal #frame-disputes-infrastructure h2 {
  color: #fff;
}

.reveal .slides > section#after-frame-disputes,
.reveal .slides > section#frame-disputes-infrastructure {
  top: 0 !important;
  height: 100%;
  padding-top: 210px;
}

.reveal .slides > section#after-frame-disputes h2,
.reveal .slides > section#frame-disputes-infrastructure h2 {
  position: absolute;
  top: 100px;
  left: var(--gutter);
  right: var(--gutter);
  text-align: center;
}

.reveal:not(.overview) .slides > section#after-frame-disputes h2,
.reveal:not(.overview) .slides > section#frame-disputes-infrastructure h2 {
  opacity: 0;
}

.reveal .frame-disputes-heading {
  display: none;
  position: absolute;
  z-index: 1;
  top: 100px;
  left: 56px;
  right: 56px;
  color: #fff;
  font-family: var(--r-heading-font);
  font-size: var(--r-heading2-size);
  font-weight: var(--r-heading-font-weight);
  line-height: var(--r-heading-line-height);
  letter-spacing: var(--r-heading-letter-spacing);
  text-align: center;
  pointer-events: none;
}

.reveal:not(.overview) .slides:has(> #after-frame-disputes.present) > .frame-disputes-heading,
.reveal:not(.overview) .slides:has(> #frame-disputes-infrastructure.present) > .frame-disputes-heading {
  display: block;
}

.reveal .frame-disputes-backdrop {
  position: absolute;
  inset: 0;
  background: #165a45;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
  pointer-events: none;
}

.reveal:not(.overview) .slides:has(> #after-frame-disputes.present) > .frame-disputes-backdrop,
.reveal:not(.overview) .slides:has(> #frame-disputes-infrastructure.present) > .frame-disputes-backdrop {
  opacity: 1;
  visibility: visible;
}

/* In the overview each slide is shown on its own, so each carries the green itself */
.reveal.overview .slides > section:is(#after-frame-disputes, #frame-disputes-infrastructure) {
  background: #165a45;
}

.reveal #after-frame-disputes p,
.reveal #frame-disputes-infrastructure p {
  font-size: 0.8em;
  line-height: 1.25;
}

.reveal .statement h2 {
  font-size: 1.9em;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: 0.8em;
}

.reveal .eyebrow {
  font-size: 0.6em;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.55;
  margin-bottom: 0.4em;
}

/* Fades in by itself a moment after the slide appears; override the wait with style="--delay: 4s" */
.reveal .fade-in-later {
  opacity: 0;
}

.reveal .slides section.present .fade-in-later {
  animation: fade-in 0.8s ease var(--delay, 2s) forwards;
}

/* Coming back to a slide with ← shows it as you left it */
.reveal .slides section.present.revisited .fade-in-later {
  animation: none;
  opacity: 1;
}

@keyframes fade-in {
  to { opacity: 1; }
}

/* Zoomable paper (paper.js). The placeholder holds the space; the viewer is laid over it. */
:root {
  --paper-bg: #e9e7e2;
  --paper-dim: rgba(242, 241, 237, 0.82);
  --paper-ink: rgba(255, 210, 0, 0.55);
}

.reveal .paper-map {
  align-self: stretch;
  background: var(--paper-bg);
}

.reveal .paper-map > cite {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.paper-viewer {
  position: fixed;
  z-index: 20;
  background: var(--paper-bg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.paper-viewer.visible {
  opacity: 1;
}

.paper-credit {
  position: fixed;
  z-index: 21;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 12px;
  box-sizing: border-box;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.paper-credit.visible {
  opacity: 1;
}

.paper-credit span {
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #333;
  font: calc(var(--r-main-font-size) * 0.45 * var(--paper-scale, 1)) 'Gorton Perfected', sans-serif;
}

.paper-viewer.visible.interactive {
  pointer-events: auto;
  cursor: grab;
}

.paper-viewer :focus {
  outline: none;
}

.paper-mark,
.paper-spot {
  pointer-events: none;
}

/* Marker sweeps along each line in turn, then fades out with the dimming */
.paper-mark {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.paper-mark.on {
  opacity: 1;
  transition: none;
}

.paper-mark .ink {
  width: 100%;
  height: 100%;
  background: var(--paper-ink);
  mix-blend-mode: multiply;
  transform: scaleX(0);
  transform-origin: left;
  /* Reset only once the fade-out has finished */
  transition: transform 0s 0.6s;
}

.paper-mark.on .ink {
  transform: scaleX(1);
  transition: transform 0.45s linear calc(var(--line) * 0.45s);
}

.paper-viewer.paper-fixed-duration .paper-mark.on .ink {
  transition: transform calc(1.8s * var(--sweep-fraction)) linear calc(1.8s * var(--sweep-start));
}

/* Everything outside the focused passage fades back */
.paper-spot {
  border-radius: 3px;
  box-shadow: 0 0 0 200vmax var(--paper-dim);
  opacity: 0;
  transition: opacity 0.6s ease;
}

.paper-spot.on {
  opacity: 1;
}

/* Live audience question (live.js): prompt and model output on the left, QR code on the right */
.reveal .live-poll h2 {
  font-size: 1.7em;
  line-height: 1.05;
  margin-bottom: 0.7em;
}

.reveal .poll-output {
  min-height: 4em;
  font-size: 1.15em;
  line-height: 1.25;
  font-weight: 600;
  color: var(--r-heading-color);
  text-wrap: balance;
  transition: opacity 0.3s ease;
}

.reveal .poll-output.waiting {
  font-weight: 400;
  color: #888;
}

.reveal .poll-output.changing {
  opacity: 0;
}

/* Once there's a summary, it stands alone as a quote */
.reveal .live-poll.quoting h2 {
  display: none;
}

/* font-size is set by live.js to suit the quote's length */
.reveal .live-poll.quoting .poll-output {
  line-height: 1.15;
  text-indent: -0.42em;
}

.reveal .live-poll.quoting .poll-output::before {
  content: '“';
}

.reveal .live-poll.quoting .poll-output::after {
  content: '”';
}

.reveal .live-poll.quoting .poll-meta::before {
  content: '— ';
}

.reveal .poll-meta {
  min-height: 1.5em;
  font-size: 0.5em;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.reveal .poll-meta.changing {
  opacity: 0;
}

.reveal .poll-qr {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Fades in once the server has switched phones to this question (live.js) */
.reveal .poll-qr {
  transition: opacity 0.6s ease, visibility 0.6s;
}

.reveal .poll-qr[hidden] {
  visibility: hidden;
  opacity: 0;
}

.reveal .poll-qr svg {
  width: 400px;
  height: 400px;
}

.reveal .qr-url {
  margin: 0.6em 0 0;
  font-size: 0.9em;
  font-weight: 600;
}

/* Holds the QR code's place until its question opens (live.js) */
.reveal .qr-placeholder {
  display: none;
  box-sizing: border-box;
  width: 400px;
  height: 400px;
  margin: 0;
  padding: 1.5em;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.55em;
  line-height: 1.35;
  border: 3px dashed currentColor;
  opacity: 0.4;
}

.reveal .poll-qr.waiting .qr-placeholder {
  display: flex;
}

.reveal .poll-qr.waiting > :not(.qr-placeholder) {
  display: none;
}

/* A screenshot rather than an engraving: room to be read, and an edge so it reads as a window onto something */
.reveal .split.statement:has(.digest) .split-grid {
  grid-template-columns: 1.15fr 1fr;
}

.reveal .split.statement:has(.digest) .split-text p.fragment {
  font-size: 0.8em;
}

.reveal .split-image.digest {
  padding: 0;
  margin-right: var(--gutter);
  width: calc(100% - var(--gutter));
  border: 1px solid #ddd;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
}

/* Live choice (live.js): QR on the left, options with support bars on the right */
.reveal .split.statement.choice-poll .split-grid {
  grid-template-columns: 1fr 1.25fr;
  column-gap: 1.2em;
}

/* The QR column is narrower here, so the address is a little smaller than on the feeling slide */
.reveal .choice-poll .qr-url {
  font-size: 0.75em;
}

/* Live on anyone's deck but the presenter's (live.js), a text question has no QR code to show, so the prompt takes
   the left column and the output the right, and the prompt stays when there's a summary to quote beside it */
.reveal .live-poll:not(.choice-poll)[data-mode='follow'] .poll-qr {
  display: none;
}

.reveal .live-poll:not(.choice-poll)[data-mode='follow'] .split-text {
  display: contents;
}

.reveal .live-poll:not(.choice-poll)[data-mode='follow'] h2 {
  display: block;
  grid-column: 1;
  grid-row: 1 / span 2;
  margin: 0;
  padding: 0 0.5em 0 var(--gutter);
}

.reveal .live-poll:not(.choice-poll)[data-mode='follow'] :is(.poll-output, .poll-meta) {
  grid-column: 2;
  padding-right: var(--gutter);
}

.reveal .live-poll:not(.choice-poll)[data-mode='follow'] .poll-output {
  align-self: end;
  min-height: 0;
}

.reveal .live-poll:not(.choice-poll)[data-mode='follow'] .poll-meta {
  align-self: start;
}

/* Before the talk, in the record, and live on anyone's deck but the presenter's (live.js), there's no QR code, so
   the scene-setting text takes the left column and the options the right */
.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-qr {
  display: none;
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .split-text {
  display: contents;
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-intro {
  grid-column: 1;
  grid-row: 1 / span 2;
  padding-left: var(--gutter);
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-options,
.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-meta {
  grid-column: 2;
  padding-right: var(--gutter);
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-options {
  align-self: end;
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-meta {
  align-self: start;
}

/* There, the options come in after the intro's lines, as the live ones would (live.js) */
.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) :is(.poll-options, .poll-meta) {
  transition: opacity 0.4s ease, visibility 0.4s;
}

.reveal .choice-poll.options-pending :is(.poll-options, .poll-meta) {
  opacity: 0;
  visibility: hidden;
}

/* Stand-in options look alike on every choice slide: cards, as on #contest-workload */
.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-options:not([hidden]) {
  display: grid;
  gap: 0.55em;
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-options li {
  margin: 0;
  padding: 0.65em 0.8em;
  border-left: 4px solid #9a9a91;
  background: #f4f3ef;
  transition: background-color 0.2s ease;
}

.reveal .choice-poll:is([data-mode='upcoming'], [data-mode='preview'], [data-mode='record'], [data-mode='follow']) .poll-options li[data-goto]:hover {
  background: #e9e7e0;
}

.reveal .choice-poll .split-text {
  padding-right: var(--gutter);
}

.reveal .poll-options {
  list-style: none;
  margin: 0;
  padding: 0;
}

.reveal .poll-options[hidden],
.reveal .poll-intro[hidden] {
  display: none;
}

.reveal .poll-options li {
  position: relative;
  margin: 0 0 0.7em;
  font-size: 0.72em;
  line-height: 1.2;
  cursor: pointer;
}

.reveal .poll-options li.leading {
  font-weight: 700;
}

.reveal .option-bar {
  display: none;
  height: 0.5em;
  margin-top: 0.3em;
  width: calc(100% - 2.2em);
  background: #eee;
  border-radius: 0.25em;
  overflow: hidden;
  vertical-align: middle;
}

.reveal .poll-options.with-bars .option-bar {
  display: inline-block;
}

/* Overshoots a little, so support springs up (or down) */
.reveal .option-fill {
  display: block;
  height: 100%;
  width: 0;
  background: #999;
  border-radius: 0.25em;
  transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal .poll-options li.leading .option-fill {
  background: var(--r-link-color);
}

.reveal .option-count {
  display: inline-block;
  width: 2em;
  text-align: right;
  font-size: 0.9em;
  vertical-align: middle;
}

.reveal .poll-anonymous-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, 0.6em);
  grid-auto-rows: 0.6em;
  gap: 0.2em;
  width: 100%;
  max-height: 7em;
  overflow-y: auto;
  margin: 0.65em 0 0;
}

.reveal .poll-anonymous-results[hidden] {
  display: none;
}

.reveal .response-circle {
  display: block;
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: #d63535;
  animation: response-circle-arrive 0.45s ease-out both;
}

.reveal .response-circle:nth-child(7n + 2) { background: #e67e22; }
.reveal .response-circle:nth-child(7n + 3) { background: #e4ba16; }
.reveal .response-circle:nth-child(7n + 4) { background: #2b9b57; }
.reveal .response-circle:nth-child(7n + 5) { background: #287cc1; }
.reveal .response-circle:nth-child(7n + 6) { background: #5953b4; }
.reveal .response-circle:nth-child(7n) { background: #a64cb2; }

@keyframes response-circle-arrive {
  0% {
    opacity: 0;
    transform: scale(0.2);
  }
  70% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.reveal #contest-workload .poll-intro {
  margin-bottom: 0.55em;
}

.reveal #contest-workload .poll-intro h2 {
  font-size: 1.15em;
  line-height: 1.15;
}

.reveal #contest-workload .poll-options {
  display: grid;
  gap: 0.55em;
}

.reveal #contest-workload .poll-options[hidden] {
  display: none;
}

.reveal #contest-workload .poll-options li {
  margin: 0;
  padding: 0.65em 0.8em;
  border-left: 4px solid #9a9a91;
  background: #f4f3ef;
  font-size: 0.62em;
  line-height: 1.25;
  cursor: default;
}

.reveal #contest-workload .poll-options.with-bars .option-label {
  display: block;
  margin-bottom: 0.45em;
}

.reveal #contest-workload .poll-meta {
  font-size: 0.38em;
  opacity: 0.6;
}

.reveal #contest-workload .poll-response-count {
  margin: 0.7em 0 0;
  font-size: 0.45em;
  opacity: 0.6;
}

.reveal .slides > section.contest-results {
  top: 0 !important;
  height: 100%;
  padding-top: 64px;
}

.reveal .contest-results h2 {
  font-size: 1.15em;
  margin-bottom: 0.8em;
}

.reveal .contest-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2em;
  text-align: left;
}

.reveal .contest-results-grid[hidden] {
  display: none;
}

.reveal .contest-results-grid > [data-poll-reasons] {
  animation: contest-pane-in 0.5s ease-out both;
}

.reveal .contest-results-grid > [data-poll-reasons]:nth-child(2) {
  animation-delay: 0.15s;
}

@keyframes contest-pane-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.reveal .contest-results-grid h3 {
  font-size: 0.9em;
  margin-bottom: 0.6em;
}

.reveal .contest-results-grid [data-option="calibration"] {
  --contest-accent: #087c78;
  --contest-background: #dff3ef;
  --contest-background-alternate: #bfe3dc;
}

.reveal .contest-results-grid [data-option="rejection"] {
  --contest-accent: #a85016;
  --contest-background: #fcebdc;
  --contest-background-alternate: #f4d2b6;
}

.reveal .contest-results-grid .poll-choice-count {
  color: var(--contest-accent);
}

.reveal .contest-results-grid .poll-reasons {
  grid-template-columns: 1fr;
  max-height: 360px;
}

.reveal .contest-results-grid .poll-reasons li {
  background: var(--contest-background);
  border-left: 0;
}

.reveal .contest-results-grid .poll-reasons li:nth-child(even) {
  background: var(--contest-background-alternate);
}

.reveal .contest-results-grid .poll-meta {
  font-size: 0.45em;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .reveal .response-circle,
  .reveal .contest-results-grid > [data-poll-reasons] {
    animation: none;
  }
}

/* In the record: the option the talk went with */
.reveal .poll-options li.chosen .option-label::after {
  content: " · followed at the talk";
  font-size: 0.65em;
  font-weight: 700;
  color: var(--r-link-color);
}

/* Earlier lines carried over onto a continuation slide (continues.js) */
.reveal .downtuned {
  opacity: 0.4;
  font-size: 0.75em;
}

/* Stand-in text, to be replaced with real copy */
.reveal .placeholder {
  color: #aaa;
  font-style: italic;
}

/* On a paper slide the left half is the map, so footnotes sit under the text column */
.reveal .split:has(.paper-map) > .footnote {
  left: calc(50% + var(--gutter));
}

.reveal .byline {
  margin-top: 1.5em;
  font-size: 0.8em;
  line-height: 1.4;
  opacity: 0.7;
}

.reveal .occasion {
  margin-top: 1.6em;
  font-size: 0.65em;
  font-weight: 100;
  opacity: 0.55;
}

/* The link to the slides, part of the talk details: set like them, only showing itself as a link on hover */
.reveal .occasion a {
  color: inherit;
  text-decoration: underline transparent;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.18em;
  transition: text-decoration-color 0.2s ease;
}

.reveal .occasion a:hover,
.reveal .occasion a:focus-visible {
  color: inherit;
  text-decoration-color: currentColor;
}

/* On the questions slide, the link is what people are looking for */
.reveal #end .occasion {
  font-size: 0.9em;
}

.reveal .sources {
  text-align: left;
}

.reveal .sources ol {
  font-size: 0.6em;
  line-height: 1.4;
}

.reveal cite {
  font-style: normal;
}

.reveal .cite-missing {
  color: #c62828;
}

/* citation.js output: one .csl-entry per reference, with a hanging indent */
.reveal [data-bibliography] {
  font-size: 0.38em;
  line-height: 1.3;
}

.reveal .csl-entry {
  margin-bottom: 0.6em;
  padding-left: 2em;
  text-indent: -2em;
}

.reveal .choices {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
  counter-reset: choice;
}

.reveal .choices a {
  counter-increment: choice;
  min-width: 12em;
  padding: 0.4em 1em;
  border: 2px solid currentColor;
  border-radius: 0.3em;
  cursor: pointer;
}

.reveal .choices a::before {
  content: counter(choice) ". ";
  opacity: 0.5;
}

.reveal .choices a.visited {
  opacity: 0.55;
}

.reveal .choices a.visited::after {
  content: " ✓";
}

/* In the record of the talk: the way the talk went */
.reveal .choices a.chosen {
  opacity: 1;
  border-width: 4px;
}

.reveal .choices a.chosen::after {
  content: " · taken at the talk";
  font-size: 0.6em;
}

/* The reasons people gave for a choice (live.js), as short quotes in two columns */
.reveal .poll-reasons-slide h2 {
  font-size: 0.95em;
  line-height: 1.2;
  margin-bottom: 0.8em;
}

.reveal .poll-reasons {
  list-style: none;
  margin: 0;
  padding: 0 0.4em 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 0.6em 1.2em;
  max-height: 400px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #bbb transparent;
}

/* There's more below: fade the bottom edge */
.reveal .poll-reasons.more-below {
  mask-image: linear-gradient(to bottom, #000 calc(100% - 70px), transparent);
}

.reveal .poll-reasons li {
  margin: 0;
  padding: 0.35em 0.6em;
  border-left: 4px solid var(--r-link-color);
  background: #f4f3ef;
  font-size: 0.55em;
  font-weight: 300;
  line-height: 1.3;
}

.reveal .poll-reasons li.new {
  animation: reason-in 0.6s ease;
}

@keyframes reason-in {
  from {
    opacity: 0;
    transform: translateY(0.6em);
  }
}

.reveal .poll-reasons-slide .poll-meta {
  font-size: 0.45em;
  opacity: 0.6;
}

/* Each discussion changes from audience responses to an explanation without leaving the slide. */
.reveal .slides > section.resonant-discussion {
  top: 0 !important;
  height: 100%;
  overflow: hidden;
}

.reveal .resonant-discussion h2 {
  position: absolute;
  top: 100px;
  left: var(--gutter);
  width: calc(63% - 2 * var(--gutter));
  margin: 0;
}

.reveal .resonant-responses,
.reveal .resonant-copy {
  position: absolute;
  top: 190px;
  left: var(--gutter);
}

.reveal .other-discussion .resonant-responses {
  top: 270px;
}

.reveal .other-discussion .resonant-copy {
  top: 295px;
}

.reveal .resonant-responses {
  right: var(--gutter);
  transition: opacity 0.4s ease, visibility 0s 0.4s;
}

.reveal .resonant-copy {
  top: 215px;
  width: calc(63% - 2 * var(--gutter));
  font-size: 0.9em;
}

.reveal .resonant-copy p {
  margin: 0 0 0.6em;
}

.reveal .resonant-copy .resonant-intro.visible {
  transition-delay: 0.4s;
}

.reveal .resonant-image {
  position: absolute;
  inset: 0 0 0 63%;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform 0.7s ease, opacity 0.7s ease, visibility 0s 0.7s;
}

.reveal .resonant-image figcaption,
.reveal .slide-image-credit figcaption {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.88);
  color: #333;
  font-size: 0.45em;
}

.reveal .resonant-discussion:has(.resonant-intro.visible) .resonant-responses {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.reveal .resonant-discussion:has(.resonant-intro.visible) .resonant-image {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  transition: transform 0.7s ease 0.4s, opacity 0.7s ease 0.4s;
}

.reveal .frame-disputes-other h2 {
  font-size: 1.2em;
  margin-bottom: 0.2em;
}

.reveal .slides > section.frame-disputes-other {
  top: 0 !important;
  height: 100%;
  align-content: center;
}

.reveal .frame-disputes-source {
  font-size: 0.6em;
  opacity: 0.7;
  margin: 0 0 1.4em;
}

.reveal .frame-dispute-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4em;
}

.reveal .frame-disputes-other {
  --frame-first-color: #e7effc;
  --frame-second-color: #f4e9d8;
}

.reveal .frame-dispute-grid h3 {
  font-size: 0.9em;
}

.reveal .frame-dispute-grid p {
  font-size: 0.75em;
  line-height: 1.3;
}

.reveal .frame-dispute-grid .frame-exemplar {
  display: block;
  width: 100%;
  margin: 0.3em 0 0.8em;
  padding: 0.6em 0.8em;
  border: 0;
  background: var(--frame-first-color);
  color: inherit;
  font: inherit;
  font-size: 0.75em;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.reveal .frame-dispute-grid > :nth-child(2) .frame-exemplar {
  background: var(--frame-second-color);
}

.reveal .frame-exemplar:focus-visible,
.reveal .frame-reflections-close:focus-visible {
  outline: 3px solid var(--r-link-color);
  outline-offset: 3px;
}

.reveal .frame-reflections {
  position: absolute;
  z-index: 3;
  inset: 72px 28px;
  box-sizing: border-box;
  padding: 100px 40px 40px;
  background: var(--frame-first-color);
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, 0.28), 0 16px 48px rgba(0, 0, 0, 0.25);
  animation: reflections-open 0.25s ease-out;
}

.reveal .frame-dispute-grid + .frame-reflections + .frame-reflections {
  background: var(--frame-second-color);
}

@keyframes reflections-open {
  from { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .reveal .frame-reflections { animation: none; }
}

.reveal .frame-reflections[hidden] {
  display: none;
}

.reveal .frame-reflections-close {
  position: absolute;
  top: 40px;
  right: 40px;
  padding: 0.3em 0.6em;
  border: 1px solid currentColor;
  background: #fff;
  color: var(--r-link-color);
  font: inherit;
  font-size: 0.6em;
  cursor: pointer;
}

.reveal .frame-reflections .poll-meta {
  font-size: 0.45em;
  opacity: 0.6;
}

.reveal .frame-reflections .poll-reasons {
  max-height: 366px;
}
