/* =========================================================
   BB'S CYBER ELITE THEME - MASTER MODULAR CSS v2.2
   Updates: Added Module 21 (Flashcards) & Module 22 (Quiz Bank)
   Updates: Module 23 Fixed Terminal Sizing (1800px) & Input Visibility
========================================================= */

/* =========================================================
   MODULE 0: CORE VARIABLES & FONTS
========================================================= */
@import url('/css/shared/font-standard.css');

:root {
  --bb-bg-deep: var(--theme-component-page-20);
  --bb-bg-surface: var(--theme-component-surface-31);
  --bb-bg-glass: var(--theme-component-surface-48);
  
  --bb-text-main: var(--theme-component-ink-18);
  --bb-text-muted: var(--theme-component-muted-13);
  --bb-text-dim: var(--theme-component-info-4);
  
  --bb-kelly: var(--theme-component-primary-1);
  --bb-cyan: var(--theme-component-info-16);
  --bb-error: var(--theme-component-error-1);
  --bb-gold: var(--theme-component-ink-38);
  --bb-carrot: var(--theme-component-warning-11);
  --bb-amber: var(--theme-component-error-21);
  --bb-honey: var(--theme-component-warning-12);
  --bb-cherry: var(--theme-component-error-22);
  --bb-sangria: var(--theme-component-error-23);
  --bb-basil: var(--theme-component-primary-84);
  --bb-sage: var(--theme-component-muted-14);
  --bb-purple: var(--theme-component-info-17);
  --bb-lav: var(--theme-component-ink-39);
  --bb-wine: var(--theme-component-surface-49);
  --bb-brightblue: var(--theme-component-info-18);
  
  --bb-glow-primary: 0 0 20px var(--theme-component-primary-35);
  --bb-glow-hover: 0 0 35px var(--theme-component-primary-39);
  --bb-glass-blur: blur(12px);
  --bb-border-glass: 1px solid var(--theme-component-primary-42);
  
  --font-tech: 'Ultra', Georgia, serif;
  --font-body: 'Geist', sans-serif;
  --font-code: 'JetBrains Mono', monospace;
  
  --bb-radius-lg: 12px;
}

/* =========================================================
    MODULE 1: ATMOSPHERE & CURSOR (REVISED FOR TOUCH)
========================================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bb-bg-deep);
    color: var(--bb-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    cursor: none; /* Desktop default */
}

/* --- TACTICAL RETICLE SYSTEM --- */
.cursor {
    position: fixed; top: 0; left: 0;
    width: 50px; height: 50px;
    border: 2px solid var(--bb-kelly);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2147483647 !important;
    transition: width 0.2s, height 0.2s, border-color 0.2s;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 0 4px var(--theme-component-primary-34);
    background-image: linear-gradient(90deg, var(--bb-kelly) 25%, transparent 25%, transparent 75%, var(--bb-kelly) 75%),
                      linear-gradient(180deg, var(--bb-kelly) 25%, transparent 25%, transparent 75%, var(--bb-kelly) 75%);
    background-position: center;
    background-size: 100% 2px, 2px 100%;
    background-repeat: no-repeat;
}

.cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 4px; height: 4px;
    background: var(--theme-component-ink-5); border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 2147483647 !important;
    box-shadow: 0 0 4px var(--theme-component-ink-5);
}

.cursor.active {
    width: 85px;
    height: 85px;
    border-color: var(--theme-component-border-7);
    background-color: var(--theme-component-primary-22);
    box-shadow: 0 0 18px var(--theme-component-primary-25);
}

.cursor-coords {
    position: absolute;
    right: -92px;
    top: -15px;
    color: var(--bb-kelly);
    font-family: var(--font-code);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--theme-component-primary-59);
    white-space: nowrap;
}

#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: var(--bb-kelly);
    box-shadow: 0 0 15px var(--theme-component-primary-85);
    z-index: 2000;
}

@media (hover: hover) and (pointer: fine) {
    body,
    a,
    button,
    input,
    select,
    textarea,
    [role="button"],
    [role="tab"],
    [draggable="true"] {
        cursor: none !important;
    }
}

/* MOBILE FIX: Hide reticle on touch devices */
@media (pointer: coarse) {
    body { cursor: auto !important; }
    .cursor, .cursor-dot { display: none !important; }
}
/* =========================================================
   MODULE 2: BUTTONS & UTILITIES
========================================================= */
/* Utility Classes */
.bb-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-center { text-align: center; }
.text-kelly { color: var(--bb-kelly); }
.bb-muted { color: var(--bb-text-muted); }
.bb-center { display: flex; justify-content: center; }
.mb-60 { margin-bottom: 60px; }
.mt-20 { margin-top: 20px; }

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 28px; font-weight: 700; border-radius: 2px; font-size: max(14px, 0.95rem);
  font-family: var(--font-tech); text-transform: uppercase; transition: 0.2s ease;
  text-decoration: none !important; cursor: pointer;
}

.btn-primary {
  background: var(--bb-kelly); color: var(--theme-component-on-primary-3) !important; border: none;
  box-shadow: var(--bb-glow-primary);
  clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}
.btn-primary:hover { background: var(--theme-component-primary-86); box-shadow: var(--bb-glow-hover); transform: translateY(-2px); }

.btn-secondary { 
  background: var(--theme-component-primary-36); border: 1px solid var(--bb-kelly); 
  color: var(--bb-kelly) !important; 
}
.btn-secondary:hover { background: var(--theme-component-primary-42); transform: translateY(-2px); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; border-color: var(--bb-text-dim); color: var(--bb-text-dim) !important; }

/* Small Button Variant */
.btn-sm { font-size: 15px; padding: 8px 16px; }

/* =========================================================
   MODULE 3: NAVIGATION (Index-Matched)
========================================================= */
nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--theme-component-page-21);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--theme-component-primary-87);
  padding: 10px 0;
}

nav .bb-container{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo img{
  height: 40px;
  filter: drop-shadow(0 0 5px var(--bb-kelly));
  transition: 0.3s ease;
}
nav .logo img:hover{
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px var(--bb-kelly));
}

/* keep it single-line like index; if it wraps on smaller widths we'll handle with media queries later */
nav ul{
  display: flex;
  gap: 25px;
  list-style: none;
  flex-wrap: nowrap;
  align-items: center;
}

/* brighter + slightly larger than muted default */
nav ul li a{
  font-family: var(--font-tech);
  font-weight: 700;
  font-size: max(15px, 1rem);
  letter-spacing: 1px;
  color: var(--theme-component-ink-40);
  text-transform: uppercase;
  text-decoration: none;
  padding: 10px 2px;
  position: relative;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

/* underline tab behavior like index */
nav ul li a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: 4px;
  width: 100%;
  height: 2px;
  background: var(--bb-kelly);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  opacity: 0.95;
}

nav ul li a:hover,
nav ul li a.active{
  color: var(--bb-kelly);
  text-shadow: 0 0 10px var(--theme-component-primary-59);
}

nav ul li a:hover::after,
nav ul li a.active::after{
  transform: scaleX(1);
}

/* =========================================================
   MODULE 4: HERO & ANIMATION (Index Hero System)
========================================================= */

