/* One-frame slide layer. prototype.css remains the visual source; this file
   owns viewport containment, responsive composition, and deck controls.

   Proportional contract: `--u` is the deck's typographic unit, derived from
   the frame via container-query units. Every type size, icon, gutter, and
   component dimension is a multiple of it, so the text:frame and text:graphic
   proportions hold at any viewport and all slides share one apparent size.
   The fitter remains only as a safety net for pathological frames. */
:root {
  --deck-controls-h: 58px;
  /* Base unit: bounded by frame height on wide screens and width on narrow. */
  --u: clamp(13px, min(3.6cqh, 4.3cqw), 27px);
  --deck-pad-x: clamp(16px, 3.4cqw, 54px);
  --deck-pad-y: clamp(12px, 3.4cqh, 30px);
  --deck-prose-size: calc(var(--u) * 0.86);
  --deck-prose-leading: 1.35;
  --deck-prose-gap: calc(var(--u) * 0.55);
  --deck-point-size: var(--u);
  --deck-point-leading: 1.35;
  --deck-point-pad-y: calc(var(--u) * 0.5);
  --deck-point-icon-size: calc(var(--u) * 1.85);
  --deck-point-gutter: calc(var(--u) * 2.55);
  --deck-finding-label-w: calc(var(--u) * 3);
  --deck-finding-pad-y: calc(var(--u) * 0.45);
  /* Reading measure for prose columns (~60ch of Newsreader at 1u). */
  --deck-measure: calc(var(--u) * 28);
}

