/* ==========================================================================
   DEVPEGS - PYTHON CONCEPT ATLAS & MEMORY MAP
   Aesthetic, Gamified, Responsive Stylesheet
   ========================================================================== */

:root {
  --py-blue: #38bdf8;
  --py-blue-glow: rgba(56, 189, 248, 0.35);
  --py-yellow: #f59e0b;
  --py-yellow-glow: rgba(245, 158, 11, 0.35);
  --py-green: #10b981;
  --py-green-glow: rgba(16, 185, 129, 0.35);
  --py-purple: #c084fc;
  --py-purple-glow: rgba(192, 132, 252, 0.35);
  --py-rose: #f43f5e;
  --py-rose-glow: rgba(244, 63, 94, 0.35);
  
  --py-bg-panel: rgba(15, 23, 42, 0.92);
  --py-bg-card: rgba(30, 41, 59, 0.7);
  --py-bg-card-hover: rgba(51, 65, 85, 0.85);
  --py-border: rgba(56, 189, 248, 0.25);
  --py-border-active: rgba(245, 158, 11, 0.6);
}

.python-atlas-container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #e2e8f0;
  background: radial-gradient(circle at 50% 0%, rgba(30, 58, 138, 0.22) 0%, rgba(10, 15, 30, 0.98) 75%);
  border-radius: 16px;
  border: 1px solid var(--py-border);
  overflow: hidden;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.75);
  margin-bottom: 2.5rem;
  position: relative;
}

/* --- HUD Header & Navigation Bar --- */
.py-hud-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.6rem;
  background: rgba(8, 14, 28, 0.96);
  border-bottom: 1px solid var(--py-border);
  flex-wrap: wrap;
  gap: 1rem;
}

.py-hud-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.py-hud-logo {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8 0%, #3b82f6 50%, #f59e0b 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 0 22px var(--py-blue-glow);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.py-hud-title {
  margin: 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #38bdf8, #a855f7, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.py-hud-subtitle {
  margin: 0.15rem 0 0 0;
  font-size: 0.76rem;
  color: #94a3b8;
  font-weight: 500;
}

.py-hud-stats {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.py-hud-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

/* --- Primary View Switcher Tabs --- */
.py-view-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1.6rem;
  background: rgba(12, 18, 36, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  overflow-x: auto;
}

.py-view-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.py-view-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.05);
}

.py-view-tab-btn.active {
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(245, 158, 11, 0.2));
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

/* --- Sub-View Sections --- */
.py-subview {
  display: none;
  padding: 1.6rem;
}

.py-subview.active {
  display: block;
  animation: pyFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ─────────────────────────────────────────────────────────────
   1. MAP VIEW (THE 30 REGIONS WORLD MAP)
   ───────────────────────────────────────────────────────────── */
.py-map-banner {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(15, 23, 42, 0.7));
  border: 1px solid var(--py-border);
  border-radius: 14px;
  padding: 1.25rem 1.6rem;
  margin-bottom: 1.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.py-map-banner-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.py-map-banner-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 780px;
  line-height: 1.5;
}

.py-regions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.15rem;
}

.py-region-card {
  background: var(--py-bg-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.py-region-card:hover {
  background: var(--py-bg-card-hover);
  border-color: var(--region-color, var(--py-blue));
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(56, 189, 248, 0.2);
}

.py-region-card.active {
  border-color: var(--region-color, var(--py-blue));
  background: rgba(30, 58, 138, 0.28);
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.3);
}

.py-region-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.py-region-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.py-region-num {
  font-size: 0.68rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--region-color, var(--py-blue));
}

.py-region-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  margin: 0.1rem 0 0 0;
}

.py-region-desc {
  font-size: 0.8rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}

.py-region-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: #64748b;
}

/* ─────────────────────────────────────────────────────────────
   2. CONCEPT CHEAT-SHEET CARDS (8-PART PIPELINE)
   ───────────────────────────────────────────────────────────── */