/* Base hero layout aligned to index */
.hero{
  position: relative;
  padding: 140px 0 100px; /* matches index */
  overflow: hidden;
  border-bottom: 1px solid var(--theme-component-border-14);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* index "Logo - Text - Logo deck */
.hero-command-deck{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  width: 100%;
  max-width: 1400px;
  position: relative;
  z-index: 2;
}

/* center block */
.hero-text{
  text-align: center;
  max-width: 800px;
  text-shadow: 0 0 30px var(--theme-component-page-48);
  position: relative;
  z-index: 2;
}

/* big headline matches index vibe */
.hero h1{
  font-family: var(--font-tech);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 18px;
}

/* paragraph tone */
.hero p{
  color: var(--bb-text-muted);
  max-width: 900px;
  margin: 0 auto;
}

/* watermark flank logos */
.hero-flank-logo{
  height: 180px;
  width: auto;
  opacity: 0.08;
  filter: grayscale(100%) brightness(1.2);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: 0.3s all ease;
}

@media (max-width: 1200px){
  .hero-flank-logo{ display:none; }
}

/* CTA alignment: index uses centered on hero pages */
.hero .cta-buttons{
  display: flex;
  gap: 15px;
  margin-top: 25px;
  justify-content: center;
}

/* hero background svg behavior */
.bb-hero-bg-svg{
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  opacity: 0.35; /* index uses 0.35 */
  pointer-events: none;
}

/* Hex animation classes (shared) */
.hex-path{
  fill: none;
  stroke: var(--theme-component-ink-13);
  stroke-width: 1;
}

.hex-active{
  fill: var(--bb-kelly);
  stroke: none;
  opacity: 0;
  animation: hexPulse 4s infinite;
}

.hex-scan-line{
  fill: url(#scanGradient);
  opacity: 0.5;
  animation: hexScan 8s linear infinite;
}

@keyframes hexPulse{
  0%, 100%{ opacity: 0; }
  50%{ opacity: 0.2; }
}

@keyframes hexScan{
  0%{ transform: translateY(-10%); }
  100%{ transform: translateY(110%); }
}
/* =========================================================
   MODULE 5: NEWSLETTER / INTEL FEED
========================================================= */
.newsletter-section {
  background: linear-gradient(180deg, var(--bb-bg-surface) 0%, var(--bb-bg-deep) 100%);
  padding: 80px 0;
  border-top: 1px solid var(--theme-component-border-14);
  position: relative;
}

.newsletter-box {
  background: var(--bb-bg-glass);
  border: 1px solid var(--bb-kelly);
  border-radius: var(--bb-radius-lg);
  padding: 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 25px var(--theme-component-primary-36);
}

.newsletter-box::before {
  content: ">> SYSTEM STATUS: RECEIVING";
  position: absolute; top: 15px; left: 20px;
  font-family: var(--font-code); font-size: 14px;
  color: var(--bb-kelly); opacity: 0.8; letter-spacing: 1px;
}

.newsletter-box h3 {
  font-family: var(--font-tech); font-size: 2rem;
  text-transform: uppercase; margin-bottom: 10px; color: var(--theme-component-ink-5);
}

.newsletter-form {
  display: flex; gap: 15px; max-width: 550px;
  margin: 30px auto 0; justify-content: center;
}

.newsletter-input {
  flex: 1; background: var(--theme-component-page-47);
  border: 1px solid var(--bb-text-dim);
  color: var(--bb-kelly); font-family: var(--font-code);
  padding: 14px 20px; border-radius: 2px; outline: none;
  transition: all 0.3s ease;
}
.newsletter-input::placeholder { color: var(--bb-text-dim); opacity: 0.6; }
.newsletter-input:focus {
  border-color: var(--bb-kelly);
  box-shadow: 0 0 15px var(--theme-component-primary-42);
  background: var(--theme-component-page-45);
}

@media (max-width: 768px) {
  .newsletter-form { flex-direction: column; }
  .newsletter-input, .newsletter-form .btn-primary { width: 100%; }
}

/* =========================================================
   MODULE 6: PANELS & CARDS
========================================================= */
.panel, .dossier-card {
  padding: 32px 40px; margin-bottom: 40px; background: var(--bb-bg-glass);
  backdrop-filter: var(--bb-glass-blur); border: var(--bb-border-glass); border-radius: var(--bb-radius-lg);
}
.panel h2, .panel h3 { margin-bottom: 15px; }
.panel p, .dossier-card p { margin-bottom: 16px; color: var(--bb-text-muted); }
.panel ul, .panel ol { padding-left: 35px; margin-bottom: 20px; color: var(--bb-text-muted); }
.panel li { margin-bottom: 10px; }

.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; font-family: var(--font-tech); text-transform: uppercase; }
.section-sub { text-align: center; color: var(--bb-text-muted); margin-top: -30px; margin-bottom: 50px; }

/* =========================================================
   MODULE 7: FOOTER
========================================================= */
footer { text-align: center; padding: 60px 0; border-top: 1px solid var(--theme-component-border-14); margin-top: 80px; }
footer img { height: 40px; margin-bottom: 15px; opacity: 0.6; transition: 0.3s; }
footer img:hover { opacity: 1; filter: drop-shadow(0 0 8px var(--bb-kelly)); }

/* --- DRILL CARD GRID (RESPONSIVE OVERWRITE) --- */
.drill-grid {
    display: grid;
    /* This line is the magic: it stays 380px on PC but drops to 100% on phones */
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
    gap: 25px;
    margin-top: 40px;
}

.drill-card {
    background: var(--theme-component-primary-40);
    border: 1px solid var(--theme-component-primary-41);
    border-radius: 8px;
    padding: clamp(15px, 4vw, 30px); /* Padding shrinks on smaller screens */
    display: flex;
    flex-direction: column;
    transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
/* =========================================================
   MODULE 12: WIRESHARK TABLES
========================================================= */
.ws-sim-container { margin-top: 25px; }
.ws-table-wrap { overflow-x: auto; border: 1px solid var(--theme-component-border-15); border-radius: 8px; margin-top: 20px; }

.ws-table { width: 100%; border-collapse: collapse; font-family: var(--font-code); font-size: 14px; min-width: 600px; }
.ws-table th { background: var(--theme-component-primary-88); color: var(--bb-kelly); padding: 12px; text-align: left; font-weight: 700; border-bottom: 1px solid var(--theme-component-primary-89); }
.ws-table td { padding: 10px 12px; border-bottom: 1px solid var(--theme-component-border-14); cursor: pointer; color: var(--bb-text-muted); }
.ws-table tr:hover { background: var(--theme-component-ink-19); }
.ws-table tr.active { background: var(--theme-component-primary-90); border-left: 3px solid var(--bb-kelly); }

.ws-details { margin-top: 15px; background: var(--theme-component-page-22); border: 1px solid var(--theme-component-border-15); border-radius: 8px; padding: 20px; font-family: var(--font-code); font-size: 15px; min-height: 150px; }

/* --- HOVER FIX: Tooltip Styles --- */
    .ws-explain {
        position: relative;
        cursor: help;
        text-decoration: underline;
        text-decoration-style: dotted;
        color: var(--theme-component-ink-5); /* Ensure the link text itself is visible */
    }

    .ws-explain::after {
        content: attr(data-explain);
        position: absolute;
        
        /* High Z-Index to force it on top of all other layers */
        z-index: 99999; 
        
        left: 20px; 
        top: 1.5em;
        
        /* Solid black background prevents text underneath from showing through */
        background-color: var(--theme-component-page-20); 
        
        /* Visual styling to match theme */
        border: 1px solid var(--theme-component-primary-1); 
        color: var(--theme-component-ink-28);
        padding: 10px 12px;
        border-radius: 6px;
        font-family: 'Geist', sans-serif;
        font-size: 14px;
        line-height: 1.4;
        min-width: 260px;
        max-width: 350px;
        white-space: normal;
        
        /* Drop shadow helps separate it from the background */
        box-shadow: 0 4px 20px var(--theme-component-page-49); 

        /* Animation */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.1s ease-in-out;
        pointer-events: none; /* Prevents cursor flickering */
    }

    .ws-explain:hover::after {
        opacity: 1;
        visibility: visible;
    }
/* =========================================================
   MODULE 13: WIDGETS & GRIDS
========================================================= */
/* Myth Grid */
.myth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.myth-col { background: var(--theme-component-page-50); padding: 24px; border-radius: 8px; border: 1px solid var(--theme-component-border-14); }
.myth-col h3 { color: var(--bb-kelly); font-size: 1.1rem; margin-bottom: 15px; border-bottom: 1px dashed var(--theme-component-primary-91); padding-bottom: 10px; }
.myth-list { list-style: none !important; padding: 0 !important; }
.myth-list li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; font-size: max(15px, 0.95rem); color: var(--bb-text-muted); }
.icon-x { color: var(--bb-error); font-weight: bold; }
.icon-check { color: var(--bb-kelly); font-weight: bold; }

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

/* Quote / Insight Box */
.quote-box {
  border-left: 3px solid var(--bb-kelly);
  background: var(--theme-component-primary-92);
  padding: 20px; margin-top: 25px;
  border-radius: 0 8px 8px 0;
}
.quote-text { font-style: italic; color: var(--theme-component-ink-5); margin-bottom: 10px; font-size: 1.1rem; }

/* Dossier Card Headers */
.dossier-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; border-bottom: 1px solid var(--theme-component-border-14); padding-bottom: 15px; }
.dossier-title { font-family: var(--font-tech); font-weight: 700; font-size: 1.2rem; color: var(--theme-component-ink-5); text-transform: uppercase; }
.dossier-status { font-family: var(--font-code); font-size: 14px; padding: 4px 8px; border: 1px solid var(--bb-kelly); color: var(--bb-kelly); border-radius: 4px; letter-spacing: 1px; }

/* Archives Grid */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.dossier-card { display: flex; flex-direction: column; }

/* =========================================================
   MODULE 14: ELITE RESOURCE GRIDS & BUTTONS
========================================================= */
.elite-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.elite-resource-btn {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--theme-component-primary-36);
    border: 1px solid var(--theme-component-primary-35);
    border-radius: 8px;
    padding: 28px;
    text-decoration: none;
    transition: 0.3s all cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.elite-resource-btn:hover {
    background: var(--theme-component-primary-81);
    border-color: var(--bb-kelly);
    transform: translateY(-4px);
    box-shadow: var(--bb-glow-primary);
}

.elite-resource-btn i, .elite-resource-btn img {
    font-size: 1.8rem;
    color: var(--bb-kelly);
    filter: drop-shadow(0 0 8px var(--theme-component-primary-34));
    flex-shrink: 0;
    margin-top: 5px;
}
.elite-resource-btn img { height: 45px; width: auto; }

.btn-text { display: flex; flex-direction: column; gap: 8px; }

.btn-title {
    font-family: var(--font-tech);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--theme-component-ink-5);
    letter-spacing: 1.5px;
    font-size: 1.1rem;
}

.btn-sub {
    font-size: max(15px, 0.9rem);
    color: var(--bb-text-muted);
    line-height: 1.5;
}

.category-header {
    color: var(--bb-kelly); 
    margin: 50px 0 20px 0; 
    font-family: var(--font-tech); 
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--theme-component-primary-41);
    padding-bottom: 10px;
}

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

/* =========================================================
   MODULE 15: MISSION CARDS & RADAR ANIMATION
========================================================= */

/* --- THREAT RADAR ANIMATION --- */
.radar-grid {
    fill: none;
    stroke: var(--bb-kelly);
    stroke-width: 1;
    opacity: 0.2;
}

.radar-sweep-group {
    transform-origin: 500px 300px; /* Center of SVG viewbox */
    animation: radarSpin 4s infinite linear;
}

.radar-line {
    stroke: var(--bb-kelly);
    stroke-width: 2;
    filter: drop-shadow(0 0 5px var(--bb-kelly));
}

.radar-trail {
    fill: url(#sweepGradient);
    opacity: 0.3;
}

/* Blips */
.blip-safe {
    fill: var(--bb-kelly);
    opacity: 0;
    animation: blipFade 4s infinite;
}

.blip-threat {
    fill: var(--theme-component-error-24); /* Red for threat */
    opacity: 0;
    animation: blipFadeThreat 4s infinite;
    filter: drop-shadow(0 0 8px var(--theme-component-error-25));
}

/* Automated Response Shield */
.shield-icon {
    fill: none;
    stroke: var(--bb-kelly);
    stroke-width: 2;
    opacity: 0;
    animation: shieldDeploy 4s infinite;
}

@keyframes radarSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

@keyframes blipFade {
    0% { opacity: 0; }
    20% { opacity: 1; r: 6; } /* Ping on scan */
    100% { opacity: 0; r: 2; }
}

@keyframes blipFadeThreat {
    0% { opacity: 0; }
    45% { opacity: 0; } /* Wait for scanner */
    50% { opacity: 1; r: 8; }
    100% { opacity: 0; r: 2; }
}

@keyframes shieldDeploy {
    0%, 55% { opacity: 0; transform: scale(0.5); }
    60% { opacity: 1; transform: scale(1.2); }
    70% { transform: scale(1); }
    100% { opacity: 0; }
}

/* --- MISSION CARD LAYOUT --- */
.lab-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr)); 
    gap: 30px; 
    margin-top: 30px; 
}

