@font-face {
  font-family: 'Inter';
  src: url('pix/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('pix/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('pix/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('pix/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg-primary: #0a1628;
  --bg-secondary: #0f1f3a;
  --accent: #f59e0b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e3a5f;

  --font-display: 'Instrument Serif', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --rail-width: 88px;
  --content-max: 65ch;

  color-scheme: dark;
  font-feature-settings:
    'tnum' 1,
    'cv11' 1,
    'ss01' 1;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

html,
body {
  background: var(--bg-primary);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

#essay {
  min-height: 100dvh;
}

/* progress bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  z-index: 50;
  pointer-events: none;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* chapter rail */
.chapter-rail {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 40;
  padding: 1.25rem 0.75rem;
  pointer-events: none;
}

.chapter-rail-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: auto;
}

.chapter-rail-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  transition:
    color 200ms ease,
    background-color 200ms ease;
}

.chapter-rail-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
  transition:
    opacity 200ms ease,
    transform 200ms ease;
}

.chapter-rail-label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition:
    opacity 200ms ease,
    transform 200ms ease;
  max-width: 0;
  overflow: hidden;
}

.chapter-rail:hover .chapter-rail-label,
.chapter-rail:focus-within .chapter-rail-label {
  opacity: 1;
  transform: translateX(0);
  max-width: 240px;
}

.chapter-rail-link.is-active {
  color: var(--accent);
}

.chapter-rail-link.is-active .chapter-rail-dot {
  opacity: 1;
  transform: scale(1.4);
}

.chapter-rail-link:hover {
  color: var(--text);
}

@media (max-width: 1024px) {
  .chapter-rail {
    display: none;
  }
}

/* chapter article */
.chapter {
  position: relative;
}

/* hero */
.hero {
  position: relative;
  height: 68vh;
  min-height: 480px;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--bg-secondary);
}

.chapter:first-of-type .hero {
  height: 86vh;
  min-height: 600px;
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.92;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 0.15) 0%,
    rgba(10, 22, 40, 0.05) 35%,
    rgba(10, 22, 40, 0.55) 70%,
    rgba(10, 22, 40, 0.92) 100%
  );
  pointer-events: none;
}

.hero--no-photo::after {
  background: radial-gradient(
    ellipse at center,
    rgba(15, 31, 58, 0.85) 0%,
    rgba(10, 22, 40, 1) 70%
  );
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 0 calc(var(--rail-width) + 1rem) 4vh;
  max-width: 1400px;
  width: 100%;
  text-align: left;
}

@media (max-width: 1024px) {
  .hero-overlay {
    padding: 0 1.5rem 4vh;
  }
}

.hero-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--text);
  max-width: 18ch;
  text-wrap: balance;
}

.hero-cue {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
  animation: cue-bob 2.4s ease-in-out infinite;
}

.chapter:not(:first-of-type) .hero-cue {
  display: none;
}

@keyframes cue-bob {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(6px);
    opacity: 1;
  }
}

/* narration */
.narration {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 3rem 1.5rem 1.5rem;
  font-size: 1.1rem;
  color: var(--text);
}

.narration p {
  margin-bottom: 1.1rem;
}

.narration p:first-of-type::first-letter {
  font-family: var(--font-display);
  float: left;
  font-size: 3.4rem;
  line-height: 0.85;
  padding: 0.25rem 0.5rem 0 0;
  color: var(--accent);
  font-weight: 400;
}

.narration strong {
  color: var(--text);
  font-weight: 600;
}

.pull-quote {
  display: block;
  margin: 2.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.25;
  color: var(--text);
  font-style: italic;
  text-wrap: balance;
  quotes: '\201C' '\201D';
}

.pull-quote::before {
  content: open-quote;
  color: var(--accent);
  font-weight: 600;
  margin-right: 0.1em;
}

.pull-quote::after {
  content: close-quote;
  color: var(--accent);
  font-weight: 600;
  margin-left: 0.1em;
}

