/* ==========================================================================
   SCS 2211: SOFTWARE PROJECT MANAGEMENT — PORTAL & SLIDEDECK DESIGN SYSTEM
   Adapted from teqmaster Portal + Zimknows Slidedeck
   Zero Google Fonts / Zero External Network Latency / Mobile-First Responsive
   ========================================================================== */

@view-transition {
  navigation: auto;
}

:root {
  /* Color Palette — Cyber Abyss (Dark Default) */
  --bg-color: #030611;
  --bg-dark: #080c14;
  --bg-gradient: radial-gradient(circle at 50% 25%, #0d172e 0%, #060a17 55%, #020308 100%);

  --text-primary: #f8fafc;
  --text-main: #f8fafc;
  --text-secondary: #94a3b8;
  --text-sub: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* Accents */
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;
  --accent-violet: #a78bfa;

  /* Crisp High-Performance Card Surfaces (no heavy GPU blur lag on mobile) */
  --card-bg: rgba(10, 16, 30, 0.9);
  --card-bg-hover: rgba(15, 23, 42, 0.96);
  --card-surface: rgba(15, 23, 42, 0.92);
  --card-inner: rgba(2, 6, 23, 0.62);
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(16, 185, 129, 0.45);
  --border-card: rgba(51, 65, 85, 0.55);
  --border-glow: rgba(16, 185, 129, 0.4);
  --card-radius: 14px;

  /* Header / Footer Chrome */
  --header-bg: rgba(3, 6, 17, 0.72);
  --bar-bg-top: linear-gradient(to bottom, rgba(8, 12, 20, 0.95) 0%, rgba(8, 12, 20, 0.75) 75%, rgba(8, 12, 20, 0) 100%);
  --bar-bg-bottom: linear-gradient(to top, rgba(8, 12, 20, 0.96) 0%, rgba(8, 12, 20, 0.82) 75%, rgba(8, 12, 20, 0) 100%);
  --subtle-surface: rgba(255, 255, 255, 0.05);
  --table-stripe: rgba(255, 255, 255, 0.03);

  /* Pure System Typography (0 ms font load, zero Google Fonts requests) */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Transitions */
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  --bg-color: #f8fafc;
  --bg-dark: #f1f5f9;
  --bg-gradient: radial-gradient(circle at 50% 20%, #e2e8f0 0%, #f1f5f9 60%, #ffffff 100%);

  --text-primary: #0f172a;
  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-sub: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --accent-emerald: #059669;
  --accent-cyan: #0284c7;
  --accent-sky: #0284c7;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;
  --accent-violet: #7c3aed;

  --card-bg: rgba(255, 255, 255, 0.86);
  --card-bg-hover: rgba(255, 255, 255, 0.98);
  --card-surface: rgba(255, 255, 255, 0.92);
  --card-inner: rgba(241, 245, 249, 0.9);
  --card-border: rgba(15, 23, 42, 0.1);
  --card-border-hover: rgba(5, 150, 105, 0.55);
  --border-card: rgba(15, 23, 42, 0.12);
  --border-glow: rgba(5, 150, 105, 0.35);

  --header-bg: rgba(248, 250, 252, 0.82);
  --bar-bg-top: linear-gradient(to bottom, rgba(248, 250, 252, 0.96) 0%, rgba(248, 250, 252, 0.82) 75%, rgba(248, 250, 252, 0) 100%);
  --bar-bg-bottom: linear-gradient(to top, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.85) 75%, rgba(248, 250, 252, 0) 100%);
  --subtle-surface: rgba(15, 23, 42, 0.05);
  --table-stripe: rgba(15, 23, 42, 0.03);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background Particle Canvas & Zero-Cost Radial Glows */
#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

.cyber-glow-aura,
.ambient-glow {
  position: fixed;
  top: 6%;
  left: 50%;
  transform: translate3d(-50%, 0, 0);
  width: min(820px, 100vw);
  height: 440px;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.11) 0%, rgba(6, 182, 212, 0.05) 45%, transparent 72%);
  pointer-events: none;
  z-index: 0;
}

