/* =========================================================================
   PHISH TANK — STYLES (v2)
   Aesthetic: PublicEdTech training simulation. Windowed app chrome.
   Fixed 100vh — no page scroll. Internal panel scrolling only.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700;9..40,800;9..40,900&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* PET brand */
  --pet-blue: #2250d5;
  --pet-blue-hover: #1a3fa5;
  --pet-blue-soft: #eaeef9;
  --pet-blue-wash: #f4f6fc;
  --pet-yellow: #fbc442;
  --pet-yellow-soft: #fef4d6;
  --pet-dark: #1a1f2e;
  --pet-dark-2: #252a3a;
  --pet-dark-3: #323849;

  /* Surfaces */
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-soft: #fafbfd;
  --surface-shade: #eef0f6;

  /* Borders */
  --border: #e3e6ef;
  --border-strong: #c8cddc;

  /* Text */
  --text: #1a1d2e;
  --text-soft: #4a5168;
  --text-fade: #8891a6;
  --text-inv: #ffffff;

  /* Severity */
  --sev-low: #2d8f4e;
  --sev-med: #b88030;
  --sev-high: #e05a20;
  --sev-crit: #c91e1e;

  /* Annotation marker */
  --anno: #e05a20;
  --anno-soft: #fef0e6;
  --anno-glow: rgba(224, 90, 32, 0.28);

  /* Email client chrome */
  --email-bg: #ffffff;
  --email-border: #e1e1e4;
  --email-muted: #606368;
}

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

/* Utility: generic hidden — ensures any element with .hidden disappears,
   regardless of its base display rule. Must be !important to win against
   component-level display rules set on the same element. */
.hidden { display: none !important; }

html, body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================================
   BOOT OVERLAY — brief "entering simulation" transition
   ========================================================================= */
#pt-boot {
  position: fixed; inset: 0;
  background: var(--pet-dark);
  color: var(--text-inv);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#pt-boot.show { display: flex; opacity: 1; }
#pt-boot.fade { opacity: 0; }

.boot-logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.boot-logo-mark {
  width: 38px; height: 38px;
  background: var(--pet-blue);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 18px;
  letter-spacing: -0.02em;
}
.boot-logo-text {
  font-weight: 800; font-size: 17px;
  letter-spacing: -0.01em;
}
.boot-logo-text span { color: var(--pet-yellow); }

.boot-init {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: rgba(255,255,255,0.55);
}
.boot-progress {
  width: 280px; height: 2px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  border-radius: 1px;
}
.boot-bar {
  width: 0%; height: 100%;
  background: var(--pet-yellow);
  animation: bootFill 1.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes bootFill { to { width: 100%; } }

.boot-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  min-height: 14px;
}

/* =========================================================================
   LANDING / ORIENTATION
   ========================================================================= */
#pt-landing {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  overflow-y: auto;
  background: var(--bg);
}
#pt-landing.active { display: flex; }

.landing-topbar {
  flex-shrink: 0;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.landing-topbar-mark {
  display: flex; align-items: center; gap: 10px;
}
.landing-topbar-mark-logo {
  width: 30px; height: 30px;
  background: var(--pet-blue);
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 14px;
  letter-spacing: -0.02em;
}
.landing-topbar-mark-text {
  font-weight: 800; font-size: 16px; letter-spacing: -0.01em;
}
.landing-topbar-mark-text span { color: var(--pet-yellow); }
.landing-topbar-sep { width: 1px; height: 24px; background: var(--border); }
.landing-topbar-module {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-soft);
}
.landing-topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--text-soft);
}
.landing-topbar-right a { color: var(--pet-blue); text-decoration: none; font-weight: 500; }
.landing-topbar-right a:hover { text-decoration: underline; }

.landing-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
}

.landing-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--pet-blue);
  margin-bottom: 20px;
  font-weight: 600;
}
.landing-title {
  font-weight: 900;
  font-size: clamp(56px, 9vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 24px;
}
.landing-title .y { color: var(--pet-yellow); }
.landing-sub {
  font-size: clamp(18px, 2.2vw, 22px);
  color: var(--text-soft);
  max-width: 620px;
  margin: 0 auto 16px;
  line-height: 1.4;
  font-weight: 400;
}
.landing-desc {
  font-size: 15px;
  color: var(--text-fade);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.6;
}

.landing-cta-primary {
  background: var(--pet-blue);
  color: white;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 18px 36px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(34, 80, 213, 0.5);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.landing-cta-primary:hover {
  background: var(--pet-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -6px rgba(34, 80, 213, 0.6);
}
.landing-cta-primary .arrow { font-size: 18px; }

.landing-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 60px;
  max-width: 960px;
  width: 100%;
  padding: 0 20px;
}
.landing-mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 22px;
  cursor: pointer;
  transition: all 0.18s;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 200px;
}
.landing-mode-card:hover:not(.locked) {
  border-color: var(--pet-blue);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -12px rgba(34, 80, 213, 0.25);
}
.landing-mode-card.locked { opacity: 0.6; cursor: not-allowed; }
.landing-mode-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-fade);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.landing-mode-card-title {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.landing-mode-card-sub {
  font-size: 13px;
  color: var(--text-fade);
  margin-bottom: 14px;
  font-style: italic;
}
.landing-mode-card-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  margin-bottom: auto;
}
.landing-mode-card-pill {
  margin-top: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  background: var(--pet-blue-soft);
  color: var(--pet-blue);
  border-radius: 3px;
  align-self: flex-start;
}
.landing-mode-card.locked .landing-mode-card-pill {
  background: var(--surface-shade);
  color: var(--text-fade);
}

.landing-footer {
  flex-shrink: 0;
  background: var(--pet-dark);
  color: rgba(255,255,255,0.7);
  padding: 20px 32px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.landing-footer strong { color: var(--pet-yellow); font-weight: 600; }
.landing-footer a { color: var(--pet-yellow); text-decoration: none; }

/* =========================================================================
   SIMULATION — the full windowed training environment
   ========================================================================= */
#pt-sim {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
#pt-sim.active { display: flex; }

.sim-titlebar {
  flex-shrink: 0;
  height: 48px;
  background: var(--pet-dark);
  color: var(--text-inv);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 2px solid var(--pet-dark-2);
  user-select: none;
}
.sim-tb-logo {
  display: flex; align-items: center; gap: 10px;
  padding-right: 18px;
  border-right: 1px solid var(--pet-dark-3);
  margin-right: 18px;
}
.sim-tb-logo-mark {
  width: 24px; height: 24px;
  background: var(--pet-blue);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 12px;
  letter-spacing: -0.02em;
}
.sim-tb-logo-text {
  font-weight: 700; font-size: 13px;
  letter-spacing: -0.01em;
}
.sim-tb-logo-text span { color: var(--pet-yellow); }

.sim-tb-app {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.65);
  margin-right: 24px;
}
.sim-tb-app span {
  color: var(--pet-yellow);
  margin: 0 6px;
}

.sim-tb-tabs {
  display: flex;
  gap: 4px;
  align-items: stretch;
  height: 100%;
}
.sim-tb-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, background 0.15s;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
}
.sim-tb-tab:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.05); }
.sim-tb-tab.active { color: var(--pet-yellow); border-bottom-color: var(--pet-yellow); }
.sim-tb-tab.locked { color: rgba(255,255,255,0.25); cursor: not-allowed; }
.sim-tb-tab.locked:hover { background: transparent; color: rgba(255,255,255,0.25); }
.sim-tb-tab-icon { font-size: 14px; }
.sim-tb-tab-pill {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  padding: 1px 5px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sim-tb-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  font-family: 'JetBrains Mono', monospace;
}
.sim-tb-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
  margin-right: 4px;
  display: inline-block;
  vertical-align: middle;
}
.sim-tb-exit {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.sim-tb-exit:hover { background: rgba(255,255,255,0.08); color: white; }

.sim-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* ----- Field Guide module ----- */
.fg-module {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}
.fg-module.hidden { display: none; }

.fg-rail {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fg-rail-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.fg-rail-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.fg-rail-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-fade);
  text-transform: uppercase;
  letter-spacing: 0.15em;
}
.fg-rail-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.fg-rail-item {
  padding: 10px 18px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  position: relative;
}
.fg-rail-item:hover { background: var(--pet-blue-wash); }
.fg-rail-item.active {
  background: var(--pet-blue-wash);
  border-left-color: var(--pet-blue);
}
.fg-rail-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-fade);
  letter-spacing: 0.1em;
}
.fg-rail-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin: 2px 0 2px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.fg-rail-item.active .fg-rail-name { color: var(--pet-blue); }
.fg-rail-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4px;
}
.fg-rail-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-fade);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.fg-rail-sev {
  width: 7px; height: 7px; border-radius: 50%;
}
.fg-sev-low { background: var(--sev-low); }
.fg-sev-medium { background: var(--sev-med); }
.fg-sev-high { background: var(--sev-high); }
.fg-sev-critical { background: var(--sev-crit); }

.fg-work {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.fg-work-head {
  flex-shrink: 0;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.fg-work-num {
  font-weight: 900;
  font-size: 42px;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}
.fg-work-title-block { min-width: 0; }
.fg-work-latin {
  font-size: 12px;
  color: var(--text-fade);
  font-style: italic;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}
.fg-work-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fg-work-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-soft);
}
.fg-work-sev-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 5px 10px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  white-space: nowrap;
}
.fg-sev-badge-low { color: var(--sev-low); background: rgba(45, 143, 78, 0.06); }
.fg-sev-badge-medium { color: var(--sev-med); background: rgba(184, 128, 48, 0.06); }
.fg-sev-badge-high { color: var(--sev-high); background: rgba(224, 90, 32, 0.08); }
.fg-sev-badge-critical { color: var(--sev-crit); background: rgba(201, 30, 30, 0.08); }

.fg-work-body {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 0;
  overflow: hidden;
  min-height: 0;
}

.fg-specimen-panel {
  background: var(--surface-shade);
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fg-specimen-synopsis {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.55;
  padding: 12px 16px;
  background: var(--pet-yellow-soft);
  border-left: 3px solid var(--pet-yellow);
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.fg-analysis-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-height: 0;
}

/* =========================================================================
   ACCORDION (replaces the old tabs)
   ========================================================================= */
.acc-section {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.acc-section.open { flex-shrink: 1; display: flex; flex-direction: column; min-height: 0; }

.acc-header {
  padding: 14px 18px;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.acc-header:hover { background: var(--pet-blue-wash); }
.acc-section.open .acc-header {
  background: var(--surface);
  border-left-color: var(--pet-blue);
}
.acc-chevron {
  color: var(--text-fade);
  transition: transform 0.2s ease;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.acc-section.open .acc-chevron { transform: rotate(90deg); color: var(--pet-blue); }
.acc-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}
.acc-section.open .acc-title { color: var(--pet-blue); }
.acc-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-fade);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.acc-body {
  display: none;
  padding: 16px 20px 20px;
  background: var(--surface);
}
.acc-section.open .acc-body { display: block; animation: accIn 0.22s ease; overflow-y: auto; min-height: 0; }
@keyframes accIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Red Flags list inside an accordion section */
.flag-item {
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
  cursor: pointer;
  transition: padding-left 0.12s;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.flag-item:last-child { border-bottom: none; }
.flag-item:hover { padding-left: 4px; }
.flag-item-num {
  width: 20px; height: 20px;
  background: var(--anno);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.flag-item-text { flex: 1; min-width: 0; }
.flag-item-label {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.flag-item-summary {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
}

/* Why It Works block */
.acc-lever-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-fade);
  margin-bottom: 8px;
}
.acc-lever-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--pet-blue);
}
.acc-body-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
}

/* Impact block (dark forensic style) */
.acc-impact {
  background: var(--pet-dark);
  color: rgba(255,255,255,0.9);
  padding: 16px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.65;
}
.acc-impact-head {
  color: var(--pet-yellow);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  margin-bottom: 10px;
}

/* Defense list */
.acc-defense-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.acc-defense-list li {
  padding: 8px 0 8px 26px;
  position: relative;
  font-size: 12.5px;
  line-height: 1.55;
  border-bottom: 1px dashed var(--border);
}
.acc-defense-list li:last-child { border-bottom: none; }
.acc-defense-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 16px; height: 16px;
  background: var(--pet-blue);
  border-radius: 50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M2 5 L4 7 L8 3' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
}

/* =========================================================================
   ANNOTATION POPUP — floats near the marker when clicked
   ========================================================================= */
