:root {
  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --bg-dark: hsl(222, 47%, 4%);
  --bg-card: hsl(217, 33%, 8%);
  --bg-hover: hsl(217, 30%, 14%);
  --bg-active: hsl(220, 25%, 18%);
  --text-light: hsl(210, 40%, 98%);
  --text-muted: hsl(215, 20%, 65%);
  --text-dim: hsl(215, 12%, 45%);
  --border-color: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(99, 102, 241, 0.12);
  
  /* Accent colors */
  --primary: hsl(224, 89%, 60%);
  --primary-glow: rgba(99, 102, 241, 0.3);
  --cyan: hsl(187, 85%, 45%);
  --cyan-glow: rgba(6, 182, 212, 0.3);
  --purple: hsl(271, 91%, 65%);
  --purple-glow: rgba(139, 92, 246, 0.3);
  --amber: hsl(38, 92%, 50%);
  --amber-glow: rgba(245, 158, 11, 0.3);
  --emerald: hsl(142, 70%, 45%);
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --rose: hsl(350, 89%, 60%);
  --rose-glow: rgba(244, 63, 94, 0.3);
  
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-light);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(99, 102, 241, 0.1) 0%, transparent 80%),
    radial-gradient(ellipse 40% 30% at 100% 60%, rgba(6, 182, 212, 0.05) 0%, transparent 80%);
  background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Header & Layout */
header {
  border-bottom: 1px solid var(--border-color);
  background: rgba(2, 6, 23, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text-light);
  background: linear-gradient(90deg, #fff, var(--text-muted));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tab-nav {
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-sm);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--text-light);
  background: var(--bg-hover);
  border-color: var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.02);
}

/* App Main Container */
main.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2.5rem 2rem 5rem;
}

/* Tab Panel visibility */
.tab-panel {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

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

.tab-panel[hidden],
.sandbox-panel[hidden] {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* Cards & Glassmorphism */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  transition: var(--transition);
}

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

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
}

/* Main Dashboard Elements */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.hero-card {
  background: linear-gradient(135deg, hsl(222, 47%, 6%) 0%, hsl(217, 33%, 10%) 100%);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.05);
}

.exam-version-note {
  padding: 0.9rem 1rem;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.05);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.exam-version-note strong {
  color: var(--amber);
}

.hero-card h1 {
  font-size: 2.75rem;
  line-height: 1.15;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(90deg, var(--cyan) 0%, var(--primary) 50%, var(--purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Stats Block */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1.5rem;
  margin: 2.5rem 0;
}

.stat-item {
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  padding: 1.25rem;
}

.stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-light);
}

.stat-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Domain list on dashboard */
.domain-card-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.domain-row-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

.domain-row-item:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.domain-bullet {
  width: 10px; height: 10px;
  border-radius: 50%;
  margin-right: 1rem;
  flex-shrink: 0;
}

.domain-title-text {
  flex-grow: 1;
  font-weight: 600;
  font-size: 0.95rem;
}

.domain-weight-badge {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding-left: 1rem;
}

/* Accordion Lessons */
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.lesson-accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: var(--transition);
}

.lesson-header {
  width: 100%;
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: var(--transition);
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

.lesson-header:hover {
  background: var(--bg-hover);
}

.lesson-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.day-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.lesson-title {
  font-size: 1.25rem;
  color: var(--text-light);
}

.accordion-arrow {
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.lesson-accordion.open .accordion-arrow {
  transform: rotate(180deg);
  color: var(--text-light);
}

.lesson-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-top: 0 solid var(--border-color);
}

.lesson-accordion.open .lesson-content {
  max-height: 2000px; /* Large enough to display */
  border-top-width: 1px;
}

.lesson-body {
  padding: 2.5rem;
}

/* Day lesson content styling */
.lesson-intro-box {
  background: rgba(255, 255, 255, 0.02);
  border-left: 4px solid var(--primary);
  padding: 1.25rem 1.5rem;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: 2rem;
  font-style: italic;
  color: var(--text-muted);
}

.hour-section {
  margin-bottom: 2.5rem;
}

.hour-section:last-child {
  margin-bottom: 0;
}

.hour-title-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(6, 182, 212, 0.08);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.hour-section h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.hour-section p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.hour-section ul {
  list-style: none;
  margin-bottom: 1.5rem;
}

.hour-section ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.hour-section ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--cyan);
  font-weight: bold;
}

