/* =====================================================
   PHISHING SIMULATION LAB — DESIGN SYSTEM
   ===================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  /* Color Palette */
  --bg-void:         #050810;
  --bg-deep:         #080d1c;
  --bg-base:         #0a1020;
  --bg-raised:       #0e1628;
  --bg-elevated:     #131d35;
  --bg-overlay:      #182240;
  --bg-glass:        rgba(14, 22, 40, 0.7);

  --accent-teal:     #00d4aa;
  --accent-teal-dim: #00a882;
  --accent-teal-glow:rgba(0, 212, 170, 0.15);
  --accent-blue:     #3b82f6;
  --accent-cyan:     #06b6d4;

  --danger-red:      #ef4444;
  --danger-red-dim:  #dc2626;
  --danger-glow:     rgba(239, 68, 68, 0.15);
  --warn-amber:      #f59e0b;
  --warn-amber-dim:  #d97706;
  --warn-glow:       rgba(245, 158, 11, 0.15);
  --safe-green:      #22c55e;
  --safe-glow:       rgba(34, 197, 94, 0.15);

  --text-primary:    #e8eaf6;
  --text-secondary:  #9ba3c4;
  --text-muted:      #5a6380;
  --text-code:       #00d4aa;

  --border-subtle:   rgba(255, 255, 255, 0.06);
  --border-dim:      rgba(255, 255, 255, 0.10);
  --border-accent:   rgba(0, 212, 170, 0.3);

  /* Typography */
  --font-ui:         'Inter', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.04) inset;
  --shadow-glow-teal: 0 0 30px rgba(0, 212, 170, 0.12);
  --shadow-glow-red:  0 0 30px rgba(239, 68, 68, 0.12);

  /* Transitions */
  --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-smooth);
  --transition-base: 250ms var(--ease-smooth);
  --transition-slow: 400ms var(--ease-smooth);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-ui);
  background-color: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Background Noise Texture --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* --- Grid Scanline Overlay --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 212, 170, 0.007) 2px,
    rgba(0, 212, 170, 0.007) 4px
  );
  pointer-events: none;
  z-index: 0;
}

/* =====================================================
   TYPOGRAPHY
   ===================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

p { line-height: 1.7; }

a { color: var(--accent-teal); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #fff; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875em;
}

/* =====================================================
   LAYOUT UTILITIES
   ===================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1440px; }

.flex  { display: flex; }
.grid  { display: grid; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* =====================================================
   DISCLAIMER BANNER
   ===================================================== */
.disclaimer-banner {
  position: relative;
  z-index: 100;
  background: linear-gradient(90deg, rgba(245,158,11,0.12) 0%, rgba(245,158,11,0.06) 100%);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  padding: 10px var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--warn-amber);
  letter-spacing: 0.03em;
}

.disclaimer-banner strong { color: #fbbf24; }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(5, 8, 16, 0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 var(--space-lg);
}

.navbar__inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.navbar__logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.navbar__logo span { color: var(--accent-teal); }

.navbar__back {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition-fast);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.navbar__back:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
  border-color: var(--border-dim);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.08);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.btn:hover::before { opacity: 1; }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: linear-gradient(135deg, var(--accent-teal), var(--accent-teal-dim));
  color: #050810;
  box-shadow: 0 4px 15px rgba(0, 212, 170, 0.3);
}

.btn--primary:hover {
  box-shadow: 0 6px 25px rgba(0, 212, 170, 0.5);
  transform: translateY(-1px);
  color: #050810;
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dim);
}

.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-accent);
  background: var(--accent-teal-glow);
}

.btn--danger {
  background: linear-gradient(135deg, var(--danger-red), var(--danger-red-dim));
  color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn--danger:hover {
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
}

.btn--lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn--sm { padding: 7px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }

/* =====================================================
   BADGES
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.badge--low {
  background: rgba(34, 197, 94, 0.12);
  color: var(--safe-green);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.badge--medium {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warn-amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge--high {
  background: rgba(239, 68, 68, 0.12);
  color: var(--danger-red);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge--critical {
  background: rgba(239, 68, 68, 0.2);
  color: #ff6b6b;
  border: 1px solid rgba(239, 68, 68, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
  50%       { box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
}

.badge__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  animation: blink-dot 1.5s ease-in-out infinite;
}

@keyframes blink-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
}

.card:hover {
  border-color: var(--border-accent);
  box-shadow: var(--shadow-card), var(--shadow-glow-teal);
  transform: translateY(-2px);
}

/* =====================================================
   PHASE PROGRESS INDICATOR
   ===================================================== */
.phase-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 1;
}