#anno-popup {
  position: fixed;
  width: 440px;
  max-width: calc(100vw - 24px);
  max-height: 70vh;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--anno);
  border-radius: 6px;
  box-shadow: 0 12px 40px -8px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.04);
  z-index: 1000;
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#anno-popup.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.popup-head {
  padding: 12px 40px 10px 14px;
  background: var(--anno-soft);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.popup-num {
  width: 22px; height: 22px;
  background: var(--anno);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.popup-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.popup-close {
  position: absolute;
  top: 8px; right: 10px;
  width: 22px; height: 22px;
  background: transparent;
  border: none;
  color: var(--text-fade);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.12s, color 0.12s;
}
.popup-close:hover { background: rgba(0,0,0,0.06); color: var(--text); }

.popup-body {
  padding: 14px 16px;
  flex: 1;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

/* Compare block — fake vs real visual */
.popup-compare {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface-soft);
}
.popup-compare-row {
  padding: 9px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--border);
  overflow-wrap: anywhere;
}
.popup-compare-row:last-child { border-bottom: none; }
.popup-compare-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.popup-compare-tag.fake { background: #fde0d7; color: var(--sev-crit); }
.popup-compare-tag.real { background: #dcf0e0; color: var(--sev-low); }
.popup-compare-val { color: var(--text); }
.popup-compare-val.fake { color: var(--sev-crit); text-decoration: line-through wavy rgba(201, 30, 30, 0.3); }
.popup-compare-val.real { color: var(--sev-low); font-weight: 500; }
.popup-compare-note {
  font-size: 11px;
  font-family: 'DM Sans', sans-serif;
  padding: 8px 12px;
  background: var(--pet-yellow-soft);
  color: var(--text-soft);
  font-style: italic;
  border-top: 1px solid var(--border);
}

/* Examples block */
.popup-examples {
  margin-top: 12px;
}
.popup-examples-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-fade);
  margin-bottom: 6px;
}
.popup-examples ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.popup-examples li {
  padding: 7px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-soft);
  border-bottom: 1px dashed var(--border);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-wrap: anywhere;
}
.popup-examples li:last-child { border-bottom: none; }
.popup-examples li .ex-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.popup-examples li .ex-tag.fake { background: #fde0d7; color: var(--sev-crit); }
.popup-examples li .ex-tag.real { background: #dcf0e0; color: var(--sev-low); }
.popup-examples li .ex-tag.neutral { background: var(--surface-shade); color: var(--text-soft); }
.popup-examples li .ex-val.fake { color: var(--sev-crit); }
.popup-examples li .ex-val.real { color: var(--sev-low); font-weight: 500; }

/* =========================================================================
   MODULE INTRO SCREEN (orientation before the workstation loads)
   ========================================================================= */
.fg-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 50px;
  text-align: center;
  overflow-y: auto;
  background: var(--bg);
}
.fg-intro.hidden { display: none; }

.intro-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--pet-blue);
  margin-bottom: 16px;
  font-weight: 600;
}
.intro-title {
  font-size: clamp(44px, 6vw, 68px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}
.intro-title .y { color: var(--pet-yellow); }
.intro-sub {
  font-size: 17px;
  color: var(--text-soft);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.intro-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 760px;
  width: 100%;
  margin-bottom: 40px;
}
.intro-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 18px;
  text-align: left;
  transition: all 0.18s;
}
.intro-step:hover { border-color: var(--pet-blue); transform: translateY(-2px); }
.intro-step-num {
  width: 28px; height: 28px;
  background: var(--pet-blue);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.intro-step-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.intro-step-body {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
}

.intro-start {
  background: var(--pet-blue);
  color: white;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px -6px rgba(34, 80, 213, 0.5);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.intro-start:hover {
  background: var(--pet-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -6px rgba(34, 80, 213, 0.6);
}

.intro-meta {
  margin-top: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-fade);
}

.fg-work-foot {
  flex-shrink: 0;
  height: 48px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 14px;
}
.fg-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
}
.fg-nav-btn:hover:not(:disabled) {
  border-color: var(--pet-blue);
  color: var(--pet-blue);
  background: var(--pet-blue-wash);
}
.fg-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.fg-nav-progress {
  flex: 1;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-fade);
}
.fg-nav-progress .current { color: var(--pet-blue); font-weight: 700; }

/* =========================================================================
   EMAIL SPECIMEN
   ========================================================================= */
.email-specimen {
  background: var(--email-bg);
  border: 1px solid var(--email-border);
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 8px 24px -10px rgba(0,0,0,0.15);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #202124;
  position: relative;
  overflow: hidden;
}
.email-specimen::before {
  content: 'SPECIMEN · SIMULATED';
  position: absolute;
  top: 10px; right: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  color: rgba(0,0,0,0.18);
  pointer-events: none;
  z-index: 5;
}

.email-header {
  padding: 14px 18px 12px;
  border-bottom: 1px solid #efefef;
  padding-right: 140px;
}
.email-subject {
  font-size: 17px;
  font-weight: 600;
  color: #202124;
  margin-bottom: 10px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.email-from-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.email-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pet-blue);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 13px;
  flex-shrink: 0;
}
.email-from-info { flex: 1; min-width: 0; }
.email-from-name { font-weight: 600; color: #202124; font-size: 13px; }
.email-from-addr { color: var(--email-muted); font-size: 12px; font-family: 'JetBrains Mono', monospace; word-break: break-all; }
.email-to { color: var(--email-muted); font-size: 11px; margin-top: 2px; }
.email-date { color: var(--email-muted); font-size: 12px; white-space: nowrap; flex-shrink: 0; }

.email-body {
  padding: 20px 20px 22px;
  font-size: 14px;
  line-height: 1.6;
  color: #202124;
}
.email-body p { margin-bottom: 12px; }
.email-body p:last-child { margin-bottom: 0; }
.email-body strong { font-weight: 600; color: #000; }

.email-logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
  color: #666;
}
.email-fake-ms-logo {
  display: inline-grid;
  grid-template-columns: 10px 10px;
  gap: 2px;
  width: 22px;
}
.email-fake-ms-logo span { display: block; width: 10px; height: 10px; }

.email-cta {
  display: inline-block;
  background: var(--pet-blue);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  border-radius: 3px;
}

.email-bank-box {
  background: #f8f8f8;
  border: 1px solid #e0e0e0;
  padding: 12px 16px;
  margin: 12px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
}
.email-bank-box table { width: 100%; }
.email-bank-box td { padding: 2px 0; }
.email-bank-box td:first-child { color: var(--email-muted); padding-right: 18px; width: 90px; }

/* =========================================================================
   ANNOTATION MARKERS
   ========================================================================= */
[data-anno] {
  position: relative;
  display: inline;
  background: rgba(224, 90, 32, 0.09);
  box-shadow: inset 0 -2px 0 rgba(224, 90, 32, 0.4);
  transition: background 0.15s;
}
[data-anno]:hover { background: rgba(224, 90, 32, 0.2); }
[data-anno].anno-active {
  background: rgba(224, 90, 32, 0.28);
  box-shadow: inset 0 -2px 0 var(--anno);
}

.anno-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  background: var(--anno);
  color: white;
  border-radius: 50%;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  margin: 0 3px 0 2px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px white, 0 2px 4px var(--anno-glow);
  position: relative;
  top: -1px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.email-from-row [data-anno],
.email-header [data-anno] {
  background: rgba(224, 90, 32, 0.12);
  padding: 1px 3px;
  border-radius: 2px;
}

/* =========================================================================
   LINK DESTINATION TOOLTIP
   On any email link with [data-dest], show a "goes to: ..." reveal on hover.
   Teaches the habit of checking where a link actually leads before clicking.
   ========================================================================= */
.email-specimen a[data-dest] {
  position: relative;
}

.email-specimen a[data-dest]:hover::after {
  content: '→ goes to: ' attr(data-dest);
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: var(--pet-dark);
  color: white;
  padding: 8px 14px;
  border-radius: 5px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 400;
  /* Stay on one line; expand to whatever the URL needs.
     Cap at 90% of the viewport so the tooltip can't run off-screen
     for absurdly long URLs. */
  white-space: nowrap;
  max-width: 90vw;
  width: max-content;
  z-index: 500;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);
  pointer-events: none;
  line-height: 1.45;
  letter-spacing: 0.01em;
  animation: destReveal 0.14s ease;
}

.email-specimen a[data-dest]:hover::before {
  content: '';
  position: absolute;
  top: calc(100% + 4px);
  left: 14px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--pet-dark);
  z-index: 501;
  pointer-events: none;
}

@keyframes destReveal {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =========================================================================
   INBOX MODULE
   ========================================================================= */
.inbox-module {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
  background: var(--bg);
}
.inbox-module.hidden { display: none; }

/* --- Inbox intro screen (same pattern as Field Guide intro) --- */
.inbox-intro {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 40px 50px;
  text-align: center;
  overflow-y: auto;
}
.inbox-intro.hidden { display: none; }

/* --- Active inbox layout --- */
.inbox-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
.inbox-content.hidden { display: none; }

.inbox-head {
  flex-shrink: 0;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}
.inbox-head-title-block {}
.inbox-head-persona {
  font-size: 12px;
  color: var(--text-fade);
  font-style: italic;
  margin-bottom: 2px;
}
.inbox-head-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.inbox-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  min-width: 200px;
}
.inbox-progress-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-soft);
}
.inbox-progress-text .current { color: var(--pet-blue); font-weight: 700; font-size: 12px; }
.inbox-progress-bar {
  width: 200px;
  height: 6px;
  background: var(--surface-shade);
  border-radius: 3px;
  overflow: hidden;
}
.inbox-progress-fill {
  height: 100%;
  background: var(--pet-blue);
  transition: width 0.3s ease;
}

.inbox-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-height: 0;
}

/* --- Email list (left rail) --- */
.inbox-list {
  width: 320px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
}
.inbox-list-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  border-left: 3px solid transparent;
  position: relative;
  min-height: 76px;
}
.inbox-list-item:hover { background: var(--pet-blue-wash); }
.inbox-list-item.active {
  background: var(--pet-blue-wash);
  border-left-color: var(--pet-blue);
}
.inbox-list-item.triaged { opacity: 0.55; }
.inbox-list-item.triaged:hover { opacity: 0.75; background: var(--surface-soft); }

.inbox-list-item-row1 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.inbox-list-item-from {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}
.inbox-list-item.triaged .inbox-list-item-from { font-weight: 500; }
.inbox-list-item-date {
  font-size: 11px;
  color: var(--text-fade);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}
.inbox-list-item-subject {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.inbox-list-item.triaged .inbox-list-item-subject { color: var(--text-soft); }
.inbox-list-item-preview {
  font-size: 11.5px;
  color: var(--text-fade);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.inbox-list-item-action {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: white;
}
.inbox-list-item-action.trust { background: var(--sev-low); }
.inbox-list-item-action.report { background: var(--anno); }
.inbox-list-item-action.delete { background: var(--text-fade); }

/* --- Reading pane (right) --- */
.inbox-reader {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--surface-shade);
}
.inbox-reader-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.inbox-reader-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-fade);
  font-size: 14px;
  font-style: italic;
}

/* Reading-pane email uses the same .email-specimen chrome but strips the
   "SPECIMEN" watermark + marker highlighting during the drill. */
.inbox-live .email-specimen::before { display: none; }
.inbox-live [data-anno] {
  background: none;
  box-shadow: none;
  cursor: default;
}

/* --- Action footer --- */
.inbox-actions {
  flex-shrink: 0;
  padding: 14px 24px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.inbox-action-btn {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid transparent;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: -0.01em;
}
.inbox-action-btn .action-glyph {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.inbox-action-btn.trust {
  background: #e8f5e9;
  color: var(--sev-low);
  border-color: #c8e6c9;
}
.inbox-action-btn.trust .action-glyph { background: var(--sev-low); color: white; }
.inbox-action-btn.trust:hover { background: var(--sev-low); color: white; border-color: var(--sev-low); }
.inbox-action-btn.trust:hover .action-glyph { background: white; color: var(--sev-low); }

.inbox-action-btn.report {
  background: var(--anno-soft);
  color: var(--anno);
  border-color: #fcd4c0;
}
.inbox-action-btn.report .action-glyph { background: var(--anno); color: white; }
.inbox-action-btn.report:hover { background: var(--anno); color: white; border-color: var(--anno); }
.inbox-action-btn.report:hover .action-glyph { background: white; color: var(--anno); }

.inbox-action-btn.delete {
  background: var(--surface-shade);
  color: var(--text-soft);
  border-color: var(--border);
}
.inbox-action-btn.delete .action-glyph { background: var(--text-soft); color: white; }
.inbox-action-btn.delete:hover { background: var(--text-soft); color: white; border-color: var(--text-soft); }
.inbox-action-btn.delete:hover .action-glyph { background: white; color: var(--text-soft); }

.inbox-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--surface-shade);
  color: var(--text-fade);
  border-color: var(--border);
}
.inbox-action-btn:disabled:hover { background: var(--surface-shade); color: var(--text-fade); }

.inbox-finish-btn {
  padding: 12px 22px;
  background: var(--pet-blue);
  color: white;
  border: none;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 12px -4px rgba(34, 80, 213, 0.4);
  transition: all 0.15s;
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
}
.inbox-finish-btn.ready {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  animation: finishPulse 1.4s ease-in-out infinite;
}
@keyframes finishPulse {
  0%, 100% { box-shadow: 0 4px 12px -4px rgba(34, 80, 213, 0.4); }
  50% { box-shadow: 0 6px 18px -4px rgba(34, 80, 213, 0.7); }
}
.inbox-finish-btn:hover { background: var(--pet-blue-hover); }

/* =========================================================================
   INBOX DEBRIEF
   ========================================================================= */
.inbox-debrief {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--bg);
}
.inbox-debrief.hidden { display: none; }

.debrief-head {
  flex-shrink: 0;
  padding: 26px 32px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.debrief-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--pet-blue);
  font-weight: 600;
  margin-bottom: 8px;
}
.debrief-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 8px;
}
.debrief-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-soft);
}
.debrief-score .score-big {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 900;
  color: var(--pet-blue);
  letter-spacing: -0.02em;
  margin: 0 4px;
}

.debrief-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 40px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.debrief-breakdown {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.debrief-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  text-align: center;
}
.debrief-stat-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-fade);
  margin-bottom: 8px;
  font-weight: 600;
}
.debrief-stat-val {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.debrief-stat-val.good { color: var(--sev-low); }
.debrief-stat-val.bad { color: var(--sev-crit); }
.debrief-stat-sub {
  font-size: 11px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
}

.debrief-section-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text);
  margin: 28px 0 14px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--text);
  display: flex;
  justify-content: space-between;
}
.debrief-section-head .head-count { color: var(--text-fade); font-weight: 500; }

.debrief-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: box-shadow 0.15s;
}
.debrief-result.correct { border-left-color: var(--sev-low); }
.debrief-result.wrong { border-left-color: var(--sev-crit); background: #fef7f7; }

.debrief-result-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.debrief-result-icon {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: white;
  font-weight: 900;
  font-size: 14px;
  margin-top: 2px;
}
.debrief-result.correct .debrief-result-icon { background: var(--sev-low); }
.debrief-result.wrong .debrief-result-icon { background: var(--sev-crit); }

.debrief-result-main { flex: 1; min-width: 0; }
.debrief-result-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 2px;
}
.debrief-result-meta {
  font-size: 11.5px;
  color: var(--text-soft);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 8px;
}
.debrief-result-meta .sep { margin: 0 6px; color: var(--text-fade); }
.debrief-result-meta .user-chose { color: var(--text-fade); }
.debrief-result-meta .user-chose.wrong { color: var(--sev-crit); font-weight: 700; }
.debrief-result-meta .correct-was { color: var(--sev-low); font-weight: 700; }
.debrief-result-feedback {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
}

.debrief-reveal-btn {
  margin-top: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  color: var(--pet-blue);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: all 0.12s;
}
.debrief-reveal-btn:hover { background: var(--pet-blue); color: white; border-color: var(--pet-blue); }