.lab-card { 
    background: var(--theme-component-primary-40); 
    border: 1px solid var(--theme-component-primary-41); 
    border-radius: 8px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s all ease; 
}

.lab-card:hover { 
    border-color: var(--bb-kelly); 
    box-shadow: 0 0 20px var(--theme-component-primary-42); 
    transform: translateY(-5px); 
    background: var(--theme-component-primary-93); 
}

.lab-visual { 
    position: relative; 
    height: 220px; 
    border-bottom: 1px solid var(--theme-component-primary-41); 
    overflow: hidden; 
    background: var(--theme-component-page-22); 
}

.lab-visual img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0.8; 
    transition: 0.3s; 
}

.lab-card:hover .lab-visual img { opacity: 1; transform: scale(1.02); }

.lab-badges { 
    position: absolute; top: 15px; left: 15px; 
    display: flex; gap: 8px; flex-wrap: wrap; 
}

.badge { 
    font-family: var(--font-code); font-size: 14px; 
    text-transform: uppercase; padding: 4px 8px; 
    border-radius: 2px; font-weight: 700; 
}

.badge-primary { background: var(--bb-kelly); color: var(--theme-component-on-primary-3); }
.badge-secondary { background: var(--theme-component-page-17); color: var(--bb-text-muted); border: 1px solid var(--bb-text-dim); }

.lab-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }

.lab-title { 
    font-family: var(--font-tech); color: var(--theme-component-ink-5); 
    font-size: 1.4rem; text-transform: uppercase; 
    margin-bottom: 15px; line-height: 1.2; 
}

.lab-desc { 
    font-size: max(15px, 0.95rem); color: var(--bb-text-muted); 
    margin-bottom: 20px; flex-grow: 1; 
}

.lab-skills { 
    background: var(--theme-component-page-50); padding: 15px; 
    border-radius: 4px; border-left: 3px solid var(--bb-text-dim); 
    margin-bottom: 25px; 
}

.lab-skills h4 { 
    color: var(--bb-text-main); font-size: 14px; 
    text-transform: uppercase; margin-bottom: 8px; 
    font-family: var(--font-code); 
}

.lab-skills ul { padding-left: 20px; font-size: 14px; color: var(--bb-text-muted); }
.lab-skills li { margin-bottom: 4px; }

.btn-launch { 
    text-align: center; 
    background: var(--theme-component-primary-3); 
    border: 1px solid var(--bb-kelly); 
    color: var(--bb-kelly); padding: 12px; 
    text-transform: uppercase; font-weight: 700; 
    text-decoration: none; transition: 0.2s; 
    font-family: var(--font-tech); letter-spacing: 1px; 
}

.btn-launch:hover { background: var(--bb-kelly); color: var(--theme-component-on-primary-3); box-shadow: 0 0 15px var(--theme-component-primary-34); }

.cert-header { 
    color: var(--bb-kelly); 
    margin: 60px 0 20px 0; 
    font-family: var(--font-tech); 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    border-bottom: 1px solid var(--theme-component-primary-41); 
    padding-bottom: 10px; 
    font-size: 1.8rem; 
}

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

/* =========================================================
   MODULE 16: SECURE COMMS & TERMINAL FORMS
   Styles for Suggestions/Contact Page
========================================================= */

/* --- COMMS HEADER VISUAL --- */
.comms-header {
    position: relative;
    padding: 100px 0 60px;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--theme-component-primary-41);
}

.comms-svg {
    height: 150px;
    width: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px var(--theme-component-primary-87));
}

/* SVG Animations */
.signal-wave { animation: signalMove 2s infinite linear; opacity: 0; }
.signal-wave:nth-child(2) { animation-delay: 0.5s; }
.signal-wave:nth-child(3) { animation-delay: 1s; }

@keyframes signalMove {
    0% { opacity: 1; transform: translateX(0) scale(0.5); }
    100% { opacity: 0; transform: translateX(100px) scale(1.5); }
}

.dish-rotate { 
    animation: dishScan 8s ease-in-out infinite alternate; 
    transform-origin: center bottom; 
}
@keyframes dishScan { from { transform: rotate(-15deg); } to { transform: rotate(15deg); } }

/* --- TERMINAL FORM CONTAINER --- */
.terminal-container {
    max-width: 1800px;
    margin: 40px auto;
    background: var(--theme-component-surface-50);
    border: 1px solid var(--bb-kelly);
    position: relative;
}

.terminal-header {
    background: var(--theme-component-primary-3);
    padding: 10px 20px;
    font-family: var(--font-code);
    font-size: 14px;
    color: var(--bb-kelly);
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--theme-component-primary-87);
}

.terminal-status { display: flex; gap: 10px; align-items: center; }
.status-blink { width: 8px; height: 8px; background: var(--bb-kelly); border-radius: 50%; animation: blink 1s infinite; }

.terminal-body { padding: 30px; }

/* --- FORM INPUTS --- */
.form-group { margin-bottom: 25px; }

.form-label {
    display: block;
    font-family: var(--font-tech);
    text-transform: uppercase;
    color: var(--bb-kelly);
    margin-bottom: 8px;
    font-size: max(14px, 0.9rem);
    letter-spacing: 1px;
}

.form-input, .form-textarea {
    width: 100%;
    background: var(--theme-component-page-51);
    border: 1px solid var(--theme-component-primary-87);
    padding: 12px;
    color: var(--bb-text-main);
    font-family: var(--font-code);
    transition: 0.3s;
}

/* Fix for Dropdown Options Background */
.form-input option {
    background-color: var(--theme-component-page-22);
    color: var(--bb-text-main);
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px var(--theme-component-primary-41) inset;
    background: var(--theme-component-primary-36);
}

.form-textarea { resize: vertical; height: 120px; }

/* --- TRANSMIT BUTTON --- */
.btn-transmit {
    width: 100%;
    padding: 15px;
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3);
    font-family: var(--font-tech);
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: bold;
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 2px;
    cursor: pointer;
}

.btn-transmit:hover {
    background: var(--theme-component-primary-86);
    box-shadow: 0 0 30px var(--theme-component-primary-25);
}

.btn-transmit::after {
    content: "";
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, var(--theme-component-ink-41), transparent);
    transition: 0.5s;
}
.btn-transmit:hover::after { left: 100%; }

/* --- TRANSMISSION OVERLAY --- */
.transmission-overlay {
    position: absolute; inset: 0;
    background: var(--theme-component-page-21);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 10;
    visibility: hidden; opacity: 0;
    transition: 0.3s;
    font-family: var(--font-code);
}
.transmission-overlay.active { visibility: visible; opacity: 1; }

.progress-bar-container {
    width: 60%; height: 10px; background: var(--theme-component-surface-51);
    margin: 20px 0; border-radius: 5px; overflow: hidden;
}
.progress-bar {
    height: 100%; width: 0%; background: var(--bb-kelly);
    transition: width 3s ease-in-out;
    box-shadow: 0 0 10px var(--bb-kelly);
}
.success-message { color: var(--bb-kelly); font-size: 1.5rem; display: none; text-transform: uppercase; }

/* =========================================================
   MODULE 17: TACTICAL GAME INTERFACE (Firewall Escape)
========================================================= */
.game-ui-container {
    max-width: 900px;
    margin: 40px auto;
    background: var(--theme-component-page-22);
    border: 1px solid var(--bb-kelly);
    box-shadow: 0 0 30px var(--theme-component-primary-3);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

/* CRT Scanline Overlay */
.game-ui-container::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(var(--theme-component-surface-52) 50%, var(--theme-component-page-52) 50%), linear-gradient(90deg, var(--theme-component-error-26), var(--theme-component-primary-94), var(--theme-component-info-19));
    z-index: 5;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.game-header {
    background: var(--theme-component-primary-3);
    padding: 15px 25px;
    border-bottom: 1px solid var(--bb-kelly);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-tech);
}

.game-timer { font-size: 1.2rem; color: var(--bb-error); font-weight: bold; animation: pulseRed 1s infinite; }
@keyframes pulseRed { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

.game-screen {
    padding: 40px;
    flex-grow: 1;
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: center;
    animation: fadeIn 0.5s ease;
}
.game-screen.active { display: flex; }

.game-title {
    font-family: var(--font-tech);
    font-size: 2.5rem;
    color: var(--theme-component-ink-5);
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--bb-kelly);
}

.game-desc { font-size: 1.1rem; color: var(--bb-text-muted); margin-bottom: 30px; max-width: 600px; }

.challenge-box {
    background: var(--theme-component-ink-19);
    border: 1px dashed var(--bb-text-dim);
    padding: 25px;
    margin-bottom: 25px;
}

