/* slideshow.css. CTO Pitch deck and any future slideshow on stravica.ai.
 * Inherits site tokens from site.css. Adds slide-specific layout, print,
 * and present-mode rules. Zero deps. Vanilla. Cascade order: this file
 * loads after site.css so its rules win for slide elements.
 */

/* -------- Page-level: slideshow owns the viewport --------
 * Wherever a [data-slideshow] root appears, the page itself takes exactly
 * the viewport, scroll is suppressed, and site chrome is hidden. The deck
 * is its own surface; a small back-link in slideshow chrome handles
 * "return to the site". This eliminates the leftover-scroll problem that
 * comes from trying to fit a 100vh slide inside a page that also renders
 * site header + footer.
 */
body:has([data-slideshow]) {
  overflow: hidden;
  margin: 0;
}

body:has([data-slideshow]) .site-header,
body:has([data-slideshow]) .site-footer,
body:has([data-slideshow]) .skip {
  display: none;
}

body:has([data-slideshow]) main {
  padding: 0;
  margin: 0;
}

/* -------- Slideshow root -------- */
.slideshow {
  position: relative;
  width: 100%;
  height: 100vh;
  background: var(--paper);
  color: var(--ink);
}

.slideshow__deck {
  position: relative;
  width: 100%;
  height: 100vh;
}

/* -------- Slide -------- */
.slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  padding: 3rem clamp(1.5rem, 5vw, 4rem);
  box-sizing: border-box;
  overflow: hidden;
}

.slide[hidden] {
  display: none;
}

.slide__inner {
  width: 100%;
  max-width: 56rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.slide__inner--centered {
  text-align: center;
  align-items: center;
}

.slide__inner--diagram {
  max-width: 64rem;
  align-items: center;
}

.slide__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  margin: 0;
}

.slide__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  /* Prevents a single-word last line: re-balances the break so the orphan
   * pulls a sibling word with it. Modern Chrome / FF / Safari support
   * text-wrap: pretty; older browsers gracefully degrade. */
  text-wrap: pretty;
}

.slide__title--xl {
  font-size: clamp(2.75rem, 7vw, 5rem);
  letter-spacing: -0.03em;
}

.slide__title--diagram {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-align: center;
  margin-bottom: 0.5rem;
}

.slide__title--quote {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1rem;
}

.slide__title--transition {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-style: italic;
  font-weight: 500;
}

.slide__subtitle {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2.25vw, 1.625rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--mute);
  margin: 0;
  max-width: 44rem;
}

.slide__meta {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--mute);
  margin: 1rem 0 0;
}

.slide__claim {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.5vw, 4rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0;
  max-width: 48rem;
  text-wrap: pretty;
}

.slide__claim-body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.6;
  color: var(--mute);
  max-width: 44rem;
  margin-top: 1rem;
}

.slide__claim-body ol,
.slide__claim-body ul {
  padding-left: 1.25rem;
  margin: 0;
  text-align: left;
}

.slide__claim-body li {
  margin: 0.5rem 0;
}

.slide__body {
  font-family: var(--font-body);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.6;
}

.slide__body p {
  margin: 0 0 1rem;
}

.slide__body p:last-child {
  margin-bottom: 0;
}

.slide__body--transition {
  font-style: italic;
  color: var(--mute);
  max-width: 36rem;
}

.slide__key-line {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  line-height: 1.35;
  color: var(--signal);
  border-left: 3px solid var(--signal);
  padding-left: 1rem;
  margin: 1rem 0 0;
}

/* -------- List slide -------- */
.slide__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.slide__list-item {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  padding-left: 1.25rem;
  border-left: 2px solid var(--rule);
}

.slide__list-term {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--signal);
  display: inline;
  margin-right: 0.35rem;
}

.slide__list-body {
  display: inline;
}

/* -------- Quote / stats slide -------- */
.slide__stats {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3rem);
  justify-content: center;
  align-items: stretch;
}

.slide__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  max-width: 16rem;
}

.slide__stat-figure {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  color: var(--signal);
  letter-spacing: -0.02em;
}

.slide__stat-label {
  font-family: var(--font-body);
  font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
  line-height: 1.4;
  color: var(--ink);
  text-align: center;
}

.slide__stat-source {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--mute);
  margin-top: auto;
  padding-top: 0.5rem;
}

.slide__quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.35;
  margin: 1rem 0;
  padding: 0 1.5rem;
  max-width: 46rem;
}

.slide__attribution {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--mute);
  margin: 0;
}

/* -------- Diagram slide -------- */
.slide__diagram {
  width: 100%;
  max-width: 60rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.slide__diagram figure {
  margin: 0;
  width: 100%;
  max-height: calc(100vh - 18rem);
}

.slide__diagram svg {
  width: 100%;
  height: auto;
  max-height: calc(100vh - 18rem);
}

.slide__caption {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--mute);
  text-align: center;
  margin: 0.5rem 0 0;
}