.debrief-reveal {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.debrief-reveal.show { display: block; }
.debrief-reveal-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-fade);
  margin-bottom: 8px;
}
.debrief-flags {
  list-style: none;
  padding: 0;
  margin: 0;
}
.debrief-flags li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.debrief-flags li:last-child { border-bottom: none; }
.debrief-flags .flag-num {
  width: 20px; height: 20px;
  background: var(--anno);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.debrief-flags .flag-text {
  font-size: 13px;
  line-height: 1.5;
}
.debrief-flags .flag-label { font-weight: 700; margin-right: 6px; }

.debrief-foot {
  flex-shrink: 0;
  padding: 16px 32px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 12px;
}
.debrief-btn {
  padding: 12px 26px;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  letter-spacing: -0.01em;
}
.debrief-btn.primary {
  background: var(--pet-blue);
  color: white;
  box-shadow: 0 4px 12px -4px rgba(34, 80, 213, 0.4);
}
.debrief-btn.primary:hover { background: var(--pet-blue-hover); }
.debrief-btn.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.debrief-btn.secondary:hover { border-color: var(--pet-blue); color: var(--pet-blue); }

/* =========================================================================
   AFTERMATH MODULE — split-screen cinematic player
   ========================================================================= */
.aftermath-module {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  background: var(--bg);
}
.aftermath-module.hidden { display: none; }

/* --- Player container --- */
.aftermath-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  position: relative;
}
.aftermath-player.hidden { display: none; }

/* --- Player header (title + controls + progress) --- */
.aft-head {
  flex-shrink: 0;
  padding: 14px 24px 12px;
  background: var(--pet-dark);
  color: white;
  border-bottom: 2px solid var(--pet-dark-2);
}
.aft-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 10px;
}
.aft-head-title-block {
  min-width: 0;
}
.aft-head-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--pet-yellow);
  margin-bottom: 4px;
  font-weight: 600;
}
.aft-head-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
}

.aft-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.aft-btn {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 7px 14px;
  border-radius: 5px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.aft-btn:hover {
  background: rgba(255,255,255,0.15);
  color: white;
  border-color: rgba(255,255,255,0.25);
}
.aft-btn.primary {
  background: var(--pet-blue);
  border-color: var(--pet-blue);
  color: white;
}
.aft-btn.primary:hover { background: var(--pet-blue-hover); border-color: var(--pet-blue-hover); }
.aft-btn-icon {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
}
.aft-btn.speed-active {
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border-color: var(--pet-yellow);
}

.aft-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.1em;
  min-width: 110px;
  text-align: right;
  white-space: nowrap;
}
.aft-time .current { color: var(--pet-yellow); font-weight: 700; }

.aft-progress-track {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.aft-progress-fill {
  height: 100%;
  background: var(--pet-yellow);
  width: 0%;
  transition: width 0.1s linear;
}
.aft-progress-markers {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.aft-progress-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 8px;
  background: rgba(255,255,255,0.2);
}

/* --- Panels --- */
.aft-panels {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  min-height: 0;
}

.aft-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
  position: relative;  /* anchors damage-report, epilogue, connection-terminated overlays */
}

.aft-panel-victim { background: #eef1f6; }
.aft-panel-attacker {
  background: #0d0f14;
  border-left: 2px solid var(--pet-dark-2);
}

.aft-panel-head {
  flex-shrink: 0;
  padding: 10px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.aft-panel-victim .aft-panel-head {
  background: white;
  border-bottom-color: var(--border);
}
.aft-panel-attacker .aft-panel-head {
  background: #151820;
  border-bottom-color: rgba(255,255,255,0.08);
}

.aft-panel-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text);
}
.aft-panel-attacker .aft-panel-label {
  color: var(--pet-yellow);
}

.aft-panel-sub {
  font-size: 11.5px;
  color: var(--text-soft);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.05em;
}
.aft-panel-attacker .aft-panel-sub { color: rgba(255,255,255,0.5); }

/* --- Stage (the scene area) --- */
.aft-panel-stage {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  min-height: 0;
  position: relative;
}

/* --- Narration strip (bottom of each panel) --- */
.aft-panel-narration {
  flex-shrink: 0;
  padding: 14px 20px;
  min-height: 70px;
  max-height: 120px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  font-style: italic;
  border-top: 1px solid rgba(0,0,0,0.08);
  transition: opacity 0.25s;
}
.aft-panel-victim .aft-panel-narration {
  background: #f8f9fc;
  color: var(--text);
  border-top-color: var(--border);
}
.aft-panel-attacker .aft-panel-narration {
  background: #0a0c12;
  color: rgba(255,255,255,0.85);
  border-top-color: rgba(255,255,255,0.08);
}
.aft-panel-narration:empty { opacity: 0.5; }

@keyframes narrFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.aft-panel-narration > .narr-text {
  animation: narrFade 0.3s ease;
}

/* =========================================================================
   VICTIM SCENES
   ========================================================================= */

/* Scene: inbox */
.scene-inbox {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
  overflow: hidden;
  animation: sceneIn 0.3s ease;
}
.scene-inbox-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
}
.scene-inbox-title { font-weight: 700; font-size: 13px; letter-spacing: -0.01em; }
.scene-inbox-count {
  font-size: 10px;
  padding: 2px 7px;
  background: var(--pet-blue);
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}
.scene-inbox-item {
  padding: 14px 14px;
  border-left: 3px solid transparent;
  position: relative;
  transition: all 0.2s;
  cursor: default;
}
.scene-inbox-item.unread { border-left-color: var(--pet-blue); background: var(--pet-blue-wash); }
.scene-inbox-item.active {
  background: #ffefe4;
  border-left-color: var(--anno);
  box-shadow: inset 0 0 0 1px rgba(224,90,32,0.2);
}
.scene-inbox-from { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.scene-inbox-subj { font-size: 12.5px; margin-bottom: 3px; }
.scene-inbox-prev { font-size: 11.5px; color: var(--text-fade); }
.scene-inbox-time {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
}

/* Scene: browser */
.scene-browser {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
}
.scene-browser-chrome {
  background: #e8eaef;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #d0d3dc;
}
.scene-browser-dots {
  display: flex; gap: 5px;
}
.scene-browser-dots span {
  width: 10px; height: 10px; border-radius: 50%;
  display: block;
}
.scene-browser-dots span:nth-child(1) { background: #ff5f57; }
.scene-browser-dots span:nth-child(2) { background: #febc2e; }
.scene-browser-dots span:nth-child(3) { background: #28c840; }
.scene-browser-arrows {
  display: flex;
  gap: 4px;
  color: #8891a6;
  font-size: 12px;
}
.scene-browser-url {
  flex: 1;
  background: white;
  border: 1px solid #c8cddc;
  border-radius: 14px;
  padding: 5px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}
.scene-browser-url .lock { color: #5b7; }
.scene-browser-url .url-real { color: var(--text-soft); }
.scene-browser-url .url-fake { color: var(--sev-crit); font-weight: 600; }
.scene-browser-url .url-path { color: var(--text-fade); }
.scene-browser-body {
  padding: 30px 20px 24px;
  min-height: 280px;
}

/* Fake Microsoft login */
.scene-login {
  max-width: 360px;
  margin: 0 auto;
  background: white;
  padding: 24px 28px;
  border: 1px solid var(--border);
  box-shadow: 0 4px 20px -8px rgba(0,0,0,0.15);
}
.scene-login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.scene-login-logo-grid {
  display: grid;
  grid-template-columns: 10px 10px;
  gap: 2px;
  width: 22px;
}
.scene-login-logo-grid span { display: block; width: 10px; height: 10px; }
.scene-login-logo-text { font-size: 14px; font-weight: 400; color: #5e5e5e; letter-spacing: -0.005em; }
.scene-login-title { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 14px; color: #1b1b1b; }
.scene-login-field { margin-bottom: 14px; }
.scene-login-field input {
  width: 100%;
  border: none;
  border-bottom: 1px solid #666;
  padding: 6px 0;
  font-size: 14px;
  font-family: inherit;
  background: transparent;
  color: var(--text);
  outline: none;
}
.scene-login-field.typing input { border-bottom-color: var(--pet-blue); color: var(--pet-blue); }
.scene-login-btn {
  background: #2f2f2f;
  color: white;
  border: none;
  padding: 8px 28px;
  font-size: 14px;
  font-family: inherit;
  margin-top: 6px;
  cursor: default;
}

/* --- Locked / password-reset variants: calmer IT-realistic states ---------
   Instead of a dramatic dark-red takeover, the login page shows a banner.
   The fields are muted and disabled. Reads as "IT legitimately locked this." */
.scene-login.locked .scene-login-field input,
.scene-login.reset  .scene-login-field input {
  color: var(--text-fade);
  border-bottom-color: var(--border);
}
.scene-login.locked .scene-login-btn {
  background: #c0c5cf;
  color: rgba(255,255,255,0.9);
  cursor: not-allowed;
}
.scene-login-banner {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 4px;
  margin: -4px 0 18px;
  animation: bannerIn 0.35s ease;
}
@keyframes bannerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.scene-login-banner.warning {
  background: #fff5e0;
  border: 1px solid #e8c46b;
}
.scene-login-banner.success {
  background: #e7f5ec;
  border: 1px solid #9bc7a7;
}
.scene-login-banner-icon {
  font-size: 18px;
  line-height: 1;
}
.scene-login-banner.warning .scene-login-banner-icon { color: #b45309; }
.scene-login-banner.success .scene-login-banner-icon { color: #166534; }
.scene-login-banner-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 3px;
}
.scene-login-banner-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-soft);
}
.scene-login-banner-ticket {
  margin-top: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-fade);
  letter-spacing: 0.05em;
}

/* Scene: ambient desktop */
.scene-ambient {
  height: 100%;
  min-height: 280px;
  background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.15);
}
.scene-ambient-wallpaper {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(251, 196, 66, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(34, 80, 213, 0.15) 0%, transparent 50%);
}
.scene-ambient-clock {
  position: absolute;
  bottom: 40px;
  right: 30px;
  font-family: 'DM Sans', sans-serif;
  font-size: 48px;
  font-weight: 800;
  color: rgba(255,255,255,0.85);
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.scene-ambient-date {
  position: absolute;
  bottom: 22px;
  right: 30px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.1em;
}
.scene-ambient-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: rgba(26, 31, 46, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.scene-ambient-text {
  font-size: 20px;
  font-weight: 700;
  color: white;
  text-align: center;
  max-width: 320px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.scene-ambient-text .faint {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,0.6);
  font-style: italic;
  letter-spacing: 0.01em;
}

/* Scene: chat */
.scene-chat {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
}
.scene-chat-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-soft);
}
.scene-chat-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--pet-blue);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 12px;
}
.scene-chat-name { font-weight: 700; font-size: 13px; }
.scene-chat-status {
  font-size: 11px;
  color: var(--sev-low);
  font-family: 'JetBrains Mono', monospace;
}
.scene-chat-status::before { content: '● '; color: var(--sev-low); }
.scene-chat-messages {
  padding: 18px 16px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.scene-chat-bubble {
  background: #f0f2f7;
  padding: 10px 14px;
  border-radius: 12px 12px 12px 2px;
  max-width: 85%;
  font-size: 13px;
  line-height: 1.5;
  animation: bubbleIn 0.3s ease;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.scene-chat-reply {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
}
.scene-chat-reply input {
  width: 100%;
  background: white;
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-fade);
  font-family: inherit;
}

/* Scene: call */
.scene-call {
  background: #0d0f14;
  border-radius: 6px;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  min-height: 300px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.3);
}
.scene-call-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
}
.scene-call-caller {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 6px;
}
.scene-call-role {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  font-style: italic;
  margin-bottom: 28px;
}
.scene-call-quote {
  background: rgba(255,255,255,0.06);
  border-left: 3px solid var(--pet-yellow);
  padding: 14px 18px;
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
  max-width: 440px;
  color: rgba(255,255,255,0.9);
  border-radius: 0 4px 4px 0;
}

@keyframes sceneIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Time-skip overlay (between acts) */
.scene-timeskip {
  position: absolute;
  inset: 0;
  background: var(--pet-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  animation: timeskipIn 0.8s ease forwards;
}
@keyframes timeskipIn {
  0% { opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; pointer-events: none; visibility: hidden; }
}
.scene-timeskip-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5em;
  color: var(--pet-yellow);
  text-transform: uppercase;
  text-align: center;
}

/* =========================================================================
   ATTACKER TERMINAL
   ========================================================================= */
.aft-terminal {
  font-family: 'JetBrains Mono', monospace;
  background: #0a0c12;
  color: #c9d1d9;
  font-size: 12px;
  line-height: 1.7;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.aft-terminal-head {
  padding: 10px 18px;
  background: #151820;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  flex-shrink: 0;
}
.aft-terminal-head .term-user { color: #4caf50; font-weight: 600; }
.aft-terminal-head .term-path { color: rgba(255,255,255,0.4); }
.aft-terminal-head .term-cmd { color: var(--pet-yellow); }

.aft-terminal-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px 20px;
  min-height: 0;
}

.term-line {
  display: flex;
  gap: 12px;
  margin-bottom: 4px;
  animation: lineIn 0.25s ease;
}
@keyframes lineIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}
.term-time {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  flex-shrink: 0;
  min-width: 56px;
}
.term-plus { color: #4caf50; }
.term-msg {
  color: rgba(255,255,255,0.85);
  flex: 1;
  word-break: break-word;
}
.term-msg .term-highlight {
  color: var(--pet-yellow);
  font-weight: 600;
}
.term-msg .term-domain-fake {
  color: #f97066;
  font-weight: 600;
}

/* --- Command blocks (shell-style rendering for scenario A events) -------
   Each attacker event becomes a discrete block with a prompt, command, and
   output lines. Feels like a real operator session. */
.term-block {
  margin-bottom: 14px;
  animation: blockIn 0.2s ease;
  word-break: break-word;
}
@keyframes blockIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.term-prompt-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: rgba(255,255,255,0.95);
  padding-right: 8px;
}
.term-prompt {
  color: #4ec9b0;  /* classic teal shell prompt */
  margin-right: 4px;
  user-select: none;
}
.term-cmd {
  color: rgba(255,255,255,0.95);
}
.term-caret {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--pet-yellow);
  margin-left: 2px;
  vertical-align: -1px;
  animation: cursorBlink 1s steps(2) infinite;
}
.term-output {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  padding: 0 0 0 0;
  margin: 0;
  white-space: pre-wrap;
  animation: outputIn 0.2s ease;
}
@keyframes outputIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.term-output.indented { padding-left: 14px; color: rgba(255,255,255,0.55); }
.term-output .term-plus { color: #4caf50; margin-right: 4px; }
.term-output .term-bang { color: #ff5454; font-weight: 700; margin-right: 4px; }
.term-output .term-dash { color: #ffc04d; margin-right: 4px; }
.term-output .term-highlight { color: var(--pet-yellow); font-weight: 600; }

.term-cursor {
  color: var(--pet-yellow);
  animation: cursorBlink 1.1s steps(2) infinite;
  font-weight: 700;
}
@keyframes cursorBlink {
  to { opacity: 0.2; }
}

.term-compose-preview {
  margin-top: 6px;
  margin-left: 68px;
  padding: 10px 14px;
  background: rgba(251, 196, 66, 0.06);
  border-left: 2px solid var(--pet-yellow);
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  animation: lineIn 0.3s ease;
}
.term-compose-preview .field {
  display: block;
  margin-bottom: 3px;
}
.term-compose-preview .field-k {
  color: rgba(255,255,255,0.4);
  display: inline-block;
  width: 60px;
}
.term-compose-preview .field-v { color: rgba(255,255,255,0.9); }
.term-compose-preview .excerpt {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.1);
  font-style: italic;
  color: rgba(255,255,255,0.65);
}

/* =========================================================================
   AFTERMATH CODA (final takeover)
   ========================================================================= */
.aftermath-coda {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: var(--pet-dark);
  color: white;
  overflow-y: auto;
  text-align: center;
  position: relative;
}
.aftermath-coda.hidden { display: none; }
.aftermath-coda::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(251, 196, 66, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(224, 90, 32, 0.06) 0%, transparent 50%);
  pointer-events: none;
}
.coda-inner {
  max-width: 680px;
  position: relative;
  z-index: 1;
}
.coda-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--pet-yellow);
  margin-bottom: 24px;
  font-weight: 600;
}
.coda-headline {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 26px;
  color: white;
}
.coda-body {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}
.coda-stat {
  padding: 20px 24px;
  background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--pet-yellow);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  text-align: left;
  margin-bottom: 28px;
  border-radius: 0 4px 4px 0;
}
.coda-takeaway {
  font-size: 17px;
  font-weight: 700;
  color: var(--pet-yellow);
  letter-spacing: -0.01em;
  line-height: 1.4;
  margin-bottom: 36px;
}
.coda-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}
.coda-btn {
  padding: 12px 26px;
  border-radius: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.coda-btn.primary {
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border-color: var(--pet-yellow);
}
.coda-btn.primary:hover { background: #fcd372; border-color: #fcd372; }
.coda-btn.secondary {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.2);
}
.coda-btn.secondary:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.35); }