html,
body.deck-page {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body.deck-page {
  position: fixed;
  inset: 0;
  padding: 0;
  background: var(--bg-0);
}

.deck-page::after {
  display: none;
}

.skip-link {
  z-index: 1000;
}

.deck {
  position: fixed;
  inset: 0 0 var(--deck-controls-h);
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  outline: none;
  /* The frame is the sizing container for every cq unit below. */
  container-type: size;
  container-name: deck;
}

.deck .prototype {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.deck .editorial-slide,
.deck .prototype-c-title {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: block;
  padding: 0;
  border: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.deck .editorial-slide.active,
.deck .prototype-c-title.active {
  z-index: 2;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.deck .editorial-slide.fit-measuring,
.deck .prototype-c-title.fit-measuring {
  z-index: 1;
  opacity: 0;
  visibility: visible;
  pointer-events: none;
}

.deck .editorial-slide.fit-measuring .slide-plane,
.deck .prototype-c-title.fit-measuring .slide-plane {
  visibility: visible !important;
  transition: none !important;
}

.deck .editorial-slide.fit-measuring .slide-plane *,
.deck .prototype-c-title.fit-measuring .slide-plane * {
  visibility: visible !important;
  transition: none !important;
}

.deck .editorial-slide.fit-measuring .ladder-tier-tooltip {
  visibility: hidden !important;
}

.slide-plane {
  position: absolute;
  inset: 0 auto auto 0;
  width: calc(100% / var(--fit-scale, 1));
  height: calc(100% / var(--fit-scale, 1));
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  align-items: center;
  gap: calc(var(--u) * 1.05) calc(var(--u) * 1.5);
  padding: var(--deck-pad-y) var(--deck-pad-x);
  overflow: visible;
  transform: scale(var(--fit-scale, 1));
  transform-origin: top left;
  transition: none !important;
}

.slide-plane > * {
  min-width: 0;
}

.slide-plane > .editorial-section-heading {
  grid-column: 1 / -1;
  align-self: start;
}

.prototype-c .editorial-section-heading {
  grid-template-columns: calc(var(--u) * 2.1) minmax(0, 1fr) auto;
  gap: calc(var(--u) * 0.64);
  padding-bottom: calc(var(--u) * 0.5);
}

.prototype-c .editorial-section-heading::before {
  width: calc(var(--u) * 1.4);
  margin-top: calc(var(--u) * -0.82);
}

.prototype-c .editorial-section-heading h2 {
  font-size: calc(var(--u) * 1.4);
  line-height: 1.05;
  letter-spacing: 0;
  white-space: normal;
}

.prototype-c .editorial-section-heading .editorial-index {
  font-size: calc(var(--u) * 0.5);
}

.editorial-slide[data-part] .editorial-section-heading::after {
  content: attr(data-part);
  justify-self: end;
  align-self: center;
  padding: calc(var(--u) * 0.18) calc(var(--u) * 0.36);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font: 600 calc(var(--u) * 0.42)/1 var(--font-ui);
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-transform: uppercase;
}

.prototype-c .editorial-copy,
.prototype-c .editorial-copy p,
.overview-coherence blockquote,
.ladder-tier-description,
.cycle-key p,
.cycle-warning span {
  font-family: var(--font-prose);
}

.prototype-c .editorial-copy {
  gap: var(--deck-prose-gap);
  max-width: none;
  font-size: var(--deck-prose-size);
  line-height: var(--deck-prose-leading);
}

.prototype-c .editorial-copy > p:not(.eyebrow) {
  max-width: none;
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  letter-spacing: 0;
}

/* Explanatory prose uses one semantic row system throughout the deck. */
.prototype-c .slide-points,
.prototype-c .slide-findings {
  gap: 0;
  font-size: var(--deck-point-size);
  line-height: var(--deck-point-leading);
}

.slide-points > p:not(.eyebrow) {
  position: relative;
  min-height: calc(var(--u) * 2.45);
  padding: var(--deck-point-pad-y) 0 var(--deck-point-pad-y) var(--deck-point-gutter);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
}

/* Prose reads at a measure, not at whatever width the grid left over. */
.prototype-c .slide-points,
.prototype-c .slide-findings {
  max-width: calc(var(--deck-measure) + var(--deck-point-gutter));
}

.slide-points > p:not(.eyebrow) + p:not(.eyebrow) {
  border-top: 0;
}

.slide-points > p::before {
  content: "";
  position: absolute;
  top: var(--deck-point-pad-y);
  left: 0;
  width: var(--deck-point-icon-size);
  height: var(--deck-point-icon-size);
  border: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--bg-0) 82%, var(--accent) 18%);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.slide-points > p[data-point-icon="trust"]::before,
.slide-points > p[data-point-icon="measure"]::before,
.slide-points > p[data-point-icon="accurate"]::before,
.slide-points > p[data-point-icon="confirm"]::before,
.slide-points > p[data-point-icon="result"]::before,
.slide-points > p[data-point-icon="paper"]::before {
  background-image: url("assets/minty-teal.png");
  background-position: center;
  background-size: 62% auto;
}

.slide-points > p[data-point-icon="values"]::before {
  background-image:
    url("assets/preference-cycle-options/generated-v2/coin-large/coin-large-03-32.png"),
    url("assets/preference-cycle-options/generated-v2/coin-small/coin-small-03-32.png");
  background-position: right 5% top 5%, left 5% bottom 5%;
  background-size: 62% 62%, 52% 52%;
}

.slide-points > p[data-point-icon="test"]::before,
.slide-points > p[data-point-icon="cycle"]::before,
.slide-points > p[data-point-icon="finding"]::before,
.slide-points > p[data-point-icon="caution"]::before {
  background-image:
    url("assets/preference-cycle-options/generated-v2/coin-large/coin-large-03-32.png"),
    url("assets/preference-cycle-options/generated-v2/coin-small/coin-small-03-32.png"),
    url("assets/preference-cycle-options/generated-v2/ice-cream/ice-cream-01-32.png");
  background-position: center 5%, left 10% bottom 8%, right 10% bottom 8%;
  background-size: 42% 42%, 42% 42%, 42% 42%;
}

.slide-points > p[data-point-icon="choice"]::before {
  background-image:
    url("assets/preference-cycle-options/generated-v2/coin-small/coin-small-03-32.png"),
    url("assets/preference-cycle-options/generated-v2/ice-cream/ice-cream-01-32.png");
  background-position: left 3% center, right 3% center;
  background-size: 57% 57%, 57% 57%;
}

.slide-points > p[data-point-icon="order"]::before {
  background-image: url("assets/preference-cycle-options/generated-v2/coin-large/coin-large-03-32.png");
  background-position: center;
  background-size: 80% 80%;
}

.slide-points > p[data-point-icon="ladder"]::before {
  background-image: url("assets/human-happiness-a-t4-128.png");
  background-position: center;
  background-size: 85% 85%;
}

.slide-points > p[data-point-icon="sequence"]::before,
.slide-points > p[data-point-icon="trend"]::before {
  background-image:
    url("assets/human-happiness-a-t1-weaker-128.png"),
    url("assets/human-happiness-a-t7-128.png");
  background-position: left 3% center, right 3% center;
  background-size: 60% 60%, 60% 60%;
}

.slide-points > p[data-point-icon="compare"]::before {
  background-image:
    url("assets/human-happiness-a-t4-128.png"),
    url("assets/alligator-saved-b-128.png");
  background-position: left 3% center, right 3% center;
  background-size: 60% 60%, 60% 60%;
}

.slide-points > p[data-point-icon="example"]::before {
  background-image: url("assets/alligator-saved-b-128.png");
  background-position: center;
  background-size: 85% 85%;
}

.pt-line {
  display: block;
  white-space: nowrap;
}

.pretext-managed {
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.deck-title-slide .slide-plane {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(var(--u) * 0.55);
  text-align: center;
}

.deck-title-slide h1 {
  max-width: calc(var(--u) * 44);
  font-size: calc(var(--u) * 2.9);
  line-height: 1;
  letter-spacing: 0;
}

.deck-title-slide .prototype-c-subtitle {
  max-width: calc(var(--u) * 38);
  font-size: calc(var(--u) * 1.5);
}

.deck-title-slide .prototype-c-byline {
  font-size: calc(var(--u) * 0.8);
}

.deck-title-slide .prototype-c-resource-links {
  margin-top: calc(var(--u) * 0.4);
}

.deck-title-slide .prototype-c-resource-links a {
  min-height: calc(var(--u) * 1.7);
  padding: calc(var(--u) * 0.28) calc(var(--u) * 0.55);
  font-size: calc(var(--u) * 0.46);
}

/* Text columns are measure-bound: the reading measure wins inside a 34-48%
   band of the frame; the visual absorbs the remainder. */
.prototype-c #c-overview .slide-plane {
  grid-template-columns:
    clamp(34%, calc(var(--deck-measure) + var(--deck-point-gutter)), 46%)
    minmax(0, 1fr);
}

.model-headline-results {
  gap: calc(var(--u) * 0.55);
  padding: calc(var(--u) * 0.9);
}

.model-headline-results .model-chart-title {
  font-size: calc(var(--u) * 1.1);
  line-height: 1.15;
}

.mini-strict-mono-chart {
  gap: calc(var(--u) * 0.32);
  padding: calc(var(--u) * 0.6);
}

.mini-strict-mono-chart .model-result-row > div {
  height: calc(var(--u) * 0.72);
}

.mini-strict-mono-chart .model-result-row strong,
.mini-strict-mono-chart .model-result-row > span {
  font-size: calc(var(--u) * 0.45);
}

.model-headline-results .strict-mono-legend {
  justify-content: flex-start;
  margin: 0;
  font-size: calc(var(--u) * 0.38);
}

.model-headline-results .strict-mono-legend i {
  --model-color: var(--accent);
  width: calc(var(--u) * 1.1);
  height: calc(var(--u) * 0.45);
  background: var(--model-color);
}

.model-headline-results .strict-mono-legend .reasoning-on i {
  background-color: var(--model-color);
  background-image: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 5px,
    color-mix(in srgb, var(--bg-0) 58%, transparent) 5px,
    color-mix(in srgb, var(--bg-0) 58%, transparent) 8px
  );
}

.prototype-c #c-coherence .slide-plane {
  grid-template-columns:
    minmax(0, 1fr)
    clamp(34%, calc(var(--deck-measure) + var(--deck-point-gutter)), 46%);
}

/* The cycle diagram is an absolutely-composed visual; its geometry is
   em-driven from the unit (design point 1em = 19px) so it scales with the
   type instead of staying a fixed-px wireframe. */
.coherence-cycle-diagram {
  min-height: 0;
  height: 100%;
  max-height: calc(var(--u) * 25);
  align-self: start;
  font-size: var(--u);
}

.prototype-c .coherence-forced-choice-copy {
  align-self: start;
}

.coherence-cycle-diagram .cycle-node {
  width: 7.8em;
  min-height: 8.2em;
  gap: 0.2em;
}

.coherence-cycle-diagram .cycle-node-a {
  top: 3.2em;
}

.coherence-cycle-diagram .cycle-node-a-plus {
  bottom: 3em;
  min-height: 8.7em;
}

.coherence-cycle-diagram .cycle-node-b {
  bottom: 3em;
  min-height: 8.2em;
}

.coherence-cycle-diagram .cycle-node-symbol {
  font-size: 1.58em;
}

.coherence-cycle-diagram .cycle-option-sprite {
  width: 5em;
  height: 5em;
}

.coherence-cycle-diagram .cycle-arrow {
  width: 5.5em;
  height: 1.26em;
}

.coherence-cycle-diagram .cycle-arrow::before {
  right: 0.68em;
  left: 0.05em;
  border-top-width: 0.26em;
}

.coherence-cycle-diagram .cycle-arrow::after {
  right: 0.16em;
  width: 0.68em;
  height: 0.68em;
  border-top-width: 0.26em;
  border-right-width: 0.26em;
}

.coherence-cycle-diagram .cycle-arrow-b-a-plus {
  width: 7.4em;
}

/* Pin every geometry-affecting property: prototype's small-screen block
   re-places this key with a transform, which must not mix with em placement. */
.coherence-cycle-diagram .cycle-key {
  top: 0.84em;
  right: 0.95em;
  left: auto;
  width: max-content;
  padding: 0.47em 0.63em;
  gap: 0.1em;
  transform: none;
}

.coherence-cycle-diagram .cycle-node {
  padding: 0.4em;
}

.coherence-cycle-diagram .cycle-key strong {
  font-size: 0.9em;
}

.coherence-cycle-diagram .cycle-key p {
  font-size: 0.58em;
}

.coherence-cycle-diagram .pairwise-caption {
  top: 0.84em;
  left: 0.95em;
  font-size: 0.47em;
}

.coherence-cycle-diagram .cycle-warning {
  right: 0.95em;
  bottom: 0.74em;
  left: 0.95em;
  gap: 0.2em 0.63em;
}

.coherence-cycle-diagram .cycle-warning strong {
  font-size: 0.58em;
}

.coherence-cycle-diagram .cycle-warning span {
  font-size: 0.84em;
}

.ladder-method-slide .slide-plane,
.ladder-example-slide .slide-plane,
.results-model-slide .slide-plane,
.upshot-slide .slide-plane,
.links-slide .slide-plane {
  grid-template-columns: minmax(0, 1fr);
}

.results-model-slide .slide-plane {
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-content: center;
}

/* Shared left datum: the copy column starts at the heading's left edge and
   holds the reading measure; the right margin is deliberate. */
.ladder-method-slide .editorial-copy {
  width: min(100%, calc(var(--deck-measure) + var(--deck-point-gutter) + var(--u) * 4));
  justify-self: center;
  align-self: center;
}

.ladder-method-copy > .tier-order-strip,
.ladder-method-copy > .ladder-consistency-card {
  margin-block: calc(var(--u) * 0.4);
}

.tier-order-strip {
  overflow: hidden;
}

.tier-order-item img {
  width: calc(var(--u) * 1.9);
}

.ladder-consistency-card {
  min-height: calc(var(--u) * 3.1);
  padding: calc(var(--u) * 0.5) calc(var(--u) * 0.8);
}

.ladder-consistency-card strong {
  font-size: calc(var(--u) * 1.5);
}

.ladder-consistency-card p {
  font-size: calc(var(--u) * 0.8);
}

/* The ladder sizes to its content in units; the fitter is only a safety net. */
.ladder-example-slide .vertical-ladder {
  width: min(100%, calc(var(--u) * 58));
  height: auto;
  min-height: 0;
  justify-self: center;
  align-self: center;
  padding: calc(var(--u) * 0.55) calc(var(--u) * 0.8);
}

.ladder-example-slide .vertical-ladder ol {
  height: auto;
  display: grid;
  grid-auto-rows: auto;
  gap: calc(var(--u) * 0.2);
}

.ladder-example-slide .ladder-tier {
  min-height: 0;
  height: auto;
  grid-template-columns: calc(var(--u) * 2.7) calc(var(--u) * 2.2) minmax(0, 1fr);
  gap: calc(var(--u) * 0.45);
  padding-block: calc(var(--u) * 0.22);
}

.ladder-example-slide .ladder-tier img {
  width: calc(var(--u) * 2.5);
}

.ladder-example-slide .ladder-tier-description {
  font-size: calc(var(--u) * 0.8);
}

.ladder-example-slide .ladder-tier-marker strong {
  font-size: calc(var(--u) * 0.62);
}

.ladder-example-slide .ladder-tier-marker span {
  font-size: calc(var(--u) * 0.38);
}

.prototype-c #c-comparison .slide-plane {
  grid-template-columns:
    minmax(0, 1fr)
    clamp(34%, calc(var(--deck-measure) + var(--deck-point-gutter)), 44%);
}