.ambient-glow-bottom {
  position: fixed;
  width: 55vw;
  height: 55vw;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 63, 94, 0.07) 0%, rgba(251, 191, 36, 0.03) 40%, transparent 70%);
  bottom: -20vw;
  left: -10vw;
  pointer-events: none;
  z-index: 0;
}

/* Page Container & Transitions */
.site-container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  animation: pageFadeIn 0.3s var(--ease-spring) forwards;
}

body.page-exiting .site-container,
body.page-exiting .deck-viewport {
  animation: pageFadeOut 0.16s ease-in forwards;
}

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

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

/* ==========================================================================
   PORTAL HEADER & NAVIGATION (Copied from teqmaster)
   ========================================================================== */
.portal-header {
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--card-border);
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--accent-emerald);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
  white-space: nowrap;
}

.portal-nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-emerald);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-emerald);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-emerald);
}

.portal-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.theme-toggle-btn, .nav-icon-btn, .tool-btn {
  background: var(--subtle-surface);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.theme-toggle-btn:hover, .nav-icon-btn:hover, .tool-btn:hover {
  color: var(--accent-emerald);
  border-color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-1px);
}

.theme-icon, .nav-icon-btn svg, .tool-btn svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

/* ==========================================================================
   PORTAL HERO & GATEWAY CARDS (Copied from teqmaster index.html + sources.html)
   ========================================================================== */
.portal-main {
  flex: 1;
  padding: 2rem 0 3.5rem;
}

.portal-hero {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
}

.hero-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.portal-title {
  font-size: clamp(1.9rem, 5.5vw, 3.8rem);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.15rem;
  line-height: 1.12;
  letter-spacing: 0.12em;
}

.kinetic-letter {
  display: inline-block;
  transition: transform 0.9s var(--ease-spring), opacity 0.8s ease, color 0.35s ease;
  cursor: pointer;
}

.kinetic-letter.locked-in {
  color: var(--accent-emerald);
  text-shadow: 0 0 18px rgba(16, 185, 129, 0.55);
}

.portal-subtitle {
  font-size: clamp(0.96rem, 1.8vw, 1.12rem);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 720px;
  margin: 0 auto 1.6rem;
}

.project-spotlight-tag {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  margin-bottom: 1.6rem;
  font-size: 0.8rem;
}

.spotlight-pulse, .status-dot, .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
  animation: pulseDot 2s infinite;
  display: inline-block;
  flex-shrink: 0;
}

.pulse-dot.live {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.85); }
}

.spotlight-title {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-emerald);
}

.spotlight-sep { color: var(--text-muted); }
.spotlight-meta { color: var(--text-secondary); }

.overview-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 2.25rem;
}

.overview-pill {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--subtle-surface);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
}

.overview-pill.accent {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
}

/* Section Headers (from sources.html) */
.sources-group {
  margin-bottom: 3rem;
}

.sources-group-header {
  margin-bottom: 1.35rem;
  text-align: left;
}

.sources-group-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.sources-group-desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* Gateway / Concept Grid */
.gateway-cards,
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.gateway-card,
.doc-card,
.nexus-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  padding: 1.65rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.22s var(--ease-spring), border-color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  text-align: left;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gateway-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-emerald));
  opacity: 0.85;
}

.gateway-card:hover,
.doc-card:hover,
.nexus-card:hover {
  transform: translateY(-4px);
  background: var(--card-bg-hover);
  border-color: var(--card-border-hover);
  box-shadow: 0 16px 34px -10px var(--accent-emerald-glow);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.card-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--card-accent, var(--accent-cyan));
  text-transform: uppercase;
}