.phase-step {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
}

.phase-step:not(:last-child)::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border-subtle);
  margin: 0 12px;
  transition: background var(--transition-slow);
}

.phase-step.completed:not(:last-child)::after {
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-teal-dim));
}

.phase-step__num {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  border: 2px solid var(--border-dim);
  color: var(--text-muted);
  background: var(--bg-elevated);
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.phase-step.active .phase-step__num {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: var(--accent-teal-glow);
  box-shadow: 0 0 20px rgba(0,212,170,0.3);
}

.phase-step.completed .phase-step__num {
  border-color: var(--accent-teal);
  background: var(--accent-teal);
  color: #050810;
}

.phase-step__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--transition-fast);
}

.phase-step.active .phase-step__label   { color: var(--accent-teal); }
.phase-step.completed .phase-step__label { color: var(--text-secondary); }

/* =====================================================
   SCENARIO PHASE PANELS
   ===================================================== */
.phase-panel {
  display: none;
  animation: fade-in-up 0.4s var(--ease-smooth);
}

.phase-panel.active { display: block; }

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   RED FLAG CALLOUTS
   ===================================================== */
.red-flag {
  position: relative;
  display: inline-block;
}

.red-flag::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0; right: 0;
  height: 2px;
  background: var(--danger-red);
  border-radius: 2px;
  animation: underline-pulse 2s ease-in-out infinite;
}

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

.flag-callout {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: var(--danger-glow);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  animation: fade-in-up 0.4s var(--ease-smooth) both;
}