.comparison-visual-stack,
.comparison-slide .editorial-copy {
  align-self: start;
}

.comparison-visual-stack {
  height: max-content;
  gap: calc(var(--u) * 0.55);
}

/* Em-driven interior so the animation card scales with the type. */
.animated-fixed-comparison {
  min-height: 0;
  font-size: var(--u);
}

.animated-tier-viewport {
  height: 8em;
}

.animated-tier-face img {
  width: 5.2em;
}

.animated-tier-face strong {
  font-size: 0.65em;
}

.animated-tier-face small {
  font-size: 0.55em;
}

.animated-alligator-side img {
  width: 4.6em;
}

.animated-alligator-side strong {
  font-size: 0.7em;
}

.comparison-label {
  font-size: 0.45em;
}

.animated-comparison-mark span {
  font-size: 1.5em;
}

.result-curve-card {
  padding: calc(var(--u) * 0.6);
}

.monotonicity-example-card .result-curve,
.monotonic-y-axis {
  height: calc(var(--u) * 5.6);
}

.monotonicity-example-title,
.incoherence-example-title {
  font-size: calc(var(--u) * 1);
}

.monotonicity-example-disclosure,
.incoherence-example-disclosure {
  font-size: calc(var(--u) * 0.42);
}

.monotonicity-example-note,
.incoherence-example-note {
  font-size: calc(var(--u) * 0.6);
}

