:root {
  --bg-dark: #071124;
  --bg-card: #13223b;
  --bg-panel: #0d192e;
  --border: #2a4066;
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --accent: #f59e0b;
  --accent-bright: #facc15;
  --orange: #ea580c;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #38bdf8;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: radial-gradient(circle at top right, #162a4a 0%, var(--bg-dark) 58%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.45;
  overflow-x: hidden;
}

/* Mobile-View Friendly Zoom Mode for Virtual Screen-Sharing */
body.mobile-read-mode {
  font-size: 118%;
}
body.mobile-read-mode .slide-title { font-size: clamp(32px, 3.6vw, 44px); }
body.mobile-read-mode .slide-subtitle { font-size: 21px; }
body.mobile-read-mode .slide-card h4 { font-size: 22px; }
body.mobile-read-mode .slide-card p { font-size: 18px; }
body.mobile-read-mode .ab-option-text,
body.mobile-read-mode .scenario-prompt,
body.mobile-read-mode .myth-claim-box p { font-size: 22px; }
body.mobile-read-mode .icon-btn#btnMobileMode {
  background: var(--accent-bright);
  color: #071124;
  border-color: var(--accent-bright);
}

/* ==================== CLEAN WHITE BANNER ==================== */
.brand-banner {
  background: #ffffff;
  border-bottom: 4px solid var(--accent);
  padding: 12px 28px;
}

.brand-banner-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.banner-logo-right { height: 58px; width: auto; display: block; }

