/* ═══════════════════════════════════════════════════════════════════════════
   XIRTUX UNIX SYSTEM — Overhead Projector Transparency Deck
   Stylesheet: analog projection environment, acetate sheets, xerox typography
   
   This file creates the illusion of a 1970s overhead projector presentation.
   Every effect is designed to feel physical: acetate, toner, dust, bulb light.
   No vaporwave. No terminal green. No cyberpunk. Just warm projector light
   on a beige wall in a windowless municipal computing lab.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Custom Properties: Analog Palette ─────────────────────────────────── */
:root {
  /* Projector light */
  --projector-bulb: #f4d77a;
  --hot-center: #fff4c7;
  --bulb-warmth: #f2c94c;
  
  /* Acetate / transparency sheet */
  --acetate-clear: rgba(255, 252, 226, 0.72);
  --acetate-base: #f5f0db;
  --aged-acetate: #eee5bd;
  
  /* Paper / wall */
  --paper-beige: #d8cfad;
  --wall-warm: #c8bfa0;
  
  /* Grays — machine, institutional */
  --machine-gray: #77766d;
  --cold-gray: #5c5b54;
  --deep-gray: #2b2b27;
  
  /* Xerox blacks */
  --xerox-black: #11110e;
  --faded-black: #292820;
  --toner-dark: #1a1a15;
  
  /* Accents (used sparingly) */
  --rubber-stamp-red: #7b1f14;
  --annotation-yellow: #ffe27a;
  --dust-white: rgba(255, 255, 230, 0.55);
  --lens-flare: rgba(255, 248, 200, 0.12);
  
  /* Typography */
  --font-typewriter: "Courier Prime", "Courier New", "Prestige Elite", "IBM Plex Mono", "Courier", monospace;
  --font-label: "Letter Gothic", "Orator", "Courier Prime", "Courier New", monospace;
  --font-code: "Courier Prime", "Courier New", "IBM Plex Mono", "Courier", monospace;
  
  /* Spacing & layout */
  --slide-padding: clamp(2rem, 5vw, 4rem);
  --slide-width: min(52rem, 92vw);
  --slide-ratio: 1.33; /* roughly 4:3 overhead projector ratio */
  
  /* Timing */
  --transition-slide: 0.8s;
  --transition-focus: 0.6s;
  --transition-lamp: 0.4s;
}

/* ─── @font-face Placeholders ───────────────────────────────────────────── */
/* Replace these with self-hosted or licensed fonts.
   Prestige Elite, Courier Prime, Letter Gothic, and Orator are recommended
   for authentic typewriter/office document feel.
   
   IBM Plex Mono may be used as fallback but should be further distressed
   through CSS effects since it is too clean for primary emotional typography. */

@font-face {
  font-family: "Courier Prime";
  src: local("Courier Prime"), local("CourierPrime");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: local("Courier Prime Bold"), local("CourierPrime-Bold");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Courier Prime";
  src: local("Courier Prime Italic"), local("CourierPrime-Italic");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Prestige Elite";
  src: local("Prestige Elite"), local("PrestigeElite");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Letter Gothic";
  src: local("Letter Gothic"), local("LetterGothic");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Orator";
  src: local("Orator"), local("OratorStd");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ─── Reset & Base ──────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  font-family: var(--font-typewriter);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--xerox-black);
  background: var(--deep-gray);
  /* The dark room behind the projector */
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Subtle text rendering that feels like printed matter */
  text-rendering: optimizeLegibility;
}

/* ─── Projector Stage ───────────────────────────────────────────────────── */
.projector-stage {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background-color: var(--deep-gray);
  /* Dark room surrounding the projection wall */
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(244, 215, 122, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.4) 0%, transparent 50%);
}

/* ─── Projection Canvas (Three.js overlay) ─────────────────────────────── */
#projection-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 20;
  pointer-events: none;
  /* Blend with the HTML content beneath */
  mix-blend-mode: multiply;
  opacity: 0.85;
}

/* ─── CSS Fallback Projection Effects ───────────────────────────────────── */
/* Active when WebGL is unavailable. Simulates projector atmosphere. */
.projection-fallback {
  position: fixed;
  inset: 0;
  z-index: 19;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s;
  background:
    /* Vignette */
    radial-gradient(ellipse at 50% 45%, transparent 55%, rgba(17, 17, 14, 0.5) 100%),
    /* Warm center hotspot */
    radial-gradient(ellipse at 50% 42%, var(--lens-flare) 0%, transparent 55%),
    /* Subtle fresnel rings approximation via repeating gradient */
    repeating-radial-gradient(circle at 50% 42%, transparent 0, transparent 2.8px, rgba(244,215,122,0.03) 2.8px, rgba(244,215,122,0.03) 3px),
    repeating-radial-gradient(circle at 50% 42%, transparent 0, transparent 6px, rgba(244,215,122,0.02) 6px, rgba(244,215,122,0.02) 6.2px),
    /* Top heat shimmer gradient */
    linear-gradient(to bottom, rgba(255,248,210,0.08) 0%, transparent 15%),
    /* Edge blur approximation */
    radial-gradient(ellipse at 50% 42%, transparent 60%, rgba(43,43,39,0.3) 100%);
  filter: blur(0px);
}

.projection-fallback.active {
  opacity: 1;
}

/* ─── Transparency Deck ─────────────────────────────────────────────────── */
.transparency-deck {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  /* Keystone distortion — subtle perspective tilt */
  transform: perspective(1400px) rotateX(1.2deg);
  transform-origin: 50% 0%;
  /* Warm light wash over the entire deck */
  box-shadow: inset 0 0 200px rgba(244, 215, 122, 0.04);
}