.py-cards-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.py-search-box {
  position: relative;
  min-width: 280px;
  flex-grow: 1;
  max-width: 450px;
}

.py-search-input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--py-border);
  border-radius: 10px;
  color: #f8fafc;
  font-size: 0.85rem;
  outline: none;
  transition: all 0.2s ease;
}

.py-search-input:focus {
  border-color: var(--py-blue);
  box-shadow: 0 0 16px var(--py-blue-glow);
}

.py-search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
}

.py-concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(460px, 1fr));
  gap: 1.6rem;
}

@media (max-width: 640px) {
  .py-concept-grid {
    grid-template-columns: 1fr;
  }
}

.py-card {
  background: var(--py-bg-panel);
  border: 1px solid var(--py-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease;
}

.py-card:hover {
  border-color: rgba(56, 189, 248, 0.6);
}

.py-card-header {
  padding: 1.1rem 1.35rem;
  background: rgba(8, 14, 28, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.py-card-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.py-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.py-card-region-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.py-card-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* Card Sections */
.py-card-box {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
}

.py-card-box-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.py-card-idea {
  font-size: 0.88rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.py-card-peg {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fde047;
  background: rgba(234, 179, 8, 0.12);
  border: 1px dashed rgba(234, 179, 8, 0.4);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.py-card-ascii {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.76rem;
  color: #38bdf8;
  background: #030712;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 0.75rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.35;
}

.py-card-code-wrap {
  position: relative;
}

.py-card-code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.8rem;
  color: #a7f3d0;
  background: #020617;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 0.85rem;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.4;
}

.py-card-copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.py-card-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Difficulty Tabs */
.py-diff-tabs {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.py-diff-btn {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  cursor: pointer;
}

.py-diff-btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.py-diff-content {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.45;
  margin-top: 0.5rem;
}

.py-card-footer {
  padding: 0.9rem 1.35rem;
  background: rgba(8, 14, 28, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.py-card-related {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.py-related-pill {
  font-size: 0.7rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

/* ─────────────────────────────────────────────────────────────
   3. INTERACTIVE MINI-GAMES SUITE
   ───────────────────────────────────────────────────────────── */
.py-games-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  padding-bottom: 0.4rem;
}

.py-game-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.py-game-tab-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #fff;
}

.py-game-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(244, 63, 94, 0.2));
  border-color: #f59e0b;
  color: #fde047;
  box-shadow: 0 0 18px var(--py-yellow-glow);
}

.py-game-stage {
  background: rgba(8, 14, 28, 0.95);
  border: 1px solid var(--py-border);
  border-radius: 14px;
  padding: 1.8rem;
  min-height: 480px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

/* Game 1: 1-Billion Records Vending Machine */
.py-vending-sim {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

@media (max-width: 800px) {
  .py-vending-sim {
    grid-template-columns: 1fr;
  }
}

.py-machine-chassis {
  background: #030712;
  border: 2px solid #38bdf8;
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.2);
}

.py-vending-glass {
  width: 100%;
  height: 180px;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.1) 0%, rgba(2, 6, 23, 0.8) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.py-vending-can {
  font-size: 3rem;
  filter: drop-shadow(0 0 12px #38bdf8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.py-vending-can.dispensed {
  transform: translateY(80px) scale(0.8);
  opacity: 0;
}

.py-meter-box {
  width: 100%;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 1rem;
}

.py-meter-bar-outer {
  height: 14px;
  background: #020617;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.6rem 0;
}

.py-meter-bar-fill {
  height: 100%;
  width: 2%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  transition: width 0.3s ease;
}

/* Game 2: Thread Race Condition Bank */
.py-bank-stage {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.py-bank-vault {
  background: #020617;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0 25px rgba(245, 158, 11, 0.25);
}

.py-bank-balance {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  color: #fde047;
  margin: 0.4rem 0;
}

.py-workers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.py-worker-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
}

/* ─────────────────────────────────────────────────────────────
   4. CONTRAST MATRIX ARENA
   ───────────────────────────────────────────────────────────── */
.py-contrast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 1.6rem;
}

@media (max-width: 640px) {
  .py-contrast-grid {
    grid-template-columns: 1fr;
  }
}

.py-contrast-card {
  background: var(--py-bg-panel);
  border: 1px solid var(--py-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.py-contrast-head {
  padding: 1rem 1.4rem;
  background: rgba(8, 14, 28, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.py-contrast-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  divide-x: 1px solid rgba(255, 255, 255, 0.08);
}

.py-contrast-side {
  padding: 1.2rem;
}

.py-contrast-side.left {
  background: rgba(56, 189, 248, 0.04);
}

.py-contrast-side.right {
  background: rgba(245, 158, 11, 0.04);
}

.py-contrast-points {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.py-contrast-point {
  font-size: 0.78rem;
  color: #cbd5e1;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  line-height: 1.35;
}

.py-contrast-verdict {
  padding: 0.9rem 1.35rem;
  background: rgba(16, 185, 129, 0.1);
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 0.82rem;
  font-weight: 700;
  color: #6ee7b7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ─────────────────────────────────────────────────────────────
   5. CHOOSE YOUR TOOL DECISION TREE
   ───────────────────────────────────────────────────────────── */
.py-tree-container {
  max-width: 800px;
  margin: 0 auto;
  background: var(--py-bg-panel);
  border: 1px solid var(--py-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

.py-tree-question {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-bottom: 1.8rem;
}

.py-tree-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 600px) {
  .py-tree-options {
    grid-template-columns: 1fr;
  }
}

.py-tree-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.3rem 1.1rem;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.py-tree-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.2);
}

.py-tree-result {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 14px;
  padding: 1.8rem;
  text-align: center;
  animation: pyFadeIn 0.3s ease;
}

/* ─────────────────────────────────────────────────────────────
   6. MENTAL SIMULATION (THE GOLDEN RULE)
   ───────────────────────────────────────────────────────────── */
.py-sim-challenge-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--py-bg-panel);
  border: 1px solid var(--py-border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5);
}

.py-sim-code-preview {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 0.88rem;
  background: #020617;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 1.2rem;
  color: #7dd3fc;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
  margin: 1.2rem 0;
}

.py-sim-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 1.2rem;
}

@media (max-width: 600px) {
  .py-sim-options-grid {
    grid-template-columns: 1fr;
  }
}

.py-sim-option-btn {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 0.9rem;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.py-sim-option-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #fff;
}

.py-sim-option-btn.correct {
  background: rgba(16, 185, 129, 0.25);
  border-color: #10b981;
  color: #6ee7b7;
}

.py-sim-option-btn.wrong {
  background: rgba(239, 68, 68, 0.25);
  border-color: #ef4444;
  color: #fca5a5;
}

.py-sim-explanation {
  margin-top: 1.5rem;
  background: rgba(15, 23, 42, 0.9);
  border-left: 4px solid #38bdf8;
  border-radius: 0 10px 10px 0;
  padding: 1.1rem 1.4rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #cbd5e1;
}

/* ─────────────────────────────────────────────────────────────
   ENHANCEMENTS: Custom Scrollbars, Responsive, Progress, Focus
   ───────────────────────────────────────────────────────────── */

/* --- Custom Scrollbars for Log & Code Containers --- */
.python-atlas-container ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.python-atlas-container ::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 3px;
}

.python-atlas-container ::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.3);
  border-radius: 3px;
}

.python-atlas-container ::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.5);
}

/* --- sim-btn Fallback (for atlas that uses simulator classes) --- */
.python-atlas-container .sim-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.python-atlas-container .sim-btn.primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(59, 130, 246, 0.35));
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}