/* -------- Transition slide (act break) -------- */
.slide--transition {
  background: var(--ink);
  color: var(--paper);
}

.slide--transition .slide__title--transition,
.slide--transition .slide__body--transition,
.slide--transition .slide__section-label {
  color: var(--paper);
}

.slide--transition .slide__section-label {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 1rem;
}

/* Claim slide inverse treatment for the deck-defining moment.
 * Marked by `inverse: true` in frontmatter or .slide--inverse class. */
.slide--inverse {
  background: var(--ink);
  color: var(--paper);
}

.slide--inverse .slide__title,
.slide--inverse .slide__claim,
.slide--inverse .slide__subtitle,
.slide--inverse .slide__body {
  color: var(--paper);
}

.slide--inverse .slide__eyebrow,
.slide--inverse .slide__claim-body {
  color: rgba(255, 255, 255, 0.7);
}

.slide--inverse .slide__key-line {
  color: var(--signal);
  border-left-color: var(--signal);
}

/* -------- Speaker notes -------- */
.slide__notes {
  display: none;
  position: absolute;
  bottom: 4rem;
  left: 50%;
  transform: translateX(-50%);
  width: min(50rem, calc(100% - 4rem));
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 20;
  text-align: left;
}

.slide__notes-label {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.5rem;
  opacity: 0.85;
}

.slide__notes-body {
  color: var(--paper);
}

.slide__notes-body p {
  margin: 0 0 0.5rem;
}

.slide__notes-body p:last-child {
  margin-bottom: 0;
}

body.show-notes .slide[data-active] .slide__notes {
  display: block;
}

/* -------- Back link (top-left, low emphasis) -------- */
.slideshow__back {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 0.5rem 0.75rem;
  margin: 1rem 0 0 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  pointer-events: auto;
}

.slideshow__back:hover,
.slideshow__back:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

body.slideshow-present .slideshow__back {
  display: none;
}

/* -------- Contact (top-right, low emphasis) -------- */
.slideshow__contact {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 30;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 0.5rem 0.75rem;
  margin: 1rem 1rem 0 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
  pointer-events: auto;
}

.slideshow__contact:hover,
.slideshow__contact:focus-visible {
  color: var(--ink);
  border-color: var(--ink);
}

body.slideshow-present .slideshow__contact {
  display: none;
}

body.is-speaker-view .slideshow__contact {
  display: none;
}

/* -------- Chrome (counter, progress, nav buttons) -------- */
.slideshow__chrome {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  pointer-events: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 0;
}

.slideshow__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--rule);
}

.slideshow__progress-bar {
  height: 100%;
  width: 0;
  background: var(--signal);
  transition: width 200ms ease-out;
}

.slideshow__counter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 0.5rem 0.75rem;
  margin: 0 0 1rem 1rem;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

.slideshow__counter-sep {
  margin: 0 0.25rem;
  opacity: 0.5;
}

.slideshow__hint {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--mute);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  padding: 0.5rem 0.75rem;
  margin: 0 1rem 1rem 0;
  border: 1px solid var(--rule);
  border-radius: 4px;
}

/* -------- Visible nav buttons (bottom-right) --------
 * Mirror the keyboard nav: first / prev / next / last. Sit alongside the
 * hint chip. pointer-events re-enabled (parent chrome has it off so the
 * slide itself stays clickable for click-to-nav). */
.slideshow__nav {
  display: inline-flex;
  gap: 0.25rem;
  margin: 0 1rem 1rem 0;
  pointer-events: auto;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25rem;
}

.slideshow__nav-button {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: 3px;
  cursor: pointer;
  min-width: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.slideshow__nav-button:hover,
.slideshow__nav-button:focus-visible {
  background: var(--rule);
  color: var(--ink);
}

.slideshow__nav-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.slideshow__nav-button:disabled:hover {
  background: transparent;
}

/* Stack the counter / hint / nav into a single right-edge column at the
 * bottom so they don't fight each other for the same row. */
.slideshow__chrome-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  pointer-events: none;
}

.slideshow__chrome-right > * {
  margin: 0 1rem 0 0;
}

.slideshow__chrome-right .slideshow__nav,
.slideshow__chrome-right .slideshow__hint {
  margin: 0 1rem 0 0;
}

.slideshow__chrome-right > *:last-child {
  margin-bottom: 1rem;
}

.slideshow__hint-sep {
  margin: 0 0.4rem;
  opacity: 0.5;
}

.slideshow__hint kbd {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  padding: 1px 4px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink);
}

/* -------- Help overlay -------- */
.slideshow__help {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ink) 60%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.slideshow__help[hidden] {
  display: none;
}