@media (prefers-reduced-motion: reduce) {
  .transparency-deck {
    scroll-behavior: auto;
  }
}

/* ─── Individual Transparency Slide ──────────────────────────────────────── */
.transparency {
  position: relative;
  width: var(--slide-width);
  min-height: 88vh;
  margin: 6vh auto;
  padding: var(--slide-padding);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  
  /* Acetate sheet base */
  background: var(--acetate-clear);
  background-image:
    /* Subtle paper fiber */
    linear-gradient(0deg, transparent 0%, rgba(255,252,226,0.15) 50%, transparent 100%),
    /* Warm vertical gradient (projector light through acetate) */
    linear-gradient(180deg, rgba(255,248,210,0.3) 0%, rgba(255,252,226,0.15) 30%, rgba(238,229,189,0.2) 70%, rgba(216,207,173,0.1) 100%);
  
  /* Acetate sheet shadow / thickness illusion */
  box-shadow:
    0 2px 12px rgba(0,0,0,0.25),
    0 8px 30px rgba(0,0,0,0.15),
    0 1px 3px rgba(255,252,226,0.3) inset;
  
  /* Slight transparency sheet border */
  border: 1px solid rgba(200, 190, 160, 0.4);
  outline: 1px solid rgba(180, 170, 140, 0.2);
  outline-offset: 3px;
  
  /* Slide frame registration marks */
  transition:
    filter var(--transition-focus) ease-out,
    opacity var(--transition-slide) ease-out,
    transform var(--transition-slide) ease-out;
}

/* Registration marks (corner ticks for alignment on projector bed) */
.transparency::before {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background:
    /* Top-left corner mark */
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) 8px 8px / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) 8px 8px / 1px 14px no-repeat,
    /* Top-right corner mark */
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) calc(100% - 22px) 8px / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) calc(100% - 8px) 8px / 1px 14px no-repeat,
    /* Bottom-left corner mark */
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) 8px calc(100% - 8px) / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) 8px calc(100% - 22px) / 1px 14px no-repeat,
    /* Bottom-right corner mark */
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) calc(100% - 22px) calc(100% - 8px) / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) calc(100% - 8px) calc(100% - 22px) / 1px 14px no-repeat;
}

/* Acetate grain, dust specks, fine scratches */
.transparency::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  /* Toner grain / photocopy noise via layered gradients */
  background-image:
    /* Dust specks — scattered bright and dark points */
    radial-gradient(0.4px 0.4px at 12% 8%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 23% 14%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 35% 22%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 48% 7%, rgba(0,0,0,0.15) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 56% 18%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 67% 11%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 78% 25%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 88% 9%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 15% 45%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 31% 38%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 44% 52%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 59% 41%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 72% 55%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 83% 48%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 92% 35%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 8% 72%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 27% 68%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 38% 78%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 53% 72%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 64% 82%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 76% 68%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 87% 75%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 19% 90%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 42% 88%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 61% 92%, rgba(0,0,0,0.2) 50%, transparent 50%),
    /* Fine scratches — horizontal lines */
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(200,190,160,0.08) 40px, rgba(200,190,160,0.08) 40.3px),
    /* Another scratch layer at different spacing */
    repeating-linear-gradient(0deg, transparent, transparent 127px, rgba(180,170,140,0.05) 127px, rgba(180,170,140,0.05) 127.2px),
    /* Overall photocopy noise wash */
    linear-gradient(25deg, transparent 30%, rgba(180,170,140,0.06) 50%, transparent 70%),
    linear-gradient(-15deg, rgba(200,190,160,0.04) 20%, transparent 55%, rgba(200,190,160,0.04) 80%);
}

/* ─── Slide States ──────────────────────────────────────────────────────── */
/* Slide entering focus */
.transparency.entering {
  filter: blur(3px) brightness(1.3);
  opacity: 0.6;
}

/* Slide in focus (intersecting) */
.transparency.in-focus {
  filter: blur(0px) brightness(1.05);
  opacity: 1;
}

/* Slide leaving focus */
.transparency.leaving {
  filter: blur(2px) brightness(0.85);
  opacity: 0.7;
}

/* ─── Xerox / Toner Effect ──────────────────────────────────────────────── */
/* Simulates photocopier degradation: toner bleed, slight blur, reduced contrast */
.xerox {
  /* Toner bleed — directional smearing like a copier drum */
  text-shadow:
    0.6px 0 0 rgba(17, 17, 14, 0.18),
    -0.4px 0 0 rgba(17, 17, 14, 0.12),
    0 0.4px 0 rgba(17, 17, 14, 0.1),
    0 -0.3px 0 rgba(17, 17, 14, 0.08);
  /* Reduced contrast — photocopies flatten the tonal range */
  filter: contrast(0.92) brightness(0.96);
}

/* Heavier xerox for diagrams and code */
.xerox-heavy {
  text-shadow:
    0.8px 0 0 rgba(17, 17, 14, 0.22),
    -0.6px 0 0 rgba(17, 17, 14, 0.15),
    0 0.5px 0 rgba(17, 17, 14, 0.12),
    0 -0.4px 0 rgba(17, 17, 14, 0.1);
  filter: contrast(0.88) brightness(0.94) blur(0.2px);
}

/* ─── Typewriter Typography ─────────────────────────────────────────────── */
.typed {
  font-family: var(--font-typewriter);
  font-variant-ligatures: none;
  letter-spacing: 0.02em;
  /* Slight irregular baseline through subtle transform variation
     — real typewriters don't strike perfectly */
}