.narration em {
  color: var(--text);
  font-style: italic;
}

/* infographic embed between narration and signature */
.infographic {
  max-width: 1100px;
  width: calc(100% - 2rem);
  margin: 1rem auto 1.5rem;
  padding: 0;
}

.infographic-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
}

/* signature placeholder */
.signature-placeholder {
  max-width: 720px;
  margin: 1.5rem auto 4rem;
  padding: 2rem 1.5rem;
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.signature-placeholder-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.signature-placeholder-module {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text);
}

/* signature interactives */
.signature {
  max-width: 920px;
  margin: 2rem auto 4.5rem;
  padding: 2rem clamp(1rem, 3.5vw, 2rem);
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.sig-header {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sig-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}

.sig-lede {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  line-height: 1.4;
  color: var(--text);
  max-width: 60ch;
  text-wrap: balance;
}

.sig-lede em {
  color: var(--accent);
  font-style: italic;
}

.sig-mini-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-stage {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.75rem;
  align-items: center;
}

.sig-grid,
.sig-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.sig-grid-svg {
  width: 180px;
  height: 180px;
}

.sig-grid-qubit {
  fill: var(--accent);
  opacity: 0.85;
}

.sig-grid-count {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sig-chart-svg {
  width: 100%;
  height: auto;
  font-family: var(--font-mono);
}

.sig-chart-grid {
  stroke: var(--border);
  stroke-width: 0.6;
}

.sig-chart-tickmark {
  stroke: var(--border);
  stroke-width: 1;
}

.sig-chart-tick {
  font-size: 11px;
  fill: var(--text-muted);
}

.sig-chart-axis-label {
  font-size: 10px;
  fill: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sig-chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linejoin: round;
  opacity: 0.85;
}

.sig-chart-dot {
  fill: var(--text-muted);
  transition: r 220ms ease;
}

.sig-chart-dot.is-active {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.55));
}

.sig-chart-note {
  font-size: 10px;
  fill: var(--text-muted);
  letter-spacing: 0.06em;
}

.sig-chart-readout {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.sig-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.sig-control-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-segmented {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}

.sig-segmented [role='radio'] {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.sig-segmented [role='radio']:hover {
  color: var(--text);
}

.sig-segmented [role='radio']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sig-segmented [role='radio'][aria-checked='true'] {
  background: var(--accent);
  color: var(--bg-primary);
  font-weight: 600;
}

.sig-caption {
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.sig-caption-numbers {
  font-family: var(--font-mono);
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sig-caption-insight strong {
  color: var(--accent);
  font-weight: 500;
}

@media (max-width: 720px) {
  .sig-stage {
    grid-template-columns: 1fr;
  }
  .sig-grid-svg {
    width: 160px;
    height: 160px;
  }
}

/* chapter 2: planck wave to quanta */
.sig-planck-stage {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.sig-planck-svg {
  display: block;
  width: 100%;
  height: auto;
}

.sig-planck-wave {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  transition: opacity 400ms ease;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.3));
}

.sig-planck-axis {
  stroke: var(--border);
  stroke-width: 1;
}

.sig-planck-quantum {
  fill: var(--accent);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 380ms ease,
    transform 380ms ease;
}

.sig-planck-quantum.is-shown {
  opacity: 0.92;
  transform: translateY(0);
}

.sig-planck-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sig-planck-control button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}

.sig-planck-quantize {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}

.sig-planck-h {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sig-planck-h-value {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* chapter 3: photoelectric effect */
.sig-photon-stage {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.sig-photon-svg {
  display: block;
  width: 100%;
  height: auto;
}

.sig-photon-metal {
  stroke: var(--text);
  stroke-width: 4;
  stroke-linecap: round;
}

.sig-photon-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
  letter-spacing: 0.18em;
}

.sig-photon-readout {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.sig-photon-control {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: center;
}

.sig-photon-slider {
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}

.sig-photon-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--accent);
}

.sig-photon-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--accent);
}

.sig-photon-current {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* chapter 4: Bohr orbital jumps */
.sig-bohr-stage {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
}

.sig-bohr-svg {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 540px;
}

.sig-bohr-shell {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
  stroke-dasharray: 3 5;
}

.sig-bohr-shell-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
}

.sig-bohr-nucleus {
  fill: var(--accent);
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.55));
}