/* --- Responsive: stack panels on narrow viewports --- */
@media (max-width: 900px) {
  .aft-panels { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
  .aft-panel-attacker { border-left: none; border-top: 2px solid var(--pet-dark-2); }
}

/* =========================================================================
   PLAY WALKTHROUGH — presentation mode for a Field Guide specimen
   ========================================================================= */
#play-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: playFadeIn 0.22s ease;
}
#play-overlay.hidden { display: none; }

@keyframes playFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.play-head {
  flex-shrink: 0;
  height: 56px;
  background: var(--pet-dark);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 22px;
  border-bottom: 2px solid var(--pet-dark-2);
  gap: 20px;
}
.play-breadcrumb {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.75);
}
.play-breadcrumb .crumb-sep { color: rgba(255,255,255,0.3); margin: 0 8px; }
.play-breadcrumb .crumb-specimen { color: var(--pet-yellow); font-weight: 700; }

.play-counter {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
}
.play-counter .current { color: var(--pet-yellow); font-weight: 700; font-size: 13px; }

.play-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.14s;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.play-close:hover {
  background: rgba(255,255,255,0.08);
  color: white;
  border-color: rgba(255,255,255,0.35);
}

.play-stage {
  flex: 1;
  overflow-y: auto;
  padding: 40px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.play-slide {
  max-width: 1120px;
  width: 100%;
  animation: slideFadeIn 0.28s ease;
}
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Shared slide elements --- */
.slide-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--pet-blue);
  font-weight: 700;
  margin-bottom: 16px;
}
.slide-kicker.warning { color: var(--sev-crit); }
.slide-kicker.yellow { color: #b88030; }

.slide-headline {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 18px;
}

/* --- Intro slide --- */
.slide-intro {
  text-align: center;
  padding: 20px 40px 40px;
  max-width: 780px;
  margin: 0 auto;
}
.slide-intro-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-fade);
  letter-spacing: 0.3em;
  margin-bottom: 14px;
}
.slide-intro-latin {
  font-family: 'DM Sans', sans-serif;
  font-style: italic;
  font-size: 16px;
  color: var(--text-fade);
  margin-bottom: 28px;
}
.slide-intro-synopsis {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 32px;
}
.slide-intro-meta {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}
.slide-intro-cat {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-soft);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* --- Annotation slide (two-panel: focused email + detail) --- */
.slide-anno {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 32px;
  align-items: start;
}
.slide-anno-email-col {
  min-width: 0;
}
.slide-anno-email-wrap {
  max-height: 62vh;
  overflow-y: auto;
  padding: 4px;
}
.slide-anno-email-wrap .email-specimen {
  pointer-events: none;
}
/* The focused annotated element glows */
.slide-anno-email-wrap [data-anno-focus="true"] {
  background: rgba(251, 196, 66, 0.45) !important;
  box-shadow: 0 0 0 3px var(--pet-yellow), 0 0 0 6px rgba(251, 196, 66, 0.35) !important;
  animation: annoGlow 1.8s ease-in-out infinite;
}
@keyframes annoGlow {
  0%, 100% { box-shadow: 0 0 0 3px var(--pet-yellow), 0 0 0 6px rgba(251, 196, 66, 0.35); }
  50% { box-shadow: 0 0 0 3px var(--pet-yellow), 0 0 0 10px rgba(251, 196, 66, 0.15); }
}
.slide-anno-email-wrap [data-anno-focus="true"] .anno-marker {
  transform: scale(1.4);
  box-shadow: 0 0 0 3px white, 0 0 0 5px var(--anno), 0 4px 14px rgba(224, 90, 32, 0.5) !important;
}

.slide-anno-detail {
  position: sticky;
  top: 0;
}
.slide-anno-num-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.slide-anno-num {
  width: 48px; height: 48px;
  background: var(--anno);
  color: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--anno-glow);
}
.slide-anno-label {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.slide-anno-summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  margin-bottom: 20px;
}
.slide-anno-compare {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  margin-bottom: 16px;
}
.slide-anno-compare-row {
  padding: 11px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  overflow-wrap: anywhere;
}
.slide-anno-compare-row:last-child { border-bottom: none; }
.slide-anno-compare-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.slide-anno-compare-tag.fake { background: #fde0d7; color: var(--sev-crit); }
.slide-anno-compare-tag.real { background: #dcf0e0; color: var(--sev-low); }
.slide-anno-compare-val.fake {
  color: var(--sev-crit);
  text-decoration: line-through wavy rgba(201, 30, 30, 0.3);
}
.slide-anno-compare-val.real { color: var(--sev-low); font-weight: 500; }
.slide-anno-compare-note {
  font-size: 12px;
  padding: 9px 14px;
  background: var(--pet-yellow-soft);
  color: var(--text-soft);
  font-style: italic;
  border-top: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
}

.slide-anno-examples { }
.slide-anno-examples-head {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-fade);
  margin-bottom: 8px;
  font-weight: 600;
}
.slide-anno-examples ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.slide-anno-examples li {
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: var(--text-soft);
  background: var(--surface-soft);
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px dashed var(--border);
  overflow-wrap: anywhere;
}
.slide-anno-examples li:last-child { border-bottom: none; }
.slide-anno-examples .ex-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: 'DM Sans', sans-serif;
}
.slide-anno-examples .ex-tag.fake { background: #fde0d7; color: var(--sev-crit); }
.slide-anno-examples .ex-tag.real { background: #dcf0e0; color: var(--sev-low); }
.slide-anno-examples .ex-tag.neutral { background: var(--surface-shade); color: var(--text-soft); }
.slide-anno-examples .ex-val.fake { color: var(--sev-crit); }
.slide-anno-examples .ex-val.real { color: var(--sev-low); font-weight: 500; }

/* --- Consequences slide --- */
.slide-consequences {
  max-width: 880px;
  margin: 0 auto;
  padding: 40px 48px;
  background: var(--pet-dark);
  color: white;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.slide-consequences::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 15%, rgba(224, 90, 32, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(201, 30, 30, 0.1) 0%, transparent 60%);
  pointer-events: none;
}
.slide-consequences > * { position: relative; z-index: 1; }
.slide-consequences .slide-kicker { color: var(--sev-high); }
.slide-consequences .slide-headline { color: white; }
.slide-consequences-body {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255,255,255,0.92);
}

/* --- Cascade slide (the two-wave story) --- */
.slide-cascade-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: stretch;
  margin: 28px 0 24px;
}
.slide-cascade-wave {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.slide-cascade-wave.wave1 {
  border-top: 4px solid var(--text-fade);
}
.slide-cascade-wave.wave2 {
  border-top: 4px solid var(--sev-crit);
  background: linear-gradient(180deg, #fef7f7 0%, var(--surface) 100%);
}
.slide-cascade-wave-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-soft);
  margin-bottom: 12px;
  font-weight: 700;
}
.slide-cascade-wave.wave2 .slide-cascade-wave-label { color: var(--sev-crit); }
.slide-cascade-wave-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
  flex: 1;
}

.slide-cascade-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
}
.slide-cascade-arrow-glyph {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  color: var(--pet-dark);
  letter-spacing: -0.05em;
}
.slide-cascade-arrow-label {
  position: absolute;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 46px;
  text-align: center;
}

.slide-cascade-example {
  background: #f5f6fa;
  border: 1px solid var(--border);
  border-left: 3px solid var(--sev-crit);
  border-radius: 4px;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  line-height: 1.55;
  margin-top: auto;
}
.slide-cascade-example-head {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sev-crit);
  font-weight: 700;
  margin-bottom: 8px;
  font-family: 'DM Sans', sans-serif;
}
.slide-cascade-example-field {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  overflow-wrap: anywhere;
}
.slide-cascade-example-field .k {
  color: var(--text-fade);
  display: inline-block;
  width: 62px;
}
.slide-cascade-example-excerpt {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  font-style: italic;
  color: var(--text-soft);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  line-height: 1.55;
}

.slide-cascade-lesson {
  background: var(--pet-dark);
  color: white;
  padding: 22px 28px;
  border-radius: 8px;
  border-left: 4px solid var(--pet-yellow);
  font-size: 17px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.slide-cascade-lesson::before {
  content: 'THE LESSON';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--pet-yellow);
  font-weight: 600;
  margin-bottom: 8px;
}

/* --- Defense slide --- */
.slide-defense {
  max-width: 760px;
  margin: 0 auto;
}
.slide-defense-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: grid;
  gap: 10px;
}
.slide-defense-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px 14px 14px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: stretch;
  transition: background 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}
.slide-defense-list li:hover {
  background: white;
  border-color: var(--pet-blue);
  transform: translateX(2px);
}
.slide-defense-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 800;
  color: var(--pet-blue);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  padding-right: 12px;
  user-select: none;
}
.slide-defense-rule {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 3px;
}
.slide-defense-why {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-soft);
  letter-spacing: -0.002em;
}

/* --- Closing slide: home ↔ digital comparison --- */
.slide-closing {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 30px;
}
.slide-closing .slide-kicker { color: var(--pet-yellow); }
.slide-closing .slide-headline {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
  text-wrap: balance;
  max-width: 18ch;
  margin-left: auto;
  margin-right: auto;
}
.slide-closing-intro {
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-soft);
  font-style: italic;
  margin-bottom: 30px;
  letter-spacing: -0.005em;
}

/* Comparison chart — three rows of Home ↔ Digital pairs */
.closing-grid {
  display: grid;
  grid-template-columns: 1fr 52px 1fr;
  gap: 10px 14px;
  max-width: 680px;
  margin: 0 auto 34px;
  text-align: left;
}
.cc-header {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-weight: 700;
  padding: 0 0 6px;
  text-align: center;
}
.cc-header-home { color: var(--pet-blue); }
.cc-header-digital { color: var(--sev-crit); }

.cc-cell {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px 13px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 78px;
}
.cc-home    { border-left: 3px solid var(--pet-blue); }
.cc-digital { border-left: 3px solid var(--sev-crit); }

.cc-cell-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.cc-icon {
  font-size: 20px;
  line-height: 1;
}
.cc-name {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--text);
}
.cc-desc {
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.45;
}

.cc-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  user-select: none;
}

/* Body paragraph — tight, centered, with the punch in a colored strong */
.slide-closing-body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  max-width: 560px;
  margin: 0 auto 22px;
  text-align: center;
  text-wrap: pretty;
}
.slide-closing-body strong {
  color: var(--sev-crit);
  font-weight: 800;
}

.slide-closing-punch {
  font-size: 16px;
  line-height: 1.5;
  color: var(--pet-dark);
  font-weight: 700;
  margin-top: 12px;
  font-style: italic;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 680px) {
  .closing-grid {
    grid-template-columns: 1fr 36px 1fr;
    gap: 8px 8px;
  }
  .cc-cell { padding: 12px 12px 11px; min-height: 70px; }
  .cc-arrow { font-size: 14px; }
}

/* --- Footer nav --- */
.play-foot {
  flex-shrink: 0;
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.play-nav-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.play-nav-btn:hover:not(:disabled) {
  border-color: var(--pet-blue);
  color: var(--pet-blue);
}
.play-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.play-nav-btn.primary {
  background: var(--pet-blue);
  color: white;
  border-color: var(--pet-blue);
  box-shadow: 0 4px 12px -4px rgba(34, 80, 213, 0.45);
}
.play-nav-btn.primary:hover:not(:disabled) {
  background: var(--pet-blue-hover);
  border-color: var(--pet-blue-hover);
  color: white;
}
.play-nav-arrow { font-size: 14px; }

.play-dots {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: center;
}
.play-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
  cursor: pointer;
  transition: all 0.14s;
}
.play-dot:hover { background: var(--text-fade); }
.play-dot.active {
  background: var(--pet-blue);
  transform: scale(1.4);
}
.play-dot.visited { background: var(--pet-blue-soft); border: 1px solid var(--pet-blue); }