/* Typewriter heading — uppercase, like typed slide titles */
.typed-heading {
  font-family: var(--font-typewriter);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  word-spacing: 0.15em;
  font-variant-ligatures: none;
}

/* Simulate double-strike bold (common on typewriters) */
.typed-double-strike {
  text-shadow: 0.3px 0 0 currentColor;
}

/* Typewriter body — slightly imperfect spacing */
.typed-body {
  font-family: var(--font-typewriter);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: 0.015em;
  font-variant-ligatures: none;
  /* Simulate slight ribbon ink variation */
  color: var(--toner-dark);
}

/* ─── Rubric / Institutional Labels ──────────────────────────────────────── */
.rubric {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--machine-gray);
  font-variant-ligatures: none;
}

.rubric-dark {
  color: var(--faded-black);
}

.rubric-stamp {
  color: var(--rubber-stamp-red);
  font-weight: 700;
}

/* ─── Diagram Styling ───────────────────────────────────────────────────── */
.diagram {
  position: relative;
  font-family: var(--font-label);
}

.diagram-box {
  border: 1.2px solid var(--faded-black);
  background: rgba(255, 252, 226, 0.45);
  padding: 0.5rem 0.8rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--xerox-black);
  /* Slight misregistration — boxes are never perfectly square */
  transform: rotate(-0.15deg);
}

.diagram-box:nth-child(even) {
  transform: rotate(0.1deg);
}

.diagram-line {
  stroke: var(--faded-black);
  stroke-width: 1;
  fill: none;
  stroke-dasharray: none;
}

/* SVG diagram container */
.diagram-svg {
  width: 100%;
  max-width: 100%;
  height: auto;
  filter: contrast(0.9) brightness(0.96);
}

/* SVG filter for hand-drawn roughness */
.diagram-rough {
  filter: url(#svg-rough) contrast(0.9);
}

/* ─── Code / Command Display ─────────────────────────────────────────────── */
.command-block {
  font-family: var(--font-code);
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--xerox-black);
  background: rgba(255, 252, 226, 0.35);
  border-left: 2px solid var(--machine-gray);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  white-space: pre-wrap;
  word-break: break-all;
  /* Toner grain on code */
  position: relative;
}

.command-block::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.5) 2px, rgba(0,0,0,0.5) 2.2px);
  mix-blend-mode: multiply;
}

.command-prompt {
  color: var(--faded-black);
  font-weight: 700;
}

.command-output {
  color: var(--machine-gray);
}

/* ─── Technical Table (Compatibility Matrix) ────────────────────────────── */
.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-typewriter);
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--xerox-black);
}

.tech-table th {
  font-family: var(--font-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--faded-black);
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 2px solid var(--faded-black);
  border-top: 1px solid var(--machine-gray);
}

.tech-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid rgba(119, 118, 109, 0.35);
}

.tech-table tr:nth-child(even) td {
  background: rgba(255, 252, 226, 0.15);
}

.tech-table .status-stable {
  color: var(--faded-black);
}

.tech-table .status-experimental {
  color: var(--machine-gray);
  font-style: italic;
}

.tech-table .status-planned {
  color: var(--cold-gray);
  font-style: italic;
}

/* ─── Title Slide Specific ──────────────────────────────────────────────── */
.transparency-title {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

.slide-title-main {
  font-family: var(--font-typewriter);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.1;
  color: var(--xerox-black);
  /* Typed impression */
  text-shadow:
    0.5px 0 0 rgba(0,0,0,0.25),
    0 0.5px 0 rgba(0,0,0,0.15);
}

.slide-title-sub {
  font-family: var(--font-typewriter);
  font-size: clamp(0.8rem, 1.5vw, 1rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.04em;
  color: var(--faded-black);
  margin-top: 0.8rem;
  max-width: 28rem;
}

.slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: center;
  margin-top: 2.5rem;
  font-family: var(--font-label);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
}

.slide-meta dt {
  font-weight: 700;
  color: var(--faded-black);
  margin-bottom: 0.15rem;
}

.slide-meta dd {
  margin: 0;
}

/* ─── Section Headings ──────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--machine-gray);
  margin-bottom: 0.3rem;
  display: block;
}

.section-heading {
  font-family: var(--font-typewriter);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--xerox-black);
  margin-bottom: 1.2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--faded-black);
}

/* ─── Engineering Bullets ───────────────────────────────────────────────── */
.engineering-list {
  list-style: none;
  counter-reset: eng-item;
  padding: 0;
}

.engineering-list li {
  counter-increment: eng-item;
  position: relative;
  padding-left: 2.2rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-typewriter);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--xerox-black);
}

.engineering-list li::before {
  content: counter(eng-item) ".";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--faded-black);
  font-family: var(--font-typewriter);
}

/* ─── Download CTAs (typed labels / stamp boxes) ────────────────────────── */
.download-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
}

.cta-stamp {
  display: inline-block;
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--xerox-black);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--faded-black);
  background: rgba(255, 252, 226, 0.4);
  position: relative;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  /* Slight misregistration */
  transform: rotate(-0.2deg);
}

.cta-stamp:nth-child(even) {
  transform: rotate(0.15deg);
}

.cta-stamp:hover,
.cta-stamp:focus-visible {
  background: rgba(244, 215, 122, 0.3);
  box-shadow: 0 0 0 2px rgba(244, 215, 122, 0.4);
  outline: none;
}

.cta-stamp:focus-visible {
  outline: 2px solid var(--rubber-stamp-red);
  outline-offset: 2px;
}