.flag-callout__icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.flag-callout__title {
  font-weight: 700;
  color: var(--danger-red);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.flag-callout__body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.tip-callout {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: var(--safe-glow);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.tip-callout__title {
  font-weight: 700;
  color: var(--safe-green);
  margin-bottom: 4px;
  font-size: 0.9rem;
}

.tip-callout__body {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =====================================================
   LESSON PANEL
   ===================================================== */
.lesson-checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.lesson-checklist li {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 12px var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.lesson-checklist li::before {
  content: '✓';
  color: var(--safe-green);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: var(--safe-glow);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* =====================================================
   SIMULATED EMAIL CLIENT
   ===================================================== */
.email-client {
  background: #1a1a2e;
  border-radius: var(--radius-lg);
  border: 1px solid #2d2d4e;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  font-family: var(--font-ui);
}

.email-client__toolbar {
  background: #16213e;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #2d2d4e;
}

.traffic-light {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.tl-red    { background: #ff5f57; }
.tl-yellow { background: #ffbd2e; }
.tl-green  { background: #28ca41; }

.email-client__url-bar {
  flex: 1;
  background: #0f0f23;
  border-radius: 6px;
  padding: 5px 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #7a7aaa;
  margin-left: 8px;
}

.email-client__body {
  padding: var(--space-lg);
}

.email-header-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: 8px;
  font-size: 0.875rem;
}

.email-header-row label {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 50px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.email-header-row span { color: var(--text-secondary); }

.email-subject {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: var(--space-md) 0;
  padding-bottom: var(--space-md);
  border-bottom: 1px solid #2d2d4e;
}

.email-body { font-size: 0.9rem; color: #c0c0d4; line-height: 1.8; }
.email-body p { margin-bottom: 12px; }

/* =====================================================
   SIMULATED SMS
   ===================================================== */
.phone-frame {
  max-width: 320px;
  margin: 0 auto;
  background: #1a1a1a;
  border-radius: 40px;
  padding: 20px 12px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 2px #333;
  position: relative;
}

.phone-frame__notch {
  width: 120px;
  height: 28px;
  background: #111;
  border-radius: 14px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.phone-frame__notch::after {
  content: '';
  width: 10px; height: 10px;
  background: #222;
  border-radius: 50%;
  border: 1px solid #333;
}

.phone-screen {
  background: #f5f5f5;
  border-radius: 28px;
  overflow: hidden;
  min-height: 400px;
}

.phone-status-bar {
  background: #fff;
  padding: 8px 20px 4px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-weight: 600;
  color: #222;
}

.sms-header {
  background: #f5f5f5;
  padding: 12px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sms-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #ccc;
  display: grid;
  place-items: center;
  font-size: 1rem;
  color: #666;
}

.sms-name { font-weight: 700; font-size: 0.85rem; color: #111; }
.sms-number { font-size: 0.72rem; color: #666; }

.sms-messages {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 300px;
}

.sms-bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #111;
}

.sms-bubble--incoming {
  background: #e8e8e8;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.sms-bubble--outgoing {
  background: #007aff;
  color: #fff;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.sms-bubble a { color: #007aff; }
.sms-bubble--outgoing a { color: #aadcff; }

/* =====================================================
   FAKE LOGIN PAGE
   ===================================================== */
.fake-login {
  max-width: 420px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 40px 40px 32px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.5);
  color: #202124;
  font-family: 'Roboto', var(--font-ui);
}

.fake-login__logo {
  text-align: center;
  margin-bottom: 24px;
}

.fake-login__logo svg {
  height: 44px;
}

.fake-login h2 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #202124;
  margin-bottom: 8px;
  letter-spacing: 0;
}

.fake-login__subtitle {
  font-size: 0.9rem;
  color: #5f6368;
  margin-bottom: 24px;
}

.form-field {
  margin-bottom: 16px;
}

.form-field label {
  display: block;
  font-size: 0.875rem;
  color: #5f6368;
  margin-bottom: 6px;
}

.form-field input {
  width: 100%;
  border: 1px solid #dadce0;
  border-radius: 4px;
  padding: 13px 15px;
  font-size: 1rem;
  color: #202124;
  outline: none;
  transition: border-color 0.15s;
  font-family: var(--font-ui);
  background: #fff;
}

.form-field input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}

.form-link {
  font-size: 0.875rem;
  color: #1a73e8;
  cursor: pointer;
  font-weight: 500;
}

.btn--google {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background 0.15s;
}

.btn--google:hover { background: #1557b0; }

/* =====================================================
   URL COMPARISON
   ===================================================== */
.url-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .url-compare { grid-template-columns: 1fr; }
}

.url-box {
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 2px solid transparent;
}

.url-box--safe   { border-color: rgba(34, 197, 94, 0.3); }
.url-box--danger { border-color: rgba(239, 68, 68, 0.3); }

.url-box__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
}

.url-box--safe   .url-box__label { color: var(--safe-green); }
.url-box--danger .url-box__label { color: var(--danger-red); }

.url-box__text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-all;
}

.url-box--danger .url-box__text .highlight-bad {
  background: rgba(239, 68, 68, 0.25);
  color: #ff8a8a;
  padding: 1px 3px;
  border-radius: 3px;
}

/* =====================================================
   TERMINAL / CODE BLOCK
   ===================================================== */
.terminal {
  background: #050810;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid #1a1a3e;
  font-family: var(--font-mono);
}

.terminal__header {
  background: #0d0d2b;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #1a1a3e;
}

.terminal__header span { font-size: 0.72rem; color: #5555aa; }

.terminal__body {
  padding: var(--space-md);
  font-size: 0.82rem;
  line-height: 1.8;
  color: #88aacc;
}

.terminal__body .t-prompt  { color: var(--accent-teal); }
.terminal__body .t-cmd     { color: #e0e0ff; }
.terminal__body .t-out     { color: #6677aa; }
.terminal__body .t-danger  { color: var(--danger-red); }
.terminal__body .t-warn    { color: var(--warn-amber); }

/* =====================================================
   SCENARIO PAGE LAYOUT
   ===================================================== */
.scenario-page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 61px);
  padding: var(--space-xl) var(--space-lg);
}

.scenario-page .container { max-width: 960px; }

.scenario-header {
  margin-bottom: var(--space-xl);
}

.scenario-header__meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.scenario-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: var(--space-sm);
}

.scenario-header__desc {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 640px;
  line-height: 1.7;
}

.scenario-content {
  display: grid;
  gap: var(--space-xl);
}

.phase-nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border-subtle);
}

/* =====================================================
   COMPLETION OVERLAY
   ===================================================== */
.completion-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.9);
  backdrop-filter: blur(10px);
  z-index: 200;
  display: none;
  place-items: center;
}

.completion-overlay.show { display: grid; }

.completion-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  max-width: 480px;
  animation: scale-in 0.4s var(--ease-bounce);
  box-shadow: var(--shadow-glow-teal);
}

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.85); }
  to   { opacity: 1; transform: scale(1); }
}

.completion-card__icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: bounce-icon 1s var(--ease-bounce) 0.3s both;
}