.sig-bohr-electron {
  fill: var(--text);
  filter: drop-shadow(0 0 6px rgba(248, 250, 252, 0.45));
  transition:
    cx 600ms cubic-bezier(0.5, -0.2, 0.5, 1.2),
    cy 600ms cubic-bezier(0.5, -0.2, 0.5, 1.2);
}

.sig-bohr-photon {
  fill: transparent;
  pointer-events: none;
}

.sig-bohr-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.sig-bohr-control [role='radio'] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}

.sig-bohr-control [role='radio'][aria-checked='true'] {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

/* chapter 5: wave-particle duality */
.sig-duality-stage {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.sig-duality-svg {
  display: block;
  width: 100%;
  height: auto;
}

.sig-duality-source {
  fill: var(--accent);
}

.sig-duality-barrier,
.sig-duality-barrier-mid {
  fill: var(--text);
  opacity: 0.85;
}

.sig-duality-screen {
  stroke: var(--text-muted);
  stroke-width: 2;
}

.sig-duality-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
  letter-spacing: 0.18em;
}

.sig-duality-beam {
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 4;
  opacity: 0.5;
}

.sig-duality-arc {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1;
  opacity: 0.18;
}

.sig-duality-control {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.sig-duality-control [role='radio'] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}

.sig-duality-control [role='radio'][aria-checked='true'] {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

/* chapter 10: GPU vs quantum workload */
.sig-vs-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.sig-vs-control [role='radio'] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
}

.sig-vs-control [role='radio'][aria-checked='true'] {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

.sig-vs-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
}

.sig-vs-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition:
    border-color 200ms ease,
    transform 200ms ease;
}

.sig-vs-card[data-winner='true'] {
  border-color: var(--accent);
  transform: scale(1.02);
}

.sig-vs-speed {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  color: var(--text);
  line-height: 1.1;
}

.sig-vs-card[data-winner='true'] .sig-vs-speed {
  color: var(--accent);
}

.sig-vs-verdict {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sig-vs-divider {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 720px) {
  .sig-vs-stage {
    grid-template-columns: 1fr;
  }
  .sig-vs-divider {
    justify-content: center;
  }
}

/* chapter 12: timeline close */
.sig-close-timeline {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.4rem;
  position: relative;
}

.sig-close-timeline::before {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  top: 64%;
  height: 2px;
  background: var(--border);
  z-index: 0;
}

.sig-close-timeline [role='radio'] {
  appearance: none;
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.4rem 0;
  position: relative;
  z-index: 1;
}

.sig-close-year {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.sig-close-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--text-muted);
  transition: all 200ms ease;
}

.sig-close-who {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.sig-close-timeline [role='radio'][aria-checked='true'] .sig-close-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.55);
}

.sig-close-timeline [role='radio'][aria-checked='true'] .sig-close-who {
  color: var(--accent);
}