/* Rubber stamp style CTA */
.cta-stamp-red {
  border-color: var(--rubber-stamp-red);
  color: var(--rubber-stamp-red);
  text-shadow: 0.4px 0 0 rgba(123, 31, 20, 0.3);
}

/* ─── Institutional Footnote ────────────────────────────────────────────── */
.institutional-note {
  font-family: var(--font-label);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
  border-top: 1px solid rgba(119, 118, 109, 0.3);
  padding-top: 0.6rem;
  margin-top: 1.5rem;
}

/* ─── Closing Statement ─────────────────────────────────────────────────── */
.closing-statement {
  font-family: var(--font-typewriter);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--xerox-black);
  text-align: center;
  /* Strong typed impression */
  text-shadow:
    0.6px 0 0 rgba(0,0,0,0.3),
    0 0.6px 0 rgba(0,0,0,0.2);
}

/* ─── Slide Number / Footer ─────────────────────────────────────────────── */
.slide-footer {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
}

.slide-header-label {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
}

.slide-header-revision {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-family: var(--font-label);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
}

/* ─── Slide Indicator (corner navigation) ───────────────────────────────── */
.slide-indicator {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 30;
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--machine-gray);
  letter-spacing: 0.05em;
  background: rgba(43, 43, 39, 0.8);
  padding: 0.3rem 0.6rem;
  border: 1px solid rgba(119, 118, 109, 0.3);
}

.slide-current {
  color: var(--dust-white);
  font-weight: 700;
}

.slide-separator {
  margin: 0 0.2rem;
  opacity: 0.5;
}

/* ─── Projector Status Bar ──────────────────────────────────────────────── */
.projector-status {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 30;
  font-family: var(--font-label);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--machine-gray);
  opacity: 0.7;
  display: flex;
  gap: 1rem;
}

/* ─── Handwritten Annotations ───────────────────────────────────────────── */
/* Grease pencil / marker on acetate — used sparingly */
.annotation-marker {
  position: absolute;
  z-index: 5;
  font-family: "Segoe Script", "Comic Sans MS", cursive; /* fallback handwriting */
  font-size: 0.7rem;
  color: var(--annotation-yellow);
  opacity: 0.55;
  transform: rotate(-3deg);
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(0,0,0,0.3);
  /* Simulate marker bleed on acetate */
  filter: blur(0.3px);
}

.annotation-marker-2 {
  color: rgba(255, 100, 80, 0.5);
  transform: rotate(2deg);
  font-size: 0.6rem;
}

/* ─── Divider Lines ─────────────────────────────────────────────────────── */
.rule-line {
  border: none;
  border-top: 1px solid var(--faded-black);
  opacity: 0.5;
  margin: 1rem 0;
  width: 100%;
}

.rule-line-thin {
  border-top-width: 0.5px;
  opacity: 0.35;
}

.rule-line-double {
  border-top: 1px solid var(--faded-black);
  border-bottom: 0.5px solid var(--machine-gray);
  height: 3px;
  opacity: 0.45;
}

/* ─── Tape / Mount Marks ────────────────────────────────────────────────── */
/* Simulates yellowed tape holding the acetate to a mount */
.tape-mark {
  position: absolute;
  width: 22px;
  height: 18px;
  background: rgba(244, 215, 122, 0.2);
  border: 0.5px solid rgba(200, 180, 130, 0.3);
  z-index: 3;
  pointer-events: none;
}

.tape-mark-tl { top: -5px; left: 10px; transform: rotate(-2deg); }
.tape-mark-tr { top: -4px; right: 12px; transform: rotate(1.5deg); }
.tape-mark-bl { bottom: -4px; left: 14px; transform: rotate(1deg); }
.tape-mark-br { bottom: -5px; right: 10px; transform: rotate(-1.5deg); }

/* ─── Projector Dust (CSS-only fallback) ─────────────────────────────────── */
.projector-dust {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
  opacity: 0.4;
}

.dust-particle {
  position: absolute;
  border-radius: 50%;
  background: var(--dust-white);
  animation: dustFloat 12s linear infinite;
}

.dust-particle:nth-child(1) { width: 2px; height: 2px; top: 15%; left: 30%; animation-delay: 0s; animation-duration: 14s; }
.dust-particle:nth-child(2) { width: 1.5px; height: 1.5px; top: 22%; left: 55%; animation-delay: -3s; animation-duration: 11s; }
.dust-particle:nth-child(3) { width: 2.5px; height: 2.5px; top: 10%; left: 42%; animation-delay: -7s; animation-duration: 13s; }
.dust-particle:nth-child(4) { width: 1px; height: 1px; top: 28%; left: 65%; animation-delay: -2s; animation-duration: 10s; }
.dust-particle:nth-child(5) { width: 2px; height: 2px; top: 18%; left: 38%; animation-delay: -5s; animation-duration: 15s; }
.dust-particle:nth-child(6) { width: 3px; height: 3px; top: 8%; left: 48%; animation-delay: -9s; animation-duration: 12s; }
.dust-particle:nth-child(7) { width: 1.5px; height: 1.5px; top: 25%; left: 58%; animation-delay: -4s; animation-duration: 9s; }
.dust-particle:nth-child(8) { width: 2px; height: 2px; top: 12%; left: 35%; animation-delay: -6s; animation-duration: 16s; }
.dust-particle:nth-child(9) { width: 1px; height: 1px; top: 20%; left: 50%; animation-delay: -8s; animation-duration: 10.5s; }
.dust-particle:nth-child(10) { width: 2.5px; height: 2.5px; top: 16%; left: 62%; animation-delay: -1s; animation-duration: 13.5s; }