.prototype-c #c-results .slide-plane {
  grid-template-columns: minmax(0, 1fr);
}

.results-example-slide .results-story {
  grid-template-columns:
    clamp(32%, calc(var(--deck-measure) + var(--deck-point-gutter)), 42%)
    minmax(0, 1fr);
  align-items: start;
  gap: calc(var(--u) * 1.5);
}

/* prototype.css stacks these into column 1 below 1300px/1120px; the deck keeps
   its own breakpoints, so reset to auto placement (same fix as the model slide). */
.results-example-slide .results-intro,
.results-example-slide .incoherence-example-card {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
  align-self: start;
}

.incoherence-example-card .result-curve,
.result-y-axis {
  height: calc(var(--u) * 6.5);
}

.result-example-context img {
  width: calc(var(--u) * 2.4);
}

.result-example-context span {
  font-size: calc(var(--u) * 0.42);
}

.result-example-context strong {
  font-size: calc(var(--u) * 0.8);
}

.results-model-slide .results-model-story {
  display: grid;
  grid-template-columns:
    clamp(26%, calc(var(--deck-measure) * 0.8 + var(--deck-finding-label-w)), 36%)
    minmax(0, 1fr);
  align-items: start;
  gap: calc(var(--u) * 1.5);
}

.results-model-slide .results-summary-copy,
.results-model-slide .strict-mono-card {
  grid-column: auto;
  grid-row: auto;
  margin: 0;
  padding-top: 0;
}