.sig-close-timeline [role='radio']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.sig-close-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sig-close-card-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.sig-close-card-year {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sig-close-card-who {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 400;
  color: var(--text);
}

.sig-close-card-formula {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  font-style: italic;
}

.sig-close-card-what {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-close-card-why {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

@media (max-width: 720px) {
  .sig-close-timeline {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
  .sig-close-timeline::before {
    display: none;
  }
}

/* chapter 6: probability cloud collapse */
.sig-cloud-stage {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 0.5rem;
}

.sig-cloud-svg {
  display: block;
  width: 100%;
  height: auto;
  cursor: crosshair;
}

.sig-cloud-curve {
  fill: url(#sig-cloud-grad);
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
  opacity: 0.85;
}

.sig-cloud-axis,
.sig-cloud-strip-base {
  stroke: var(--border);
  stroke-width: 1;
}

.sig-cloud-axis-label {
  font-family: var(--font-mono);
  font-size: 11px;
  fill: var(--text-muted);
  letter-spacing: 0.08em;
}

.sig-cloud-dot {
  fill: var(--text);
  opacity: 0.85;
}

.sig-cloud-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.sig-cloud-control button {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.sig-cloud-control button:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.sig-cloud-control button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sig-cloud-measure {
  background: var(--accent) !important;
  color: var(--bg-primary) !important;
  border-color: var(--accent) !important;
  font-weight: 600;
}

.sig-cloud-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.sig-cloud-counter dt {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-cloud-counter dd {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* chapter 7: entangled qubit pair */
.sig-spooky-stage {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.sig-spooky-qubit {
  appearance: none;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  color: inherit;
  border-radius: 12px;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    transform 200ms ease;
}

.sig-spooky-qubit:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.sig-spooky-qubit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sig-spooky-qubit:disabled {
  cursor: default;
}

.sig-spooky-mini-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.sig-spooky-circle {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(245, 158, 11, 0.25) 0%,
    rgba(245, 158, 11, 0.08) 50%,
    rgba(245, 158, 11, 0) 80%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  animation: spooky-pulse 2.4s ease-in-out infinite;
}

@keyframes spooky-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.45);
    border-color: var(--accent);
  }
  50% {
    box-shadow: 0 0 24px 4px rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.7);
  }
}

.sig-spooky-circle.is-measured {
  animation: none;
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 18px 2px rgba(245, 158, 11, 0.3);
}

.sig-spooky-state {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: var(--accent);
  line-height: 1;
}

.sig-spooky-circle.is-measured .sig-spooky-state {
  font-size: 2.8rem;
}

.sig-spooky-superpos {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.sig-spooky-action {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-spooky-qubit:disabled .sig-spooky-action {
  visibility: hidden;
}

.sig-spooky-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 220px;
  max-width: 100%;
}

.sig-spooky-link svg {
  width: 100%;
  height: 60px;
  overflow: visible;
}

.sig-spooky-link-line {
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 4 6;
  fill: none;
  opacity: 0.55;
}

.sig-spooky-stage.is-measured .sig-spooky-link-line {
  stroke-dasharray: none;
  opacity: 0.85;
}

.sig-spooky-link-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-spooky-stats {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.sig-spooky-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.sig-spooky-stat dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-spooky-stat dd {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.sig-spooky-reset {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease;
}

.sig-spooky-reset:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.sig-spooky-reset:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .sig-spooky-stage {
    grid-template-columns: 1fr;
  }
  .sig-spooky-link svg {
    transform: rotate(90deg);
    height: 40px;
  }
}

/* chapter 8: qubit scale slider */
.sig-qubit {
  align-items: stretch;
}

.sig-qubit-readout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 0;
}

.sig-qubit-mini-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-qubit-states {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -0.01em;
  transition: color 200ms ease;
}

.sig-qubit[data-crossed='true'] .sig-qubit-states {
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.45));
}

.sig-qubit-context {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.sig-qubit-control {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 0.5rem;
}

.sig-qubit-slider {
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  outline: none;
}

.sig-qubit-slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--accent);
}

.sig-qubit-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: grab;
  border: 3px solid var(--bg-secondary);
  box-shadow: 0 0 0 1px var(--accent);
}

.sig-qubit-slider:focus-visible::-webkit-slider-thumb {
  box-shadow:
    0 0 0 1px var(--accent),
    0 0 0 4px rgba(245, 158, 11, 0.3);
}

.sig-qubit-control-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-qubit-current {
  color: var(--accent);
  font-weight: 600;
}

.sig-qubit-bar {
  position: relative;
  height: 78px;
  margin: 0.75rem 0 0.25rem;
}

.sig-qubit-bar-track {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
}

.sig-qubit-bar-fill {
  position: absolute;
  top: 28px;
  left: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: width 120ms ease-out;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.sig-qubit-bar-needle {
  position: absolute;
  top: 22px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 2px var(--accent);
  transition: left 120ms ease-out;
}

.sig-qubit-bar-marks {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sig-qubit-bar-marks li {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

.sig-qubit-tick {
  display: block;
  width: 2px;
  height: 14px;
  background: var(--text-muted);
  margin-top: 22px;
  opacity: 0.7;
}

.sig-qubit-tick-label {
  position: absolute;
  top: 0;
  font-size: 0.7rem;
  color: var(--text);
}

.sig-qubit-tick-desc {
  position: absolute;
  top: 60px;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 720px) {
  .sig-qubit-tick-desc {
    display: none;
  }
}

/* chapter 11: industry HNDL exposure picker */
.sig-sowhat-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
}

.sig-sowhat-control [role='radio'] {
  appearance: none;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    border-color 160ms ease;
}

.sig-sowhat-control [role='radio']:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.sig-sowhat-control [role='radio']:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.sig-sowhat-control [role='radio'][aria-checked='true'] {
  background: var(--accent);
  color: var(--bg-primary);
  border-color: var(--accent);
  font-weight: 600;
}

.sig-sowhat-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sig-sowhat-card[data-urgency='critical'] {
  border-left-color: #ef4444;
}
.sig-sowhat-card[data-urgency='high'] {
  border-left-color: var(--accent);
}
.sig-sowhat-card[data-urgency='medium'] {
  border-left-color: #94a3b8;
}

.sig-sowhat-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.sig-sowhat-card-name {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.005em;
}

.sig-sowhat-urgency {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-weight: 600;
}

.sig-sowhat-urgency[data-urgency='critical'] {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.sig-sowhat-urgency[data-urgency='high'] {
  color: var(--accent);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.sig-sowhat-urgency[data-urgency='medium'] {
  color: var(--text-muted);
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.sig-sowhat-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 0;
}

.sig-sowhat-meta div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sig-sowhat-meta dt {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.sig-sowhat-meta dd {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.sig-sowhat-classes h4,
.sig-sowhat-reco h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.sig-sowhat-classes ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 1.5rem;
  padding: 0;
  margin: 0;
}

.sig-sowhat-classes li {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  padding-left: 1rem;
  position: relative;
}

.sig-sowhat-classes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.sig-sowhat-reco p {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

@media (max-width: 720px) {
  .sig-sowhat-meta,
  .sig-sowhat-classes ul {
    grid-template-columns: 1fr;
  }
}

/* chapter 1: self-erasing equation */
.sig-bug {
  --progress: 0;
}

.sig-bug-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2.5rem 1.5rem;
  background:
    radial-gradient(ellipse at center, rgba(15, 31, 58, 0.4) 0%, rgba(10, 22, 40, 0.7) 100%),
    repeating-linear-gradient(
      45deg,
      rgba(148, 163, 184, 0.025) 0,
      rgba(148, 163, 184, 0.025) 2px,
      transparent 2px,
      transparent 6px
    );
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sig-bug-board {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.sig-bug-line {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1.5rem;
}

.sig-bug-eq {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.2vw, 2.6rem);
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  font-style: italic;
}

.sig-bug-strike {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.sig-bug-strike line {
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--progress));
  opacity: clamp(0, calc(var(--progress) * 4), 1);
  filter: drop-shadow(0 0 3px rgba(220, 38, 38, 0.4));
}

.sig-bug-scrawl {
  align-self: flex-end;
  margin-top: -0.5rem;
  margin-right: -0.5rem;
}

.sig-bug-infinity {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: #ef4444;
  letter-spacing: 0.06em;
  font-weight: 600;
  transform: rotate(-8deg) scale(calc(0.4 + var(--progress) * 0.6));
  opacity: clamp(0, calc((var(--progress) - 0.45) * 2.5), 1);
  transform-origin: left center;
  filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.45));
}

/* mobile chapter nav */
.mobile-nav {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-nav {
    display: block;
  }
}

.mobile-nav-badge {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 60;
  appearance: none;
  background: rgba(15, 31, 58, 0.92);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.65rem 0.95rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  font-variant-numeric: tabular-nums;
}

.mobile-nav-current {
  color: var(--accent);
  font-weight: 600;
}

.mobile-nav-divider {
  color: var(--text-muted);
  opacity: 0.6;
}

.mobile-nav-total {
  color: var(--text-muted);
}

.mobile-nav-sheet {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(10, 22, 40, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.mobile-nav-sheet.is-open {
  opacity: 1;
  visibility: visible;
}

.mobile-nav-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.mobile-nav-close {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
}

.mobile-nav-close:hover {
  background: var(--bg-secondary);
}

.mobile-nav-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  margin: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
}

.mobile-nav-list a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  transition: background 160ms ease;
}

.mobile-nav-list a:hover,
.mobile-nav-list a:active {
  background: var(--bg-secondary);
}

.mobile-nav-list a.is-active {
  color: var(--accent);
}

.mobile-nav-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
}

.mobile-nav-list a.is-active .mobile-nav-num {
  color: var(--accent);
}

.mobile-nav-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.2;
}

/* essay meta + footer */
.essay-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.essay-footer {
  max-width: 920px;
  margin: 3rem auto 5rem;
  padding: 2.5rem 1.5rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
  color: var(--text-muted);
}

.essay-footer-section h3 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.essay-footer-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
}

.essay-footer-section li {
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.55;
  padding-left: 1rem;
  position: relative;
  color: var(--text);
}

.essay-footer-section li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 5px;
  height: 5px;
  background: var(--text-muted);
  border-radius: 50%;
  opacity: 0.6;
}

.essay-footer-meta {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.essay-footer-meta p {
  color: var(--text-muted);
  margin: 0;
}

.essay-footer a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 158, 11, 0.4);
  transition: border-color 160ms ease;
}

