/* ============================================
   Kraken Brand Tokens
   ============================================ */
:root {
  --bg: #100030;
  --bg-card: #180048;
  --bg-card-glass: rgba(24, 0, 72, 0.6);
  --accent-magenta: #F050F8;
  --accent-cyan: #60F0F8;
  --accent-purple: #5840FF;
  --text: #F0FFFF;
  --text-muted: rgba(240, 255, 255, 0.6);
  --text-dim: rgba(240, 255, 255, 0.35);
  --border-glass: rgba(240, 255, 255, 0.1);
  --border-glow: rgba(240, 80, 248, 0.3);
  --font: 'Plus Jakarta Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --slide-transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Status colours */
  --red: #FF4D6A;
  --amber: #FFB84D;
  --green: #4DFF91;
  --blue: #4DA6FF;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Presentation Container
   ============================================ */
.presentation {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-magenta), var(--accent-cyan));
  transition: width 0.4s ease;
  z-index: 100;
}

/* ============================================
   Persistent Nav Logo (top-left, hidden on slide 1)
   ============================================ */
.nav-logo {
  position: fixed;
  top: 18px;
  left: 28px;
  height: 28px;
  width: auto;
  z-index: 90;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  cursor: pointer;
}

.nav-logo:hover {
  opacity: 0.8;
}

.nav-logo.hidden {
  opacity: 0;
}

/* ============================================
   Slide Counter
   ============================================ */
.slide-counter {
  position: fixed;
  bottom: 24px;
  right: 32px;
  font-size: 14px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  z-index: 90;
  letter-spacing: 0.5px;
}

/* ============================================
   Controls Hint
   ============================================ */
.controls-hint {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 90;
  opacity: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.controls-hint.hide {
  opacity: 0;
}

.controls-hint .hint-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}

.controls-hint .hint-keys {
  display: flex;
  gap: 6px;
}

.controls-hint .key {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(240, 255, 255, 0.06);
  border: 1px solid rgba(240, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dim);
  animation: key-bob 2s ease-in-out infinite;
}

.controls-hint .key:nth-child(1) { animation-delay: 0s; }
.controls-hint .key:nth-child(2) { animation-delay: 0.15s; }

@keyframes key-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* ============================================
   Slides
   ============================================ */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
  overflow-y: auto;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Background gradient orbs */
.slide::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(240, 80, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.slide::after {
  content: '';
  position: absolute;
  bottom: -15%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(96, 240, 248, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.slide > * {
  position: relative;
  z-index: 1;
}

/* ============================================
   Appendix Slides — Distinct Visual Style
   ============================================ */
.slide.appendix {
  background: #0A0824;
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple)) 1;
}

.slide.appendix::before {
  background: radial-gradient(circle, rgba(96, 240, 248, 0.08) 0%, transparent 70%);
}

.slide.appendix::after {
  background: radial-gradient(circle, rgba(88, 64, 255, 0.06) 0%, transparent 70%);
}

.slide.appendix h2 {
  font-size: 32px;
  text-shadow: 0 0 30px rgba(96, 240, 248, 0.15);
}

.slide.appendix .glass-card:hover {
  border-color: rgba(96, 240, 248, 0.3);
  box-shadow: 0 0 30px rgba(96, 240, 248, 0.08);
}

.slide.appendix .hypothesis-table th,
.slide.appendix .comms-table th {
  background: rgba(96, 240, 248, 0.1);
  color: var(--accent-cyan);
}

/* ============================================
   Back Link (top-right on appendix slides)
   ============================================ */
.back-link {
  position: absolute;
  top: 20px;
  right: 32px;
  font-size: 12px;
  color: var(--text-dim);
  text-decoration: none;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease;
  letter-spacing: 0.5px;
}

.back-link:hover {
  color: var(--accent-cyan);
}

.back-link-bottom {
  position: relative;
  top: auto;
  right: auto;
  display: inline-block;
  margin-top: 24px;
  font-size: 13px;
}

/* ============================================
   Appendix TOC — Contents Page
   ============================================ */
.appendix-toc {
  align-items: center;
  text-align: center;
}

.toc-heading {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 42px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 900px;
}

.toc-grid .toc-card:nth-child(4),
.toc-grid .toc-card:nth-child(5) {
  /* Center the last two cards in their own row */
}

.toc-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  position: relative;
}