.slideshow__help-panel {
  background: var(--paper);
  color: var(--ink);
  padding: 2rem;
  max-width: 32rem;
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.slideshow__help-panel h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.slideshow__help-panel dl {
  display: grid;
  grid-template-columns: minmax(8rem, auto) 1fr;
  gap: 0.5rem 1.25rem;
  margin: 0 0 1.25rem;
}

.slideshow__help-panel dt {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--mute);
}

.slideshow__help-panel dd {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  margin: 0;
}

.slideshow__help-panel kbd {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 6px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--ink);
  margin: 0 2px;
}

.slideshow__help-foot {
  font-size: 0.8125rem;
  color: var(--mute);
  margin: 0 0 1.25rem;
}

.slideshow__help-foot code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 1px 4px;
  border-radius: 2px;
}

.slideshow__help-close {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.slideshow__help-close:hover {
  background: var(--signal);
}

/* -------- Present mode -------- */
/* Site chrome is already hidden by default on any page carrying a
 * [data-slideshow] root (see body:has rule at top). What's specific to
 * present mode now is just cursor-hide-on-idle and back-link hide.
 * Triggered by ?present=1 in URL or document.fullscreenElement.
 */

/* Cursor hide (set on body when idle in present mode). */
body.slideshow-cursor-hidden,
body.slideshow-cursor-hidden * {
  cursor: none !important;
}

/* -------- Speaker view (private window for the live presenter) --------
 * Triggered by ?speaker=1 in the URL. The body picks up .is-speaker-view
 * via JS; that class hides the regular slide canvas + chrome and reveals
 * the .speaker-view panel which fills the viewport.
 *
 * The presenter opens this in a second window (`s` key from the main
 * deck), keeps it on their private screen, and shares the main deck
 * window in their meeting tool. Slide state syncs between the two via
 * localStorage events (either window can drive nav). Timer state is
 * also in localStorage so reloads don't lose it.
 */

.speaker-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  font-family: var(--font-body);
}


.speaker-view[hidden] {
  display: none;
}

body.is-speaker-view .slideshow__deck,
body.is-speaker-view .slideshow__chrome,
body.is-speaker-view .slideshow__back,
body.is-speaker-view .slideshow__help {
  display: none !important;
}

body.is-speaker-view .speaker-view {
  display: grid;
}

.speaker-view__top {
  display: flex;
  align-items: baseline;
  gap: clamp(1rem, 2vw, 2rem);
  padding: 1rem clamp(1rem, 2vw, 1.75rem) 0.75rem;
  border-bottom: 1px solid var(--rule);
}

.speaker-view__counter {
  font-family: var(--font-mono);
  font-size: clamp(1.125rem, 1.5vw, 1.5rem);
  color: var(--mute);
  white-space: nowrap;
}

.speaker-view__counter-sep {
  opacity: 0.5;
}

.speaker-view__current-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.6vw, 1.5rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  flex: 1;
  /* JS flattens any <br> in slide titles to spaces before populating this
   * element, so the title reads as one inline line in the speaker view. */
}

.speaker-view__timer {
  font-family: var(--font-mono);
  font-size: clamp(1.125rem, 1.6vw, 1.625rem);
  color: var(--signal);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Speaker intro slot: auto-derived "you are here" cue. Shows the slide's
 * eyebrow (section context) and the slide title in a more prominent
 * setting than the top bar, so the presenter can orient by reading the
 * intro slot without looking up at the main share. Notes below carry the
 * read-aloud content. Hidden when the active slide has neither eyebrow
 * nor title (rare). */
.speaker-view__intro {
  display: block;
  padding: 0.75rem clamp(1rem, 2vw, 1.75rem) 1rem;
  background: color-mix(in srgb, var(--signal) 6%, var(--paper));
  border-bottom: 1px solid color-mix(in srgb, var(--signal) 25%, var(--rule));
}

.speaker-view__intro[hidden] {
  display: none;
}

.speaker-view__intro-body p {
  margin: 0;
}

.speaker-view__intro-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 0 0 0.25rem !important;
}

.speaker-view__intro-title {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.3;
  color: var(--ink);
  font-weight: 600;
  margin: 0 !important;
}

/* Notes body: bigger than default editorial body so the presenter can read
 * it at glance distance from a second monitor. Operator-asked bump 2026-05-24. */
.speaker-view__notes {
  padding: 1.5rem clamp(1rem, 2vw, 1.75rem);
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.85vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
  overflow-y: auto;
}

.speaker-view__notes ul {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.5rem;
}

.speaker-view__notes li {
  margin: 0 0 0.4rem;
}