.tip-box {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 1.25rem;
  border-radius: var(--r-md);
  margin: 1.5rem 0;
}

.tip-box strong {
  color: var(--amber);
}

.analogy-box {
  background: rgba(139, 92, 246, 0.04);
  border: 1px dashed rgba(139, 92, 246, 0.25);
  padding: 1.25rem;
  border-radius: var(--r-md);
  margin: 1.5rem 0;
  color: var(--text-muted);
}

.analogy-box strong {
  color: var(--purple);
}

/* Reference table in lessons */
.lesson-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.lesson-table th, .lesson-table td {
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.9rem;
}

.lesson-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-light);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.lesson-table td {
  color: var(--text-muted);
}

/* Complete Checklist */
.complete-btn-container {
  margin-top: 2rem;
  display: flex;
  justify-content: flex-end;
}

.complete-checkbox-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.complete-checkbox-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

.lesson-accordion.completed .complete-checkbox-btn {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--emerald);
}

.lesson-accordion.completed {
  border-color: rgba(16, 185, 129, 0.25);
  box-shadow: 0 10px 30px -10px rgba(16, 185, 129, 0.05);
}

/* Slide Viewer */
.slide-viewer-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
}

.slide-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  max-height: 700px;
  overflow-y: auto;
}

.slide-list-menu {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.slide-menu-item {
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  text-align: left;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.slide-menu-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-light);
}

.slide-menu-item.active {
  background: var(--bg-hover);
  border-color: var(--border-color);
  color: var(--text-light);
  box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.01);
}

.slide-player-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.slide-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background: #020617;
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.slide-iframe-wrapper iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

.slide-player-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.slide-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 0.6rem 1.2rem;
  border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.slide-action-btn:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Fullscreen Slide mode */
.slide-iframe-wrapper.fullscreen {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  padding-top: 0;
  z-index: 9999;
  border-radius: 0;
}

/* Searchable Cheatsheet */
.cheatsheet-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  max-width: 400px;
  min-width: 250px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 0.75rem 1rem 0.75rem 2.75rem;
  border-radius: var(--r-md);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
}

.search-highlight {
  background: rgba(6, 182, 212, 0.4);
  color: var(--text-light);
  border-radius: 2px;
  padding: 0 0.08em;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
}

.cheatsheet-table-container {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.cheatsheet-section {
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  padding: 2rem;
}

.cheatsheet-section h3 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  color: var(--text-light);
}

/* Practice Exam Center */
.quiz-welcome-panel {
  text-align: center;
  max-width: 600px;
  margin: 4rem auto;
}

.quiz-welcome-panel h2 {
  font-size: 2.25rem;
  margin-bottom: 1rem;
}

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 2rem;
  text-align: left;
  transition: var(--transition);
}

.quiz-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.quiz-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: hsl(224, 89%, 65%);
  box-shadow: 0 0 20px var(--primary-glow);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-color);
  color: var(--text-light);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.quiz-player-card {
  max-width: 800px;
  margin: 2rem auto;
}

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 3px;
  margin: 0 1.5rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-timer {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quiz-question-text {
  font-size: 1.35rem;
  line-height: 1.4;
  margin-bottom: 2rem;
}

.quiz-choices {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.choice-option {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
  font-family: inherit;
  text-align: left;
  color: var(--text-muted);
}

.choice-option:hover {
  background: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--text-light);
}

.choice-option:disabled {
  cursor: default;
  opacity: 1;
}

.choice-option:disabled:hover {
  transform: none;
}

.choice-option.selected {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.05);
  color: var(--text-light);
}

.choice-option.correct {
  border-color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text-light);
}