.toc-card:hover {
  border-color: rgba(96, 240, 248, 0.4);
  box-shadow: 0 0 24px rgba(96, 240, 248, 0.12);
  transform: translateY(-2px);
}

.toc-card .toc-number {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  display: block;
}

.toc-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.toc-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0;
}

.toc-card .toc-arrow {
  position: absolute;
  top: 24px;
  right: 20px;
  font-size: 18px;
  color: var(--text-dim);
  transition: color 0.2s ease, transform 0.2s ease;
}

.toc-card:hover .toc-arrow {
  color: var(--accent-cyan);
  transform: translateX(3px);
}

/* ============================================
   Staggered Content Reveal
   ============================================ */
.slide .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.slide.active .reveal {
  opacity: 1;
  transform: translateY(0);
}

.slide.active .reveal:nth-child(1) { transition-delay: 0.1s; }
.slide.active .reveal:nth-child(2) { transition-delay: 0.2s; }
.slide.active .reveal:nth-child(3) { transition-delay: 0.3s; }
.slide.active .reveal:nth-child(4) { transition-delay: 0.4s; }
.slide.active .reveal:nth-child(5) { transition-delay: 0.5s; }
.slide.active .reveal:nth-child(6) { transition-delay: 0.6s; }
.slide.active .reveal:nth-child(7) { transition-delay: 0.7s; }
.slide.active .reveal:nth-child(8) { transition-delay: 0.8s; }
.slide.active .reveal:nth-child(9) { transition-delay: 0.9s; }
.slide.active .reveal:nth-child(10) { transition-delay: 1.0s; }

/* ============================================
   Typography
   ============================================ */
.slide-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-magenta);
  margin-bottom: 12px;
}

h1 {
  font-size: 52px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

h1 .accent {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 32px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

p, li {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
}

.subtitle {
  font-size: 22px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.5;
}

.small-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* ============================================
   Title Slide
   ============================================ */
.title-slide {
  text-align: center;
  justify-content: center;
  align-items: center;
}

.title-slide .logo {
  width: 180px;
  margin-bottom: 40px;
}

.title-slide h1 {
  font-size: 48px;
  max-width: 800px;
  margin-bottom: 20px;
}

.title-slide .subtitle {
  font-size: 20px;
  max-width: 600px;
}

.title-meta {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  margin-top: 40px;
  font-size: 15px;
  color: var(--text-muted);
}

.title-meta .divider {
  width: 1px;
  height: 20px;
  background: var(--text-dim);
}

/* ============================================
   Glassmorphic Cards
   ============================================ */
.glass-card {
  background: var(--bg-card-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--border-glow);
  box-shadow: 0 0 30px rgba(240, 80, 248, 0.08);
}

.glass-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

.glass-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Card grid layouts */
.card-grid {
  display: grid;
  gap: 20px;
}

.card-grid-2 { grid-template-columns: 1fr 1fr; }
.card-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.card-grid-2x3 { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================
   Status Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.badge-red {
  background: rgba(255, 77, 106, 0.15);
  color: var(--red);
}
.badge-red::before { background: var(--red); }

.badge-amber {
  background: rgba(255, 184, 77, 0.15);
  color: var(--amber);
}
.badge-amber::before { background: var(--amber); }

.badge-green {
  background: rgba(77, 255, 145, 0.15);
  color: var(--green);
}
.badge-green::before { background: var(--green); }

.badge-blue {
  background: rgba(77, 166, 255, 0.15);
  color: var(--blue);
}
.badge-blue::before { background: var(--blue); }

.badge-purple {
  background: rgba(88, 64, 255, 0.15);
  color: var(--accent-purple);
}
.badge-purple::before { background: var(--accent-purple); }

.badge-cyan {
  background: rgba(96, 240, 248, 0.15);
  color: var(--accent-cyan);
}
.badge-cyan::before { background: var(--accent-cyan); }

/* Pulsing badge animation */
.badge-pulse::before {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ============================================
   Bullet Lists
   ============================================ */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bullet-list li {
  padding-left: 28px;
  position: relative;
  font-size: 18px;
  line-height: 1.5;
}

.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-magenta);
}

.bullet-list li:nth-child(even)::before {
  background: var(--accent-cyan);
}

/* Mono-colour bullet lists (no alternating) */
.bullet-list-mono li::before,
.bullet-list-mono li:nth-child(even)::before {
  background: var(--accent-magenta);
}

.bullet-list-amber li::before,
.bullet-list-amber li:nth-child(even)::before {
  background: var(--amber);
}

/* Amber warning card variant */
.glass-card-amber {
  background: rgba(255, 184, 77, 0.06);
  border-color: rgba(255, 184, 77, 0.25);
}

.glass-card-amber:hover {
  border-color: rgba(255, 184, 77, 0.4);
  box-shadow: 0 0 30px rgba(255, 184, 77, 0.1);
}

/* Red alert card variant */
.glass-card-red {
  background: rgba(255, 77, 106, 0.06);
  border-color: rgba(255, 77, 106, 0.25);
}

.glass-card-red:hover {
  border-color: rgba(255, 77, 106, 0.4);
  box-shadow: 0 0 30px rgba(255, 77, 106, 0.1);
}

.bullet-list-red li::before,
.bullet-list-red li:nth-child(even)::before {
  background: var(--red);
}

/* ============================================
   Status List (for Slide 2)
   ============================================ */
.status-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.status-item .label {
  font-size: 16px;
  font-weight: 500;
}

/* ============================================
   Status Bar (horizontal, above cards)
   ============================================ */
.status-bar {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-bottom: 8px;
}

.status-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.status-block-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.3px;
}

/* ============================================
   Data Flow Diagram (Slide 4)
   ============================================ */
.data-flow {
  width: 100%;
  margin: 24px 0;
}

.data-flow svg {
  width: 100%;
  height: auto;
}

/* Pulsing failure point */
@keyframes glow-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(255, 77, 106, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(255, 77, 106, 0.8));
  }
}