.essay-footer a:hover {
  border-bottom-color: var(--accent);
}

.essay-footer code {
  font-family: var(--font-mono);
  background: var(--bg-secondary);
  padding: 0.1rem 0.35rem;
  border-radius: 3px;
  font-size: 0.85rem;
  border: 1px solid var(--border);
}

/* a11y: visually hidden + skip link */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -200px;
  left: 0.5rem;
  z-index: 100;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: top 200ms ease;
}

.skip-link:focus {
  top: 0.5rem;
}

/* print stylesheet */
@media print {
  :root {
    color-scheme: light;
  }
  html,
  body {
    background: white !important;
    color: #111 !important;
    font-size: 11pt;
    line-height: 1.55;
  }
  .progress-bar,
  .chapter-rail,
  .signature,
  .hero-cue,
  .skip-link {
    display: none !important;
  }
  .chapter {
    page-break-after: always;
    break-after: page;
  }
  .hero {
    height: auto !important;
    min-height: auto !important;
    padding: 0 0 0.5in;
    background: none !important;
    display: block;
  }
  .hero::after {
    display: none !important;
  }
  .hero-photo {
    position: relative !important;
    max-height: 3.6in !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    opacity: 1 !important;
  }
  .hero-overlay {
    padding: 0 !important;
    color: #111 !important;
    text-align: left;
  }
  .hero-num {
    color: #555 !important;
  }
  .hero-title {
    color: #111 !important;
    font-size: 28pt !important;
    margin-top: 0.25in;
  }
  .narration {
    max-width: 5.5in !important;
    padding: 0 !important;
    color: #111 !important;
    margin: 0 !important;
    font-size: 11pt !important;
  }
  .narration p:first-of-type::first-letter {
    color: #111 !important;
    font-size: 30pt !important;
  }
  .narration strong,
  .narration em {
    color: #111 !important;
  }
  .infographic {
    max-width: 5.5in !important;
    margin: 0.25in 0 !important;
    page-break-inside: avoid;
  }
  .infographic-img {
    border: 1px solid #ccc !important;
    background: white !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