.choice-option.incorrect {
  border-color: var(--rose);
  background: rgba(244, 63, 94, 0.08);
  color: var(--text-light);
}

.choice-letter {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 1.25rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.choice-option.selected .choice-letter {
  background: var(--primary);
  color: white;
}

.choice-option.correct .choice-letter {
  background: var(--emerald);
  color: white;
}

.choice-option.incorrect .choice-letter {
  background: var(--rose);
  color: white;
}

.choice-text {
  flex-grow: 1;
}

.quiz-explanation {
  background: rgba(6, 182, 212, 0.03);
  border: 1px solid rgba(6, 182, 212, 0.15);
  padding: 1.5rem;
  border-radius: var(--r-md);
  margin-bottom: 2rem;
  animation: slideDown 0.3s ease-out;
}

.quiz-explanation h4 {
  color: var(--cyan);
  margin-bottom: 0.5rem;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); max-height: 0; overflow: hidden; }
  to { opacity: 1; transform: translateY(0); max-height: 200px; }
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
}

.quiz-results-panel {
  text-align: center;
  max-width: 500px;
  margin: 3rem auto;
}

.result-score-circle {
  width: 160px; height: 160px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-card) 100%);
  border: 6px solid var(--border-color);
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.result-score-circle.pass {
  border-color: var(--emerald);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.15);
}

.result-score-circle.fail {
  border-color: var(--rose);
  box-shadow: 0 0 30px rgba(244, 63, 94, 0.15);
}

.result-score-val {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
}

.result-score-lbl {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Interactive Cyber Sandbox */
.sandbox-tabs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.sandbox-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.sandbox-tab-btn.active {
  color: var(--text-light);
}

.sandbox-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1rem; left: 0; right: 0; height: 2px;
  background: var(--primary);
}

.sandbox-panel {
  display: none;
}

.sandbox-panel.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

/* OSI Visualizer Stack */
.osi-playground {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: flex-start;
}

.osi-stack {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.osi-layer-block {
  width: 100%;
  padding: 1.25rem 1.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: inherit;
  font: inherit;
  text-align: left;
}

.osi-layer-block:hover {
  transform: scale(1.01) translateY(-1px);
}

.osi-layer-block.active {
  border-color: var(--layer-color);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 0 20px var(--layer-glow);
}

.osi-layer-num {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  opacity: 0.25;
  transition: var(--transition);
}

.osi-layer-block.active .osi-layer-num {
  opacity: 1;
  color: var(--layer-color);
}

.osi-layer-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.osi-layer-block.active .osi-layer-name {
  color: var(--text-light);
}

.osi-layer-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 2rem;
  min-height: 400px;
}

.osi-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.osi-info-title {
  font-size: 1.5rem;
}

.osi-info-badge {
  padding: 0.35rem 0.75rem;
  border-radius: var(--r-sm);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* ALE Calculator */
.calc-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.calc-inputs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-light);
}

.input-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.calc-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.calc-prefix {
  position: absolute;
  left: 1rem;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.95rem;
}

.calc-input-box {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-light);
  padding: 0.75rem 1rem 0.75rem 2.2rem;
  border-radius: var(--r-md);
  font-size: 1rem;
  outline: none;
  transition: var(--transition);
}

.calc-input-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}

.calc-results {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.calc-res-item {
  text-align: center;
}

.calc-res-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calc-res-val {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: var(--cyan);
  text-shadow: 0 0 20px var(--cyan-glow);
}

/* Resources Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.resource-card {
  padding: 2rem;
}

.resource-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resource-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.resource-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.res-link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.res-link-item:hover {
  color: hsl(187, 85%, 55%);
  text-shadow: 0 0 10px var(--cyan-glow);
  transform: translateX(2px);
}

/* Applied study guides and code-native infographics */
.study-aid {
  display: grid;
  gap: 1.5rem;
  margin: 3rem 0 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

.study-aid-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.study-aid-kicker,
.worked-example-label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--cyan);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.study-aid-heading h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.study-aid-day {
  flex: 0 0 auto;
  padding: 0.4rem 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
}

.study-objectives {
  padding: 1.5rem;
  border: 1px solid rgba(6, 182, 212, 0.16);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(99, 102, 241, 0.025));
}