@keyframes dustFloat {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  5% {
    opacity: 0.7;
  }
  50% {
    transform: translateY(-30px) translateX(8px) scale(1.2);
    opacity: 0.5;
  }
  95% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(-60px) translateX(-4px) scale(0.8);
    opacity: 0;
  }
}

/* ─── Heat Shimmer (CSS-only approximation) ──────────────────────────────── */
/* Subtle animated gradient at top of viewport to simulate heat from bulb */
.heat-shimmer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 30vh;
  z-index: 17;
  pointer-events: none;
  opacity: 0.15;
  background: linear-gradient(to bottom, rgba(255,248,200,0.3), transparent);
  animation: heatPulse 5s ease-in-out infinite;
}

@keyframes heatPulse {
  0%, 100% { opacity: 0.12; }
  50% { opacity: 0.18; }
}

/* ─── Bulb Flicker (CSS approximation) ───────────────────────────────────── */
.bulb-flicker {
  animation: bulbFlicker 8s ease-in-out infinite;
}

@keyframes bulbFlicker {
  0%, 100% { opacity: 1; }
  2% { opacity: 0.97; }
  4% { opacity: 1; }
  48% { opacity: 0.985; }
  50% { opacity: 1; }
  72% { opacity: 0.975; }
  74% { opacity: 1; }
}

/* ─── Accessibility ──────────────────────────────────────────────────────── */
/* Skip link for keyboard users */
.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 100;
  font-family: var(--font-label);
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--xerox-black);
  background: var(--paper-beige);
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--faded-black);
  transition: top 0.2s;
}

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

/* Focus visible styles */
:focus-visible {
  outline: 2px solid var(--rubber-stamp-red);
  outline-offset: 3px;
}

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

/* ─── Responsive Design ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --slide-padding: 1.5rem;
    --slide-width: 95vw;
  }
  
  .transparency {
    min-height: 75vh;
    margin: 3vh auto;
  }
  
  .transparency-deck {
    transform: perspective(1800px) rotateX(0.5deg);
  }
  
  .slide-meta {
    gap: 0.8rem 1.5rem;
    font-size: 0.55rem;
  }
  
  .slide-title-main {
    font-size: clamp(1.5rem, 6vw, 2.5rem);
  }
  
  .section-heading {
    font-size: 1rem;
  }
  
  .tech-table {
    font-size: 0.65rem;
  }
  
  .tech-table th,
  .tech-table td {
    padding: 0.3rem 0.4rem;
  }
  
  .command-block {
    font-size: 0.7rem;
    padding: 0.7rem 0.9rem;
  }
  
  .slide-indicator {
    bottom: 0.8rem;
    left: 0.8rem;
    font-size: 0.65rem;
  }
  
  .projector-status {
    bottom: 0.8rem;
    right: 0.8rem;
    font-size: 0.5rem;
  }
  
  .download-cta-group {
    gap: 0.6rem;
  }
  
  .cta-stamp {
    font-size: 0.65rem;
    padding: 0.4rem 0.7rem;
  }
  
  .closing-statement {
    font-size: clamp(1.2rem, 5vw, 2rem);
  }
}

@media (max-width: 480px) {
  :root {
    --slide-padding: 1rem;
  }
  
  .transparency {
    min-height: 65vh;
    margin: 2vh auto;
  }
  
  .slide-meta {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
  }
  
  .transparency-deck {
    transform: none; /* Remove perspective on very small screens */
  }
  
  .slide-header-label,
  .slide-header-revision {
    font-size: 0.5rem;
  }
  
  .annotation-marker {
    display: none; /* Hide annotations on very small screens */
  }
}

/* ─── Print Styles ──────────────────────────────────────────────────────── */
@media print {
  body {
    background: white;
    color: black;
  }
  
  .projector-stage {
    background: white;
  }
  
  .transparency {
    box-shadow: none;
    border: 1px solid #ccc;
    page-break-after: always;
    background: white;
  }
  
  .transparency::before,
  .transparency::after {
    display: none;
  }
  
  #projection-canvas,
  .projection-fallback,
  .projector-dust,
  .heat-shimmer,
  .slide-indicator,
  .projector-status {
    display: none !important;
  }
  
  .transparency-deck {
    transform: none;
    overflow: visible;
    height: auto;
  }
}

/* ─── Reduced Motion ────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .transparency {
    transition: none !important;
  }
  
  .dust-particle {
    animation: none !important;
  }
  
  .heat-shimmer {
    animation: none !important;
  }
  
  .bulb-flicker {
    animation: none !important;
  }
  
  .transparency-deck {
    scroll-behavior: auto;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HYPEREXTENSION: Link styles, page navigation, table of contents,
   single-page transparency mode, and cross-reference styling.
   Every element is a potential hypertext link — styled to feel like
   typed cross-references in an engineering document, not web links.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Base Link Reset ──────────────────────────────────────────────────── */