.game-options { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.game-btn {
    background: var(--theme-component-page-45);
    border: 1px solid var(--bb-kelly);
    color: var(--bb-kelly);
    padding: 15px;
    font-family: var(--font-code);
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}
.game-btn:hover { background: var(--bb-kelly); color: var(--theme-component-on-primary-3); box-shadow: 0 0 15px var(--bb-kelly); }

.feedback-msg {
    margin-top: 15px;
    font-family: var(--font-code);
    font-weight: bold;
    min-height: 24px;
}
.feedback-success { color: var(--bb-kelly); }
.feedback-fail { color: var(--bb-error); }

/* Progress Dots */
.level-indicators { display: flex; gap: 5px; }
.level-dot { width: 10px; height: 10px; background: var(--theme-component-surface-51); border-radius: 50%; }
.level-dot.active { background: var(--bb-kelly); box-shadow: 0 0 5px var(--bb-kelly); }

/* =========================================================
   MODULE 19: BB'S POMODORO TIMER
========================================================= */

/* Main Layout Shell */
.pomodoro-shell {
    display: grid;
    grid-template-columns: 1fr 350px; /* Timer on left, Settings/Info on right */
    grid-template-rows: auto auto;
    gap: 30px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.pomodoro-header-bar {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--theme-component-primary-41);
    margin-bottom: 20px;
}

.pomodoro-title {
    font-family: var(--font-tech);
    color: var(--bb-kelly);
    text-transform: uppercase;
    font-size: 2rem;
    margin: 0;
}

/* --- THE TIMER CARD (Left Side) --- */
.pomodoro-timer-card {
    grid-column: 1 / 2;
    grid-row: 2 / 4;
    background: var(--bb-bg-glass);
    border: 1px solid var(--bb-kelly);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 0 30px var(--theme-component-primary-36);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 600px;
}

/* Phase Buttons (Work / Short / Long) */
.timer-phase-modes {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    background: var(--theme-component-page-50);
    padding: 5px;
    border-radius: 30px;
}

.timer-phase-button {
    border-radius: 25px;
    border: none !important;
    font-size: max(14px, 0.9rem);
    padding: 8px 20px;
    opacity: 0.7;
    transition: 0.3s;
}

.timer-phase-button.active {
    background: var(--bb-kelly) !important;
    color: var(--theme-component-on-primary-3) !important;
    opacity: 1;
    font-weight: bold;
    box-shadow: 0 0 15px var(--theme-component-primary-34);
}

/* The SVG Ring & Time Display */
.timer-visual-wrapper {
    position: relative;
    width: 300px;
    height: 300px;
    margin-bottom: 40px;
}

.timer-ring-container {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start from top */
}

#timer-ring { width: 100%; height: 100%; }

.timer-ring-bg { stroke: var(--theme-component-ink-19); }
.timer-ring-fg { stroke: var(--bb-kelly); transition: stroke-dashoffset 0.5s linear; }

.timer-display {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.timer-time {
    font-family: var(--font-code);
    font-size: 4.5rem;
    font-weight: bold;
    color: var(--theme-component-ink-5);
    line-height: 1;
    text-shadow: 0 0 20px var(--theme-component-primary-41);
}

.timer-phase-label {
    font-family: var(--font-tech);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--bb-kelly);
    margin-top: 10px;
}

.timer-session-counter {
    font-size: 14px;
    color: var(--bb-text-muted);
    margin-top: 5px;
}

/* Controls */
.timer-main-button {
    font-size: 1.5rem !important;
    padding: 15px 50px !important;
    margin-bottom: 20px;
    width: 200px;
}

.timer-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
}

.timer-status-line {
    font-family: var(--font-code);
    color: var(--bb-text-main);
    min-height: 1.5em;
    margin-bottom: 20px;
}

.timer-toggles {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
    font-size: max(14px, 0.9rem);
    color: var(--bb-text-muted);
    background: var(--theme-component-ink-42);
    padding: 15px;
    border-radius: 8px;
    width: 100%;
}

/* --- SETTINGS & INFO CARDS (Right Side) --- */
.pomodoro-settings-card, .pomodoro-info-card {
    grid-column: 2 / 3;
    background: var(--theme-component-surface-53);
    border: 1px solid var(--theme-component-border-15);
    border-radius: 8px;
    padding: 25px;
}

.pomodoro-settings-card h3, .pomodoro-info-card h3 {
    color: var(--bb-kelly);
    font-family: var(--font-tech);
    text-transform: uppercase;
    border-bottom: 1px solid var(--theme-component-border-15);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.timer-preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.timer-preset-button {
    background: transparent;
    border: 1px solid var(--bb-text-dim);
    color: var(--bb-text-muted);
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}

.timer-preset-button.active, .timer-preset-button:hover {
    border-color: var(--bb-kelly);
    color: var(--bb-kelly);
    background: var(--theme-component-primary-36);
}

.timer-custom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.timer-custom-grid label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: var(--bb-text-muted);
}

.timer-custom-grid input {
    background: var(--theme-component-page-51);
    border: 1px solid var(--theme-component-border-8);
    color: var(--theme-component-ink-5);
    padding: 8px;
    border-radius: 4px;
    margin-top: 5px;
    font-family: var(--font-code);
}

.timer-custom-grid input:focus {
    border-color: var(--bb-kelly);
    outline: none;
}

.timer-settings-note {
    font-size: 15px;
    color: var(--bb-kelly);
    margin-top: 10px;
    min-height: 1.2em;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .pomodoro-shell {
        grid-template-columns: 1fr;
    }
    .pomodoro-timer-card {
        grid-row: auto;
    }
}

/* =========================================================
   MODULE 20: WIRESHARK CHEAT SHEET & SIMULATOR
========================================================= */

/* --- FILTER CARDS --- */
.filter-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.2rem;
    margin-top: 1rem;
}

.filter-card {
    background: linear-gradient(145deg, var(--theme-component-surface-54), var(--theme-component-page-53));
    border-radius: 12px;
    border: 1px solid var(--theme-component-primary-95);
    padding: 0.9rem 1rem 1rem 1rem;
    box-shadow: 0 0 14px var(--theme-component-primary-90);
}

.filter-card h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
    font-size: 1rem;
    color: var(--theme-component-primary-96); /* Keeping your specific pale green */
    font-family: var(--font-tech);
}

.filter-card p {
    margin: 0.25rem 0 0.4rem 0;
    font-size: 15px;
    color: var(--bb-text-muted);
}

.filter-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.4rem;
}

.filter-tag {
    font-family: var(--font-code);
    font-size: 14px;
    padding: 3px 7px;
    border-radius: 999px;
    border: 1px solid var(--theme-component-primary-97);
    background: var(--theme-component-page-54);
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    color: var(--theme-component-ink-5);
}

/* --- PACKET EXPLANATION CARDS --- */
.packet-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.packet-card {
    background: linear-gradient(145deg, var(--theme-component-surface-55), var(--theme-component-surface-56));
    border-radius: 12px;
    border: 1px solid var(--theme-component-info-20);
    padding: 0.9rem 1rem 1rem 1rem;
}

.packet-card h3 {
    margin-top: 0;
    margin-bottom: 0.3rem;
    font-size: 1rem;
    color: var(--theme-component-info-21); /* Keeping your pale blue */
    font-family: var(--font-tech);
}

.packet-card p {
    margin: 0.2rem 0;
    font-size: 15px;
    color: var(--bb-text-muted);
}

.packet-fields {
    margin-top: 0.4rem;
    font-family: var(--font-code);
    font-size: 14px;
    background: var(--theme-component-page-45);
    border-radius: 8px;
    padding: 6px 8px;
    color: var(--bb-text-main);
}

/* --- WIRESHARK SIMULATOR UI --- */
.ws-sim-container {
    margin-top: 1.5rem;
}

.ws-sim {
    background: var(--theme-component-page-45);
    border-radius: 12px;
    border: 1px solid var(--theme-component-primary-91);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 420px;
}

.ws-sim-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--theme-component-primary-98);
    font-size: max(14px, 0.9rem);
    background: radial-gradient(circle at top left, var(--theme-component-primary-99), var(--theme-component-page-17));
    color: var(--bb-text-muted);
}

.ws-sim-grid {
    display: grid;
    grid-template-rows: 40% 35% 25%;
    flex: 1;
}

.ws-sim-pane {
    border-top: 1px solid var(--theme-component-border-13);
    padding: 6px 8px;
    overflow: auto;
    font-size: 14px;
}

.ws-sim-pane h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--theme-component-primary-100); /* Your neon green */
    font-family: var(--font-tech);
}

.ws-sim-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-family: var(--font-code);
}

.ws-sim-table thead {
    background: var(--theme-component-page-51);
    position: sticky;
    top: 0;
    z-index: 1;
}

.ws-sim-table th, .ws-sim-table td {
    padding: 4px 6px;
    border-bottom: 1px solid var(--theme-component-border-16);
    white-space: nowrap;
    text-align: left;
    color: var(--bb-text-muted);
}

.ws-sim-table th {
    font-weight: 600;
    color: var(--theme-component-primary-96);
}

.ws-sim-row { cursor: pointer; }
.ws-sim-row:hover { background: var(--theme-component-primary-101); }
.ws-sim-row.active { background: var(--theme-component-primary-102); }
.ws-sim-row.active td { color: var(--theme-component-ink-5); }

.ws-sim-details-layer { margin-bottom: 4px; }
.ws-sim-details-layer strong { color: var(--theme-component-primary-96); }
.ws-sim-details-layer ul { margin: 3px 0 4px 16px; padding: 0; }
.ws-sim-details-layer li { list-style: disc; margin-bottom: 1px; color: var(--bb-text-muted); }

.ws-sim-bytes {
    font-family: var(--font-code);
    white-space: pre;
    font-size: 14px;
    background: var(--theme-component-page-51);
    border-radius: 6px;
    padding: 6px;
    color: var(--bb-text-muted);
}

/* Hover Tooltips */
.ws-explain {
    position: relative;
    cursor: help;
    text-decoration: underline;
    text-decoration-style: dotted;
    color: var(--theme-component-ink-5);
}

.ws-explain::after {
    content: attr(data-explain);
    position: absolute;
    z-index: 30;
    left: 0;
    top: 1.4em;
    background: var(--theme-component-page-55);
    border: 1px solid var(--theme-component-primary-103);
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.3;
    min-width: 220px;
    max-width: 320px;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease;
    color: var(--theme-component-ink-5);
}

.ws-explain:hover::after { opacity: 1; visibility: visible; }

@media (max-width: 900px) {
    .ws-sim-grid { grid-template-rows: 45% 30% 25%; }
}


/* =========================================================
   MODULE 21: FLASHCARD SYSTEM (RESPONSIVE + TACTICAL VISUALS)
========================================================= */

/* --- GRID LAYOUT --- */
.flashcard-grid {
  display: grid;
  /* Fluid columns: Stays 300px on PC, drops to 100% on phones */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 25px;
  margin-top: 20px;
}

/* --- CARD CONTAINER (Perspective) --- */
.flashcard {
  position: relative;
  width: 100%;
  height: 250px; /* Fixed height for 3D flip stability */
  perspective: 1000px;
  cursor: pointer;
}

/* The invisible checkbox that controls the state */
.flashcard-toggle {
  display: none;
}

/* --- SHARED FACE STYLES --- */
.flashcard-front, .flashcard-back {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0; top: 0;
  border-radius: 12px;
  padding: 25px;
  backface-visibility: hidden; /* Critical for flip */
  transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 1px solid var(--theme-component-primary-41);
  box-shadow: 0 4px 15px var(--theme-component-page-50);
}

/* --- FRONT FACE VISUALS --- */
.flashcard-front {
  background: var(--bb-bg-surface);
  transform: rotateY(0deg); 
  z-index: 2;
}

.flashcard-front:hover {
  border-color: var(--bb-kelly);
  box-shadow: 0 0 15px var(--theme-component-primary-41);
}