.study-objectives h3 {
  margin-bottom: 0.85rem;
  font-size: 1rem;
  color: var(--text-light);
}

.study-objectives ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  list-style: none;
}

.study-objectives li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.study-objectives li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--emerald);
  font-weight: 800;
}

.study-visual {
  margin: 0;
  padding: 1.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 15% 0%, rgba(99, 102, 241, 0.08), transparent 35%),
    rgba(255, 255, 255, 0.012);
}

.study-visual figcaption {
  margin-bottom: 1.25rem;
  color: var(--text-light);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.study-visual-canvas {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.study-visual-node {
  --study-tone: var(--primary);
  --study-glow: rgba(99, 102, 241, 0.09);
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  padding: 1.15rem;
  overflow: hidden;
  border: 1px solid var(--study-tone);
  border-radius: var(--r-md);
  background: linear-gradient(145deg, var(--study-glow), rgba(255, 255, 255, 0.01) 70%);
}

.study-visual-node::after {
  content: '';
  position: absolute;
  inset: auto -25% -55% 35%;
  height: 100px;
  border-radius: 50%;
  background: var(--study-glow);
  filter: blur(18px);
  pointer-events: none;
}

.study-visual-node h4 {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0 0.45rem;
  color: var(--study-tone);
  font-size: 0.95rem;
}

.study-visual-node p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.5;
}

.study-visual-index {
  position: relative;
  z-index: 1;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.study-visual-connector {
  align-self: center;
  flex: 0 0 auto;
  color: var(--text-dim);
  font-size: 1.2rem;
}

.tone-primary { --study-tone: var(--primary); --study-glow: rgba(99, 102, 241, 0.09); }
.tone-cyan { --study-tone: var(--cyan); --study-glow: rgba(6, 182, 212, 0.09); }
.tone-purple { --study-tone: var(--purple); --study-glow: rgba(139, 92, 246, 0.09); }
.tone-amber { --study-tone: var(--amber); --study-glow: rgba(245, 158, 11, 0.09); }
.tone-emerald { --study-tone: var(--emerald); --study-glow: rgba(16, 185, 129, 0.09); }
.tone-rose { --study-tone: var(--rose); --study-glow: rgba(244, 63, 94, 0.09); }

.study-visual-compare .study-visual-canvas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.study-visual-layers .study-visual-canvas {
  flex-direction: column;
}

.study-visual-layers .study-visual-node {
  width: 100%;
  min-height: 0;
}

.study-cycle-return {
  width: fit-content;
  margin: 0.9rem auto 0;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.06);
  color: var(--emerald);
  font-size: 0.75rem;
  font-weight: 700;
}

.worked-example {
  padding: 1.75rem;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: var(--r-lg);
  background: rgba(16, 185, 129, 0.025);
}

.worked-example h3 {
  margin-bottom: 0.65rem;
  font-size: 1.25rem;
}

.worked-example-scenario {
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.worked-example ol {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.worked-example li {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.worked-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.7rem;
  width: 1.7rem;
  height: 1.7rem;
  margin-top: 0.05rem;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.08);
  color: var(--emerald);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
}

.worked-example-takeaway {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid var(--emerald);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  background: rgba(16, 185, 129, 0.05);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.worked-example-takeaway strong {
  color: var(--emerald);
}

.exam-trap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.04);
}

.exam-trap > span {
  font-size: 1.25rem;
}

.exam-trap strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--amber);
  font-family: var(--font-display);
}

.exam-trap p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.knowledge-check {
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--r-md);
  background: rgba(139, 92, 246, 0.03);
}

.knowledge-check summary {
  padding: 1rem 1.25rem;
  color: var(--purple);
  font-family: var(--font-display);
  font-weight: 800;
  cursor: pointer;
}

.knowledge-check summary::marker {
  color: var(--purple);
}