/* Links inherit text color. No blue. No modern underlines. */
a {
  color: inherit;
  text-decoration: none;
  /* Subtle underline like a typewriter underscore or See Also reference */
  border-bottom: 0.5px solid rgba(119, 118, 109, 0.45);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

a:hover,
a:focus-visible {
  border-bottom-color: var(--faded-black);
  background: rgba(244, 215, 122, 0.18);
  outline: none;
}

a:focus-visible {
  outline: 1.5px solid var(--rubber-stamp-red);
  outline-offset: 3px;
}

/* Links inside rubric/metadata — lighter treatment */
.rubric a,
.slide-meta a,
.slide-header-label a,
.slide-header-revision a,
.slide-footer a {
  border-bottom-color: rgba(119, 118, 109, 0.3);
}

.rubric a:hover,
.slide-meta a:hover {
  border-bottom-color: var(--machine-gray);
  background: rgba(244, 215, 122, 0.12);
}

/* ─── Page Container (single-transparency pages) ───────────────────────── */
.page-container {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  /* Keystone distortion */
  transform: perspective(1400px) rotateX(1.2deg);
  transform-origin: 50% 0%;
}

@media (max-width: 480px) {
  .page-container {
    transform: none;
    padding: 1rem 0.5rem;
  }
}

/* ─── Single Transparency (page mode, not deck) ────────────────────────── */
.transparency-page {
  width: min(44rem, 94vw);
  min-height: auto;
  margin: 0 auto;
  padding: var(--slide-padding);
  scroll-snap-align: none;
  position: relative;
  background: var(--acetate-clear);
  background-image:
    linear-gradient(0deg, transparent 0%, rgba(255,252,226,0.15) 50%, transparent 100%),
    linear-gradient(180deg, rgba(255,248,210,0.3) 0%, rgba(255,252,226,0.15) 30%, rgba(238,229,189,0.2) 70%, rgba(216,207,173,0.1) 100%);
  box-shadow:
    0 2px 12px rgba(0,0,0,0.25),
    0 8px 30px rgba(0,0,0,0.15),
    0 1px 3px rgba(255,252,226,0.3) inset;
  border: 1px solid rgba(200, 190, 160, 0.4);
  outline: 1px solid rgba(180, 170, 140, 0.2);
  outline-offset: 3px;
}

/* Page transparency pseudo-elements (same as deck .transparency) */
.transparency-page::before {
  content: '';
  position: absolute;
  inset: 6px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  background:
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) 8px 8px / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) 8px 8px / 1px 14px no-repeat,
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) calc(100% - 22px) 8px / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) calc(100% - 8px) 8px / 1px 14px no-repeat,
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) 8px calc(100% - 8px) / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) 8px calc(100% - 22px) / 1px 14px no-repeat,
    linear-gradient(to right, var(--faded-black) 1px, transparent 1px) calc(100% - 22px) calc(100% - 8px) / 14px 1px no-repeat,
    linear-gradient(to bottom, var(--faded-black) 1px, transparent 1px) calc(100% - 8px) calc(100% - 22px) / 1px 14px no-repeat;
}

.transparency-page::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.55;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(0.4px 0.4px at 12% 8%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 23% 14%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 35% 22%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 48% 7%, rgba(0,0,0,0.15) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 56% 18%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 67% 11%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 78% 25%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 88% 9%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 15% 45%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 31% 38%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 44% 52%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 59% 41%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 72% 55%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 83% 48%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 92% 35%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 8% 72%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 27% 68%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 38% 78%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 53% 72%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 64% 82%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 76% 68%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 87% 75%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 19% 90%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 42% 88%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 61% 92%, rgba(0,0,0,0.2) 50%, transparent 50%),
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(200,190,160,0.08) 40px, rgba(200,190,160,0.08) 40.3px),
    repeating-linear-gradient(0deg, transparent, transparent 127px, rgba(180,170,140,0.05) 127px, rgba(180,170,140,0.05) 127.2px),
    linear-gradient(25deg, transparent 30%, rgba(180,170,140,0.06) 50%, transparent 70%),
    linear-gradient(-15deg, rgba(200,190,160,0.04) 20%, transparent 55%, rgba(200,190,160,0.04) 80%);
}

/* ─── Page-Load Focus Settle ───────────────────────────────────────────── */
/* When a page first loads, the transparency starts blurred/overbright
   then settles into focus — like an acetate being placed on the bed. */
.transparency-page.page-entering {
  filter: blur(3px) brightness(1.3);
  opacity: 0.5;
  transition: filter 0.7s ease-out, opacity 0.7s ease-out, brightness 0.7s ease-out;
}

.transparency-page.page-settled {
  filter: blur(0px) brightness(1.04);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .transparency-page.page-entering {
    filter: none;
    opacity: 1;
    transition: none;
  }
}

/* ─── Page Navigation (prev / toc / next) ──────────────────────────────── */
.page-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(119, 118, 109, 0.35);
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-label);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faded-black);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding: 0.2rem 0;
  transition: border-color 0.2s, color 0.2s;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--xerox-black);
  border-bottom-color: var(--faded-black);
  background: transparent;
  outline: none;
}

.nav-link:focus-visible {
  outline: 1.5px solid var(--rubber-stamp-red);
  outline-offset: 3px;
}

.nav-link-current {
  color: var(--machine-gray);
  pointer-events: none;
  border-bottom: none;
}

.nav-separator {
  color: var(--machine-gray);
  opacity: 0.4;
  font-family: var(--font-label);
  font-size: 0.6rem;
}

/* ─── Table of Contents ────────────────────────────────────────────────── */
.toc-heading {
  font-family: var(--font-typewriter);
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--xerox-black);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--faded-black);
}

.toc-section-label {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--machine-gray);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  display: block;
}

.toc-section-label:first-of-type {
  margin-top: 0;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 0.15rem;
}

.toc-link {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--xerox-black);
  text-decoration: none;
  border-bottom: 0.5px dotted rgba(119, 118, 109, 0.25);
  padding: 0.35rem 0.3rem;
  transition: background 0.15s, border-color 0.15s;
}