.badge-emerald,
.badge-cyan,
.badge-amber,
.badge-rose {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-emerald {
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.badge-cyan {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.28);
}

.badge-amber {
  color: var(--accent-amber);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.badge-rose {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.gateway-card .card-title,
.doc-title {
  color: var(--text-primary);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.gateway-card .card-desc,
.doc-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.doc-feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}

.doc-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.doc-feature-item svg {
  width: 14px;
  height: 14px;
  color: var(--accent-emerald);
  flex-shrink: 0;
  margin-top: 0.2rem;
}

.card-footer-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--card-border);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--card-accent, var(--accent-emerald));
}

.arrow-svg {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.gateway-card:hover .arrow-svg {
  transform: translateX(4px);
}

/* Blueprint / Exam Tier Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
}

.portal-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--card-border);
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-left { display: flex; align-items: center; gap: 0.55rem; }
.footer-title { font-weight: 700; letter-spacing: 0.12em; color: var(--text-primary); }
.footer-center { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-center a { color: var(--text-secondary); text-decoration: none; }
.footer-center a:hover, .footer-center a.active { color: var(--accent-emerald); }

/* ==========================================================================
   SLIDEDECK MODE (Copied from slidedeckzimknows, Mobile-First Enhanced)
   ========================================================================== */
body.deck-mode {
  overflow: hidden;
}

.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem clamp(12px, 3vw, 36px);
  z-index: 50;
  background: var(--bar-bg-top);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.back-hub-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.78rem;
  min-height: 36px;
  border-radius: 8px;
  background: var(--subtle-surface);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.back-hub-pill:hover {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
}

.track-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.presenter-tools {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.timer-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Deck Viewport */
.deck-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 68px clamp(16px, 4vw, 56px) 72px;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
}

.slide.active {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  animation: slideFadeIn 0.3s var(--ease-spring) forwards;
}

@keyframes slideFadeIn {
  from { opacity: 0; transform: scale(0.985) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.slide-content {
  width: 100%;
  max-width: 1280px;
  margin: auto 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.slide-eyebrow {
  font-family: var(--font-mono);
  font-size: clamp(0.72rem, 1.1vw, 0.88rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-emerald);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-title {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 3vw, 2.75rem);
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  margin-bottom: clamp(12px, 2vh, 22px);
  color: var(--text-main);
}

.slide-title span.highlight {
  background: linear-gradient(135deg, var(--accent-emerald) 0%, var(--accent-sky) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-title span.highlight-rose {
  background: linear-gradient(135deg, var(--accent-rose) 0%, #fb7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.slide-title span.highlight-amber {
  background: linear-gradient(135deg, var(--accent-amber) 0%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Stat / Concept Cards Grid (from slidedeckzimknows View 2) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 2vw, 22px);
  width: 100%;
}

.stats-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.stats-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.stat-card {
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: clamp(16px, 2.4vh, 24px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--card-accent, var(--accent-emerald));
  box-shadow: 0 0 12px var(--card-accent, var(--accent-emerald));
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.stat-agency {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--card-accent, var(--accent-emerald));
  text-transform: uppercase;
}

.stat-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--subtle-surface);
  color: var(--text-muted);
  white-space: nowrap;
}

.stat-big-number {
  font-family: var(--font-heading);
  font-size: clamp(1.45rem, 2.6vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-main);
  margin: 4px 0;
}

.formula-box {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 1.25vw, 1.05rem);
  font-weight: 700;
  color: var(--card-accent, var(--accent-emerald));
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 8px 12px;
  margin: 8px 0 10px;
  word-break: break-word;
}

.stat-big-label {
  font-size: clamp(0.88rem, 1.15vw, 1.02rem);
  font-weight: 700;
  color: var(--card-accent, var(--accent-emerald));
  margin-bottom: 10px;
}

.stat-details-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--card-border);
  padding-top: 10px;
}

.stat-details-list li {
  font-size: clamp(0.8rem, 0.95vw, 0.9rem);
  line-height: 1.45;
  color: var(--text-sub);
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.stat-details-list li::before {
  content: '▪';
  color: var(--card-accent, var(--accent-emerald));
  font-size: 1rem;
  line-height: 1.25;
  flex-shrink: 0;
}

.stat-bottom-callout {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* 4-Column Pillar Grid (from slidedeckzimknows View 3C) */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
  margin-bottom: 16px;
}

.pillar-item {
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
}

.pillar-title {
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-main);
}

.pillar-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Reveal / Banner Callout (from slidedeckzimknows View 3B & View 5) */
.callout-banner {
  width: 100%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, var(--card-surface) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.callout-banner.amber {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1) 0%, var(--card-surface) 100%);
  border-color: rgba(251, 191, 36, 0.35);
}

.callout-banner.rose {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.1) 0%, var(--card-surface) 100%);
  border-color: rgba(244, 63, 94, 0.35);
}