.python-atlas-container .sim-btn.primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.5), rgba(59, 130, 246, 0.5));
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
}

.python-atlas-container .sim-btn.secondary {
  background: rgba(30, 41, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: #94a3b8;
}

.python-atlas-container .sim-btn.secondary:hover {
  background: rgba(51, 65, 85, 0.7);
  border-color: rgba(255, 255, 255, 0.25);
  color: #cbd5e1;
}

/* --- Focus-Visible Accessibility Outlines --- */
.python-atlas-container button:focus-visible,
.python-atlas-container input:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

/* --- Region Card Concept Count Progress Bar --- */
.py-region-footer {
  position: relative;
}

.py-region-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--region-color, var(--py-blue)), transparent);
  border-radius: 0 0 12px 12px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.py-region-card:hover::after {
  opacity: 0.7;
}

/* --- Dispense Animation for Vending Machine --- */
@keyframes pyDispense {
  0% { transform: translateY(-20px); opacity: 0.3; }
  50% { transform: translateY(5px); opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}

.py-vending-can.dispensed {
  animation: pyDispense 0.3s ease-out;
}

/* --- Empty State for Cards View (no results) --- */
.py-concept-grid:empty::after {
  content: '🔍 No concept cards match your search or filter.';
  display: block;
  text-align: center;
  padding: 3rem 1rem;
  font-size: 1rem;
  color: #64748b;
  grid-column: 1 / -1;
}

/* --- Related Concept Pill Hover --- */
.py-related-pill {
  transition: background 0.15s ease, color 0.15s ease;
}

.py-related-pill:hover {
  background: rgba(56, 189, 248, 0.25) !important;
  color: #7dd3fc !important;
}

/* --- Game Tab Button Active Glow --- */
.py-game-tab-btn.active {
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

/* --- Responsive: Mobile Map Grid & Header --- */
@media (max-width: 768px) {
  .py-hud-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
  }

  .py-hud-stats {
    width: 100%;
    justify-content: flex-start;
  }

  .py-view-nav {
    padding: 0.6rem 0.8rem;
    gap: 0.3rem;
  }

  .py-view-tab-btn {
    padding: 0.4rem 0.7rem;
    font-size: 0.72rem;
  }

  .py-subview {
    padding: 1rem;
  }

  .py-regions-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .py-map-banner {
    flex-direction: column;
    padding: 1rem;
  }

  .py-vending-sim {
    grid-template-columns: 1fr !important;
  }

  .py-bank-stage {
    padding: 1rem;
  }

  .py-workers-grid {
    grid-template-columns: 1fr !important;
  }

  .py-tree-options {
    grid-template-columns: 1fr !important;
  }

  .py-contrast-body {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .py-hud-title {
    font-size: 1.1rem;
  }

  .py-hud-logo {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .py-hud-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.5rem;
  }

  .py-card-body > div[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .py-search-box {
    min-width: 200px;
  }

  .py-concept-grid {
    gap: 1rem;
  }
}

/* --- Contrast Card Header Gradient Enhancement --- */
.py-contrast-card:hover {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.15);
}

/* --- Decision Tree Button Hover Pulse --- */
.py-tree-btn:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 18px rgba(56, 189, 248, 0.2);
}

/* --- Smooth scrolling inside atlas --- */
.python-atlas-container {
  scroll-behavior: smooth;
}

/* ─────────────────────────────────────────────────────────────
   PICTORIAL GRAPHICAL ENGINE & VISUAL DIAGRAM STYLES
   ───────────────────────────────────────────────────────────── */

/* Container wrapping the pictorial graphic and ASCII switcher */
.py-card-visual-container {
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.py-card-visual-container:hover {
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.12);
}

.py-card-visual-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.9rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Toggle Tabs: 🎨 Pictorial Graphic | 📐 ASCII Blueprint */
.py-visual-tabs {
  display: inline-flex;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.py-visual-tab-btn {
  background: none;
  border: none;
  color: #94a3b8;
  font-family: 'Outfit', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.py-visual-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}

.py-visual-tab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* Pictorial Graphic Card */
.py-pictorial-card {
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 20%, rgba(30, 41, 59, 0.35) 0%, rgba(3, 7, 18, 0.8) 100%);
  padding: 0.85rem 0.9rem;
}

.py-pictorial-legend {
  display: flex;
  gap: 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
}

.py-pictorial-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.py-pictorial-svg {
  width: 100%;
  height: auto;
  max-height: 180px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.py-pictorial-caption {
  margin-top: 0.65rem;
  background: rgba(15, 23, 42, 0.75);
  border-left: 3px solid #a855f7;
  border-radius: 0 6px 6px 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.45;
}

.py-pictorial-caption strong {
  color: #c084fc;
}

/* ─────────────────────────────────────────────────────────────
   3D CONCEPT ARTWORK CARDS (PHOTOREALISTIC GENERATED MODELS)
   ───────────────────────────────────────────────────────────── */
.py-concept-artwork-card {
  padding: 0.85rem 0.9rem;
}

.py-concept-artwork-wrapper {
  position: relative;
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55), inset 0 0 20px rgba(56, 189, 248, 0.12);
  background: #020617;
  max-height: 240px;
}

.py-concept-artwork-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.3s ease;
  filter: saturate(1.05) contrast(1.02);
}