/* --- Play button in Field Guide workstation header --- */
.fg-play-btn {
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.14s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.005em;
  box-shadow: 0 2px 6px -2px rgba(251, 196, 66, 0.5);
}
.fg-play-btn:hover {
  background: #fcd372;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -3px rgba(251, 196, 66, 0.55);
}
.fg-play-btn-icon {
  width: 18px; height: 18px;
  background: var(--pet-dark);
  color: var(--pet-yellow);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  padding-left: 1px;
}

.fg-work-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .slide-anno { grid-template-columns: 1fr; }
  .slide-anno-detail { position: static; }
  .slide-cascade-grid { grid-template-columns: 1fr; }
  .slide-cascade-arrow { transform: rotate(90deg); padding: 10px 0; }
  .play-stage { padding: 24px 20px; }
}

/* =========================================================================
   HARVEST CINEMATIC v2 — pop-out narration, working_inbox, lockscreen,
   exfil tracker, code noise, connection terminated, damage report
   ========================================================================= */

/* --- Pop-out narration on the victim stage (replaces bottom strip) --- */
.aft-victim-popup {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: rgba(14, 18, 28, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: white;
  padding: 14px 22px;
  border-radius: 10px;
  font-style: italic;
  font-size: 14px;
  max-width: 520px;
  width: max-content;
  line-height: 1.5;
  box-shadow:
    0 10px 32px rgba(0,0,0,0.25),
    0 2px 6px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  z-index: 20;
  animation: aftPopupIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.aft-victim-popup::before {
  /* Subtle pointer/tail at bottom */
  content: '';
  position: absolute;
  top: -1px;
  left: 22px;
  width: 8px;
  height: 8px;
  background: rgba(251, 196, 66, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(251, 196, 66, 0.7);
  animation: aftPopupDot 1.4s ease-in-out infinite;
}
@keyframes aftPopupIn {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes aftPopupDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.aft-victim-popup.fading {
  animation: aftPopupOut 0.3s ease forwards;
}
@keyframes aftPopupOut {
  to { opacity: 0; transform: translateX(-50%) translateY(-6px); }
}

/* The victim stage needs to be positioning context for the popup */
.aft-panel-victim .aft-panel-stage {
  position: relative;
}

/* --- Working Inbox scene (victim continues normally) --- */
.scene-working-inbox {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
}
.scene-wi-head {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-soft);
  flex-shrink: 0;
}
.scene-wi-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.01em;
}
.scene-wi-clock {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-fade);
  letter-spacing: 0.08em;
}
.scene-wi-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.scene-wi-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 140px 1fr 60px;
  gap: 10px;
  align-items: center;
  position: relative;
  transition: background 0.14s;
}
.scene-wi-row:hover { background: var(--surface-soft); }
.scene-wi-row.unread { background: var(--pet-blue-wash); }
.scene-wi-row.unread .scene-wi-subj { font-weight: 700; }
.scene-wi-row.it-alert {
  background: #fff5e0;
  border-left: 4px solid #d4830d;
  padding-left: 10px;
  animation: itAlertPulse 1.6s ease-out;
}
@keyframes itAlertPulse {
  0% {
    background: #ffd880;
    box-shadow: 0 0 0 3px rgba(251, 196, 66, 0.6);
  }
  100% {
    background: #fff5e0;
    box-shadow: 0 0 0 0 rgba(251, 196, 66, 0);
  }
}
/* Shared-doc notification — appears during Act I.
   Looks like a legit SharePoint share, with a subtle blue left bar. */
.scene-wi-row.shared-doc-alert {
  border-left: 3px solid var(--pet-blue);
  padding-left: 11px;
  animation: sharedDocArrive 0.9s ease-out;
}
@keyframes sharedDocArrive {
  0% {
    background: rgba(34, 80, 213, 0.18);
    transform: translateX(-4px);
    opacity: 0;
  }
  40% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    background: var(--pet-blue-wash);
    transform: translateX(0);
    opacity: 1;
  }
}
.scene-wi-row.shared-doc-alert .scene-wi-from {
  color: var(--pet-blue);
}
/* Active-read state — email has been opened, now showing as read-but-current */
.scene-wi-row.active-read {
  background: var(--surface-soft);
  border-left: 3px solid var(--text-fade);
  padding-left: 11px;
}
.scene-wi-row.active-read .scene-wi-subj {
  font-weight: 400;
  color: var(--text-soft);
}
.scene-wi-from {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.scene-wi-row.it-alert .scene-wi-from { color: #8a5200; }
.scene-wi-subj {
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.scene-wi-subj .preview {
  color: var(--text-fade);
  font-weight: 400;
}
.scene-wi-time {
  font-size: 10.5px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}
.scene-wi-cursor {
  position: absolute;
  width: 18px;
  height: 22px;
  pointer-events: none;
  z-index: 5;
  animation: wiCursorMove 10s ease-in-out infinite;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.35));
}
.scene-wi-cursor::before {
  /* Proper arrow cursor shape using an SVG data URL */
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'><path d='M 2 2 L 2 18 L 6 14 L 9 20 L 11.5 19 L 8.5 13 L 14 13 Z' fill='white' stroke='black' stroke-width='1.2' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
@keyframes wiCursorMove {
  0%   { left: 60px;  top: 70px;  }
  20%  { left: 240px; top: 120px; }
  40%  { left: 180px; top: 200px; }
  60%  { left: 320px; top: 165px; }
  80%  { left: 100px; top: 250px; }
  100% { left: 60px;  top: 70px;  }
}

/* --- Lockscreen takeover (victim side) --- */
.scene-lockscreen {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a0a0a 0%, #0a0000 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 30;
  color: white;
  padding: 30px;
  animation: lockscreenIn 0.4s ease;
}
@keyframes lockscreenIn {
  0% { opacity: 0; transform: scale(1.02); }
  50% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}
.scene-lockscreen::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.5) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,0.015) 0px,
      rgba(255,255,255,0.015) 1px,
      transparent 1px,
      transparent 3px
    );
  pointer-events: none;
  animation: lockscreenStatic 0.3s steps(6) infinite;
}
@keyframes lockscreenStatic {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0, 1px); }
  75% { transform: translate(0, -1px); }
}
.scene-lockscreen-icon {
  font-size: 56px;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 16px rgba(255, 56, 56, 0.6));
  z-index: 1;
  animation: lockIconShake 0.6s ease-out;
}
@keyframes lockIconShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.scene-lockscreen-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ff3838;
  text-shadow: 0 0 24px rgba(255, 56, 56, 0.6);
  margin-bottom: 10px;
  z-index: 1;
  text-align: center;
}
.scene-lockscreen-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  margin-bottom: 24px;
  z-index: 1;
  text-align: center;
}
.scene-lockscreen-body {
  max-width: 440px;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  z-index: 1;
  font-style: italic;
}
.scene-lockscreen-body strong {
  color: var(--pet-yellow);
  font-weight: 600;
  font-style: normal;
}
.scene-lockscreen-meta {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  z-index: 1;
}

/* --- Exfil tracker (attacker panel, clickable drawer) --- */
.aft-exfil-tracker {
  flex-shrink: 0;
  margin: 10px 16px 2px;
  background: #151820;
  border: 1px solid rgba(201, 30, 30, 0.28);
  border-left: 3px solid var(--sev-crit);
  border-radius: 5px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
  font-family: 'JetBrains Mono', monospace;
}
.aft-exfil-tracker.hidden { display: none; }
.aft-exfil-tracker:hover {
  background: #1a1f2e;
  border-left-color: #ff5454;
}

/* Flash when a new capture lands — yellow glow draws the eye */
@keyframes exfilFlash {
  0%   { border-left-color: var(--sev-crit); background: #151820; box-shadow: none; }
  18%  { border-left-color: var(--pet-yellow); background: #242318; box-shadow: 0 0 26px rgba(251, 196, 66, 0.45), inset 0 0 18px rgba(251, 196, 66, 0.08); }
  100% { border-left-color: var(--sev-crit); background: #151820; box-shadow: none; }
}
.aft-exfil-tracker.flash {
  animation: exfilFlash 0.75s ease-out;
}
.aft-exfil-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aft-exfil-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.45);
  font-weight: 700;
}
.aft-exfil-counter {
  color: #ff6060;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex: 1;
  text-align: right;
}
.aft-exfil-counter .aft-exfil-size {
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  margin-left: 8px;
}
.aft-exfil-toggle {
  color: rgba(255,255,255,0.5);
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
  flex-shrink: 0;
}
.aft-exfil-tracker.open .aft-exfil-toggle {
  transform: rotate(90deg);
}
.aft-exfil-detail {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,0.12);
  font-size: 11px;
  color: rgba(255,255,255,0.75);
}
.aft-exfil-tracker.open .aft-exfil-detail {
  display: block;
}
.aft-exfil-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
}
.aft-exfil-item:last-child { border-bottom: none; }
.aft-exfil-item-name {
  color: rgba(255,255,255,0.75);
  flex: 1;
  font-size: 11px;
}
.aft-exfil-item-count {
  color: var(--pet-yellow);
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

/* --- Code noise stream (fast scrolling attacker activity) --- */
.term-noise-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: rgba(120, 200, 120, 0.42);
  line-height: 1.55;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  animation: noiseIn 0.12s ease;
  letter-spacing: -0.01em;
}
@keyframes noiseIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Attacker panel: CONNECTION TERMINATED state --- */
.aft-panel-attacker.terminated {
  animation: terminatedFlash 0.5s ease;
}
.aft-panel-attacker.terminated .aft-terminal {
  opacity: 0.4;
  filter: grayscale(0.8);
  pointer-events: none;
  transition: opacity 0.6s, filter 0.6s;
}
.aft-panel-attacker.terminated .aft-exfil-tracker {
  border-left-color: rgba(255,255,255,0.2);
  opacity: 0.5;
}
@keyframes terminatedFlash {
  0%, 100% { background: #0d0f14; }
  50% { background: rgba(255, 56, 56, 0.15); }
}

.aft-terminated-banner {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  background: rgba(201, 30, 30, 0.95);
  color: white;
  padding: 16px 28px;
  border-radius: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), 0 0 0 2px rgba(255,56,56,0.3);
  z-index: 10;
  animation: terminatedBannerIn 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}
.aft-terminated-banner::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ff3838;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 8px #ff3838;
  animation: terminatedDot 1s steps(2) infinite;
}
@keyframes terminatedDot { to { opacity: 0.2; } }
@keyframes terminatedBannerIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* --- Damage report takeover (attacker panel) --- */
.aft-damage-report {
  position: absolute;
  inset: 0;
  background: #0a0c12;
  color: white;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 24px 26px 32px;
  z-index: 20;
  animation: damageReportIn 0.4s ease;
}
@keyframes damageReportIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.aft-damage-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--pet-yellow);
  font-weight: 700;
  margin-bottom: 10px;
}
.aft-damage-headline {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
  color: white;
}
.aft-damage-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  font-style: italic;
  margin-bottom: 22px;
  line-height: 1.5;
  font-family: 'JetBrains Mono', monospace;
}
.aft-damage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.aft-damage-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  animation: damageItemIn 0.3s ease both;
}
.aft-damage-item.highlight {
  background: rgba(251, 196, 66, 0.07);
  border-left-color: var(--pet-yellow);
}
.aft-damage-item:nth-child(1) { animation-delay: 0.1s; }
.aft-damage-item:nth-child(2) { animation-delay: 0.2s; }
.aft-damage-item:nth-child(3) { animation-delay: 0.3s; }
.aft-damage-item:nth-child(4) { animation-delay: 0.4s; }
.aft-damage-item:nth-child(5) { animation-delay: 0.5s; }
.aft-damage-item:nth-child(6) { animation-delay: 0.6s; }
.aft-damage-item:nth-child(7) { animation-delay: 0.7s; }
@keyframes damageItemIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}
.aft-damage-icon {
  font-size: 22px;
  line-height: 1;
  padding-top: 2px;
}
.aft-damage-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.aft-damage-item-name {
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: -0.005em;
}
.aft-damage-item.highlight .aft-damage-item-name {
  color: var(--pet-yellow);
}
.aft-damage-item-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.05em;
  flex-shrink: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.aft-damage-item-value {
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255,255,255,0.72);
  font-style: italic;
}
.aft-damage-footer {
  background: var(--sev-crit);
  color: white;
  padding: 14px 18px;
  border-radius: 5px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.005em;
  text-align: center;
  box-shadow: 0 4px 14px -4px rgba(201, 30, 30, 0.5);
}