.flashcard-front h3 {
  font-family: var(--font-tech);
  font-size: 2.2rem;
  color: var(--theme-component-ink-5);
  margin-bottom: 5px;
  text-shadow: 0 0 10px var(--theme-component-primary-87);
}

.protocol-category {
  font-size: max(14px, 0.9rem);
  color: var(--bb-text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
}

/* --- BACK FACE VISUALS --- */
.flashcard-back {
  background: linear-gradient(145deg, var(--theme-component-surface-57), var(--theme-component-page-22));
  transform: rotateY(180deg);
  border: 1px solid var(--bb-kelly);
}

.port-line {
  font-family: var(--font-code);
  font-size: 1.4rem;
  color: var(--bb-kelly);
  font-weight: 700;
  margin-bottom: 10px;
}

.flashcard-back p {
  font-size: 15px;
  color: var(--theme-component-ink-5);
  line-height: 1.4;
}

.exam-tip {
  font-size: 14px !important;
  color: var(--bb-gold) !important;
  background: var(--theme-component-ink-43);
  padding: 8px;
  border-radius: 4px;
  border-left: 2px solid var(--bb-gold);
  width: 100%;
  margin-top: auto; 
}

/* --- FLIP ANIMATION LOGIC --- */
.flashcard-toggle:checked ~ .flashcard-front { transform: rotateY(-180deg); }
.flashcard-toggle:checked ~ .flashcard-back { transform: rotateY(0deg); }

/* --- MOBILE TWEAKS --- */
@media (max-width: 600px) {
  .flashcard { height: 280px; } /* Taller for wrapping text on phones */
}
/* =========================================================
MODULE 22: QUESTION BANK / QUIZ UI (ENHANCED EXPLANATIONS)
========================================================= */

:root {
--bb-panel: var(--theme-component-page-56);
--bb-green: var(--theme-component-primary-100);
--bb-green-2: var(--theme-component-primary-104);
--bb-red: var(--theme-component-error-27);
--bb-yellow: var(--theme-component-ink-44);
--bb-shadow: 0 14px 50px var(--theme-component-page-57);
--bb-radius: 18px;
}

.bb-matrix-layer { position: fixed; inset: 0; z-index: 0; pointer-events: none; }

.bb-lab {
max-width: 1040px;
margin: 0 auto;
padding: 22px 18px 70px;
position: relative;
z-index: 2;
}

/* --- DASHBOARD WRAPPER --- */
.bb-dashboard {
background: var(--bb-panel);
border: 1px solid var(--theme-component-primary-105);
border-radius: var(--bb-radius);
box-shadow: var(--bb-shadow);
margin-bottom: 20px;
overflow: hidden;
backdrop-filter: blur(8px);
transition: all 0.3s ease;
}

.bb-dash-head {
padding: 18px;
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid transparent;
transition: border-bottom 0.3s;
}
.bb-dashboard.expanded .bb-dash-head {
border-bottom: 1px solid var(--theme-component-primary-90);
}

.bb-brand { display:flex; align-items:center; gap:12px; }
.bb-brand img {
height: 44px; width: auto; display:block;
border-radius: 12px;
box-shadow: 0 0 15px var(--theme-component-primary-97);
border: 1px solid var(--theme-component-primary-106);
background: var(--theme-component-page-22); object-fit: contain;
}
.bb-titlewrap { display:flex; flex-direction:column; gap:4px; }
.bb-title { font-size: 20px; font-weight: 800; letter-spacing: .3px; line-height: 1.15; color: var(--bb-text-main); }
.bb-subtitle { font-size: 15px; color: var(--bb-text-muted); line-height: 1.25; }

.bb-dash-toggle {
background: var(--bb-green);
color: var(--theme-component-on-primary-8);
border: none;
border-radius: 8px;
width: 44px; height: 44px;
display: flex; align-items: center; justify-content: center;
cursor: pointer;
font-size: 20px;
font-weight: bold;
box-shadow: 0 0 15px var(--theme-component-primary-107);
transition: 0.2s ease;
}
.bb-dash-toggle:hover {
background: var(--theme-component-ink-5);
transform: scale(1.05);
box-shadow: 0 0 20px var(--theme-component-ink-45);
}

.bb-dash-body {
display: none;
padding: 18px;
animation: slideDown 0.3s ease-out;
}
.bb-dashboard.expanded .bb-dash-body { display: block; }

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

/* --- QUIZ CARDS --- */
.bb-quiz { margin-top: 20px; display:grid; gap:14px; }
.bb-qcard {
border-radius: 18px;
border: 1px solid var(--theme-component-primary-108);
background: var(--theme-component-page-58);
box-shadow: 0 0 25px var(--theme-component-primary-99);
overflow:hidden;
position: relative;
}

.bb-qhead { padding: 14px 18px 10px; border-bottom: 1px solid var(--theme-component-primary-109); background: var(--theme-component-page-59); margin-left: 6px; }
.bb-qbody { padding: 14px 18px 16px; margin-left: 6px; }
.bb-qtext { margin:0 0 12px; font-size:15px; line-height:1.45; font-weight:800; color: var(--bb-text-main); }

/* --- OPTIONS --- */
.bb-options { display:grid; gap:10px; }
.bb-opt {
display:flex; align-items:center; gap:12px; padding: 12px 12px;
border-radius: 14px; border: 2px solid var(--theme-component-primary-110); background: var(--theme-component-page-60);
cursor:pointer; transition: 0.15s ease; user-select:none; position:relative;
}
.bb-opt:hover { border-color: var(--theme-component-primary-111); box-shadow: 0 0 22px var(--theme-component-primary-110); }

/* --- ENHANCED EXPLANATION SYSTEM --- */
.bb-explain {
margin-top: 14px;
padding: 18px;
border-radius: 14px;
border: 1px solid var(--theme-component-primary-112);
background: var(--theme-component-page-61);
display:none;
animation: bbFadeUp .14s ease-out;
}
.bb-qcard.is-locked .bb-explain { display:block; }

/* Spacing out paragraphs */
.bb-explain p {
margin: 0 0 14px 0;
line-height: 1.6;
font-size: 15px;
color: var(--bb-text-main);
}
.bb-explain p:last-child { margin-bottom: 0; }

/* Spacing out list items */
.bb-explain ul, .bb-explain ol {
margin-bottom: 14px;
padding-left: 20px;
}
.bb-explain li {
margin-bottom: 6px;
color: var(--bb-text-muted);
font-size: 15px;
}

/* Logical Blocks (To separate 'Correct' from 'Incorrect' explanations) */
.bb-logic-block {
padding-top: 12px;
margin-top: 12px;
border-top: 1px solid var(--theme-component-border-13);
}

/* Highlighted "Key Takeaway" or "Concept" */
.bb-key-concept {
color: var(--bb-cyan);
background: var(--theme-component-info-22);
border-left: 3px solid var(--bb-cyan);
padding: 10px 14px;
margin-bottom: 14px;
font-style: italic;
font-size: 14px;
}

.bb-badge {
border-radius:999px; padding:4px 10px; font-size:14px; font-weight:900;
border: 1px solid var(--bb-green); color: var(--bb-green);
background: var(--theme-component-primary-113); text-transform: uppercase;
}
.bb-badge.bad { border-color: var(--bb-red); color: var(--bb-red); background: var(--theme-component-error-28); }

@keyframes bbFadeUp { from{ opacity:0; transform: translateY(4px);} to{opacity:1; transform: translateY(0);} }
/* =========================================================
   MODULE 23: LAB SIMULATION UI (TERMINALS & MODALS)
========================================================= */

/* --- CORE SIMULATION OVERRIDES --- */
.lab-mode body {
    background-image: radial-gradient(circle at center, var(--theme-component-surface-58) 0%, var(--theme-component-page-20) 100%);
    min-height: 100vh;
    padding-bottom: 50px;
    cursor: none; 
}

/* --- NETWORK CANVAS --- */
.sim-grid {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    align-items: start;
}

.network-canvas {
    background: var(--bb-bg-glass);
    border: 1px solid var(--theme-component-primary-87);
    border-radius: var(--bb-radius-lg);
    padding: 40px;
    position: relative;
    min-height: 700px;
    box-shadow: var(--bb-glow-primary);
    backdrop-filter: blur(5px);
}

.department-label {
    font-family: var(--font-tech);
    color: var(--bb-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--theme-component-border-15);
    display: inline-block;
}

.host-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 50px;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

/* --- HOST NODES --- */
.host-node {
    width: 110px;
    background: var(--theme-component-surface-59);
    border: 1px solid var(--bb-text-dim);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    cursor: none;
    z-index: 2;
    transition: all 0.3s ease;
    position: relative;
}

.host-node:hover {
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px var(--theme-component-primary-87);
    transform: translateY(-5px);
}

.host-node i {
    font-size: 2.2rem;
    color: var(--bb-text-main);
    margin-bottom: 10px;
    display: block;
}

.host-node.server-node i { color: var(--bb-cyan); }

.host-node .ip {
    font-family: var(--font-code);
    font-size: 14px;
    color: var(--bb-kelly);
    margin-top: 4px;
}

.host-node .name {
    font-family: var(--font-tech);
    font-weight: 700;
    color: var(--theme-component-ink-5);
    line-height: 1.1;
}

.host-node.is-dragging { opacity: 0.4; transform: scale(0.9); }

/* --- INFRASTRUCTURE & QUARANTINE --- */
.infra-node {
    width: 140px;
    margin: 0 auto 20px;
    text-align: center;
    padding: 12px;
    background: var(--theme-component-surface-31);
    border: 1px solid var(--bb-text-muted);
    border-radius: 4px;
    opacity: 0.8;
    transition: 0.3s;
}

.infra-node.interactive {
    cursor: none;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 10px var(--theme-component-primary-3);
    animation: pulseBorder 3s infinite;
}

.infra-node.interactive:hover {
    background: var(--theme-component-primary-3);
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--theme-component-primary-34);
}

@keyframes pulseBorder {
    0% { border-color: var(--bb-text-dim); }
    50% { border-color: var(--bb-kelly); }
    100% { border-color: var(--bb-text-dim); }
}

.infra-node i { color: var(--bb-text-muted); font-size: 1.5rem; }
.infra-text { color: var(--bb-text-muted); font-family: var(--font-tech); margin-top: 5px; font-size: 14px;}