.failure-point {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* Hypothesis table */
.hypothesis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  font-size: 14px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.hypothesis-table th {
  text-align: left;
  padding: 12px 14px;
  background: rgba(240, 80, 248, 0.1);
  color: var(--accent-magenta);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-glass);
}

.hypothesis-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.hypothesis-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.hypothesis-table td {
  padding: 14px 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-muted);
  vertical-align: middle;
  line-height: 1.4;
}

.hypothesis-table tr:last-child td { border-bottom: none; }

.hypothesis-table .step-num {
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 16px;
  vertical-align: middle;
}

.hypothesis-table .highlight-row td {
  background: rgba(255, 77, 106, 0.06);
}

/* Owner pills in hypothesis table */
.owner-cell {
  vertical-align: middle;
}

.owner-cell .owner-pill {
  margin: 2px 3px;
}

.owner-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.owner-ue {
  background: rgba(88, 64, 255, 0.12);
  color: var(--accent-purple);
}

.owner-si {
  background: rgba(96, 240, 248, 0.12);
  color: var(--accent-cyan);
}

.owner-kraken {
  background: rgba(240, 80, 248, 0.12);
  color: var(--accent-magenta);
}

/* ============================================
   Hub-Spoke Impact Diagram (Slide 5)
   ============================================ */
/* Impact cascade layout — hub at top, categories below */
.impact-hub {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 8px auto 0;
  position: relative;
}

.hub-center {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 77, 106, 0.2), rgba(255, 77, 106, 0.05));
  border: 2px solid var(--red);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  animation: hub-pulse 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes hub-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 77, 106, 0.2); }
  50% { box-shadow: 0 0 40px rgba(255, 77, 106, 0.4); }
}

.hub-center .hub-number {
  font-size: 26px;
  font-weight: 800;
  color: var(--red);
}

.hub-center .hub-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* SVG curved lines container — positioned between hub and grid */
.spoke-lines {
  width: 1100px;
  height: 90px;
  flex-shrink: 0;
  z-index: 1;
  margin-top: -2px;
}

.spoke-lines path {
  fill: none;
  stroke: rgba(240, 255, 255, 0.12);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

/* Single row of 6 spoke nodes below the curves */
.spoke-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  width: 1100px;
  z-index: 2;
}