/* --- Shared Doc scene (post-login, what the victim reads) --- */
.scene-shared-doc {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
  animation: sceneIn 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 360px;
}
.sd-chrome {
  background: #e8eaef;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #d0d3dc;
  flex-shrink: 0;
}
.sd-chrome .scene-browser-dots { flex-shrink: 0; }
.sd-chrome .sd-url {
  flex: 1;
  background: white;
  border: 1px solid #c8cddc;
  border-radius: 14px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sd-toolbar {
  background: #f7f8fa;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sd-toolbar-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.sd-toolbar-title .doc-icon {
  color: #2b579a; /* Word blue */
  margin-right: 6px;
}
.sd-toolbar-meta {
  font-size: 10.5px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
}
.sd-body {
  flex: 1;
  padding: 22px 32px;
  overflow-y: auto;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.65;
  scroll-behavior: smooth;
}
.sd-body h1 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  color: var(--text);
}
.sd-body .sd-sub {
  font-size: 11.5px;
  color: var(--text-fade);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
}
.sd-body h2 {
  font-size: 13px;
  font-weight: 700;
  margin: 16px 0 6px;
  color: var(--pet-dark);
  letter-spacing: -0.005em;
}
.sd-body p {
  margin: 0 0 10px;
}
.sd-body table.sd-budget {
  width: 100%;
  border-collapse: collapse;
  font-size: 11.5px;
  margin: 6px 0 10px;
}
.sd-body table.sd-budget td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
}
.sd-body table.sd-budget td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}
.sd-body table.sd-budget tr.sd-total td {
  border-top: 2px solid var(--pet-dark);
  border-bottom: none;
  padding-top: 6px;
  font-weight: 800;
}
.sd-presence {
  font-size: 10.5px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sd-presence::before {
  content: '';
  width: 8px;
  height: 8px;
  background: #3aa64e;
  border-radius: 50%;
  display: inline-block;
}

/* --- Email open scene (opened email view with CTA + optional reply) --- */
.scene-email-open {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 6px 20px -8px rgba(0,0,0,0.12);
  animation: sceneIn 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 300px;
  position: relative;
}
.eo-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  flex-shrink: 0;
}
.eo-back {
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--text-soft);
  cursor: default;
  padding: 4px 8px;
  border-radius: 4px;
}
.eo-head {
  padding: 16px 22px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.eo-subj {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.eo-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.eo-from {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.eo-from-name {
  color: var(--text);
  font-weight: 600;
}
.eo-time {
  font-size: 11.5px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.eo-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text);
}
.eo-body p {
  margin: 0 0 12px;
}
.eo-body p:last-child { margin-bottom: 0; }
.eo-body .eo-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--pet-blue-wash);
  border: 1px solid #c7d4f0;
  border-radius: 6px;
  font-size: 12px;
  color: var(--text);
  margin: 4px 0;
}
.eo-body .eo-doc-chip .doc-icon { font-size: 16px; }
.eo-body .eo-quote {
  border-left: 3px solid var(--border-strong);
  padding: 2px 12px;
  color: var(--text-soft);
  font-style: italic;
  margin: 10px 0;
}
.eo-cta-row {
  margin: 16px 0 4px;
}
.eo-cta {
  background: var(--pet-blue);
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 4px;
  letter-spacing: -0.005em;
  cursor: default;
  box-shadow: 0 1px 2px rgba(34, 80, 213, 0.2);
}
.eo-cta.clicked {
  background: #1a3fa8;
  transform: translateY(1px);
  box-shadow: none;
}
/* Embedded reply compose inside an opened email */
.eo-reply {
  border-top: 1px solid var(--border);
  padding: 12px 22px 14px;
  background: var(--surface-soft);
  flex-shrink: 0;
  animation: composeSlideUp 0.25s ease;
}
.eo-reply-head {
  font-size: 11px;
  color: var(--text-fade);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 6px;
  font-weight: 700;
}
.eo-reply-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  min-height: 22px;
}
.eo-reply-body .caret {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: var(--text);
  margin-left: 1px;
  vertical-align: middle;
  animation: caretBlink 1s steps(2) infinite;
}
.eo-reply-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  font-size: 10.5px;
  color: var(--text-fade);
  font-family: 'JetBrains Mono', monospace;
}

/* --- Reply compose (slides up from bottom of working_inbox) --- */
.scene-wi-compose {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: white;
  border: 1px solid var(--border-strong);
  border-radius: 8px 8px 0 0;
  box-shadow: 0 -8px 24px -8px rgba(0,0,0,0.18), 0 -2px 6px rgba(0,0,0,0.06);
  overflow: hidden;
  z-index: 15;
  animation: composeSlideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes composeSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.scene-wi-compose.sending {
  animation: composeSlideDown 0.28s ease-in forwards;
}
@keyframes composeSlideDown {
  to { transform: translateY(110%); opacity: 0; }
}
.wi-compose-head {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
  font-size: 11.5px;
  color: var(--text-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wi-compose-to {
  font-weight: 600;
  color: var(--text);
}
.wi-compose-body {
  padding: 12px 14px;
  min-height: 44px;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
  font-family: inherit;
}
.wi-compose-body .caret {
  display: inline-block;
  width: 1px;
  height: 13px;
  background: var(--text);
  margin-left: 1px;
  vertical-align: middle;
  animation: caretBlink 1s steps(2) infinite;
}
@keyframes caretBlink { to { opacity: 0.2; } }
.wi-compose-actions {
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.wi-compose-sent-toast {
  position: absolute;
  right: 32px;
  bottom: 120px;
  background: var(--sev-low);
  color: white;
  padding: 6px 14px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 12px -3px rgba(58, 166, 78, 0.5);
  animation: toastPop 1.4s ease forwards;
  z-index: 20;
}
@keyframes toastPop {
  0% { opacity: 0; transform: translateY(4px); }
  15% { opacity: 1; transform: translateY(0); }
  75% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* --- Progress bar (PowerShell-style) in attacker terminal --- */
.term-progress {
  font-family: 'JetBrains Mono', monospace;
  margin: 8px 0 4px;
  animation: lineIn 0.2s ease;
}
.term-progress-label {
  font-size: 11.5px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 3px;
}
.term-progress-label .term-plus-inline {
  color: #4caf50;
  margin-right: 6px;
}
.term-progress-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  font-size: 11.5px;
}
.term-progress-track {
  color: var(--pet-yellow);
  letter-spacing: -0.15em;
  overflow: hidden;
  white-space: nowrap;
}
.term-progress-track .unfilled {
  color: rgba(255,255,255,0.2);
}
.term-progress-count {
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  min-width: 100px;
  text-align: right;
}
.term-progress-count.done {
  color: var(--sev-low);
}

/* --- PASSWORD RESET variant of lockscreen --- */
.scene-lockscreen.reset {
  background: linear-gradient(135deg, #0a1a0a 0%, #000800 100%);
}
.scene-lockscreen.reset::before {
  /* Slightly different overlay for the reset state */
  background:
    radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.5) 100%),
    repeating-linear-gradient(0deg, rgba(100,200,100,0.02) 0px, rgba(100,200,100,0.02) 1px, transparent 1px, transparent 3px);
}
.scene-lockscreen.reset .scene-lockscreen-icon {
  filter: drop-shadow(0 0 16px rgba(251, 196, 66, 0.7));
  animation: resetIconPulse 0.8s ease;
}
@keyframes resetIconPulse {
  0% { transform: scale(0.9); opacity: 0.4; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.scene-lockscreen.reset .scene-lockscreen-headline {
  color: var(--pet-yellow);
  text-shadow: 0 0 20px rgba(251, 196, 66, 0.55);
  animation: resetHeadlineIn 0.5s ease;
}
@keyframes resetHeadlineIn {
  from { opacity: 0; letter-spacing: 0.15em; }
  to { opacity: 1; letter-spacing: 0.1em; }
}

/* --- Epilogue panel (appears over the damage report) --- */
.aft-epilogue {
  position: absolute;
  inset: 0;
  background: #0d1014;
  color: white;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: 24px 26px 32px;
  z-index: 25;
  animation: epilogueIn 0.5s ease;
}
@keyframes epilogueIn {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.aft-epilogue::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(251, 196, 66, 0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 80%, rgba(201, 30, 30, 0.06) 0%, transparent 55%);
  pointer-events: none;
}
.aft-epilogue-inner { position: relative; z-index: 1; }
.aft-epilogue-timeskip {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  color: var(--pet-yellow);
  text-align: center;
  margin-bottom: 4px;
  font-weight: 700;
  padding-top: 4px;
  animation: timeskipLabelIn 0.6s ease;
}
@keyframes timeskipLabelIn {
  from { opacity: 0; letter-spacing: 0.7em; }
  to { opacity: 1; letter-spacing: 0.42em; }
}
.aft-epilogue-divider {
  width: 40px;
  height: 2px;
  background: var(--pet-yellow);
  margin: 0 auto 22px;
  opacity: 0.55;
}
.aft-epilogue-headline {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 14px;
  color: white;
}
.aft-epilogue-intro {
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255,255,255,0.78);
  margin-bottom: 22px;
  font-style: italic;
}
.aft-epilogue-stats {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}
.aft-epilogue-stat {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--pet-yellow);
  border-radius: 4px;
  animation: damageItemIn 0.35s ease both;
}
.aft-epilogue-stat:nth-child(1) { animation-delay: 0.15s; }
.aft-epilogue-stat:nth-child(2) { animation-delay: 0.3s; }
.aft-epilogue-stat:nth-child(3) { animation-delay: 0.45s; }
.aft-epilogue-stat:nth-child(4) { animation-delay: 0.6s; }
.aft-epilogue-stat-icon {
  font-size: 18px;
  line-height: 1;
}
.aft-epilogue-stat-label {
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.4;
}
.aft-epilogue-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 800;
  color: var(--pet-yellow);
  letter-spacing: -0.01em;
}
.aft-epilogue-footer {
  background: rgba(251, 196, 66, 0.08);
  color: rgba(255,255,255,0.9);
  padding: 13px 16px;
  border-left: 3px solid var(--pet-yellow);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.45;
  text-align: center;
  font-style: italic;
}

/* =========================================================================
   SILENT BACKDOOR SLIDE (pt-004 OAuth, why password changes don't help)
   ========================================================================= */
.slide-silent-backdoor {
  max-width: 1020px;
  margin: 0 auto;
}
.slide-silent-backdoor .slide-headline { margin-bottom: 14px; }

.sb-intro {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-bottom: 28px;
  max-width: 780px;
}

/* --- Credential vs Consent comparison --- */
.sb-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 28px;
}

.sb-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px 22px 20px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sb-col-creds {
  border-top: 4px solid var(--sev-low);
}
.sb-col-consent {
  border-top: 4px solid var(--sev-crit);
  background: linear-gradient(180deg, #fef7f7 0%, var(--surface) 100%);
}

.sb-col-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-soft);
  margin-bottom: 3px;
  font-weight: 700;
}
.sb-col-consent .sb-col-label { color: var(--sev-crit); }
.sb-col-sub {
  font-size: 12.5px;
  color: var(--text-fade);
  font-style: italic;
  margin-bottom: 18px;
}

.sb-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  flex: 1;
}
.sb-steps li {
  position: relative;
  padding: 8px 0 8px 36px;
  font-size: 13.5px;
  line-height: 1.5;
  counter-increment: step;
  color: var(--text);
}
.sb-steps li + li {
  border-top: 1px dashed var(--border);
}
.sb-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 9px;
  width: 22px;
  height: 22px;
  background: var(--border-strong);
  color: var(--text-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
}
.sb-col-consent .sb-steps li::before {
  background: var(--sev-crit);
  color: white;
}
.sb-col-creds .sb-steps li::before {
  background: var(--sev-low);
  color: white;
}

.sb-outcome {
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 4px;
  margin-top: auto;
  text-align: center;
  letter-spacing: -0.005em;
}
.sb-outcome-success {
  background: #dcf0e0;
  color: var(--sev-low);
  border: 1px solid #a8d6b0;
}
.sb-outcome-fail {
  background: #fde0d7;
  color: var(--sev-crit);
  border: 1px solid #f2a898;
}

/* --- Defense layers panel (dark, striking) --- */
.sb-defenses {
  background: var(--pet-dark);
  color: white;
  padding: 24px 28px;
  border-radius: 8px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.sb-defenses::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 20% 10%, rgba(251, 196, 66, 0.06) 0%, transparent 55%);
  pointer-events: none;
}
.sb-defenses > * { position: relative; z-index: 1; }
.sb-defenses-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--pet-yellow);
  font-weight: 700;
  margin-bottom: 10px;
}
.sb-defenses-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.35;
  margin-bottom: 22px;
  color: white;
}

.sb-layers {
  display: grid;
  gap: 9px;
}
.sb-layer {
  display: grid;
  grid-template-columns: 42px 170px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  border-left: 3px solid rgba(255,255,255,0.12);
  transition: background 0.14s;
}
.sb-layer-catch {
  background: rgba(251, 196, 66, 0.08);
  border-left-color: var(--pet-yellow);
}
.sb-layer-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  font-size: 15px;
  flex-shrink: 0;
}
.sb-layer-catch .sb-layer-icon {
  background: rgba(251, 196, 66, 0.2);
}
.sb-layer-name {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.sb-layer-miss .sb-layer-name {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 56, 56, 0.5);
  text-decoration-thickness: 1.5px;
  color: rgba(255,255,255,0.7);
}
.sb-layer-miss .sb-layer-name::after {
  content: ' — no signal';
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  font-size: 12px;
  text-decoration: none;
  letter-spacing: 0;
  font-style: italic;
}
.sb-layer-catch .sb-layer-name {
  color: var(--pet-yellow);
}
.sb-layer-catch .sb-layer-name::after {
  content: ' — the only signal';
  font-weight: 600;
  color: var(--pet-yellow);
  font-size: 12px;
  letter-spacing: 0;
  opacity: 0.85;
}
.sb-layer-body {
  font-size: 12.5px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
}
.sb-layer-catch .sb-layer-body {
  color: rgba(255,255,255,0.88);
}

/* Narrow viewports: stack comparison, simplify defense layer grid */
@media (max-width: 780px) {
  .sb-comparison { grid-template-columns: 1fr; }
  .sb-layer {
    grid-template-columns: 42px 1fr;
    grid-template-rows: auto auto;
  }
  .sb-layer-icon { grid-row: 1 / 3; }
  .sb-layer-name { grid-column: 2; }
  .sb-layer-body { grid-column: 2; }
}

/* =========================================================================
   AFTERMATH GALLERY — pick a cinematic
   ========================================================================= */
.aftermath-gallery {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  overflow-y: auto;
  gap: 32px;
}
.aftermath-gallery.hidden { display: none; }

.gallery-header {
  text-align: center;
  max-width: 640px;
}
.gallery-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--text-soft);
  margin-bottom: 14px;
  font-weight: 600;
}
.gallery-title {
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
  margin-bottom: 18px;
  color: var(--text);
}
.gallery-title .y { color: var(--pet-yellow); }
.gallery-sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  width: 100%;
}
.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 26px 24px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 300px;
}
.gallery-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(34, 80, 213, 0.03) 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
}
.gallery-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -8px rgba(0,0,0,0.16);
  border-color: var(--pet-blue);
}
.gallery-card:hover::before { opacity: 1; }

.gallery-card-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--pet-blue);
  font-weight: 700;
  margin-bottom: 14px;
}
.gallery-card-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 6px;
  color: var(--text);
}
.gallery-card-latin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-fade);
  margin-bottom: 16px;
}
.gallery-card-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-soft);
  margin-bottom: 18px;
  flex: 1;
}
.gallery-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.gallery-card-meta-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-soft);
  padding: 4px 9px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-weight: 600;
}
.gallery-card-meta-tag.watched {
  background: #dcf0e0;
  color: var(--sev-low);
  border-color: #a8d6b0;
}
.gallery-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pet-blue);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 6px;
  align-self: flex-start;
  transition: background 0.14s;
}
.gallery-card:hover .gallery-card-cta {
  background: var(--pet-blue-hover);
}