.quarantine-box {
    background: var(--theme-component-surface-60);
    border: 2px dashed var(--bb-error);
    border-radius: var(--bb-radius-lg);
    height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    transition: background 0.3s;
    overflow-y: auto;
}

.quarantine-box.drag-over {
    background: var(--theme-component-error-29);
    border-style: solid;
}

.quarantine-title {
    font-family: var(--font-tech);
    color: var(--bb-error);
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 20px;
}

/* --- FIXED MODAL STYLES (GRID LAYOUT) --- */
.config-modal, .system-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--theme-component-page-62);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    cursor: auto; 
}

.modal-panel {
    width: 98vw; 
    height: 95vh;
    max-width: none;
    background: var(--bb-bg-surface);
    border: 1px solid var(--bb-kelly);
    border-radius: 8px;
    box-shadow: 0 0 60px var(--theme-component-page-49);
    display: grid;
    grid-template-rows: auto auto 1fr auto; 
    overflow: hidden; 
    animation: modalPop 0.2s ease-out;
    cursor: none;
}

.modal-panel.system-box {
    width: 500px;
    height: auto; 
    border: 2px solid var(--bb-kelly);
    box-shadow: 0 0 50px var(--theme-component-primary-41);
    display: flex; 
    flex-direction: column;
}

.modal-panel.system-box.error-mode {
    border-color: var(--bb-error);
    box-shadow: 0 0 50px var(--theme-component-error-30);
}

@keyframes modalPop {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-header {
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3);
    padding: 12px 20px;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-panel.system-box .modal-header {
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
    letter-spacing: 2px;
}

.modal-panel.system-box.error-mode .modal-header {
    background: var(--theme-component-error-3);
    color: var(--bb-error);
    border-bottom: 1px solid var(--bb-error);
}

.modal-body {
    padding: 30px;
    color: var(--bb-text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    font-size: max(15px, 1rem);
}

.modal-tabs {
    display: flex;
    background: var(--theme-component-page-51);
    border-bottom: 1px solid var(--bb-text-dim);
}
.modal-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-tech);
    text-transform: uppercase;
    color: var(--bb-text-muted);
    transition: 0.2s;
    border-right: 1px solid var(--bb-text-dim);
}
.modal-tab:last-child { border-right: none; }
.modal-tab:hover { background: var(--theme-component-ink-19); color: var(--theme-component-ink-5); }
.modal-tab.active {
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 2px solid var(--bb-kelly);
}

.modal-content-area {
    position: relative;
    background: var(--theme-component-page-63); 
    overflow: hidden;
    height: 100%;
    width: 100%;
}

.tab-view { 
    display: none; 
    height: 100%;
    width: 100%;
    flex-direction: column; 
    overflow: hidden; 
}
.tab-view.active { display: flex; }

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--theme-component-border-15);
    background: var(--theme-component-page-50);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.close-btn {
    background: none; border: none; color: var(--theme-component-on-primary-3); font-weight: bold; font-size: 1.5rem; cursor: pointer;
}
.modal-panel.system-box .close-btn { color: var(--bb-kelly); }
.modal-panel.system-box.error-mode .close-btn { color: var(--bb-error); }

/* --- TERMINAL STYLES (FIXED) --- */
.terminal-container {
    display: flex; 
    flex-direction: column; 
    width: 100%;
    height: 100%; /* Force full height of the modal */
    max-width: 1800px; /* Your requested width */
    margin: 0 auto; /* CRITICAL FIX: Removes vertical margin that pushes input off screen */
    background: var(--theme-component-page-63);
    padding: 20px; 
    font-family: var(--font-code); 
    font-size: 1.1rem;
    position: relative;
    box-sizing: border-box;
    border: 1px solid var(--theme-component-primary-41);
}

.terminal-output {
    flex-grow: 1; /* Takes up all available space, pushing input to bottom */
    overflow-y: auto; /* Enables scrolling for text only */
    min-height: 0; /* Flexbox fix to prevent overflow issues */
    color: var(--theme-component-ink-46); 
    padding-bottom: 20px;
    white-space: pre-wrap; 
    line-height: 1.4;
}

.terminal-input-line {
    display: flex; 
    align-items: center; 
    border-top: 1px solid var(--theme-component-surface-51); 
    padding-top: 15px;
    flex-shrink: 0; /* Ensures this area never shrinks/disappears */
    background: var(--theme-component-page-63);
    min-height: 50px; /* Enforces visibility */
}

.terminal-prompt { color: var(--bb-kelly); margin-right: 10px; white-space: nowrap; }

.terminal-input {
    width: 100%;
    background: transparent; 
    border: none; 
    color: var(--theme-component-ink-5);
    font-family: var(--font-code); 
    font-size: 1.1rem; 
    outline: none;
    cursor: none;
}
.term-success { color: var(--bb-kelly); }
.term-error { color: var(--bb-error); }
.term-info { color: var(--bb-cyan); }
.term-warn { color: var(--bb-honey); }

/* --- FIREWALL LOGS --- */
.log-terminal {
    background: var(--theme-component-page-22);
    color: var(--bb-text-muted);
    font-family: var(--font-code);
    font-size: 14px;
    padding: 20px;
    overflow-y: auto;
    height: 100%; 
    width: 100%;
}

.log-entry { margin-bottom: 5px; border-bottom: 1px solid var(--theme-component-border-14); padding-bottom: 2px; }
.log-entry .timestamp { color: var(--bb-text-dim); margin-right: 10px; }
.log-entry .ip-src { color: var(--bb-cyan); }
.log-entry .ip-dst { color: var(--bb-honey); }
.log-entry .port-bad { color: var(--bb-error); font-weight: bold; }
.log-entry .action-allow { color: var(--bb-kelly); float: right; }
.log-entry .action-deny { color: var(--bb-error); float: right; }

/* --- FIREWALL RULES --- */
.fw-rules-table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--font-code);
    font-size: max(14px, 0.9rem);
}
.fw-rules-table th {
    text-align: left;
    padding: 15px;
    background: var(--theme-component-primary-3);
    color: var(--bb-kelly);
    border-bottom: 1px solid var(--bb-kelly);
}
.fw-rules-table td {
    padding: 15px;
    border-bottom: 1px solid var(--theme-component-border-15);
    color: var(--theme-component-ink-5);
}
.fw-toggle-btn {
    background: var(--theme-component-page-51);
    border: 1px solid var(--bb-text-dim);
    color: var(--bb-text-muted);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    width: 80px;
    text-align: center;
}
.fw-toggle-btn.active {
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3);
    border-color: var(--bb-kelly);
    font-weight: bold;
}

/* --- EMAIL CLIENT --- */
.email-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: 100%;
    width: 100%;
    overflow: hidden;
}
.email-sidebar {
    background: var(--theme-component-page-50);
    border-right: 1px solid var(--theme-component-border-15);
    overflow-y: auto;
}
.email-message-view {
    padding: 30px;
    overflow-y: auto;
    background: var(--theme-component-ink-47);
    position: relative;
}
.email-item {
    padding: 15px;
    border-bottom: 1px solid var(--theme-component-border-14);
    cursor: pointer;
    transition: 0.2s;
}
.email-item:hover { background: var(--theme-component-ink-19); }
.email-item.active { background: var(--theme-component-primary-3); border-left: 3px solid var(--bb-kelly); }

.email-item.unread .email-subject { font-weight: bold; color: var(--theme-component-ink-5); }
.email-item.unread .email-icon { color: var(--bb-kelly); }
.email-item.read .email-subject { color: var(--bb-text-muted); }
.email-item.read .email-icon { color: var(--bb-text-dim); }

.email-sender { font-size: 14px; color: var(--bb-text-muted); display: block; margin-bottom: 2px; }
.email-subject { font-size: max(14px, 0.9rem); display: block; margin-bottom: 2px; }
.email-date { font-size: 14px; color: var(--bb-text-dim); float: right; }

.msg-header { margin-bottom: 20px; border-bottom: 1px solid var(--theme-component-border-15); padding-bottom: 15px; }
.msg-subject { font-size: 1.4rem; color: var(--theme-component-ink-5); font-family: var(--font-tech); margin-bottom: 5px; }
.msg-meta { font-size: max(14px, 0.9rem); color: var(--bb-text-muted); }
.msg-body { font-size: max(15px, 1rem); color: var(--bb-text-main); line-height: 1.6; white-space: pre-wrap; }

.phishing-btn {
    position: absolute; top: 30px; right: 30px;
    background: var(--theme-component-error-3);
    border: 1px solid var(--bb-error);
    color: var(--bb-error);
    padding: 10px 15px;
    font-size: 14px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
}
.phishing-btn:hover { background: var(--bb-error); color: var(--theme-component-on-primary-3); }
.phishing-btn.flagged { background: var(--bb-error); color: var(--theme-component-ink-5); pointer-events: none; }

/* --- CUT SHEET & INTEL --- */
.cut-sheet {
    display: none; margin-top: 60px; border-top: 1px solid var(--bb-kelly);
    padding-top: 40px; animation: slideIn 1s ease-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.intel-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; margin-top: 30px;
}
.intel-card {
    background: var(--theme-component-primary-36); border: 1px solid var(--bb-text-dim);
    padding: 25px; border-radius: 8px; border-left: 3px solid var(--bb-kelly);
}
.intel-card h3 {
    font-family: var(--font-tech); color: var(--bb-kelly); text-transform: uppercase;
    margin-bottom: 15px; font-size: 1.2rem;
}
.intel-card p { color: var(--bb-text-muted); font-size: 15px; line-height: 1.6; }
.intel-card ol { padding-left: 20px; }
.intel-card ol li { margin-bottom: 10px; color: var(--bb-text-muted); font-size: 15px; }
.intel-card strong { color: var(--theme-component-ink-5); }
.code-snippet {
    background: var(--theme-component-page-22); color: var(--bb-error); font-family: var(--font-code);
    padding: 5px 8px; border-radius: 4px; font-size: 14px;
}

.locked-intel {
    margin-top: 60px; padding: 60px;
    background: repeating-linear-gradient(45deg, var(--theme-component-page-51), var(--theme-component-page-51) 10px, var(--theme-component-surface-61) 10px, var(--theme-component-surface-61) 20px);
    border: 1px dashed var(--bb-text-dim); text-align: center; border-radius: 8px;
}