.spoke-node {
  text-align: center;
  z-index: 2;
}

.spoke-node .spoke-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  font-size: 18px;
  border: 1px solid var(--border-glass);
  overflow: hidden;
}

.spoke-node .spoke-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.spoke-node .spoke-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
}

.spoke-node .spoke-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
  white-space: nowrap;
}

/* Staggered spoke animation */
.spoke-node {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

.slide.active .spoke-node {
  opacity: 1;
}

.slide.active .spoke-node:nth-child(1) { transition-delay: 0.35s; }
.slide.active .spoke-node:nth-child(2) { transition-delay: 0.5s; }
.slide.active .spoke-node:nth-child(3) { transition-delay: 0.65s; }
.slide.active .spoke-node:nth-child(4) { transition-delay: 0.8s; }
.slide.active .spoke-node:nth-child(5) { transition-delay: 0.95s; }
.slide.active .spoke-node:nth-child(6) { transition-delay: 1.1s; }

/* ============================================
   Phase Timeline (Slide 6)
   ============================================ */
.phase-timeline {
  display: flex;
  gap: 24px;
  align-items: stretch;
  position: relative;
  margin-top: 24px;
}

/* Timeline line — vertically centered through the 16px dots (dot top = 0, center = 8px) */
.phase-timeline::before {
  content: '';
  position: absolute;
  top: 7px;
  left: calc(100% / 6);
  right: calc(100% / 6);
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  z-index: 0;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide.active .phase-timeline::before {
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.phase-card {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Dot row — fixed height so dots always align regardless of "we are here" label */
.phase-dot-wrap {
  height: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  margin-bottom: 16px;
}

.phase-card .phase-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
  z-index: 2;
}

/* "We are here" bouncing label — absolutely positioned above the dot */
.we-are-here {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-cyan);
  letter-spacing: 0.5px;
  white-space: nowrap;
  margin-bottom: 4px;
  animation: we-are-here-bounce 2s ease-in-out infinite;
}

@keyframes we-are-here-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* Contain dot = cyan, Correct & Prevent = darker blue/purple */
.phase-card:nth-child(1) .phase-dot { background: var(--accent-cyan); box-shadow: 0 0 16px rgba(96, 240, 248, 0.5); }
.phase-card:nth-child(2) .phase-dot { background: var(--accent-purple); box-shadow: 0 0 16px rgba(88, 64, 255, 0.5); }
.phase-card:nth-child(3) .phase-dot { background: var(--accent-purple); box-shadow: 0 0 16px rgba(88, 64, 255, 0.5); }

.phase-card .glass-card {
  flex: 1;
}

/* Contain = cyan accent, Correct & Prevent = darker blue accent */
.phase-card:nth-child(1) .glass-card { border-top: 2px solid var(--accent-cyan); }
.phase-card:nth-child(2) .glass-card { border-top: 2px solid var(--accent-purple); }
.phase-card:nth-child(3) .glass-card { border-top: 2px solid var(--accent-purple); }

.phase-card .phase-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.phase-card h3 {
  font-size: 20px;
  margin-bottom: 16px;
}

.phase-card .phase-time {
  font-size: 13px;
  color: var(--accent-purple);
  margin-bottom: 16px;
  font-weight: 500;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(240, 255, 255, 0.06);
}

/* Contain card uses cyan accent for time label */
.phase-card:nth-child(1) .phase-time {
  color: var(--accent-cyan);
}

.phase-card .phase-items {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.phase-card .phase-items li {
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 18px;
  position: relative;
  line-height: 1.4;
}

/* Bullet dots */
.phase-card .phase-items li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-cyan);
}

.phase-card:nth-child(2) .phase-items li::before { background: var(--accent-purple); }
.phase-card:nth-child(3) .phase-items li::before { background: var(--accent-purple); }

/* ============================================
   Communication Table (Slide 7)
   ============================================ */
.comms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
}

.comms-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(240, 80, 248, 0.08);
  color: var(--accent-magenta);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-glass);
}

.comms-table th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.comms-table th:last-child { border-radius: 0 var(--radius-sm) 0 0; }