.results-model-slide .results-summary-copy {
  align-self: start;
  gap: 0;
  border-top: 1px solid var(--border-strong);
}

.results-model-slide .results-summary-copy > p:not(.eyebrow) {
  position: relative;
  min-height: calc(var(--deck-point-size) * var(--deck-point-leading) + 2 * var(--deck-finding-pad-y));
  padding: var(--deck-finding-pad-y) 0 var(--deck-finding-pad-y) var(--deck-finding-label-w);
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
}

.results-model-slide .results-summary-copy > p::before {
  content: attr(data-finding-label);
  position: absolute;
  top: calc(var(--deck-finding-pad-y) + var(--u) * 0.22);
  left: 0;
  width: calc(var(--deck-finding-label-w) - var(--u) * 0.45);
  color: var(--accent);
  font: 600 calc(var(--u) * 0.42)/1 var(--font-ui);
  letter-spacing: 0;
  text-transform: uppercase;
}

.results-model-slide .results-summary-copy .results-summary-lead {
  color: var(--text-1);
  font-size: inherit;
}

.results-model-slide .results-summary-copy .results-reasoning-copy {
  margin-top: 0;
}

.results-model-slide .strict-mono-card {
  padding: calc(var(--u) * 0.5) calc(var(--u) * 0.7);
}