/* Accent stripe along the top of each card */
.gallery-card.card-a { border-top: 4px solid var(--pet-blue); }
.gallery-card.card-b { border-top: 4px solid var(--sev-crit); }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* =========================================================================
   RANSOMWARE CINEMATIC — Day banner + System Struggle scene
   ========================================================================= */

/* --- Day banner overlay (fades on top of victim panel for ~2.4s) --- */
.aft-day-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(26, 31, 46, 0.94), rgba(13, 16, 20, 0.94));
  backdrop-filter: blur(8px);
  z-index: 40;
  pointer-events: none;
  animation: dayBannerCycle 2.4s ease forwards;
}
@keyframes dayBannerCycle {
  0%   { opacity: 0; }
  18%  { opacity: 1; }
  78%  { opacity: 1; }
  100% { opacity: 0; }
}
.aft-day-banner-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 56px;
  font-weight: 800;
  color: var(--pet-yellow);
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 0 24px rgba(251, 196, 66, 0.4);
}
.aft-day-banner-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  border-left: 1px solid rgba(255,255,255,0.25);
  padding-left: 18px;
  line-height: 1.4;
}

/* --- System Struggle scene (Day 14 detonation) --- */
.scene-system-struggle {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 360px;
  background: #0a4d8c;  /* classic Windows-ish desktop blue */
  border-radius: 6px;
  overflow: hidden;
  animation: sceneIn 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 6px 20px -8px rgba(0,0,0,0.3);
}
.ss-desktop {
  position: absolute;
  inset: 0;
  padding: 18px 22px;
  background:
    radial-gradient(ellipse at 30% 20%, #2a7bc8 0%, #0a4d8c 65%, #062f57 100%);
}
.ss-time {
  position: absolute;
  bottom: 12px;
  right: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border-radius: 3px;
}
.ss-icons {
  display: grid;
  grid-template-columns: repeat(auto-fit, 78px);
  gap: 18px 14px;
  padding: 8px;
}
.ss-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 3px;
  cursor: default;
  transition: filter 0.4s ease, transform 0.4s ease;
}
.ss-icon-glyph {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.ss-icon-name {
  font-size: 10.5px;
  color: white;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* The overlay layer — gets progressively more "panicked" as phases advance */
.ss-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 1px, transparent 1px, transparent 3px);
  animation: ssGlitchSubtle 0.4s steps(2) infinite;
}
@keyframes ssGlitchSubtle {
  0%   { transform: translateY(0); }
  100% { transform: translateY(1px); }
}

/* Cascade phase: icons go gray, names get .locked extension (added via JS) */
.scene-system-struggle.cascade .ss-icon {
  filter: grayscale(1) brightness(0.6);
}
.scene-system-struggle.cascade .ss-overlay {
  background:
    repeating-linear-gradient(0deg, rgba(255,80,80,0.06) 0, rgba(255,80,80,0.06) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(80, 0, 0, 0.4) 100%);
  animation: ssGlitchHeavy 0.16s steps(2) infinite;
}
@keyframes ssGlitchHeavy {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(2px); }
  100% { transform: translateY(-1px); }
}

/* Fake mouse cursor that lags */
.ss-cursor {
  position: absolute;
  width: 18px;
  height: 22px;
  top: 140px;
  left: 220px;
  z-index: 5;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
  animation: ssCursorLag 1.8s ease-in-out infinite;
}
.ss-cursor::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 22'><path d='M 2 2 L 2 18 L 6 14 L 9 20 L 11.5 19 L 8.5 13 L 14 13 Z' fill='white' stroke='black' stroke-width='1.2' stroke-linejoin='round'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
}
@keyframes ssCursorLag {
  0%, 70%   { transform: translate(0, 0); }
  72%       { transform: translate(40px, 8px); }
  74%, 95%  { transform: translate(40px, 8px); }
  96%       { transform: translate(80px, -4px); }
  100%      { transform: translate(80px, -4px); }
}

/* --- Error dialogs (layered in by applySystemStrugglePhase) --- */
.ss-error-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-1deg);
  width: 320px;
  background: #ece9d8;
  border: 2px solid #4a6f9c;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.25), 0 12px 30px -10px rgba(0,0,0,0.5);
  z-index: 10;
  font-family: 'Tahoma', 'DM Sans', sans-serif;
  animation: ssErrorPop 0.25s cubic-bezier(0.2, 1.6, 0.5, 1);
}
@keyframes ssErrorPop {
  from { opacity: 0; transform: translate(-50%, -50%) rotate(-1deg) scale(0.85); }
  to { opacity: 1; transform: translate(-50%, -50%) rotate(-1deg) scale(1); }
}
.ss-error-dialog:nth-of-type(2) {
  transform: translate(-30%, -30%) rotate(2deg);
}
.ss-error-dialog:nth-of-type(3) {
  transform: translate(-70%, -65%) rotate(-3deg);
}
.ss-error-bar {
  background: linear-gradient(to bottom, #0058e0, #003ec0);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
}
.ss-error-body {
  padding: 14px 14px 10px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 11.5px;
  color: #1b1b1b;
  line-height: 1.4;
}
.ss-error-icon {
  font-size: 24px;
  color: #c52a2a;
  text-align: center;
}
.ss-error-buttons {
  padding: 8px 14px 10px;
  display: flex;
  justify-content: flex-end;
}
.ss-error-btn {
  background: #d4d0c8;
  border: 1px solid #404040;
  padding: 3px 16px;
  font-size: 11px;
  font-family: inherit;
  cursor: default;
  box-shadow: inset 1px 1px 0 white, inset -1px -1px 0 #808080;
}

/* --- File rename cascade (layered in for cascade phase) --- */
.ss-file-rename {
  position: absolute;
  bottom: 60px;
  left: 22px;
  right: 22px;
  background: rgba(0, 0, 0, 0.78);
  border-left: 3px solid #ff5454;
  padding: 12px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  z-index: 8;
  animation: ssFileRenameIn 0.35s ease;
}
@keyframes ssFileRenameIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ss-file-line {
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ss-file-name {
  color: rgba(255,255,255,0.7);
}
.ss-file-arrow {
  color: #ff5454;
  font-weight: 700;
}
.ss-file-locked {
  color: #ff8080;
  font-weight: 600;
}
.ss-file-more {
  color: rgba(255,255,255,0.4);
  font-style: italic;
  padding-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 4px;
}

/* --- Continue-to-Post-Mortem button on epilogue overlay --- */
.aft-epilogue-continue-row {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: center;
}
.aft-epilogue-continue {
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border: none;
  padding: 12px 28px;
  font-size: 13.5px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 2px 0 rgba(0,0,0,0.4), 0 4px 16px -4px rgba(251, 196, 66, 0.4);
}
.aft-epilogue-continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 0 rgba(0,0,0,0.4), 0 6px 20px -4px rgba(251, 196, 66, 0.55);
}
.aft-epilogue-continue:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(0,0,0,0.4);
}

/* =========================================================================
   COMMAND-BLOCK ORCHESTRATOR — additional styles
   ========================================================================= */

/* Result line (drops in after progress completes) */
.term-output.term-result {
  color: rgba(255,255,255,0.88);
  padding-top: 4px;
}

/* Artifact ping line — yellow accent that ties the terminal output to
   the captured-data drawer at the top of the panel */
.term-output.term-artifact {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.9);
  padding: 2px 0 0;
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  animation: artifactLineIn 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}
@keyframes artifactLineIn {
  0%   { opacity: 0; transform: translateX(-6px); }
  60%  { opacity: 1; transform: translateX(2px); }
  100% { opacity: 1; transform: translateX(0); }
}
.term-artifact-arrow {
  color: var(--pet-yellow);
  font-weight: 700;
  flex-shrink: 0;
}
.term-artifact-tag {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  background: var(--pet-yellow);
  color: var(--pet-dark);
  padding: 2px 6px;
  border-radius: 2px;
  font-weight: 800;
  flex-shrink: 0;
  text-transform: uppercase;
}
.term-artifact-label {
  color: rgba(255,255,255,0.95);
  font-weight: 600;
}
.term-artifact-meta {
  color: rgba(255,255,255,0.45);
  font-size: 11px;
}

/* Initial "awaiting credentials" placeholder before the first command lands */
.term-awaiting {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.35);
  font-style: italic;
  padding: 4px 0;
}
.term-awaiting::before {
  content: '> ';
  color: #4ec9b0;
  font-style: normal;
}

/* Progress label has a "completing" state when count goes ✓ */
.term-progress .term-progress-count.done {
  color: var(--sev-low);
  font-weight: 700;
}

/* Star marker (used for highlights) */
.term-output .term-star { color: var(--pet-yellow); margin-right: 4px; }

/* =========================================================================
   CINEMATIC 2 — WORKSTATION PLAYER (scenario B)
   Single full-width pane. Workstation simulation + center debrief cards.
   ========================================================================= */

.scenario-b-player {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 24px 24px;
}
.scenario-b-player.hidden { display: none; }
.scenario-b-player .rw-head { padding: 0; }

.rw-stage {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-height: 600px;
}

.rw-workstation {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Workstation frame — looks like a remote-desktop view of a coworker's PC */
.rw-ws-frame {
  position: relative;
  flex: 1;
  background: #0a1426;
  border: 1px solid rgba(34,80,213,0.25);
  border-radius: 6px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35), inset 0 0 0 1px rgba(255,255,255,0.04);
  overflow: hidden;
  min-height: 580px;
  display: flex;
  flex-direction: column;
}
.rw-ws-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: linear-gradient(180deg, #1c2942 0%, #14213a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  flex-shrink: 0;
}
.rw-ws-host { letter-spacing: 0.06em; }
.rw-ws-clock { color: rgba(255,255,255,0.5); }
.rw-ws-canvas {
  flex: 1;
  position: relative;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(34,80,213,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(34,80,213,0.08) 0%, transparent 60%),
    linear-gradient(180deg, #1e2f4f 0%, #142038 100%);
  overflow: hidden;
}

/* --- Desktop scenes ----------------------------------------------------- */
.ws-desktop {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.ws-desktop.ws-dimmed { filter: brightness(0.45); }
.ws-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 100px));
  gap: 18px;
  padding: 32px;
  flex: 1;
  align-content: start;
}
.ws-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: default;
}
.ws-icon-glyph {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}
.ws-icon-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-align: center;
  max-width: 90px;
}
.ws-after-hours-stamp {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 2;
}
.ws-taskbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(0,0,0,0.4);
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  flex-shrink: 0;
}
.ws-tb-start { font-weight: 700; padding: 4px 10px; background: rgba(34,80,213,0.5); border-radius: 3px; }
.ws-tb-app { padding: 4px 10px; border-radius: 3px; opacity: 0.7; }
.ws-tb-app.active { background: rgba(255,255,255,0.1); opacity: 1; }
.ws-tb-tray { margin-left: auto; opacity: 0.65; }