.comms-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-glass);
  font-size: 15px;
  line-height: 1.4;
  vertical-align: middle;
}

.comms-table tr:last-child td { border-bottom: none; }
.comms-table tr:last-child td:first-child { border-radius: 0 0 0 var(--radius-sm); }
.comms-table tr:last-child td:last-child { border-radius: 0 0 var(--radius-sm) 0; }

.comms-table .audience {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.comms-table .message {
  color: var(--text-muted);
  font-style: italic;
}

.tone-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.tone-calm { background: rgba(77, 255, 145, 0.12); color: var(--green); }
.tone-factual { background: rgba(96, 240, 248, 0.12); color: var(--accent-cyan); }
.tone-collaborative { background: rgba(88, 64, 255, 0.12); color: var(--accent-purple); }
.tone-apologetic { background: rgba(255, 184, 77, 0.12); color: var(--amber); }
.tone-confident { background: rgba(240, 80, 248, 0.12); color: var(--accent-magenta); }

/* ============================================
   Interactive Comms Rows (Slide 7)
   ============================================ */
.comms-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comms-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  border-left: 3px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.comms-row:hover {
  border-color: rgba(240, 255, 255, 0.2);
  border-left-color: rgba(240, 80, 248, 0.4);
  background: rgba(24, 0, 72, 0.8);
}

.comms-row.active {
  border-left-color: var(--accent-magenta);
  background: rgba(240, 80, 248, 0.08);
  box-shadow: 0 0 20px rgba(240, 80, 248, 0.1);
}

.comms-row.active .comms-row-msg {
  color: var(--text-muted);
}

.comms-row-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.comms-row-text strong {
  font-size: 14px;
  color: var(--text);
}

.comms-row-msg {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comms-row .tone-badge {
  flex-shrink: 0;
  font-size: 10px;
}

/* Email Preview Panel (Slide 7 right column) */
.email-preview {
  background: rgba(24, 0, 72, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}

.email-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(240, 255, 255, 0.03);
}

.email-field {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
}

.email-field-label {
  font-weight: 700;
  color: var(--text-dim);
  display: inline-block;
  min-width: 60px;
}

.email-preview .email-body {
  padding: 20px;
}

.email-preview .email-body p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 10px;
}

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

.email-preview .email-body ul {
  margin: 0 0 10px 20px;
}

.email-preview .email-body li {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-muted);
}

.email-preview .email-section-title {
  font-weight: 600;
  color: var(--text);
}

/* ============================================
   AI Reveal Grid (Slide 8)
   ============================================ */
.ai-reveal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.ai-reveal-card {
  text-align: center;
  padding: 24px 20px;
}

img.ai-reveal-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  margin-bottom: 14px;
}

/* ============================================
   AI Cards (Slide 8 — legacy)
   ============================================ */
.ai-cards {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.ai-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai-card .ai-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.ai-card .ai-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.ai-card:nth-child(2) .ai-icon img,
.ai-card:nth-child(3) .ai-icon img {
  width: 44px;
  height: 44px;
}

.ai-card:nth-child(1) .ai-icon { background: rgba(240, 80, 248, 0.15); }
.ai-card:nth-child(2) .ai-icon { background: rgba(96, 240, 248, 0.15); }
.ai-card:nth-child(3) .ai-icon { background: rgba(88, 64, 255, 0.15); }

/* Two-bar time comparison */
.ai-time-visual {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ai-time-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-time-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 48px;
  flex-shrink: 0;
}

.ai-time-manual-label { color: var(--amber); }
.ai-time-ai-label { color: var(--accent-cyan); }

.ai-time-bar {
  flex: 1;
  height: 6px;
  background: rgba(240, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.ai-time-fill-manual {
  height: 100%;
  border-radius: 3px;
  background: var(--amber);
}

.ai-time-fill-ai {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent-cyan), var(--accent-magenta));
}

.ai-time-value {
  font-size: 11px;
  font-weight: 600;
  width: 42px;
  flex-shrink: 0;
  text-align: right;
}

.ai-time-manual-value { color: var(--amber); }
.ai-time-ai-value { color: var(--accent-cyan); }

.ai-card .ai-tag {
  display: none;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   Two Column Layout
   ============================================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.two-col-wide-right {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}

/* ============================================
   Appendix Slides Styling
   ============================================ */
.appendix-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
}

/* Three-party diagram */
.three-party {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.party-card {
  text-align: center;
}

.party-card .party-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.party-card .party-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.party-card .party-owns {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Day-by-day timeline */
.day-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.day-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px;
  gap: 16px;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.day-row .day-label {
  font-weight: 700;
  color: var(--accent-cyan);
}

.day-row .day-action {
  color: var(--text-muted);
}

.day-row .day-owner {
  color: var(--text-dim);
  font-size: 12px;
  text-align: right;
}

/* Regulatory table */
.reg-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 16px;
  font-size: 14px;
}

.reg-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(96, 240, 248, 0.08);
  color: var(--accent-cyan);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border-glass);
}