/* Trailing site-reference paragraph: a visual divider + dim italic so
 * the operator can decide easily whether to read it or skip, audience
 * depending. Applied wherever a slide's notes end with a routing-link
 * back into the site (e.g. "longer treatment at /concepts/foo/").
 *
 * Uses currentColor + opacity so the same rule works visibly against
 * both light backgrounds (speaker-view notes panel) and dark
 * backgrounds (the inline .slide__notes overlay that `n` toggles). */
.speaker-view__notes .site-ref,
.slide__notes-body .site-ref {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed currentColor;
  font-size: 0.85em;
  font-style: italic;
  opacity: 0.75;
}

.speaker-view__notes .site-ref::before,
.slide__notes-body .site-ref::before {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.7em;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--signal);
  content: "Refs  ";
  margin-right: 0.4rem;
  opacity: 1.3;
}

.speaker-view__notes p {
  margin: 0 0 0.75rem;
}

.speaker-view__notes p:last-child {
  margin-bottom: 0;
}

.speaker-view__empty {
  color: var(--mute);
  font-style: italic;
}

.speaker-view__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem clamp(1rem, 2vw, 1.75rem) 1rem;
  border-top: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 95%, var(--ink) 5%);
}

.speaker-view__next {
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 1vw, 1rem);
  color: var(--mute);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.speaker-view__next-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 0.5rem;
  color: var(--signal);
}

.speaker-view__next-title {
  color: var(--ink);
}

.speaker-view__nav {
  display: inline-flex;
  gap: 0.25rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 0.25rem;
}

.slideshow__nav-button--text {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding-left: 0.6rem;
  padding-right: 0.6rem;
  letter-spacing: 0.05em;
}

/* -------- Print stylesheet -------- */
@media print {
  /* Each slide a full page. Notes visible at bottom. Site chrome gone. */
  .site-header,
  .site-footer,
  .slideshow__chrome,
  .slideshow__help,
  .skip {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .slideshow,
  .slideshow__deck {
    display: block;
    background: white;
  }

  .slide {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    min-height: auto;
    page-break-after: always;
    break-after: page;
    padding: 1.5cm;
    box-sizing: border-box;
    position: relative;
    background: white;
    color: black;
  }

  .slide[hidden] {
    display: flex !important;
  }

  .slide:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* Down-scale display type for A4. */
  .slide__title--xl {
    font-size: 2.5rem;
  }

  .slide__claim,
  .slide__title--transition {
    font-size: 2rem;
  }

  .slide__title {
    font-size: 1.5rem;
  }

  .slide__stat-figure {
    font-size: 2.5rem;
  }

  .slide__body,
  .slide__list-item {
    font-size: 0.95rem;
  }

  .slide__quote {
    font-size: 1.25rem;
  }

  /* Notes always visible on print, in italic at slide foot. */
  .slide__notes {
    display: block !important;
    position: static;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0 0;
    background: white;
    color: black;
    border-top: 1px solid #ccc;
    border-radius: 0;
    box-shadow: none;
    font-family: var(--font-body);
    font-style: italic;
    font-size: 0.8125rem;
    padding: 0.5rem 0;
  }

  .slide__notes-label {
    color: #666;
  }

  .slide__notes-body {
    color: black;
  }

  /* Transition slide inverse on print = avoid solid black backgrounds
   * (wastes ink + invisible text on B&W printer). Flip to outlined. */
  .slide--transition,
  .slide--inverse {
    background: white;
    color: black;
    border: 2px solid black;
  }

  .slide--transition .slide__title--transition,
  .slide--transition .slide__body--transition,
  .slide--inverse .slide__title,
  .slide--inverse .slide__claim,
  .slide--inverse .slide__subtitle,
  .slide--inverse .slide__body {
    color: black;
  }

  .slide--transition .slide__act,
  .slide--inverse .slide__eyebrow {
    color: #c14a3a;
  }

  /* Show every slide's diagram at print-friendly size. */
  .slide__diagram svg,
  .slide__diagram figure {
    max-height: 50vh;
  }
}

/* -------- Small-viewport fallbacks -------- */
@media (max-width: 40rem) {
  .slide {
    padding: 2rem 1.25rem;
  }

  .slide__inner {
    gap: 1rem;
  }

  .slideshow__hint {
    display: none;
  }

  .slide__stats {
    flex-direction: column;
    align-items: center;
  }
}

/* -------- Reduced motion -------- */
@media (prefers-reduced-motion: reduce) {
  .slideshow__progress-bar {
    transition: none;
  }
}

/* -------- Suppress heading-anchor copy-link icons on slides --------
 * The site adds a hover-revealed copy-link icon to every h1/h2/h3 under
 * /rcf-methodology/ and /blog/. On a presentation deck this is noise:
 * the hover state would surface a stray icon on every slide title.
 * Hide them inside .slideshow but keep their accessibility (screen
 * readers can still reach them via the static a.heading-anchor).
 */
.slideshow .heading-anchor {
  display: none;
}