.py-concept-artwork-wrapper:hover .py-concept-artwork-img {
  transform: scale(1.03);
  filter: saturate(1.15) contrast(1.05);
}

.py-concept-artwork-tag {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.02em;
}

.py-artwork-peg-sub {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: #a7f3d0;
  font-family: 'JetBrains Mono', Consolas, monospace;
}

/* ─────────────────────────────────────────────────────────────
   ILLUSTRATED PYTHON WORLD MAP HERO (MAP VIEW)
   ───────────────────────────────────────────────────────────── */
.py-world-map-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.35);
  margin-bottom: 2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(56, 189, 248, 0.15);
  background: #020617;
}

.py-world-map-img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.py-world-map-hero:hover .py-world-map-img {
  transform: scale(1.015);
}

.py-world-map-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.7) 60%, transparent 100%);
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 1rem;
}

.py-map-hotspots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.py-map-hotspot-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #f8fafc;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.py-map-hotspot-btn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(59, 130, 246, 0.35));
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

/* ==========================================================================
   VISUAL GRAPHIC METAPHOR SIMULATOR SUITE
   ========================================================================== */
.py-sim-suite {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.py-sim-header-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
}

.py-sim-nav-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  color: #cbd5e1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: left;
}

.py-sim-nav-btn span {
  font-size: 1.6rem;
}