@keyframes bounce-icon {
  from { opacity: 0; transform: scale(0) rotate(-20deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.completion-card h2 {
  font-size: 1.8rem;
  margin-bottom: var(--space-sm);
  color: var(--accent-teal);
}

.completion-card p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--space-lg);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(ellipse at center, rgba(0,212,170,0.06) 0%, transparent 65%);
  pointer-events: none;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 212, 170, 0.08);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-teal);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.hero h1 {
  margin-bottom: var(--space-md);
  background: linear-gradient(160deg, #fff 0%, #8899cc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
  margin-top: var(--space-xl);
}

.hero__stat-num {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-teal);
  display: block;
}

.hero__stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =====================================================
   SCENARIO GRID
   ===================================================== */
.scenario-grid {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-lg);
}

.scenarios-heading {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.scenarios-heading h2 {
  margin-bottom: var(--space-sm);
}

.scenarios-heading p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: var(--space-lg);
  max-width: 1280px;
  margin: 0 auto;
}

.scenario-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.scenario-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,212,170,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.scenario-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 12px 40px rgba(0,0,0,0.4), var(--shadow-glow-teal);
}

.scenario-card:hover::before { opacity: 1; }

.scenario-card.completed {
  border-color: rgba(34, 197, 94, 0.2);
}

.scenario-card.completed::after {
  content: '✓';
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 24px; height: 24px;
  background: var(--safe-green);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.scenario-card__icon {
  font-size: 2.2rem;
  line-height: 1;
}

.scenario-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
}

.scenario-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.scenario-card__type {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scenario-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.scenario-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-subtle);
}

.scenario-card__cta {
  font-size: 0.85rem;
  color: var(--accent-teal);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap var(--transition-fast);
}

.scenario-card:hover .scenario-card__cta { gap: 10px; }

/* =====================================================
   KNOWLEDGE BAR (Bottom of dashboard)
   ===================================================== */
.knowledge-bar {
  position: relative;
  z-index: 1;
  padding: var(--space-xl) var(--space-lg);
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
}

.knowledge-bar__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-xl);
}

@media (max-width: 768px) {
  .knowledge-bar__inner { grid-template-columns: 1fr; }
}

.knowledge-bar__block h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
}

.know-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.know-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.know-list li::before {
  content: '›';
  color: var(--accent-teal);
  font-weight: 700;
}

/* =====================================================
   PROGRESS BAR
   ===================================================== */
.progress-section {
  position: relative;
  z-index: 1;
  background: var(--bg-deep);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-lg);
}

.progress-section__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  flex-wrap: wrap;
}

.progress-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.progress-bar {
  flex: 1;
  min-width: 200px;
  height: 6px;
  background: var(--bg-overlay);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent-blue));
  border-radius: 3px;
  transition: width 0.6s var(--ease-smooth);
}

.progress-count {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-teal);
  white-space: nowrap;
}

/* =====================================================
   ANNOTATED OVERLAY
   ===================================================== */
.annotated-wrapper {
  position: relative;
}

.annotation-marker {
  position: absolute;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--danger-red);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  cursor: default;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(239,68,68,0.5);
  animation: pop-in 0.3s var(--ease-bounce) both;
  font-family: var(--font-mono);
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0); }
  to   { opacity: 1; transform: scale(1); }
}

/* =====================================================
   CALL SCREEN
   ===================================================== */
.call-screen {
  max-width: 340px;
  margin: 0 auto;
  background: #111;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 2px #222;
  padding-bottom: 20px;
}