.callout-banner h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.callout-banner p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* 2-Column Split Stage (from slidedeckzimknows View 4) */
.split-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2.2vw, 24px);
  width: 100%;
  align-items: stretch;
}

.stage-panel {
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: clamp(16px, 2.2vw, 22px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.stage-item-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-item {
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 11px;
  padding: 11px 14px;
}

.stage-item.accent-rose {
  border-color: rgba(244, 63, 94, 0.45);
  background: rgba(244, 63, 94, 0.07);
}

.stage-item.accent-emerald {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.07);
}

.stage-item h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 3px;
}

.stage-item p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* Responsive Data Tables (Never overflow mobile screens) */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  border-radius: 14px;
}

.spm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  text-align: left;
}

.spm-table th {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-emerald);
  background: var(--card-inner);
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-card);
  white-space: nowrap;
}

.spm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--card-border);
  color: var(--text-sub);
  vertical-align: top;
}

.spm-table tr:nth-child(even) td {
  background: var(--table-stripe);
}

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

/* Next Concept Action Pill */
.next-concept-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--accent-emerald);
  color: #030611;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.next-concept-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px var(--accent-emerald-glow);
}

/* Bottom Bar (from slidedeckzimknows) */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0.45rem clamp(12px, 3vw, 36px);
  z-index: 50;
  background: var(--bar-bg-bottom);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.slide-dots {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.dot {
  width: 24px;
  height: 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.28);
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
}

.dot.active {
  background: var(--accent-emerald);
  width: 38px;
  box-shadow: 0 0 10px var(--accent-emerald);
}

.nav-key-hints {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

.kbd {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--subtle-surface);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  font-size: 0.68rem;
}

.nav-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  background: var(--card-surface);
  border: 1px solid var(--border-card);
  color: var(--text-primary);
  min-width: 44px;
  height: 40px;
  padding: 0 10px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--accent-emerald);
  color: var(--accent-emerald);
  background: rgba(16, 185, 129, 0.12);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVE ADAPTATIONS
   ========================================================================== */
@media (max-width: 1024px) {
  .gateway-cards,
  .docs-grid,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pillars-grid,
  .stats-grid.cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-nav-links {
    display: none;
  }

  .portal-title {
    letter-spacing: 0.06em;
  }

  .gateway-cards,
  .docs-grid,
  .stats-grid,
  .stats-grid.cols-2,
  .stats-grid.cols-4,
  .pillars-grid,
  .split-stage {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }

  /* Mobile Slidedeck Ergonomics: natural vertical scroll per slide, horizontal swipe only */
  body.deck-mode {
    overflow: hidden;
  }

  .track-pill {
    display: none;
  }

  .slide {
    justify-content: flex-start;
    padding: 68px 14px 78px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .slide-content {
    margin: 0;
  }

  .nav-key-hints {
    display: none;
  }

  .dot {
    width: 16px;
    height: 6px;
  }

  .dot.active {
    width: 26px;
  }

  .nav-btn {
    min-width: 44px;
    height: 42px;
  }

  .callout-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