.knowledge-question,
.knowledge-answer {
  margin: 0 1.25rem 1rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.knowledge-answer {
  padding: 0.85rem 1rem;
  border-radius: var(--r-sm);
  background: rgba(139, 92, 246, 0.07);
}

.knowledge-answer strong {
  color: var(--purple);
}

@media(max-width: 900px) {
  .study-objectives ul {
    grid-template-columns: 1fr;
  }

  .study-visual-flow .study-visual-canvas,
  .study-visual-cycle .study-visual-canvas {
    display: grid;
    grid-template-columns: 1fr;
  }

  .study-visual-connector {
    justify-self: center;
    transform: rotate(90deg);
  }
}

@media(max-width: 600px) {
  #notes-reader-card {
    padding: 1.25rem !important;
  }

  .study-aid-heading {
    align-items: flex-start;
  }

  .study-aid-day {
    display: none;
  }

  .study-visual,
  .worked-example,
  .study-objectives {
    padding: 1.15rem;
  }
}

/* Custom Interactive Diagrams */
.diagram-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2.5rem 0;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--r-lg);
}

/* CIA Triad */
.cia-triad-diagram {
  position: relative;
  width: 320px;
  height: 320px;
}
.cia-circle {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1rem;
  transition: var(--transition);
  cursor: help;
}
.cia-circle h5 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.cia-circle p {
  font-size: 0.65rem;
  line-height: 1.2;
  margin: 0;
}
.cia-c {
  top: 10px;
  left: 85px;
  background: rgba(244, 63, 94, 0.08);
  border: 2px solid var(--rose);
  color: var(--rose);
  box-shadow: 0 0 20px var(--rose-glow);
}
.cia-i {
  top: 150px;
  left: 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 2px solid var(--emerald);
  color: var(--emerald);
  box-shadow: 0 0 20px var(--emerald-glow);
}
.cia-a {
  top: 150px;
  left: 160px;
  background: rgba(6, 182, 212, 0.08);
  border: 2px solid var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 20px var(--cyan-glow);
}
.cia-c:hover, .cia-i:hover, .cia-a:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.05);
  z-index: 10;
}
.cia-center {
  position: absolute;
  top: 115px;
  left: 115px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  color: var(--text-light);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Defense in Depth nested stack */
.did-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 460px;
}
.did-layer {
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  border: 1px solid;
  transition: var(--transition);
  cursor: help;
}
.did-layer:hover {
  transform: scale(1.01);
  filter: brightness(1.15);
}

/* Incident Response Timeline */
.ir-timeline {
  display: flex;
  gap: 12px;
  width: 100%;
  overflow-x: auto;
  padding: 10px 0;
}
.ir-step {
  flex: 1;
  min-width: 130px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: var(--transition);
}
.ir-step:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 15px var(--cyan-glow);
}
.ir-step-num {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--cyan);
  margin-bottom: 4px;
}
.ir-step-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-light);
  margin-bottom: 6px;
}
.ir-step-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* Risk Assessment Workflow */
.risk-flow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 600px;
  flex-wrap: wrap;
  gap: 12px;
}
.flow-node {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--r-md);
  padding: 12px 18px;
  text-align: center;
  min-width: 100px;
  transition: var(--transition);
}
.flow-node:hover {
  border-color: var(--primary);
  box-shadow: 0 0 15px var(--primary-glow);
}
.flow-node-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 2px;
}
.flow-node-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}
.flow-arrow {
  font-size: 1.5rem;
  color: var(--text-dim);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Footer styling */
footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: rgba(2, 6, 23, 0.4);
}

/* Responsive adjust */
@media(max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .slide-viewer-container {
    grid-template-columns: 1fr;
  }
  .osi-playground {
    grid-template-columns: 1fr;
  }
  .calc-container {
    grid-template-columns: 1fr;
  }
}

@media(max-width: 768px) {
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  .tab-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
  }
  .tab-btn {
    flex: 0 0 auto;
  }
  main.container {
    padding: 1.5rem 1rem;
  }
}

:where(a, button, input):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