.toc-link:hover,
.toc-link:focus-visible {
  background: rgba(244, 215, 122, 0.2);
  border-bottom-color: var(--faded-black);
  outline: none;
}

.toc-link:focus-visible {
  outline: 1.5px solid var(--rubber-stamp-red);
  outline-offset: 2px;
}

.toc-number {
  font-family: var(--font-label);
  font-size: 0.6rem;
  color: var(--machine-gray);
  min-width: 2.5rem;
  flex-shrink: 0;
}

.toc-description {
  font-family: var(--font-label);
  font-size: 0.6rem;
  color: var(--machine-gray);
  margin-left: auto;
  opacity: 0.7;
  white-space: nowrap;
}

/* ─── TOC Metadata Section ─────────────────────────────────────────────── */
.toc-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 0.4rem 1.5rem;
  margin-top: 0.5rem;
}

.toc-meta-item {
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  color: var(--xerox-black);
  padding: 0.3rem 0;
}

.toc-meta-item a {
  display: flex;
  gap: 0.5rem;
}

.toc-meta-key {
  font-family: var(--font-label);
  font-size: 0.6rem;
  text-transform: uppercase;
  color: var(--machine-gray);
  min-width: 5rem;
}

/* ─── Cross-Reference ("See Also") Block ───────────────────────────────── */
.see-also {
  margin-top: 1.5rem;
  padding-top: 0.8rem;
  border-top: 0.5px solid rgba(119, 118, 109, 0.3);
}

.see-also-label {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--machine-gray);
  margin-bottom: 0.4rem;
  display: block;
}

.see-also-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 1.2rem;
}

.see-also-list li {
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
}

.see-also-list a {
  border-bottom: 0.5px dotted rgba(119, 118, 109, 0.35);
}

/* ─── Breadcrumb Trail ─────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 0.5px solid rgba(119, 118, 109, 0.25);
}

.breadcrumb a,
.breadcrumb span {
  font-family: var(--font-label);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--machine-gray);
}

.breadcrumb a {
  border-bottom: 0.5px dotted rgba(119, 118, 109, 0.3);
}

.breadcrumb a:hover {
  color: var(--faded-black);
  border-bottom-color: var(--faded-black);
}

.breadcrumb-sep {
  opacity: 0.4;
  margin: 0 0.1rem;
}

.breadcrumb-current {
  color: var(--faded-black) !important;
  font-weight: 700;
}

/* ─── Inline Code Reference Links ──────────────────────────────────────── */
/* man page references like make(1), xsys(8) */
.man-ref {
  font-family: var(--font-code);
  font-size: 0.85em;
  font-weight: 700;
  white-space: nowrap;
}

.man-ref a {
  border-bottom: 0.5px dotted rgba(119, 118, 109, 0.4);
}

/* ─── Definition List (for metadata pages) ─────────────────────────────── */
.def-list {
  margin: 1rem 0;
}

.def-list dt {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faded-black);
  margin-top: 1rem;
  margin-bottom: 0.15rem;
}

.def-list dt:first-child {
  margin-top: 0;
}

.def-list dd {
  font-family: var(--font-typewriter);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--xerox-black);
  margin-left: 0;
  padding-left: 0;
}

/* ─── Changelog / Revision List ────────────────────────────────────────── */
.revision-list {
  list-style: none;
  padding: 0;
}

.revision-item {
  display: flex;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 0.5px solid rgba(119, 118, 109, 0.2);
  font-family: var(--font-typewriter);
  font-size: 0.8rem;
  line-height: 1.5;
}

.revision-version {
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--faded-black);
  min-width: 5rem;
  flex-shrink: 0;
}

.revision-date {
  font-family: var(--font-label);
  font-size: 0.6rem;
  color: var(--machine-gray);
  min-width: 6rem;
  flex-shrink: 0;
}

.revision-notes {
  color: var(--xerox-black);
}

/* ─── License Block ────────────────────────────────────────────────────── */
.license-block {
  font-family: var(--font-typewriter);
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--xerox-black);
  white-space: pre-line;
  background: rgba(255, 252, 226, 0.3);
  padding: 1rem 1.2rem;
  border: 0.5px solid rgba(119, 118, 109, 0.3);
}

/* ─── Clickable Diagram Components ─────────────────────────────────────── */
/* Make SVG diagram boxes clickable */
.diagram-svg a rect {
  cursor: pointer;
  transition: fill 0.15s;
}

.diagram-svg a:hover rect {
  fill: rgba(244, 215, 122, 0.4) !important;
  stroke-width: 1.8;
}

.diagram-svg a:focus-visible rect {
  outline: none;
  stroke: var(--rubber-stamp-red) !important;
  stroke-width: 2;
}

/* ─── Responsive: Page Mode ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .transparency-page {
    padding: 1.5rem;
    width: 96vw;
  }

  .page-navigation {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .toc-meta-grid {
    grid-template-columns: 1fr;
  }

  .revision-item {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (max-width: 480px) {
  .transparency-page {
    padding: 1rem;
  }

  .toc-link {
    font-size: 0.75rem;
    gap: 0.4rem;
  }

  .breadcrumb {
    font-size: 0.5rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPLASH & LOGO: Front-page logo display with photocopy grain overlay.
   TOC STRIP: Horizontal quick-jump navigation inside slide 01.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Splash Slide (first slide with logo) ─────────────────────────────── */