.reg-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-glass);
  color: var(--text-muted);
  vertical-align: top;
  line-height: 1.4;
}

.reg-table tr:last-child td { border-bottom: none; }

/* Email template block */
.email-template {
  background: rgba(24, 0, 72, 0.8);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.email-template .email-subject {
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-glass);
}

.email-template .email-body p {
  margin-bottom: 12px;
  font-size: 14px;
}

.email-template .email-section-title {
  font-weight: 600;
  color: var(--text);
}

/* Decision tree flowchart */
.decision-tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.tree-node {
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  max-width: 400px;
  width: 100%;
}

.tree-node-start {
  background: rgba(240, 80, 248, 0.15);
  border: 1px solid rgba(240, 80, 248, 0.3);
  color: var(--accent-magenta);
}

.tree-node-decision {
  background: rgba(96, 240, 248, 0.1);
  border: 1px solid rgba(96, 240, 248, 0.2);
  color: var(--accent-cyan);
}

.tree-node-action {
  background: rgba(77, 255, 145, 0.1);
  border: 1px solid rgba(77, 255, 145, 0.2);
  color: var(--green);
}

.tree-arrow {
  font-size: 18px;
  color: var(--text-dim);
}

.tree-branch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  max-width: 500px;
}

.tree-branch-label {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  margin-bottom: 4px;
  font-weight: 600;
}

/* ============================================
   Speaker Notes Panel
   ============================================ */
.speaker-notes {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(16, 0, 48, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-glass);
  padding: 20px 32px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 95;
  max-height: 30vh;
  overflow-y: auto;
}

.speaker-notes.visible {
  transform: translateY(0);
}

.speaker-notes-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-cyan);
  margin-bottom: 8px;
  font-weight: 600;
}

.speaker-notes p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
}

.notes-content {
  display: none;
}

/* ============================================
   Print / PDF Export Button
   ============================================ */
.pdf-btn {
  position: fixed;
  top: 16px;
  right: 24px;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  z-index: 90;
  font-family: var(--font);
  transition: border-color 0.2s, color 0.2s;
}

.pdf-btn:hover {
  border-color: var(--accent-magenta);
  color: var(--text);
}

/* ============================================
   Print Styles / PDF Export
   ============================================ */