/* --- Window scenes (inbox, email view) --------------------------------- */
.ws-window {
  position: absolute;
  top: 32px;
  left: 32px;
  right: 32px;
  bottom: 32px;
  background: #f5f6fa;
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}
.ws-win-titlebar {
  padding: 8px 14px;
  background: linear-gradient(180deg, #2250d5 0%, #1a3fa8 100%);
  color: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.ws-win-body {
  flex: 1;
  overflow: hidden;
  background: white;
  color: var(--pet-dark);
}
.ws-inbox { padding: 0; }
.ws-mail-row {
  display: grid;
  grid-template-columns: 160px 1fr 70px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  align-items: center;
}
.ws-mail-row.unread { background: rgba(34,80,213,0.06); font-weight: 600; }
.ws-mail-from { font-weight: 600; }
.ws-mail-row.unread .ws-mail-from { color: var(--pet-blue); }
.ws-mail-time { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: rgba(0,0,0,0.55); text-align: right; }

.ws-email-view { padding: 20px 24px; overflow: auto; }
.ws-email-meta {
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  margin-bottom: 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
}
.ws-email-meta div { margin-bottom: 4px; }
.ws-email-body { font-family: 'DM Sans', sans-serif; font-size: 13px; line-height: 1.6; }
.ws-email-attachment {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(251,196,66,0.18);
  border: 1px solid var(--pet-yellow);
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
}
.ws-att-icon { font-size: 16px; }
.ws-att-name { font-weight: 600; }
.ws-att-size { color: rgba(0,0,0,0.55); font-size: 11px; }

/* --- Flash (payload triggered) ------------------------------------------ */
.ws-flash {
  position: absolute;
  inset: 0;
  background: white;
  animation: wsFlash 0.5s ease-out forwards;
}
@keyframes wsFlash {
  0%   { opacity: 0; }
  10%  { opacity: 0.9; }
  100% { opacity: 0; }
}

/* --- Ambient (windows opening/closing rapidly) ------------------------- */
.ws-ambient { position: absolute; inset: 0; }
.ws-amb-window {
  position: absolute;
  background: rgba(245,246,250,0.95);
  border: 1px solid rgba(0,0,0,0.2);
  border-radius: 4px;
  padding: 8px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--pet-dark);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  animation: wsAmbWin 4s ease-in-out infinite;
  opacity: 0;
}
.ws-amb-window.w1 { top: 12%; left: 10%;  animation-delay: 0.0s; }
.ws-amb-window.w2 { top: 22%; left: 38%;  animation-delay: 0.6s; }
.ws-amb-window.w3 { top: 18%; right: 8%;  animation-delay: 1.2s; }
.ws-amb-window.w4 { top: 50%; left: 18%;  animation-delay: 1.8s; }
.ws-amb-window.w5 { top: 58%; right: 14%; animation-delay: 2.4s; }
.ws-amb-window.w6 { top: 70%; left: 42%;  animation-delay: 3.0s; }
@keyframes wsAmbWin {
  0%   { opacity: 0;    transform: scale(0.9);  }
  10%  { opacity: 0.95; transform: scale(1);    }
  60%  { opacity: 0.95; transform: scale(1);    }
  75%  { opacity: 0;    transform: scale(0.95); }
  100% { opacity: 0; }
}

/* --- Struggle scene (Day 14 — files renaming, errors, lag) -------------- */
.ws-struggle {
  position: absolute;
  inset: 0;
  filter: hue-rotate(-15deg) saturate(0.7);
}
.ws-cursor-laggy {
  position: absolute;
  top: 22%;
  left: 28%;
  font-size: 18px;
  color: white;
  animation: wsLag 1.4s ease-in-out infinite;
}
@keyframes wsLag {
  0%, 100% { transform: translate(0, 0); }
  20%      { transform: translate(40px, 0); }
  40%      { transform: translate(40px, 0); }
  60%      { transform: translate(40px, 30px); }
  80%      { transform: translate(40px, 30px); }
}
.ws-error-dialog {
  position: absolute;
  background: #f5f6fa;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 4px;
  width: 280px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: var(--pet-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  animation: wsErrorIn 0.4s ease-out;
}
.ws-error-dialog.d1 { top: 18%; left: 10%; }
.ws-error-dialog.d2 { top: 32%; right: 12%; }
.ws-err-bar {
  background: linear-gradient(180deg, #c43a3a 0%, #962525 100%);
  color: white;
  padding: 5px 10px;
  font-weight: 700;
  font-size: 10px;
}
.ws-err-body { padding: 12px; line-height: 1.4; }
.ws-err-actions { padding: 0 12px 10px; display: flex; gap: 8px; justify-content: flex-end; }
.ws-err-btn {
  padding: 4px 14px;
  border: 1px solid rgba(0,0,0,0.3);
  background: #e8e8e8;
  border-radius: 2px;
  font-size: 11px;
}
@keyframes wsErrorIn {
  from { opacity: 0; transform: translateY(-6px) rotate(var(--r, 0deg)); }
  to   { opacity: 1; }
}
.ws-rename-cascade {
  position: absolute;
  bottom: 80px;
  left: 32px;
  right: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  background: rgba(0,0,0,0.6);
  border-left: 3px solid #c43a3a;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  max-height: 140px;
  overflow: hidden;
}
.ws-rename-line {
  padding: 2px 0;
  animation: wsRenameIn 0.4s ease-out;
}
.ws-rename-line.dim { color: rgba(255,255,255,0.4); margin-top: 6px; font-style: italic; }
.rename-suffix { color: #ff6b6b; font-weight: 700; }
@keyframes wsRenameIn {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Time-lapse overlay ------------------------------------------------- */
.rw-timelapse {
  position: absolute;
  inset: 0;
  background: rgba(10,20,38,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 50;
  animation: rwTimelapseIn 0.4s ease-out;
}
.rw-timelapse.hidden { display: none; }
@keyframes rwTimelapseIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rw-tl-icon {
  font-size: 64px;
  color: var(--pet-yellow);
  animation: rwTlPulse 0.5s ease-in-out infinite alternate;
  letter-spacing: -8px;
}
@keyframes rwTlPulse {
  from { transform: translateX(-4px); opacity: 0.7; }
  to   { transform: translateX(8px); opacity: 1; }
}
.rw-tl-day {
  font-family: 'DM Sans', sans-serif;
  font-size: 36px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.04em;
}
.rw-tl-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Center debrief card ------------------------------------------------- */
.rw-debrief {
  position: absolute;
  inset: 0;
  background: rgba(10,20,38,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 32px;
  animation: rwDebriefIn 0.4s ease-out;
}
.rw-debrief.hidden { display: none; }
@keyframes rwDebriefIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rw-db-card {
  background: white;
  border-radius: 8px;
  max-width: 580px;
  width: 100%;
  padding: 32px 36px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  animation: rwDbCardIn 0.5s cubic-bezier(0.2, 1.2, 0.4, 1);
}
@keyframes rwDbCardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.rw-db-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--pet-blue);
  font-weight: 700;
  margin-bottom: 6px;
}
.rw-db-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--pet-dark);
  line-height: 1.2;
  margin-bottom: 14px;
}
.rw-db-body {
  font-family: 'DM Sans', sans-serif;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--pet-dark);
  margin-bottom: 18px;
}
.rw-db-items {
  background: #f5f6fa;
  border-left: 3px solid var(--pet-blue);
  border-radius: 0 4px 4px 0;
  padding: 12px 16px;
  margin-bottom: 22px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.rw-db-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 12px;
  padding: 4px 0;
  align-items: baseline;
}
.rw-db-time {
  color: var(--pet-blue);
  font-weight: 700;
  font-size: 11px;
}
.rw-db-text {
  color: var(--pet-dark);
  line-height: 1.5;
}
.rw-db-continue {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border: none;
  padding: 12px 22px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rw-db-continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251,196,66,0.4);
}
.rw-db-btn-arrow {
  font-size: 14px;
  transition: transform 0.15s ease;
}
.rw-db-continue:hover .rw-db-btn-arrow { transform: translateX(3px); }

/* --- In-pane end-state overlay ------------------------------------------------- */
.rw-end-pane {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a0a0a 0%, #3d0e0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 70;
  animation: rwRansomIn 0.6s ease-out;
}
.rw-end-pane.hidden { display: none; }
@keyframes rwRansomIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.rw-end-content {
  max-width: 540px;
  text-align: center;
  padding: 32px;
  font-family: 'DM Sans', sans-serif;
  color: white;
}
.rw-end-skull {
  font-size: 72px;
  color: #ff4444;
  margin-bottom: 14px;
  text-shadow: 0 0 20px rgba(255,68,68,0.6);
}
.rw-end-headline {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff6b6b;
  margin-bottom: 16px;
  text-shadow: 0 0 12px rgba(255,68,68,0.4);
}
.rw-end-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  margin-bottom: 20px;
}
.rw-end-meta {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,68,68,0.3);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}
.rw-end-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 4px 0;
  font-size: 12px;
}
.rw-end-k {
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
.rw-end-v {
  color: white;
  font-weight: 600;
}
.ws-mono { font-family: 'JetBrains Mono', monospace; font-size: 11px; }
#rw-end-countdown {
  font-family: 'JetBrains Mono', monospace;
  color: #ff6b6b;
  font-weight: 700;
}
.rw-end-warning {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ff6b6b;
  letter-spacing: 0.04em;
}

/* --- Workstation narration card ----------------------------------------- */
.rw-narration {
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(0,0,0,0.85);
  color: white;
  padding: 10px 18px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  max-width: 80%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
  z-index: 40;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.rw-narration.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================================
   C2 POLISH — encryption monitor + time-lapse refinements
   ========================================================================= */

/* Time-lapse day numeral flips into place on each tick */
@keyframes tlDayFlip {
  0%   { opacity: 0.25; transform: scale(0.92); filter: blur(1px); }
  60%  { opacity: 1;    transform: scale(1.04); filter: blur(0); }
  100% { opacity: 1;    transform: scale(1);    filter: blur(0); }
}
.rw-tl-day-flip { animation: tlDayFlip 0.22s ease-out; }

/* The ambient-window labels need a tiny tweak so the randomized contents
   stay legible at varying lengths */
.ws-amb-window {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 220px;
}

/* Encryption monitor — replaces the static rename cascade in the
   struggle scene. Reads explicitly as encryption activity. */
.ws-encrypt-monitor {
  position: absolute;
  bottom: 32px;
  left: 32px;
  right: 32px;
  background: rgba(0,0,0,0.78);
  border: 1px solid rgba(255,68,68,0.5);
  border-left: 3px solid #ff4444;
  border-radius: 0 4px 4px 0;
  padding: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,68,68,0.2);
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  animation: emPulse 1.6s ease-in-out infinite;
}
@keyframes emPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,68,68,0.2); }
  50%      { box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,68,68,0.55); }
}
.ws-em-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: rgba(255,68,68,0.18);
  border-bottom: 1px solid rgba(255,68,68,0.35);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: white;
}
.ws-em-icon { font-size: 14px; }
.ws-em-title {
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ff6b6b;
}
.ws-em-host {
  margin-left: auto;
  color: rgba(255,255,255,0.55);
  font-size: 10px;
  letter-spacing: 0.04em;
}
.ws-em-progress {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ws-em-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}
.ws-em-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff4444 0%, #ff8b5a 100%);
  transition: width 0.18s ease-out;
  box-shadow: 0 0 8px rgba(255,68,68,0.6);
}
.ws-em-counter {
  font-size: 11px;
  color: white;
  font-weight: 700;
  text-align: right;
  letter-spacing: 0.04em;
}

/* The cascade itself sits inside the encryption monitor now */
.ws-encrypt-monitor .ws-rename-cascade {
  position: static;
  background: transparent;
  border: none;
  padding: 8px 14px 12px;
  max-height: 110px;
  border-radius: 0;
}

/* =========================================================================
   FINAL DEBRIEF — damage report + epilogue side-by-side
   Single full-player overlay shown after the cinematic ends. No timer.
   ========================================================================= */

.aft-final-debrief {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: linear-gradient(180deg, var(--pet-dark) 0%, #0d1320 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: fdFadeIn 0.5s ease-out;
}
@keyframes fdFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.aft-fd-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 36px 44px 24px;
  flex: 1;
  align-items: stretch;
}

.aft-fd-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: white;
  min-width: 0;
}

.aft-fd-col-damage  { padding-right: 8px; }
.aft-fd-col-epilogue {
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.08);
}

/* Kickers */
.aft-fd-kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 700;
}
.aft-fd-kicker.yellow {
  color: var(--pet-yellow);
  text-align: center;
  letter-spacing: 0.18em;
}

.aft-fd-headline {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: white;
  text-wrap: balance;
}

.aft-fd-sub,
.aft-fd-intro {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.72);
  font-style: italic;
}

/* --- Damage list (left column) --- */
.aft-fd-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.aft-fd-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-left: 3px solid var(--pet-yellow);
  border-radius: 0 4px 4px 0;
  background: rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}
.aft-fd-item.highlight {
  background: rgba(251,196,66,0.10);
  border-left-color: var(--pet-yellow);
  box-shadow: 0 0 0 1px rgba(251,196,66,0.25);
}
.aft-fd-item-icon {
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.aft-fd-item-content { min-width: 0; }
.aft-fd-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 2px;
}
.aft-fd-item-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: white;
}
.aft-fd-item.highlight .aft-fd-item-name { color: var(--pet-yellow); }
.aft-fd-item-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  color: rgba(255,255,255,0.7);
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}
.aft-fd-item-value {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  font-style: italic;
}

/* Damage footer (left col bottom) */
.aft-fd-footer {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
  font-style: italic;
  padding: 12px 14px;
  border-left: 3px solid rgba(251,196,66,0.4);
  background: rgba(0,0,0,0.25);
  border-radius: 0 4px 4px 0;
  margin-top: auto;
}

/* --- Epilogue stats (right column) --- */
.aft-fd-stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 6px;
}
.aft-fd-stat {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-left: 3px solid var(--pet-yellow);
  border-radius: 0 4px 4px 0;
  background: rgba(255,255,255,0.04);
}
.aft-fd-stat-icon {
  font-size: 22px;
  line-height: 1;
  text-align: center;
}
.aft-fd-stat-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.aft-fd-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--pet-yellow);
  font-weight: 700;
  white-space: nowrap;
}

/* Epilogue footer (right col bottom) */
.aft-fd-footer.epilogue {
  border-left-color: rgba(251,196,66,0.4);
  background: rgba(0,0,0,0.3);
  font-style: italic;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}

/* --- Action row --- */
.aft-fd-actions {
  flex-shrink: 0;
  padding: 20px 44px 36px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: center;
  background: rgba(0,0,0,0.4);
}
.aft-fd-continue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--pet-yellow);
  color: var(--pet-dark);
  border: none;
  padding: 14px 32px;
  border-radius: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(251,196,66,0.25);
}
.aft-fd-continue:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(251,196,66,0.45);
}
.aft-fd-arrow {
  font-size: 16px;
  transition: transform 0.15s ease;
}
.aft-fd-continue:hover .aft-fd-arrow { transform: translateX(4px); }

/* --- Narrow viewport: stack columns --- */
@media (max-width: 980px) {
  .aft-fd-grid {
    grid-template-columns: 1fr;
    padding: 24px 20px;
  }
  .aft-fd-col-epilogue {
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}

/* =========================================================================
   FINAL DEBRIEF — additional clarity elements
   ========================================================================= */

/* Inline "Still active" badge on highlighted damage cards */
.aft-fd-item-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  background: rgba(251,196,66,0.2);
  color: var(--pet-yellow);
  border: 1px solid rgba(251,196,66,0.5);
  border-radius: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* Real-vs-spoofed comparison block (shown on Lookalike domain card) */
.aft-fd-compare {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  background: rgba(0,0,0,0.25);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.aft-fd-compare-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.aft-fd-compare-tag {
  flex-shrink: 0;
  width: 60px;
  text-align: center;
  padding: 3px 6px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.aft-fd-compare-tag.real {
  background: rgba(74,222,128,0.14);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.35);
}
.aft-fd-compare-tag.spoofed {
  background: rgba(244,63,94,0.14);
  color: #f87171;
  border: 1px solid rgba(244,63,94,0.35);
}
.aft-fd-compare-domain {
  color: rgba(255,255,255,0.92);
  letter-spacing: 0.01em;
  word-break: break-all;
}
/* The injected difference fragment in the spoofed domain */
.aft-fd-diff {
  background: rgba(251,196,66,0.28);
  color: var(--pet-yellow);
  font-weight: 800;
  padding: 1px 3px;
  border-radius: 2px;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(251,196,66,0.5);
}

/* =========================================================================
   C2 PHASE INDICATOR
   Below the player header, shows position in the 5-phase journey.
   ========================================================================= */

.rw-phase-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
}
.rw-phase-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rw-phase-step {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.28);
  transition: all 0.3s ease;
}
.rw-phase-step.done {
  background: var(--pet-yellow);
  border-color: var(--pet-yellow);
}
.rw-phase-step.active {
  background: var(--pet-yellow);
  border-color: var(--pet-yellow);
  box-shadow: 0 0 8px rgba(251,196,66,0.65);
  animation: phasePulse 1.6s ease-in-out infinite;
}
@keyframes phasePulse {
  0%, 100% { box-shadow: 0 0 6px rgba(251,196,66,0.55); }
  50%      { box-shadow: 0 0 14px rgba(251,196,66,0.95); }
}
.rw-phase-counter {
  letter-spacing: 0.08em;
  font-weight: 600;
}