.transparency-splash {
  /* Extra vertical room for the logo */
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  padding-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

/* ─── Logo Container ───────────────────────────────────────────────────── */
.splash-logo {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.2rem;
  max-width: min(420px, 65vw);
  /* Simulate the logo being printed on acetate — warm backing */
  background: radial-gradient(ellipse at center, rgba(255,252,226,0.5) 0%, transparent 70%);
  border-radius: 2px;
  /* Suppress link underline since this is the logo itself */
  border-bottom: none !important;
}

.splash-logo:hover {
  border-bottom: none !important;
  background: radial-gradient(ellipse at center, rgba(255,252,226,0.6) 0%, transparent 70%);
}

.splash-logo:focus-visible {
  outline: 2px solid var(--rubber-stamp-red);
  outline-offset: 4px;
  border-bottom: none !important;
}

/* ─── Logo Image ───────────────────────────────────────────────────────── */
.splash-logo-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  /* Photocopy degradation on the logo itself */
  filter: contrast(0.88) brightness(0.94) saturate(0.3);
  /* Slight misregistration — like a transparency slightly shifted */
  transform: rotate(-0.1deg);
  /* Toner bleed shadow */
  box-shadow:
    0 0 0 1px rgba(17, 17, 14, 0.08),
    0 0 40px rgba(244, 215, 122, 0.15);
  /* Blend with the acetate background */
  mix-blend-mode: multiply;
  opacity: 0.92;
}

/* ─── Logo Grain Overlay ───────────────────────────────────────────────── */
/* Adds photocopy speckle on top of the logo image */
.splash-logo-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(0.5px 0.5px at 15% 12%, rgba(0,0,0,0.4) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 28% 22%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 42% 8%, rgba(0,0,0,0.35) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 55% 18%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 68% 25%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 78% 10%, rgba(0,0,0,0.35) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 88% 22%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 20% 55%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 35% 42%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.6px 0.6px at 52% 48%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 65% 55%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 80% 42%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 90% 52%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 12% 72%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 25% 68%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 40% 78%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 58% 72%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 72% 82%, rgba(0,0,0,0.3) 50%, transparent 50%),
    radial-gradient(0.4px 0.4px at 85% 68%, rgba(0,0,0,0.25) 50%, transparent 50%),
    radial-gradient(0.3px 0.3px at 32% 88%, rgba(0,0,0,0.2) 50%, transparent 50%),
    radial-gradient(0.5px 0.5px at 55% 90%, rgba(0,0,0,0.3) 50%, transparent 50%),
    /* Horizontal scan lines like a photocopier */
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,0.03) 3px, rgba(0,0,0,0.03) 3.3px);
}

/* ─── TOC Strip (quick-jump navigation inside splash slide) ────────────── */
.toc-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
  padding: 0.5rem 0.8rem;
  border-top: 0.5px solid rgba(119, 118, 109, 0.3);
  border-bottom: 0.5px solid rgba(119, 118, 109, 0.3);
}

.toc-strip-label {
  font-family: var(--font-label);
  font-size: 0.55rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--machine-gray);
  margin-right: 0.3rem;
}

.toc-strip-link {
  font-family: var(--font-typewriter);
  font-size: 0.7rem;
  color: var(--faded-black);
  text-decoration: none;
  border-bottom: 0.5px dotted rgba(119, 118, 109, 0.4);
  transition: border-color 0.15s, background 0.15s;
  padding: 0 0.1rem;
  white-space: nowrap;
}

.toc-strip-link:hover,
.toc-strip-link:focus-visible {
  border-bottom-color: var(--faded-black);
  background: rgba(244, 215, 122, 0.2);
  outline: none;
}

.toc-strip-sep {
  color: var(--machine-gray);
  opacity: 0.35;
  font-size: 0.55rem;
  pointer-events: none;
}

/* ─── Responsive: Splash & Logo ────────────────────────────────────────── */
@media (max-width: 768px) {
  .splash-logo {
    max-width: min(280px, 55vw);
  }

  .toc-strip {
    gap: 0.2rem 0.3rem;
    padding: 0.4rem 0.5rem;
  }

  .toc-strip-link {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .splash-logo {
    max-width: min(200px, 50vw);
  }

  .splash-logo-img {
    filter: contrast(0.9) brightness(0.95) saturate(0.3);
  }

  .toc-strip {
    justify-content: flex-start;
    gap: 0.15rem 0.3rem;
  }
}

/* ─── GSA / FIPS Government Document Header ──────────────────────────────── */
/* Used on the closing slide — renders the ASCII box-drawing header as
   a typewritten government classification stamp on the transparency. */
.gsa-header {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  margin: 0 auto;
}

.gsa-header-box {
  font-family: var(--font-typewriter);
  font-size: 0.55rem;
  line-height: 1.2;
  color: var(--xerox-black);
  text-align: center;
  white-space: pre;
  background: rgba(255, 252, 226, 0.25);
  padding: 0.6rem 0.4rem;
  border: 0.5px solid rgba(119, 118, 109, 0.25);
  /* Toner bleed */
  filter: contrast(0.92) brightness(0.95);
  /* Slight misregistration */
  transform: rotate(-0.08deg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.gsa-header-box a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0.5px solid rgba(119, 118, 109, 0.5);
}

.gsa-header-box a:hover {
  border-bottom-color: var(--faded-black);
  background: rgba(244, 215, 122, 0.18);
}

@media (max-width: 768px) {
  .gsa-header-box {
    font-size: 0.4rem;
    padding: 0.4rem 0.2rem;
  }
}

@media (max-width: 480px) {
  .gsa-header-box {
    font-size: 0.32rem;
    padding: 0.3rem 0.1rem;
  }
}