.call-header {
  background: linear-gradient(180deg, #1a1a1a 0%, #111 100%);
  padding: 40px var(--space-md) var(--space-lg);
  text-align: center;
}

.call-header__carrier { font-size: 0.75rem; color: #888; margin-bottom: var(--space-lg); }
.call-header__number { font-size: 1.5rem; font-weight: 700; color: #fff; margin-bottom: 4px; }
.call-header__label { font-size: 0.85rem; color: #22c55e; margin-bottom: var(--space-sm); }
.call-header__duration { font-family: var(--font-mono); font-size: 0.85rem; color: #888; }

.call-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #333, #555);
  margin: 0 auto var(--space-md);
  display: grid;
  place-items: center;
  font-size: 2.5rem;
}

.call-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  padding: var(--space-lg) var(--space-md);
}

.call-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  transition: transform 0.15s;
}

.call-btn:active { transform: scale(0.92); }
.call-btn--mute    { background: #333; }
.call-btn--speaker { background: #333; }
.call-btn--end     { background: #ef4444; }

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
  .phase-step__label { display: none; }
  .phase-progress     { gap: 0; }
  .url-compare        { grid-template-columns: 1fr; }

  .scenario-page { padding: var(--space-lg) var(--space-md); }
  .cards-grid { grid-template-columns: 1fr; }
  .hero { padding: var(--space-xl) var(--space-md); }
}

@media (max-width: 480px) {
  .fake-login { padding: 28px 20px 24px; }
  .phone-frame { max-width: 280px; }
}

/* =====================================================
   ANIMATIONS & EFFECTS
   ===================================================== */
@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

@keyframes blink-caret {
  0%, 100% { border-color: var(--accent-teal); }
  50%       { border-color: transparent; }
}

.typing-effect {
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-teal);
  animation: typing 1.5s steps(40) forwards, blink-caret 0.8s step-end infinite 1.5s;
}

@keyframes glitch {
  0%  { clip-path: inset(0 0 90% 0); transform: translate(-3px, 0); }
  20% { clip-path: inset(30% 0 50% 0); transform: translate(3px, 0); }
  40% { clip-path: inset(60% 0 20% 0); transform: translate(-2px, 0); }
  60% { clip-path: inset(80% 0 5% 0); transform: translate(2px, 0); }
  80% { clip-path: inset(10% 0 70% 0); transform: translate(-1px, 0); }
  100%{ clip-path: inset(0 0 0 0); transform: translate(0, 0); }
}

.glitch-text {
  position: relative;
}

.glitch-text::before, .glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
}

.glitch-text::before {
  color: var(--danger-red);
  animation: glitch 0.5s infinite linear alternate-reverse;
  opacity: 0.4;
}

.glitch-text::after {
  color: var(--accent-cyan);
  animation: glitch 0.5s infinite linear alternate;
  opacity: 0.4;
}

/* =====================================================
   SKIP LINK
   ===================================================== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 300;
  background: var(--accent-teal);
  color: #050810;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* =====================================================
   KEYBOARD FOCUS VISIBILITY
   ===================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 2px;
  border-radius: 3px;
}

/* =====================================================
   ACCESS CODE GATE
   ===================================================== */
.access-gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: rgba(5, 8, 16, 0.94);
  backdrop-filter: blur(12px);
  padding: var(--space-lg);
  animation: fade-in-up 0.3s var(--ease-smooth);
}

.access-gate__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-glow-teal);
}

.access-gate__icon { font-size: 3rem; margin-bottom: var(--space-md); }

.access-gate__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: var(--space-sm) 0 var(--space-lg);
  line-height: 1.6;
}

#access-gate-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.access-gate #access-gate-input {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-dim);
  background: var(--bg-overlay);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.access-gate #access-gate-input:focus {
  outline: none;
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px var(--accent-teal-glow);
}

.access-gate__error {
  min-height: 18px;
  color: var(--danger-red);
  font-size: 0.82rem;
  font-weight: 600;
}

.access-gate__note {
  margin-top: var(--space-lg);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.access-gate__card.shake { animation: gate-shake 0.4s var(--ease-smooth); }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg-void);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-lg) var(--space-lg);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.site-footer a { color: var(--accent-teal); }