.results-model-slide .strict-mono-heading {
  margin-bottom: calc(var(--u) * 0.28);
}

.results-model-slide .strict-mono-heading > strong {
  font-size: calc(var(--u) * 1);
}

.results-model-slide .strict-mono-scale {
  margin-bottom: calc(var(--u) * 0.14);
  font-size: calc(var(--u) * 0.34);
}

.results-model-slide .strict-mono-chart {
  gap: calc(var(--u) * 0.1);
}

.results-model-slide .strict-mono-row {
  min-height: calc(var(--u) * 0.78);
  grid-template-columns: minmax(0, calc(var(--u) * 8)) minmax(0, 1fr) calc(var(--u) * 2.2);
  gap: calc(var(--u) * 0.4);
}

.results-model-slide .strict-mono-model strong,
.results-model-slide .strict-mono-row > span {
  font-size: calc(var(--u) * 0.45);
}

.results-model-slide .strict-mono-track {
  height: calc(var(--u) * 0.55);
}

.results-model-slide .strict-mono-footer {
  margin-top: calc(var(--u) * 0.36);
  padding-top: calc(var(--u) * 0.36);
}

.results-model-slide .strict-mono-average {
  font-size: calc(var(--u) * 0.42);
}

.results-model-slide .strict-mono-average strong {
  font-size: calc(var(--u) * 0.85);
}

.results-model-slide .strict-mono-legend {
  font-size: calc(var(--u) * 0.38);
}

.results-model-slide .strict-mono-footer .strict-mono-legend i {
  width: calc(var(--u) * 1.1);
  height: calc(var(--u) * 0.45);
}

/* Heading stays on the shared left-aligned system; only the statement and the
   supporting row are centered as a block. The plate is measure-sized so the
   quote fills it. */
.upshot-slide .slide-plane {
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
}

.upshot-slide .editorial-section-heading {
  width: 100%;
}

.upshot-slide .upshot-statement {
  width: min(100%, calc(var(--u) * 44));
  min-height: 0;
  align-self: center;
  padding: calc(var(--u) * 1.7) calc(var(--u) * 2);
}

/* ID-level so prototype.css's px `max-width` cannot cap the measure: the
   statement's line length is set by the plate, in units. */
/* The statement's display type must live on the element Pretext measures.
   prototype.css's `.upshot-statement span` rule was written for different
   markup and otherwise repaints Pretext's generated `.pt-line` spans in a
   different family and a vw-based size — so lines were measured in one font
   and painted in another, and overflowed their column. Italic Newsreader is
   only served at weight 400; asking for a heavier italic makes the browser
   synthesise a face the canvas cannot measure. Display type is bound by plate
   width as well as the unit: on narrow frames the plate is the column, and
   1.85u there would set a ~20-character measure with an unusable rag. */