@media (max-width: 900px) {
    .sim-grid { grid-template-columns: 1fr; }
    .quarantine-box { height: 250px; margin-top: 20px; }
}

/* =========================================================
   MODULE 24: CVSS 3.1 METRIC DETECTIVE (RESTORED LAYOUT)
========================================================= */

/* Reticle Fix */
.cursor, .cursor-dot {
    pointer-events: none;
    position: fixed;
    z-index: 2147483647 !important;
    visibility: visible;
}

/* Original 2-Column Grid Layout */
.cvss-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 25px;
    margin-top: 20px;
    align-items: start;
}

/* Metrics Grid (Restored 4-Column Look) */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    min-height: 350px;
}

/* Panels */
.cvss-layout .panel { margin-bottom: 0; }

/* Draggable Cards */
.cvss-card {
    background: var(--theme-component-primary-40);
    border: 1px solid var(--theme-component-primary-41);
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 10px;
    cursor: grab;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    transition: 0.2s all ease;
}

.cvss-card:hover {
    border-color: var(--bb-kelly);
    background: var(--theme-component-primary-81);
    transform: translateX(4px);
}

.cvss-card.dragging {
    opacity: 0.5;
    border-color: var(--bb-kelly);
    box-shadow: 0 0 15px var(--bb-kelly);
}

.cvss-card.correct { border-left: 3px solid var(--bb-kelly); background: var(--theme-component-primary-3); }
.cvss-card.incorrect { border-left: 3px solid var(--bb-error); background: var(--theme-component-error-3); }