.portal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
}
.portal-back-link:hover { border-color: var(--accent); background: #fefce8; }

.banner-center-title { display: flex; flex-direction: column; align-items: center; text-align: center; }
.banner-kicker { font-size: 11px; font-weight: 800; letter-spacing: 1.3px; color: #475569; }
.banner-main-title { font-size: 20px; font-weight: 900; letter-spacing: 0.6px; color: #0f172a; }

/* ==================== TOPBAR ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 22px;
  background: rgba(7, 17, 36, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 11px; cursor: pointer; }
.brand-icon {
  font-size: 24px;
  background: linear-gradient(135deg, #d97706, var(--accent-bright));
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-size: 14px; font-weight: 900; color: var(--accent-bright); }
.brand-sub { font-size: 11px; color: var(--text-muted); }

.nav-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.nav-pill {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.nav-pill:hover { color: #fff; border-color: var(--accent-bright); }
.nav-pill.active {
  background: linear-gradient(135deg, #d97706, var(--accent-bright));
  color: #071124;
  border-color: transparent;
}

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.score-pill {
  background: rgba(250, 204, 21, 0.16);
  border: 2px solid var(--accent-bright);
  color: var(--accent-bright);
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 17px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent-bright); }

/* ==================== MAIN & BUTTONS ==================== */
.main-container { max-width: 1440px; margin: 0 auto; padding: 24px 26px 44px; }
.module { display: none; animation: fadeIn 0.24s ease; }
.module.active { display: block; }
.hidden { display: none !important; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  transition: transform 0.14s, filter 0.18s;
}
.btn:active { transform: scale(0.97); }
.btn-lg { padding: 14px 24px; font-size: 17px; }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.btn-primary { background: linear-gradient(135deg, #d97706, var(--accent-bright)); color: #071124; }
.btn-secondary { background: var(--bg-card); color: #fff; border: 2px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent-bright); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid var(--border); }
.btn-outline:hover { border-color: var(--accent-bright); }
.btn-success { background: var(--green); color: #052e16; }

/* ==================== HOME ==================== */
.hero-banner {
  background: linear-gradient(140deg, rgba(245, 158, 11, 0.18), rgba(19, 34, 59, 0.94));
  border: 2px solid rgba(250, 204, 21, 0.38);
  border-radius: 22px;
  padding: 34px 36px;
  text-align: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.hero-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.18);
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.9px;
  margin-bottom: 12px;
}
.hero-banner h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 900; margin-bottom: 10px; }
.hero-banner .highlight { color: var(--accent-bright); }
.hero-lead { font-size: 18px; color: #e2e8f0; margin-bottom: 20px; font-weight: 600; }

.virtual-rules-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 22px;
  max-width: 1120px;
}
.vrule-item {
  background: rgba(7, 17, 36, 0.72);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  color: #e2e8f0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
}
.vrule-item span { font-size: 22px; flex-shrink: 0; }

.hero-cta-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 18px; margin-bottom: 22px; }
.module-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.2s, border-color 0.2s;
}
.module-card:hover { transform: translateY(-4px); border-color: var(--accent-bright); }
.card-accent { border-color: rgba(250, 204, 21, 0.6); background: linear-gradient(160deg, rgba(245, 158, 11, 0.16), var(--bg-card)); }
.card-pact { border-color: rgba(56, 189, 248, 0.55); background: linear-gradient(160deg, rgba(56, 189, 248, 0.14), var(--bg-card)); }
.card-num { position: absolute; top: 16px; right: 18px; font-size: 26px; font-weight: 900; color: rgba(148, 163, 184, 0.22); }
.card-icon { font-size: 36px; }
.module-card h3 { font-size: 19px; font-weight: 900; }
.module-card p { font-size: 14.5px; color: var(--text-muted); flex: 1; }
.card-tag { align-self: flex-start; background: rgba(56, 189, 248, 0.16); color: var(--blue); padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; }

.presenter-tip {
  background: rgba(19, 34, 59, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}
kbd {
  background: #071124;
  border: 1px solid #475569;
  border-radius: 5px;
  padding: 2px 7px;
  font-family: monospace;
  color: var(--accent-bright);
  font-weight: 800;
}

/* ==================== HEADERS & SLIDES ==================== */
.module-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.eyebrow { display: block; font-size: 12px; font-weight: 900; letter-spacing: 1px; color: var(--accent-bright); margin-bottom: 4px; }
.module-header h2 { font-size: clamp(22px, 2.5vw, 30px); font-weight: 900; }
.case-nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.case-counter { font-size: 16px; font-weight: 900; color: var(--accent-bright); }

.chapter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chapter-pill {
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.chapter-pill.active { background: rgba(250, 204, 21, 0.22); border-color: var(--accent-bright); color: var(--accent-bright); }

.slide-stage {
  background: linear-gradient(145deg, #13223b 0%, #091428 100%);
  border: 2px solid var(--border);
  border-radius: 22px;
  padding: 32px 38px;
  box-shadow: var(--shadow);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.slide-top-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.slide-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slide-badge {
  display: inline-block;
  background: rgba(250, 204, 21, 0.18);
  color: var(--accent-bright);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
.slide-impact-chip {
  background: rgba(234, 88, 12, 0.24);
  border: 1.5px solid #fb923c;
  color: #ffedd5;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 900;
}

.slide-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 22px;
}

.slide-visual-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(7, 17, 36, 0.78);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  min-height: 195px;
  overflow: hidden;
}

.slide-photo-thumb {
  width: 100%;
  max-height: 225px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.slide-sign-thumb {
  height: 132px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

/* Interactive Pyramid Visual inside Slide 3 */
.pyramid-visual { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; }
.pyr-tier {
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  text-align: center;
  padding: 7px 10px;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}
.pyr-1 { width: 100%; background: #16a34a; }
.pyr-2 { width: 86%; background: #ca8a04; color: #071124; }
.pyr-3 { width: 72%; background: #ea580c; }
.pyr-4 { width: 58%; background: #dc2626; }
.pyr-5 { width: 46%; background: #2563eb; }

/* Speed Limits Visual inside Slide 15 */
.speed-visual { display: flex; gap: 14px; justify-content: center; width: 100%; padding: 8px; }
.speed-circle {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: #ffffff;
  border: 11px solid #dc2626;
  color: #0f172a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4);
}
.speed-circle strong { font-size: 36px; font-weight: 900; line-height: 1; }
.speed-circle span { font-size: 11px; font-weight: 900; color: #334155; }

.slide-title { font-size: clamp(27px, 3.1vw, 38px); font-weight: 900; margin-bottom: 10px; line-height: 1.15; }
.slide-subtitle { font-size: 18px; color: #dbeafe; }

.slide-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 22px; }
.slide-card {
  background: rgba(7, 17, 36, 0.82);
  border: 1.5px solid var(--border);
  border-top: 4px solid var(--accent-bright);
  border-radius: 14px;
  padding: 20px;
}
.slide-card-icon { font-size: 34px; margin-bottom: 8px; }
.slide-card h4 { font-size: 19px; font-weight: 900; color: var(--accent-bright); margin-bottom: 8px; }
.slide-card p { font-size: 15.5px; color: #e2e8f0; line-height: 1.5; }

.slide-footer-tip {
  background: rgba(56, 189, 248, 0.15);
  border-left: 5px solid var(--blue);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 16.5px;
  font-weight: 700;
  color: #e0f2fe;
}

.slide-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.slide-dot { width: 12px; height: 12px; border-radius: 999px; border: none; background: var(--border); cursor: pointer; }
.slide-dot.active { width: 32px; background: var(--accent-bright); }

/* ==================== VIRTUAL TIMER & PULSE BAR ==================== */
.virtual-control-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 12px 18px;
  margin-bottom: 18px;
}

.timer-group { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 280px; }
.timer-readout {
  font-size: 24px;
  font-weight: 900;
  color: var(--accent-bright);
  min-width: 54px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.timer-readout.urgent { color: #f87171; animation: pulseBeat 0.5s infinite; }
@keyframes pulseBeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.14); } }

.timer-track {
  flex: 1;
  height: 14px;
  background: #071124;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  min-width: 120px;
}
.timer-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green), var(--accent-bright));
  transition: width 0.2s linear;
}
.timer-fill.low { background: linear-gradient(90deg, #dc2626, #f97316); }

.chat-pulse-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pulse-label { font-size: 13px; font-weight: 800; color: var(--text-muted); }
.pulse-btn {
  border: 1.5px solid var(--border);
  background: #071124;
  color: #fff;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.pulse-btn.pulse-a:hover { border-color: var(--blue); color: var(--blue); }
.pulse-btn.pulse-b:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

/* ==================== MODULE 1: PRIORITY CHAT A/B ==================== */
.priority-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: start; }

.scenario-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 16px;
}
.scenario-kicker {
  display: inline-block;
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-bright);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 10px;
}
.scenario-card h3 { font-size: 25px; font-weight: 900; margin-bottom: 10px; }
.scenario-prompt { font-size: 19px; color: #e2e8f0; margin-bottom: 16px; line-height: 1.45; }

.chat-cta-banner {
  background: #071124;
  border: 2px solid var(--accent-bright);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  color: #fef08a;
  text-align: center;
}
.chat-cta-banner code {
  background: var(--accent-bright);
  color: #071124;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 900;
  font-family: inherit;
}

.ab-options { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.ab-option {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 2.5px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  text-align: left;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background 0.2s;
}
.ab-option:hover { border-color: var(--accent-bright); transform: translateX(4px); }
.ab-letter {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #071124;
  border: 2.5px solid var(--accent-bright);
  color: var(--accent-bright);
  font-size: 24px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ab-option-text { font-size: 18px; font-weight: 700; line-height: 1.35; }

.ab-option.correct {
  background: rgba(22, 163, 74, 0.26);
  border-color: var(--green);
}
.ab-option.correct .ab-letter { background: var(--green); color: #052e16; border-color: #fff; }
.ab-option.dimmed { opacity: 0.48; }

.reveal-row { display: flex; gap: 12px; }

.case-photo-box {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.case-photo { width: 100%; height: 295px; object-fit: cover; display: block; }

.chat-poll-bar {
  display: flex;
  height: 36px;
  font-size: 14px;
  font-weight: 900;
}
.poll-seg { display: flex; align-items: center; justify-content: center; transition: width 0.25s ease; overflow: hidden; white-space: nowrap; }
.poll-seg-a { background: #0284c7; color: #fff; }
.poll-seg-b { background: #d97706; color: #071124; }

.feedback-panel { display: flex; flex-direction: column; gap: 12px; animation: fadeIn 0.25s ease; }
.fb-why {
  background: rgba(22, 163, 74, 0.16);
  border: 2px solid var(--green);
  border-radius: 14px;
  padding: 18px;
}
.fb-label { display: inline-block; font-size: 12px; font-weight: 900; color: #86efac; letter-spacing: 0.8px; margin-bottom: 6px; }
.fb-why p { font-size: 16.5px; color: #f0fdf4; line-height: 1.48; }

.fb-key {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  border-radius: 14px;
  padding: 18px;
  color: #fff;
}
.fb-key-label { display: inline-block; font-size: 12px; font-weight: 900; letter-spacing: 0.8px; margin-bottom: 6px; color: #fef08a; }
.fb-key p { font-size: 16.5px; font-weight: 700; line-height: 1.45; }

/* ==================== MODULE 2: MYTH BUSTERS ==================== */
.reaction-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.react-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 14px;
  color: #fff;
}
.react-true { background: linear-gradient(135deg, #1d4ed8, #2563eb); border: 2px solid #60a5fa; }
.react-false { background: linear-gradient(135deg, #c2410c, #ea580c); border: 2px solid #fb923c; }
.react-emoji { font-size: 38px; line-height: 1; }
.react-pill strong { display: block; font-size: 19px; font-weight: 900; }
.react-pill small { font-size: 13.5px; opacity: 0.92; }

.myth-stage {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 24px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 26px;
  box-shadow: var(--shadow);
  align-items: center;
}
.myth-visual-col { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid var(--border); }
.myth-photo { width: 100%; height: 320px; object-fit: cover; display: block; }
.myth-stamp {
  position: absolute;
  inset: 0;
  background: rgba(127, 29, 29, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8);
  animation: stampPop 0.28s ease;
}
@keyframes stampPop { from { transform: scale(1.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.myth-tag {
  display: inline-block;
  background: #ea580c;
  color: #fff;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 900;
  margin-bottom: 10px;
}
.myth-title { font-size: 28px; font-weight: 900; margin-bottom: 14px; }
.myth-claim-box {
  background: #071124;
  border: 2px solid var(--border);
  border-left: 5px solid var(--accent-bright);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.claim-label { display: block; font-size: 12px; font-weight: 900; color: var(--accent-bright); margin-bottom: 6px; }
.myth-claim-box p { font-size: 20px; font-weight: 700; color: #f8fafc; }

.myth-reveal-box { margin-top: 16px; animation: fadeIn 0.25s ease; }
.verdict-banner {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 12px;
}
.myth-explain { font-size: 17px; color: #e2e8f0; margin-bottom: 12px; line-height: 1.5; }
.myth-warning {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  color: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15.5px;
  font-weight: 800;
}

/* ==================== MODULE 3: SIMULATORS ==================== */
.tab-switcher { display: flex; gap: 8px; background: var(--bg-card); padding: 6px; border-radius: 12px; border: 1px solid var(--border); }
.tab-btn { background: transparent; color: var(--text-muted); border: none; padding: 9px 16px; border-radius: 8px; font-size: 14px; font-weight: 800; cursor: pointer; }
.tab-btn.active { background: var(--accent-bright); color: #071124; }
.subtab { display: none; }
.subtab.active { display: block; }

.blind-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 20px; align-items: start; margin-bottom: 22px; }
.photo-overlay-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: #071124;
}
.real-photo { width: 100%; height: auto; display: block; }
.blind-overlay-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.blind-zone { cursor: pointer; opacity: 0.78; transition: opacity 0.18s; }
.blind-zone:hover, .blind-zone.active-blind { opacity: 1; }

.vision-stats-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.chat-mini-prompt {
  background: rgba(56, 189, 248, 0.14);
  border-left: 4px solid var(--blue);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14.5px;
  color: #e0f2fe;
  margin-bottom: 14px;
}
.zone-btn-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.zone-pick {
  background: #071124;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.zone-pick.active { background: rgba(250, 204, 21, 0.2); border-color: var(--accent-bright); color: var(--accent-bright); }

#blindInfoCard h3 { font-size: 21px; color: var(--accent-bright); margin-bottom: 8px; }
#blindInfoCard p { font-size: 15.5px; color: #e2e8f0; margin-bottom: 10px; }
#blindInfoCard ul { margin-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }

/* 10m Heavy Machinery Distance Simulator */
.site-distance-panel {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 22px 26px;
}
.site-dist-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.site-dist-badge {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 900;
  background: rgba(34, 197, 94, 0.2);
  border: 2px solid var(--green);
  color: #86efac;
}
.site-dist-badge.danger {
  background: rgba(239, 68, 68, 0.24);
  border-color: var(--red);
  color: #fecaca;
}

.site-dist-visual {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  background: #071124;
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1.5px solid var(--border);
}
.machinery-icon { text-align: center; font-size: 40px; line-height: 1.1; }
.machinery-icon small { display: block; font-size: 11px; color: var(--accent-bright); font-weight: 800; }
.distance-corridor {
  position: relative;
  height: 52px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.35) 0%, rgba(239, 68, 68, 0.35) 57%, rgba(34, 197, 94, 0.24) 57%, rgba(34, 197, 94, 0.24) 100%);
  border-radius: 10px;
  border: 2px dashed #64748b;
  display: flex;
  align-items: center;
}
.danger-zone-bar {
  width: 57%;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: #fca5a5;
  border-right: 3px solid var(--accent-bright);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tech-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 36px;
  transition: left 0.15s ease;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}
.safe-corridor-label { font-size: 13px; font-weight: 800; color: #86efac; }

.site-slider-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 10px; }
.site-slider-row input[type="range"] { flex: 1; min-width: 220px; accent-color: var(--accent-bright); }
.site-dist-msg { font-size: 15.5px; color: #e2e8f0; font-weight: 700; }

/* 3-Second Rule Animator */
.rule3-panel {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}
.rule3-controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.mode-toggle-group, .speed-toggle-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mode-btn, .speed-pill {
  background: #071124;
  color: var(--text-muted);
  border: 2px solid var(--border);
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.mode-btn.active, .speed-pill.active {
  border-color: var(--accent-bright);
  background: rgba(250, 204, 21, 0.2);
  color: var(--accent-bright);
}

.road-anim-stage {
  position: relative;
  background: linear-gradient(180deg, #1e293b 0%, #334155 42%, #1f2937 42%, #111827 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  height: 210px;
  overflow: hidden;
  margin-bottom: 18px;
}
.ref-pole {
  position: absolute;
  left: 52%;
  top: 12px;
  bottom: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.pole-sign {
  background: var(--accent-bright);
  color: #071124;
  font-size: 12px;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 8px;
}
.pole-line { width: 3px; flex: 1; background: repeating-linear-gradient(180deg, #facc15 0 10px, transparent 10px 18px); }

.road-lane {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  height: 76px;
  border-top: 3px dashed rgba(255, 255, 255, 0.35);
  border-bottom: 3px solid rgba(255, 255, 255, 0.25);
}
.car-leader, .car-follower {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) scaleX(-1);
  font-size: 46px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.car-leader span, .car-follower span {
  transform: scaleX(-1);
  font-size: 11px;
  font-weight: 900;
  background: rgba(7, 17, 36, 0.9);
  color: var(--accent-bright);
  padding: 2px 7px;
  border-radius: 6px;
}
.car-leader { left: 48%; }
.car-follower { left: 10%; }

.count-bubble {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  background: rgba(7, 17, 36, 0.92);
  border: 2px solid var(--accent-bright);
  color: var(--accent-bright);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 900;
  z-index: 5;
  white-space: nowrap;
}

.stopping-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stop-card {
  background: #071124;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
}
.stop-card span { display: block; font-size: 13px; color: var(--text-muted); font-weight: 700; margin-bottom: 4px; }
.stop-card strong { font-size: 28px; font-weight: 900; color: var(--accent-bright); }
.stop-card small { display: block; font-size: 12.5px; color: #cbd5e1; margin-top: 4px; }

/* ==================== MODULE 4: CALCULATOR ==================== */
.calc-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.calc-controls-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.calc-field label { display: block; font-size: 15px; font-weight: 800; color: #f8fafc; margin-bottom: 6px; }
.field-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.field-top strong { font-size: 20px; color: var(--accent-bright); font-family: monospace; }
.calc-field input[type="range"] { width: 100%; accent-color: var(--accent-bright); cursor: pointer; }
.hint-range { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }

.fine-type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fine-btn {
  background: #071124;
  color: var(--text-muted);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.fine-btn.active { border-color: var(--accent-bright); background: rgba(250, 204, 21, 0.18); color: var(--accent-bright); }

.art124-alert {
  background: rgba(220, 38, 38, 0.18);
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14.5px;
  color: #fee2e2;
  line-height: 1.45;
}

.receipt-paper {
  background: #f8fafc;
  color: #0f172a;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55);
  border-top: 8px solid #ea580c;
  font-family: "Consolas", "Courier New", monospace;
}
.receipt-header { text-align: center; border-bottom: 2px dashed #94a3b8; padding-bottom: 14px; margin-bottom: 18px; }
.receipt-header span { display: block; font-size: 21px; font-weight: 900; color: #0f172a; }
.receipt-header small { font-size: 12px; color: #475569; font-weight: 700; }

.receipt-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: 15.5px;
  border-bottom: 1px dotted #cbd5e1;
}
.receipt-row strong { white-space: nowrap; font-size: 17px; }
.receipt-divider { border-top: 3px dashed #334155; margin: 16px 0; }
.receipt-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 900;
}
.receipt-total-row strong { font-size: 26px; color: #b91c1c; }

.receipt-note {
  margin-top: 18px;
  background: #fef3c7;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 14px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  color: #78350f;
  line-height: 1.45;
}

/* ==================== MODULE 5: OJO AL RIESGO ==================== */
.risk-layout { display: grid; grid-template-columns: 1fr 1.45fr; gap: 22px; align-items: start; }
.risk-scenario-box {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
}
.risk-scenario-box p { font-size: 17px; color: #e2e8f0; margin-bottom: 12px; }

.risk-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.risk-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.risk-item:hover { border-color: var(--accent-bright); }
.risk-item.found { background: rgba(250, 204, 21, 0.14); border-color: var(--accent-bright); }
.risk-badge-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #071124;
  border: 2px solid var(--accent-bright);
  color: var(--accent-bright);
  font-size: 18px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.risk-item.found .risk-badge-num { background: var(--accent-bright); color: #071124; }
.risk-item h4 { font-size: 17px; font-weight: 900; color: #fff; margin-bottom: 2px; }
.risk-item p { font-size: 14px; color: var(--text-muted); }
.risk-item.found p { color: #fef9c3; }

.risk-takeaway {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  border-radius: 14px;
  padding: 16px;
  font-size: 15.5px;
  color: #fff;
  line-height: 1.45;
  animation: fadeIn 0.25s ease;
}

.risk-radar-stage {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
}
.rec-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  background: rgba(15, 23, 42, 0.86);
  color: #f87171;
  border: 1.5px solid #ef4444;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  font-family: monospace;
}

.reticle-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(250, 204, 21, 0.18);
  border: 3px solid var(--accent-bright);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 5;
  box-shadow: 0 0 22px rgba(250, 204, 21, 0.7);
  transition: transform 0.18s, background 0.2s;
}
.reticle-btn:hover { transform: translate(-50%, -50%) scale(1.12); }
.reticle-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #071124;
  color: var(--accent-bright);
  font-size: 16px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.reticle-btn.found {
  background: rgba(34, 197, 94, 0.35);
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.85);
}
.reticle-btn.found .reticle-num { background: var(--green); color: #052e16; }

/* ==================== MODULE 6: PACT SHIELD ==================== */
.pact-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; align-items: start; }

.shield-stage {
  background: radial-gradient(circle at center, #132c57 0%, #071124 75%);
  border: 2px solid var(--blue);
  border-radius: 22px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}
.shield-header-label {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.2px;
  color: var(--accent-bright);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.shield-frame {
  position: relative;
  width: min(380px, 100%);
  height: 410px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shield-svg-bg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.4)); }
.shield-words {
  position: relative;
  z-index: 3;
  width: 72%;
  max-height: 290px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}
.shield-word {
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.75);
  animation: fadeIn 0.22s ease;
  cursor: pointer;
}
.shield-word:nth-child(odd) { color: #ffffff; }
.shield-word:nth-child(even) { color: #38bdf8; }
.shield-word:nth-child(3n) { color: #facc15; }
.shield-empty { color: var(--text-muted); font-size: 15px; font-weight: 700; padding: 0 12px; }

.shield-stage.sealed { border-color: var(--green); box-shadow: 0 0 38px rgba(34, 197, 94, 0.38); }

.pact-closing-quote {
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15.5px;
  line-height: 1.45;
}

.pact-right { display: flex; flex-direction: column; gap: 18px; }
.pact-input-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pact-form-row { display: flex; gap: 10px; }
.pact-form-row input, .pact-team-row input {
  flex: 1;
  background: #071124;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.pact-form-row input:focus, .pact-team-row input:focus { outline: none; border-color: var(--accent-bright); }
.pact-team-row { display: flex; flex-direction: column; gap: 6px; }
.pact-team-row label { font-size: 13px; color: var(--text-muted); font-weight: 800; }

.quick-words-label { font-size: 13px; color: var(--text-muted); font-weight: 800; }
.quick-words-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-word-chip {
  background: #071124;
  color: #e2e8f0;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}
.quick-word-chip:hover { border-color: var(--accent-bright); color: var(--accent-bright); }

.family-card {
  display: grid;
  grid-template-columns: 165px 1fr;
  gap: 16px;
  align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 14px;
}
.family-photo { width: 100%; height: 145px; object-fit: cover; border-radius: 12px; display: block; }
.family-caption strong { display: block; font-size: 18px; color: var(--accent-bright); margin-bottom: 6px; }
.family-caption p { font-size: 14.5px; color: #e2e8f0; line-height: 1.45; }

/* ==================== RESPONSIVE (MOBILE & TABLET) ==================== */
@media (max-width: 1060px) {
  .virtual-rules-strip,
  .slide-hero-grid,
  .slide-cards,
  .priority-layout,
  .myth-stage,
  .blind-layout,
  .calc-layout,
  .risk-layout,
  .pact-layout,
  .stopping-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .banner-center-title { display: none; }
  .banner-logo-right { height: 42px; }
  .main-container { padding: 16px 14px 36px; }
  .slide-stage { padding: 20px 18px; }
  .reaction-legend, .fine-type-row, .family-card { grid-template-columns: 1fr; }
  .count-bubble { font-size: 13px; white-space: normal; text-align: center; width: 92%; }
}