@media print {
  html, body {
    height: auto;
    overflow: visible;
  }

  .presentation {
    height: auto;
    overflow: visible;
  }

  .slide {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    page-break-after: always;
    page-break-inside: avoid;
    width: 100%;
    height: 100vh;
    padding: 40px 60px;
    break-after: page;
  }

  .slide .reveal {
    opacity: 1;
    transform: none;
  }

  .progress-bar,
  .slide-counter,
  .controls-hint,
  .speaker-notes,
  .pdf-btn,
  .back-link,
  .nav-logo {
    display: none !important;
  }

  .slide::before, .slide::after {
    display: none;
  }

  .spoke-node {
    opacity: 1 !important;
    transition: none !important;
  }

  .hub-center,
  .badge-pulse::before {
    animation: none !important;
  }

  .email-content { display: none !important; }
  .email-content:first-child { display: block !important; }
  .comms-row { cursor: default !important; }

  /* Preserve dark backgrounds */
  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

/* ?print URL mode — vertical layout */
body.print-mode {
  height: auto;
  overflow: visible;
}

body.print-mode .presentation {
  height: auto;
  overflow: visible;
}

body.print-mode .slide {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
  page-break-after: always;
  page-break-inside: avoid;
  break-after: page;
  min-height: 100vh;
  border-bottom: 1px solid var(--border-glass);
}

body.print-mode .slide .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

body.print-mode .progress-bar,
body.print-mode .slide-counter,
body.print-mode .controls-hint,
body.print-mode .speaker-notes,
body.print-mode .pdf-btn,
body.print-mode .back-link,
body.print-mode .nav-logo {
  display: none !important;
}

body.print-mode .slide::before,
body.print-mode .slide::after {
  display: none;
}

/* Spoke animations disabled in print */
body.print-mode .spoke-node {
  opacity: 1;
  transition: none;
}

body.print-mode .hub-center {
  animation: none;
}

body.print-mode .badge-pulse::before {
  animation: none;
}

/* Show first email in print mode */
body.print-mode .email-content { display: none; }
body.print-mode .email-content:first-child { display: block; }
body.print-mode .comms-row { cursor: default; }

/* ============================================
   Validation Checklist (Slide 2 — Is This Real?)
   ============================================ */
.validation-checklist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.check-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(96, 240, 248, 0.15);
  border: 1px solid rgba(96, 240, 248, 0.3);
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================
   Investigation Steps (Slide 3 — Rapid Investigation)
   ============================================ */
.investigation-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inv-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  transition: border-color 0.3s ease;
}

.inv-step:hover {
  border-color: rgba(96, 240, 248, 0.3);
}

.inv-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(240, 80, 248, 0.15);
  border: 1px solid rgba(240, 80, 248, 0.3);
  color: var(--accent-magenta);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Dashboard button */
.dashboard-btn {
  display: inline-block;
  margin-top: 16px;
  padding: 10px 24px;
  background: linear-gradient(135deg, rgba(240, 80, 248, 0.15), rgba(96, 240, 248, 0.15));
  border: 1px solid rgba(240, 80, 248, 0.3);
  border-radius: var(--radius-sm);
  color: var(--accent-magenta);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
  letter-spacing: 0.3px;
}

.dashboard-btn:hover {
  border-color: var(--accent-magenta);
  box-shadow: 0 0 20px rgba(240, 80, 248, 0.2);
  transform: translateY(-1px);
}

.dashboard-btn-primary {
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-purple));
  border: none;
  color: #fff;
  padding: 12px 28px;
  font-size: 15px;
}

.dashboard-btn-primary:hover {
  box-shadow: 0 0 28px rgba(240, 80, 248, 0.4);
  transform: translateY(-2px);
}

/* Validated stats */
.validated-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.v-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.v-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.v-stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Fork decision */
.fork-decision {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fork-path {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-glass);
}

.fork-confirmed {
  background: rgba(255, 77, 106, 0.06);
  border-color: rgba(255, 77, 106, 0.2);
}

.fork-unconfirmed {
  background: rgba(77, 255, 145, 0.06);
  border-color: rgba(77, 255, 145, 0.2);
}

.fork-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ============================================
   The Reveal (Slide 8)
   ============================================ */
.reveal-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.reveal-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.reveal-marker {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-magenta), var(--accent-cyan));
  flex-shrink: 0;
  margin-top: 6px;
}

/* Context file tags */
.context-files {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.context-file {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(240, 80, 248, 0.1);
  border: 1px solid rgba(240, 80, 248, 0.2);
  color: var(--accent-magenta);
  letter-spacing: 0.3px;
}

/* ============================================
   Responsive (for smaller screens/testing)
   ============================================ */
@media (max-width: 1024px) {
  .slide {
    padding: 40px;
  }

  h1 { font-size: 36px; }
  h2 { font-size: 28px; }

  .two-col,
  .two-col-wide-right {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ai-cards,
  .ai-reveal-grid,
  .card-grid-3,
  .card-grid-2x3,
  .toc-grid {
    grid-template-columns: 1fr 1fr;
  }

  .phase-timeline {
    flex-direction: column;
  }

  .phase-timeline::before {
    display: none;
  }

  .impact-hub {
    transform: scale(0.65);
    transform-origin: top center;
  }

  .spoke-grid {
    gap: 12px;
  }
}