/* Drop Zones */
.metric-zone {
    background: var(--theme-component-page-50);
    border: 1px dashed var(--bb-text-dim);
    border-radius: 8px;
    padding: 10px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.metric-zone.highlight {
    border-color: var(--bb-kelly);
    box-shadow: inset 0 0 20px var(--theme-component-primary-3);
}

.metric-zone.incorrect-zone { border-color: var(--bb-error); }

/* UI Helpers */
.vector-box {
    background: var(--theme-component-page-22);
    border: 1px solid var(--bb-kelly);
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.speed-panel { display: none; }
.speed-panel.active { display: block; }

@media (max-width: 1100px) {
    .cvss-layout { grid-template-columns: 1fr; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}
/* =========================================================
   MODULE 25: PHISHING UI ENHANCEMENTS (REALISM + DEFENSE)
========================================================= */
.email-client-realistic {
    background: var(--bb-bg-surface);
    border: 1px solid var(--theme-component-primary-87);
    border-radius: 8px;
    overflow: hidden;
}

.email-header-top {
    background: var(--theme-component-ink-42);
    padding: 20px;
    border-bottom: 1px solid var(--theme-component-border-15);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.email-avatar-circle {
    width: 48px; height: 48px;
    background: var(--bb-kelly);
    color: var(--theme-component-on-primary-3); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-family: var(--font-tech);
    font-size: 1.2rem; flex-shrink: 0;
    box-shadow: 0 0 10px var(--theme-component-primary-87);
}

.email-meta-info { flex-grow: 1; }

.email-header-row { display: flex; font-size: 14px; margin-bottom: 2px; }
.email-header-label { width: 50px; color: var(--bb-text-muted); font-weight: 600; }
.email-header-value { color: var(--bb-cyan); font-family: var(--font-code); }

.email-subject-display { 
    color: var(--theme-component-ink-5); font-weight: 700; font-size: 1.15rem; 
    margin-top: 8px; display: block; font-family: var(--font-body);
}

/* DEFENSIVE ACTION BUTTON */
.btn-flag-delete {
    background: var(--theme-component-error-3);
    border: 1px solid var(--bb-error);
    color: var(--bb-error);
    padding: 8px 12px;
    font-family: var(--font-tech);
    text-transform: uppercase;
    font-size: 14px;
    font-weight: 700;
    cursor: none; /* Keep Cyber Elite cursor */
    transition: 0.2s;
}
.btn-flag-delete:hover { background: var(--bb-error); color: var(--theme-component-ink-5); }
.btn-flag-delete.active { background: var(--bb-error); color: var(--theme-component-ink-5); border-style: dotted; }

.email-body-content {
    padding: 30px;
    font-size: max(15px, 0.95rem);
    line-height: 1.7;
    color: var(--theme-component-ink-15);
    background: linear-gradient(to bottom, var(--theme-component-page-20), var(--theme-component-surface-31));
    min-height: 280px;
}

.email-disclaimer {
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid var(--theme-component-border-14);
    color: var(--bb-text-dim);
    font-size: 14px;
    font-style: italic;
}
/* =========================================================
   MODULE X: SCROLL REVEAL (Index-like entrance)
========================================================= */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms ease;
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible{
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce){
  .reveal-on-scroll{
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* Update the existing .bb-breakdown class */
.bb-breakdown {
  white-space: pre-wrap;       /* Respects \n and multiple spaces */
  font-family: 'JetBrains Mono', 'Courier New', monospace; /* Required for alignment */
  font-size: 14px;
  color: var(--bb-text-muted);
  line-height: 1.5;
  background: var(--theme-component-page-64); /* Optional: slight background for contrast */
  padding: 10px;
  border-radius: 4px;
}
.bb-log-snippet {
    display: block;
    background: var(--theme-component-page-22);
    color: var(--theme-component-primary-100);
    padding: 12px;
    border-left: 3px solid var(--theme-component-primary-100);
    margin: 10px 0;
    font-family: var(--font-code);
}
/* Preserve ASCII charts/log formatting inside the question prompt */
.bb-qtext{
  white-space: pre-wrap;        /* keeps \n and multiple spaces */
  overflow-wrap: anywhere;      /* prevents giant tokens from exploding layout */
}

/* Make log/chart blocks scroll instead of wrapping weirdly */
.bb-qtext pre,
.bb-qtext code,
.bb-log-snippet{
  white-space: pre;             /* strict alignment */
  overflow-x: auto;             /* horizontal scroll for long lines */
  max-width: 100%;
  display: block;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.reveal-on-scroll.is-visible,
.reveal-on-scroll.active {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   Scoped variables: ONLY apply inside enhanced modules
   This avoids changing any other pages/components.
========================================================= */
details.module.bb-enhanced{
  /* Accent colors for card categories */
  --bb-accent-kelly: var(--bb-kelly);
  --bb-accent-cyan:  var(--bb-cyan);
  --bb-accent-gold:  var(--bb-gold);
  --bb-accent-error: var(--bb-error);
  --bb-accent-purple: var(--bb-purple);
  --bb-accent-carrot: var(--bb-carrot);
  --bb-accent-honey:  var(--bb-honey);
  --bb-accent-cherry: var(--bb-cherry);
  --bb-accent-sangria: var(--bb-sangria);
  --bb-accent-basil:  var(--bb-basil);
  --bb-accent-sage:   var(--bb-sage);
  --bb-accent-lav:    var(--bb-lav);
  --bb-accent-brtblu:  var(--bb-brightblue);
  /* Glow tuning (tactical default) */
  --bb-glow-edge-soft: 0 0 18px var(--theme-component-primary-65);
  --bb-glow-edge-strong: 0 0 28px var(--theme-component-primary-114);
}
/* =========================================================
   Opt-in enhanced modules (no changes unless enabled)
   Add class "bb-enhanced" to <details class="module">
========================================================= */

details.module.bb-enhanced .intel-card{
  position: relative;
  border-left-width: 4px !important;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

details.module.bb-enhanced .intel-card:hover{
  transform: translateY(-3px);
}

/* Edge glow layer */
details.module.bb-enhanced .intel-card::before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: inherit;
  opacity: .9;
  transition: opacity 220ms ease, box-shadow 220ms ease;
}

/* Accent variants (apply per card) */
details.module.bb-enhanced .intel-card.accent-kelly{
  border-left-color: var(--bb-accent-kelly) !important;
}
details.module.bb-enhanced .intel-card.accent-kelly::before{
  box-shadow: 0 0 18px var(--theme-component-primary-55), 0 0 2px var(--theme-component-primary-115);
}

details.module.bb-enhanced .intel-card.accent-cyan{
  border-left-color: var(--bb-accent-cyan) !important;
}
details.module.bb-enhanced .intel-card.accent-cyan::before{
  box-shadow: 0 0 18px var(--theme-component-info-23), 0 0 2px var(--theme-component-info-24);
}

details.module.bb-enhanced .intel-card.accent-gold{
  border-left-color: var(--bb-accent-gold) !important;
}
details.module.bb-enhanced .intel-card.accent-gold::before{
  box-shadow: 0 0 18px var(--theme-component-ink-48), 0 0 2px var(--theme-component-ink-49);
}

details.module.bb-enhanced .intel-card.accent-error{
  border-left-color: var(--bb-accent-error) !important;
}
details.module.bb-enhanced .intel-card.accent-error::before{
  box-shadow: 0 0 18px var(--theme-component-error-31), 0 0 2px var(--theme-component-error-32);
}

details.module.bb-enhanced .intel-card.accent-purple{
  border-left-color: var(--bb-accent-purple) !important;
}
details.module.bb-enhanced .intel-card.accent-purple::before{
  box-shadow: 0 0 18px var(--theme-component-info-25), 0 0 2px var(--theme-component-info-26);
}

/* =========================================================
   BB Enhanced: CATEGORY ACCENTS (CSS-only, no JS)
   - Assign one category class per card (card-definition, etc.)
   - Includes bottom-edge glow
   - Scoped to <details class="module bb-enhanced">
========================================================= */

/* 1) Ensure bottom glow isn't clipped */
details.module.bb-enhanced .intel-card{
  position: relative;
  overflow: visible !important; /* prevents ::after glow clipping */
  border-left: 4px solid var(--bb-kelly); /* fallback */
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
details.module.bb-enhanced .intel-card:hover{
  transform: translateY(-3px);
}

/* 2) Generic edge glow layer (uses per-card RGB variable) */
details.module.bb-enhanced .intel-card::before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: inherit;
  opacity: .9;
  box-shadow:
    0 0 18px rgba(var(--bb-accent-rgb, 0,200,83), .18),
    0 0 2px  rgba(var(--bb-accent-rgb, 0,200,83), .35);
  transition: opacity 220ms ease, box-shadow 220ms ease;
}

/* 3) Bottom-edge glow strip (also uses per-card RGB variable) */
details.module.bb-enhanced .intel-card::after{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: -2px;
  height: 10px;
  pointer-events:none;
  border-radius: 999px;
  background: rgba(var(--bb-accent-rgb, 0,200,83), .35);
  filter: blur(10px);
  opacity: .70;
  transition: opacity 220ms ease, filter 220ms ease;
}
details.module.bb-enhanced .intel-card:hover::after{
  opacity: .95;
  filter: blur(12px);
}

/* =========================================================
   CATEGORY   COLOR MAP (NO REPEATS)
   Apply ONE of these classes to each intel-card:
   - card-definition, card-recognize, card-parts, card-core,
     card-troubleshoot, card-related, card-distractors,
     card-realworld, card-deepdive
========================================================= */

/* Definition   KELLY (0,200,83) */
details.module.bb-enhanced .intel-card.card-definition{
  border-left-color: var(--bb-kelly) !important;
  --bb-accent-rgb: 0,200,83;
}
/* Core Facts   PURPLE (163,44,196) */
details.module.bb-enhanced .intel-card.card-core{
  border-left-color: var(--bb-purple) !important;
  --bb-accent-rgb: 163,44,196;
}
/* Related Topics   --bb-cherry (227,36,43) */
details.module.bb-enhanced .intel-card.card-related{
  border-left-color: var(--bb-cherry) !important;
  --bb-accent-rgb: 227,36,43;
}

/* Recognize/Clues   CYAN (0,176,255) */
details.module.bb-enhanced .intel-card.card-recognize{
  border-left-color: var(--bb-cyan) !important;
  --bb-accent-rgb: 0,176,255;
}

/* Replaceable Parts   CARROT (237,113,23) */
details.module.bb-enhanced .intel-card.card-parts{
  border-left-color: var(--bb-carrot) !important;
  --bb-accent-rgb: 237,113,23;
}


/* Troubleshooting   ERROR RED (255,82,82) */
details.module.bb-enhanced .intel-card.card-troubleshoot{
  border-left-color: var(--bb-error) !important;
  --bb-accent-rgb: 255,82,82;
}


/* Distractors/Traps   HONEY (236,151,6)  (unique vs Exam Intel) */
details.module.bb-enhanced .intel-card.card-distractors{
  border-left-color: var(--bb-honey) !important;
  --bb-accent-rgb: 236,151,6;
}

/* Real-world   --bb-brightblue (0,127,255) */
details.module.bb-enhanced .intel-card.card-realworld{
  border-left-color: var(--bb-brightblue) !important;
  --bb-accent-rgb: 0,127,255;
}

/* Deep Dive Links   LAV (227,159,246) */
details.module.bb-enhanced .intel-card.card-deepdive{
  border-left-color: var(--bb-lav) !important;
  --bb-accent-rgb: 227,159,246;
}

/* =========================================================
   EXAM INTEL (special block): GOLD (255,214,0)
========================================================= */
details.module.bb-enhanced .exam-intel{
  position: relative;
  overflow: visible !important;
  border-left: 4px solid var(--bb-gold) !important;
  --bb-accent-rgb: 255,214,0;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
details.module.bb-enhanced .exam-intel:hover{
  transform: translateY(-3px);
}
details.module.bb-enhanced .exam-intel::before{
  content:"";
  position:absolute;
  inset: 0;
  pointer-events:none;
  border-radius: inherit;
  opacity: .9;
  box-shadow:
    0 0 18px var(--theme-component-ink-48),
    0 0 2px  var(--theme-component-ink-49);
  transition: opacity 220ms ease, box-shadow 220ms ease;
}
details.module.bb-enhanced .exam-intel::after{
  content:"";
  position:absolute;
  left: 10px;
  right: 10px;
  bottom: -2px;
  height: 10px;
  pointer-events:none;
  border-radius: 999px;
  background: var(--theme-component-ink-49);
  filter: blur(10px);
  opacity: .70;
  transition: opacity 220ms ease, filter 220ms ease;
}
details.module.bb-enhanced .exam-intel:hover::after{
  opacity: .95;
  filter: blur(12px);
}
/* BB Enhanced: Larger (but not huge) topic tags */
details.module.bb-enhanced .intel-card h3 .tag{
  font-size: 1.2em;
  padding: 0.30em 0.65em;
  letter-spacing: 0.07em;
}

details.module.bb-enhanced .intel-card h3{
  margin-bottom: 0.65rem;
}

/* =========================================================
   BB Enhanced: Bold text inherits card accent color
   Scope: ONLY <details class="module bb-enhanced">
========================================================= */
details.module.bb-enhanced .intel-card strong{
  color: rgba(var(--bb-accent-rgb, 0,200,83), 1);
}

/* Optional: make bold pop a bit more (still tactical) */
details.module.bb-enhanced .intel-card strong{
  text-shadow: 0 0 8px rgba(var(--bb-accent-rgb, 0,200,83), .22);
}

/* Exam Intel uses gold accent */
details.module.bb-enhanced .exam-intel strong{
  color: rgba(var(--bb-accent-rgb, 255,214,0), 1);
  text-shadow: 0 0 8px rgba(var(--bb-accent-rgb, 255,214,0), .22);
}

/* =========================================================
   BB Enhanced: Tag pill matches card accent (text + outline)
   Scope: ONLY <details class="module bb-enhanced">
========================================================= */
details.module.bb-enhanced .intel-card h3 .tag{
  color: rgba(var(--bb-accent-rgb, 0,200,83), 1);
  border: 1px solid rgba(var(--bb-accent-rgb, 0,200,83), .85);
  box-shadow:
    0 0 10px rgba(var(--bb-accent-rgb, 0,200,83), .18);
}

/* Keep the pill "tactical dark fill, readable text */
details.module.bb-enhanced .intel-card h3 .tag{
  background: var(--theme-component-page-41); /* tweak if you already set a background */
}

/* Exam Intel label uses gold */
details.module.bb-enhanced .exam-intel .label{
  color: var(--theme-component-ink-50);
  border: 1px solid var(--theme-component-border-17);
  background: var(--theme-component-page-41);
  box-shadow: 0 0 10px var(--theme-component-ink-48);
  display: inline-block; /* ensures border wraps label nicely */
  padding: 0.25em 0.6em;  /* optional: consistent pill feel */
  border-radius: 999px;  /* optional: pill */
}

/* =========================================================
   OVERRIDES: Objective Row Meta Truncation
========================================================= */
.module-meta{
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  min-width: 0;
}

.module-meta{ min-width: 0; }

/* =========================================================
/* --- TACTICAL OBJECTIVE DIVIDER --- */
========================================================= */
.objective-divider {
    display: flex;
    align-items: center;
    margin: 80px 0 60px; /* Big spacing to force a visual reset */
    text-align: center;
}
.objective-divider::before, .objective-divider::after {
    content: '';
    flex: 1;
    border-bottom: 2px dashed var(--bb-kelly-dim);
    box-shadow: 0 0 10px var(--theme-component-primary-3);
}
.objective-divider .divider-badge {
    padding: 10px 30px;
    background: var(--theme-component-primary-81);
    border: 1px solid var(--bb-kelly);
    color: var(--bb-kelly);
    font-family: var(--font-code);
    font-weight: 800;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0 20px;
    box-shadow: 0 0 20px var(--theme-component-primary-41);
    clip-path: polygon(15px 0, 100% 0, 100% calc(100% - 15px), calc(100% - 15px) 100%, 0 100%, 0 15px);
}



/* =========================================================
   SHARED RESPONSIVE TUNE-UP
   Canonical shared layout/mobile fixes for site + labs
========================================================= */
:root {
  --bb-desktop-scale: 0.88;
}

@media (min-width: 1200px) {
  html {
    font-size: calc(16px * var(--bb-desktop-scale));
  }

  .bb-container,
  .content-wrapper,
  .bb-lab {
    max-width: min(1520px, 95vw) !important;
  }

  .hero,
  .hero-section,
  .bb-hero {
    padding-top: clamp(120px, 10vw, 160px) !important;
    padding-bottom: clamp(80px, 8vw, 110px) !important;
  }

  .hero-text,
  .panel,
  .terminal-body,
  .redacted-file,
  .dossier-card {
    padding: clamp(28px, 2.2vw, 42px) !important;
  }
}

/* Operator Rail (fixed floating quick-nav sidebar used on several Core Learning
   pages) is positioned right:18px with widths up to 258px. At the widened
   .bb-container above (min(1520px, 95vw)), there is no longer enough margin
   for it to sit beside the content without overlapping at typical desktop
   widths (1920px and below always overlap; only very wide monitors have room).
   Keep it hidden until the viewport is wide enough for both to coexist. */
@media (max-width: 2119px) {
  .operator-rail {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html {
    font-size: 100%;
  }

  .bb-container,
  .content-wrapper,
  .bb-lab {
    width: 94% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  nav .bb-container {
    flex-direction: column !important;
    gap: 12px;
  }

  nav ul {
    gap: 12px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding-left: 0;
  }

  .hero,
  .hero-section,
  .bb-hero {
    min-height: auto !important;
    padding: 110px 0 70px !important;
  }

  .hero-text {
    padding: 20px !important;
    max-width: 100% !important;
  }

  .panel,
  .terminal-body,
  .redacted-file,
  .dossier-card {
    padding: 22px !important;
  }

  .hero-text h1,
  .section-title,
  .mission-title {
    letter-spacing: normal !important;
  }

  .hero-text h1 {
    font-size: clamp(2rem, 8vw, 3rem) !important;
    line-height: 1.05 !important;
  }

  .section-title {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
  }

  .card-grid,
  .elite-grid,
  .hero-grid,
  .lab-grid,
  .drill-grid {
    grid-template-columns: 1fr !important;
  }

  .cta-buttons {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .cta-buttons a,
  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }
}

@media (hover: none) and (pointer: coarse) {
  body {
    cursor: auto !important;
  }

  .cursor,
  .cursor-dot {
    display: none !important;
  }

  button,
  a,
  [draggable="true"] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  [draggable="true"] {
    touch-action: none;
  }
}