.py-sim-nav-btn strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
}

.py-sim-nav-btn small {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
}

.py-sim-nav-btn:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: #38bdf8;
  transform: translateY(-2px);
}

.py-sim-nav-btn.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(168, 85, 247, 0.2));
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
}

.py-sim-nav-btn.active strong {
  color: #38bdf8;
}

.py-sim-card {
  background: #030712;
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.6);
}

.py-sim-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.py-sim-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 0.4rem;
}

.py-sim-badge.cyan { background: rgba(56, 189, 248, 0.15); border: 1px solid #38bdf8; color: #38bdf8; }
.py-sim-badge.amber { background: rgba(245, 158, 11, 0.15); border: 1px solid #f59e0b; color: #f59e0b; }
.py-sim-badge.purple { background: rgba(168, 85, 247, 0.15); border: 1px solid #a855f7; color: #c084fc; }
.py-sim-badge.teal { background: rgba(20, 184, 166, 0.15); border: 1px solid #14b8a6; color: #2dd4bf; }

.py-sim-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  color: #fff;
  margin: 0.2rem 0 0.4rem 0;
}

.py-sim-desc {
  font-size: 0.85rem;
  color: #94a3b8;
  max-width: 650px;
  line-height: 1.45;
  margin: 0;
}

.py-sim-telemetry {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.py-telemetry-item {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.py-telemetry-item .label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  font-weight: 700;
}

.py-telemetry-item .val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 800;
}

.py-telemetry-item .val.green { color: #10b981; }
.py-telemetry-item .val.cyan { color: #38bdf8; }
.py-telemetry-item .val.amber { color: #f59e0b; }
.py-telemetry-item .val.red { color: #ef4444; }

/* ─────────────────────────────────────────────────────────────
   1. ASYNCIO RADAR DISPATCHER
   ───────────────────────────────────────────────────────────── */
.py-radar-stage {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  background: radial-gradient(circle at 20% 50%, rgba(6, 182, 212, 0.08) 0%, rgba(2, 6, 23, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 900px) {
  .py-radar-stage {
    grid-template-columns: 1fr;
  }
}

.py-radar-display {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: #020817;
  border: 3px solid #0284c7;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.3), inset 0 0 35px rgba(6, 182, 212, 0.2);
  position: relative;
  overflow: hidden;
  margin: 0 auto;
}

.py-radar-sweep {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: conic-gradient(from 0deg at 50% 50%, rgba(56, 189, 248, 0.45) 0deg, transparent 60deg, transparent 360deg);
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.4s ease-out;
}

.py-radar-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(56, 189, 248, 0.3);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.ring-1 { width: 90px; height: 90px; }
.ring-2 { width: 180px; height: 180px; }
.ring-3 { width: 270px; height: 270px; }

.py-radar-crosshair-h {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(56, 189, 248, 0.2);
}

.py-radar-crosshair-v {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
  background: rgba(56, 189, 248, 0.2);
}

.py-radar-center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  background: rgba(2, 6, 23, 0.9);
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #38bdf8;
}

.py-radar-center-hub span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: #38bdf8;
  font-weight: 700;
}

.py-radar-blip {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid #f59e0b;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.blip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: pulse-blip 1s infinite alternate;
}

.blip-label {
  font-size: 0.68rem;
  color: #fde047;
  font-family: 'JetBrains Mono', monospace;
}

@keyframes pulse-blip {
  from { transform: scale(0.8); opacity: 0.6; }
  to { transform: scale(1.4); opacity: 1; }
}

.py-coroutine-lanes {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.py-lane {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem;
}

.py-lane.runway { border-left: 4px solid #10b981; }
.py-lane.orbit { border-left: 4px solid #f59e0b; }
.py-lane.ready { border-left: 4px solid #a855f7; }

.py-lane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 0.5rem;
}

.py-lane-body {
  display: flex;
  gap: 0.6rem;
}

.py-lane-body.wrap {
  flex-wrap: wrap;
}

.py-lane-empty {
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.py-task-chip {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 220px;
}

.py-task-chip .task-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex-grow: 1;
}

.py-task-chip .task-info strong {
  font-size: 0.78rem;
  color: #fff;
}

.py-task-chip .task-info small {
  font-size: 0.7rem;
  color: #94a3b8;
}

.py-pulse-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

.py-pulse-tag.cyan { background: rgba(56, 189, 248, 0.2); color: #38bdf8; }
.py-pulse-tag.amber { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.py-pulse-tag.purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; }
.py-pulse-tag.green { background: rgba(16, 185, 129, 0.2); color: #10b981; }

/* ─────────────────────────────────────────────────────────────
   2. BANK VAULT MUTEX SIMULATOR
   ───────────────────────────────────────────────────────────── */
.py-vault-stage {
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 1.5rem;
  align-items: center;
  background: #020617;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 800px) {
  .py-vault-stage { grid-template-columns: 1fr; }
}

.py-thread-worker-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.py-thread-worker-box.working {
  border-color: #10b981;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.py-thread-worker-box.waiting {
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.worker-avatar {
  font-size: 2.4rem;
}

.worker-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.worker-status-badge.idle { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }
.worker-status-badge.working { background: rgba(16, 185, 129, 0.2); color: #10b981; }
.worker-status-badge.waiting { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.worker-notes {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.4rem;
}

.py-vault-center-core {
  background: #0b1329;
  border: 2px solid #f59e0b;
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.25);
  position: relative;
}

.py-vault-laser-beam {
  width: 100%;
  padding: 0.4rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.py-vault-laser-beam.clear { background: rgba(16, 185, 129, 0.15); border: 1px solid #10b981; color: #10b981; }
.py-vault-laser-beam.active-barrier { background: rgba(239, 68, 68, 0.2); border: 1px solid #ef4444; color: #f87171; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
.py-vault-laser-beam.danger { background: rgba(245, 158, 11, 0.2); border: 1px solid #f59e0b; color: #fde047; }

.py-vault-door-graphic {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.py-vault-lock-dial {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: #1e293b;
  border: 3px solid #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s ease;
}

.py-vault-lock-dial.holding-key {
  transform: rotate(90deg);
  border-color: #10b981;
}

.py-vault-display-screen {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.8rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.screen-label { font-size: 0.68rem; color: #94a3b8; font-weight: 700; }
.screen-amount { font-family: 'Outfit', sans-serif; font-size: 2.2rem; font-weight: 900; color: #fde047; }
.screen-amount.corrupted { color: #ef4444; text-shadow: 0 0 15px rgba(239, 68, 68, 0.6); }
.screen-status { font-size: 0.72rem; font-weight: 700; color: #10b981; }

.py-vault-key-pedestal .key-badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.py-vault-key-pedestal .key-badge.held {
  border-color: #f59e0b;
  color: #fde047;
}

/* ─────────────────────────────────────────────────────────────
   3. VENDING MACHINE & YIELD CLAMP
   ───────────────────────────────────────────────────────────── */
.py-vending-machine-stage {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  background: #020617;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 850px) {
  .py-vending-machine-stage { grid-template-columns: 1fr; }
}

.py-vending-cabinet {
  background: #090e1a;
  border: 2px solid #a855f7;
  border-radius: 14px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.py-vending-display-glass {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.08) 0%, rgba(2, 6, 23, 0.9) 100%);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 220px;
}

.py-vending-spiral-shelf {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.6);
  border-radius: 8px;
}

.spiral-coil { font-size: 2rem; }
.spiral-canister {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: #c084fc;
  font-weight: 700;
  background: rgba(168, 85, 247, 0.2);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #a855f7;
}

.py-yield-clamp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.py-yield-clamp.clamped {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fde047;
}

.py-yield-clamp.unclamped {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.py-vending-chute {
  background: #020617;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 0.6rem;
  text-align: center;
  font-size: 0.75rem;
  color: #a7f3d0;
}

.py-vending-levers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.py-vending-telemetry-panel {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.meter-track {
  height: 16px;
  background: #090e1a;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin: 0.6rem 0;
}

.meter-bar.green-bar {
  background: linear-gradient(90deg, #10b981, #06b6d4);
  height: 100%;
  transition: width 0.3s ease;
}

.meter-bar.danger-bar {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  height: 100%;
  transition: width 0.3s ease;
}

.meter-legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #64748b;
}

/* ─────────────────────────────────────────────────────────────
   4. AIRLOCK CONTEXT MANAGER SIMULATOR
   ───────────────────────────────────────────────────────────── */
.py-airlock-stage {
  display: grid;
  grid-template-columns: 160px 1fr 160px;
  gap: 1rem;
  background: #020617;
  border: 1px solid rgba(20, 184, 166, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 750px) {
  .py-airlock-stage { grid-template-columns: 1fr; }
}

.py-airlock-door {
  background: #090e1a;
  border: 2px solid #14b8a6;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.door-status-tag { font-size: 0.72rem; font-weight: 800; color: #2dd4bf; margin-bottom: 0.5rem; }
.shutter-seal { font-size: 0.78rem; font-weight: 800; padding: 0.4rem; background: #020617; border-radius: 6px; }

.py-airlock-chamber {
  background: radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.1) 0%, #030712 100%);
  border: 2px solid #14b8a6;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.py-airlock-chamber.exception_alarm {
  border-color: #ef4444;
  background: radial-gradient(circle at 50% 50%, rgba(239, 68, 68, 0.2) 0%, #030712 100%);
}

.resource-pedestal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.resource-icon { font-size: 2.8rem; }
.resource-name { font-family: 'JetBrains Mono', monospace; font-size: 0.85rem; color: #a7f3d0; }

.chamber-hazard-strobe {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.chamber-hazard-strobe.strobe-on {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  animation: strobe-alert 0.6s infinite alternate;
}

@keyframes strobe-alert {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

/* ─────────────────────────────────────────────────────────────
   5. LEGB SCOPE SCANNER
   ───────────────────────────────────────────────────────────── */
.py-scope-stage {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.5rem;
  background: #020617;
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.2rem;
}

@media (max-width: 850px) {
  .py-scope-stage { grid-template-columns: 1fr; }
}

.py-scope-rings-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.py-scope-ring {
  border-radius: 50%;
  border: 2px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s ease;
}

.ring-builtin { width: 320px; height: 320px; border-color: #06b6d4; background: rgba(6, 182, 212, 0.04); }
.ring-global { width: 240px; height: 240px; border-color: #f59e0b; background: rgba(245, 158, 11, 0.04); }
.ring-enclosing { width: 160px; height: 160px; border-color: #a855f7; background: rgba(168, 85, 247, 0.04); }
.ring-local { width: 85px; height: 85px; border-color: #10b981; background: rgba(16, 185, 129, 0.08); }

.ring-label {
  position: absolute;
  top: 6px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.ring-builtin > .ring-label { color: #06b6d4; }
.ring-global > .ring-label { color: #f59e0b; }
.ring-enclosing > .ring-label { color: #c084fc; }
.ring-local > .ring-label { color: #10b981; top: 8px; }

.py-scope-ring.active-pulse {
  border-width: 3px;
  box-shadow: 0 0 25px currentColor;
}

.py-scope-ring.found-here {
  background: rgba(16, 185, 129, 0.25) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 30px #10b981 !important;
}

.scope-core-worker {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 1.2rem;
}

.scope-core-worker small {
  font-size: 0.58rem;
  color: #94a3b8;
}

.py-scope-controls-side {
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1.2rem;
}

.side-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
  color: #cbd5e1;
  margin-bottom: 0.8rem;
}

.preset-targets {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.target-chip {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0.5rem 0.8rem;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.target-chip small {
  font-family: 'Outfit', sans-serif;
  color: #94a3b8;
  font-size: 0.7rem;
}

.target-chip:hover {
  border-color: #a855f7;
  background: rgba(30, 41, 59, 0.9);
}

.target-chip.active {
  background: rgba(168, 85, 247, 0.25);
  border-color: #c084fc;
  color: #e9d5ff;
}

/* ─────────────────────────────────────────────────────────────
   SHARED CONTROLS & REAL-TIME LOG PANELS
   ───────────────────────────────────────────────────────────── */
.py-sim-controls-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1.2rem;
}

.py-sim-controls-bar .btn-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.py-sim-log-card {
  background: #020617;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
}

.log-header {
  background: rgba(15, 23, 42, 0.9);
  padding: 0.6rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #cbd5e1;
}

.log-indicator {
  font-size: 0.68rem;
  font-weight: 800;
}

.log-indicator.green { color: #10b981; }
.log-indicator.amber { color: #f59e0b; }
.log-indicator.red { color: #ef4444; }

.log-stream {
  padding: 0.8rem 1rem;
  max-height: 140px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.log-line {
  color: #94a3b8;
  line-height: 1.35;
}

.log-line:first-child {
  color: #a7f3d0;
  font-weight: 600;
}