#c-upshot .upshot-statement strong {
  max-width: none;
  font-family: var(--font-prose);
  font-style: italic;
  font-weight: 400;
  font-size: min(calc(var(--u) * 1.62), 4.6cqw);
  line-height: 1.22;
  letter-spacing: 0;
  color: var(--text-bright);
}

#c-upshot .upshot-statement strong .pt-line {
  font: inherit;
  color: inherit;
}

/* Narrower than the plate on purpose: the plate carries display type, this
   row carries reading type, and each is bound by its own measure. */
.upshot-slide .editorial-copy {
  width: min(100%, calc(var(--deck-measure) + var(--deck-point-gutter)));
  text-align: left;
}

.links-slide .slide-plane {
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-content: center;
}

.prototype-c #c-links .editorial-copy {
  width: min(100%, calc(var(--deck-measure) + var(--deck-point-gutter)));
  justify-self: start;
  text-align: left;
}

.prototype-c #c-links .research-links {
  width: 100%;
  align-self: center;
  gap: calc(var(--u) * 0.7);
}

.prototype-c #c-links .paper-link-primary {
  min-height: calc(var(--u) * 5);
  padding: calc(var(--u) * 1);
}

.prototype-c #c-links .paper-link-primary strong {
  font-size: calc(var(--u) * 2);
}

.prototype-c #c-links .research-links-secondary {
  gap: calc(var(--u) * 0.7);
}

.prototype-c #c-links .research-links-secondary a {
  min-height: calc(var(--u) * 4.6);
  gap: calc(var(--u) * 0.45);
  padding: calc(var(--u) * 0.7) calc(var(--u) * 0.8);
}

.prototype-c #c-links .research-links-secondary a span {
  font-size: calc(var(--u) * 0.42);
}

.prototype-c #c-links .research-links-secondary a strong {
  font-size: calc(var(--u) * 1.1);
}

.prototype-c #c-ladder-example,
.prototype-c #c-results-models,
.prototype-c #c-links {
  background: var(--bg-0);
}

.deck-controls {
  position: fixed;
  inset: auto 0 0;
  z-index: 20;
  height: var(--deck-controls-h);
  display: grid;
  grid-template-columns: minmax(112px, 1fr) minmax(0, 1.4fr) minmax(112px, 1fr);
  align-items: center;
  gap: 12px;
  padding: 7px 12px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border-strong);
  background: var(--bg-0);
}

.deck-control {
  min-width: 0;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: 3px;
  background: var(--bg-1);
  color: var(--text-bright);
  font: 600 10px/1 var(--font-ui);
  cursor: pointer;
}

.deck-control-prev {
  justify-self: start;
}

.deck-control-next {
  justify-self: end;
}

.deck-control:hover,
.deck-control:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.deck-control:disabled {
  cursor: default;
  opacity: 0.28;
}

.deck-position {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-2);
  font: 500 9px/1.2 var(--font-ui);
  text-align: center;
}

.deck-position > span:first-child {
  flex: 0 0 auto;
  color: var(--accent);
}

.deck-slide-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .slide-plane,
  .prototype-c #c-overview .slide-plane,
  .prototype-c #c-coherence .slide-plane,
  .prototype-c #c-comparison .slide-plane,
  .results-example-slide .results-story,
  .results-model-slide .results-model-story {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Stacked layouts use intrinsic rows; the fitter scales the whole slide.
     Fractional rows squash their tracks and let centered content overlap the
     heading and neighbouring panels. */
  .slide-plane,
  .prototype-c #c-overview .slide-plane,
  .prototype-c #c-coherence .slide-plane,
  .prototype-c #c-comparison .slide-plane,
  .prototype-c #c-results .slide-plane,
  .ladder-method-slide .slide-plane,
  .ladder-example-slide .slide-plane,
  .results-example-slide .slide-plane,
  .results-model-slide .slide-plane,
  .upshot-slide .slide-plane,
  .links-slide .slide-plane {
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: center;
    align-items: start;
  }

  .model-headline-results,
  .coherence-cycle-diagram,
  .comparison-visual-stack,
  .incoherence-example-card,
  .strict-mono-card {
    align-self: stretch;
  }

  /* Absolute-composed diagram needs an explicit height in the stacked flow;
     the em interior scales down with it so proportions hold. */
  .coherence-cycle-diagram {
    font-size: calc(var(--u) * 0.72);
    height: calc(var(--u) * 16);
    max-height: none;
  }

  .results-model-slide .results-model-story {
    grid-template-rows: none;
    grid-auto-rows: auto;
  }

  .results-model-slide .strict-mono-card {
    align-self: stretch;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  .prototype-c #c-comparison .slide-plane {
    grid-template-rows: auto auto auto;
    align-content: start;
  }
}

@media (max-width: 560px) {
  :root {
    --deck-controls-h: 54px;
  }

  .research-links-secondary {
    grid-template-columns: 1fr;
  }

  .results-model-slide .strict-mono-footer {
    display: grid;
    gap: calc(var(--u) * 0.3);
  }

  .deck-controls {
    grid-template-columns: 92px minmax(0, 1fr) 92px;
    gap: 5px;
    padding: 5px;
  }

  .deck-control {
    width: 92px;
    height: 40px;
    gap: 4px;
    padding-inline: 7px;
    font-size: 9px;
  }

  .deck-position {
    display: grid;
    gap: 2px;
    font-size: 8px;
  }
}

@media (max-width: 900px) and (orientation: landscape) {
  :root {
    --deck-controls-h: 50px;
  }

  .slide-plane,
  .prototype-c #c-overview .slide-plane,
  .prototype-c #c-coherence .slide-plane,
  .prototype-c #c-comparison .slide-plane {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: center;
    align-items: center;
  }

  .ladder-method-slide .slide-plane,
  .ladder-example-slide .slide-plane,
  .results-model-slide .slide-plane,
  .upshot-slide .slide-plane,
  .links-slide .slide-plane {
    grid-template-columns: minmax(0, 1fr);
  }

  .results-example-slide .results-story,
  .results-model-slide .results-model-story {
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    grid-template-rows: minmax(0, 1fr);
  }

  .results-example-slide .results-intro {
    grid-column: 1;
    grid-row: 1;
  }

  .results-example-slide .incoherence-example-card {
    grid-column: 2;
    grid-row: 1;
  }

  .coherence-cycle-diagram {
    min-height: 0;
    height: 100%;
  }

  /* Two-column compact chart with the model name above its track. */
  .results-model-slide .strict-mono-row {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) calc(var(--u) * 2.2);
    grid-template-rows: auto calc(var(--u) * 0.55);
    align-items: center;
    gap: calc(var(--u) * 0.14) calc(var(--u) * 0.25);
  }

  .results-model-slide .strict-mono-model {
    grid-column: 1 / -1;
    grid-row: 1;
    line-height: 1;
  }

  .results-model-slide .strict-mono-track {
    grid-column: 1;
    grid-row: 2;
    height: calc(var(--u) * 0.45);
  }

  .results-model-slide .strict-mono-row > span {
    grid-column: 2;
    grid-row: 2;
    line-height: 1;
  }

  .results-model-slide .strict-mono-chart {
    grid-template-rows: repeat(8, minmax(0, auto));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: column;
    gap: calc(var(--u) * 0.05);
    column-gap: calc(var(--u) * 0.7);
  }

  .results-model-slide .strict-mono-scale {
    width: calc(50% - var(--u) * 0.35);
    margin-left: auto;
  }

  .results-model-slide .results-summary-copy {
    align-self: center;
  }

  .deck-control {
    height: 36px;
  }
}

@media (max-width: 380px) {
  .deck-controls {
    grid-template-columns: 76px minmax(0, 1fr) 76px;
  }

  .deck-control {
    width: 76px;
  }

  .deck-control span:not([aria-hidden]) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

@media (max-width: 900px) and (max-aspect-ratio: 4 / 3) {
  .prototype-c #c-coherence .slide-plane {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    align-content: start;
  }

  .coherence-cycle-diagram {
    font-size: calc(var(--u) * 0.72);
    height: calc(var(--u) * 16);
    align-self: start;
  }

  .prototype-c .coherence-forced-choice-copy {
    align-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck .editorial-slide,
  .deck .prototype-c-title {
    transition: none;
  }
}
