/* ==========================================================================
   AGF ACADEMY — EXECUTIVE CORPORATE DESIGN SYSTEM
   Brand Colors: Deep Executive Navy #12345A · Corporate Blue #2563EB · Accent Red #E53935
   Background: Soft Mist #F4F6FA · Cards: Pure Crisp White #FFFFFF
   Typography: Inter (Body) + Plus Jakarta Sans (Headings & Display)
   Architecture: Preserves 100% of the Original Layout & Shapes ("Old Way")
   ========================================================================== */

:root {
  /* Official Corporate Brand Palette */
  --navy: #12345A;
  --navy-50: #EEF3F9;
  --navy-100: #D9E4F1;
  --navy-200: #B3C8E0;
  --navy-700: #0F2B4C;
  --navy-800: #0B2240;
  --navy-900: #08182C;

  --brand: #2563EB;
  --brand-50: #EFF4FF;
  --brand-100: #DCE7FE;
  --brand-600: #1D4FD8;
  --brand-700: #1E40AF;

  --accent: #E53935;
  --accent-50: #FDEDED;
  --accent-600: #C62828;

  --mist: #F4F6FA;
  --card: #ffffff;
  --card-alt: #f8fafc;
  --ink: #0f172a;
  --ink-secondary: #334155;
  --mut: #64748b;
  --line: #e2e8f0;
  --line-light: #f1f5f9;

  /* App Variable Aliases */
  --blue: var(--brand);
  --blue-hover: var(--brand-600);
  --red: var(--accent);
  --red-hover: var(--accent-600);
  --bg: var(--mist);
  --ok: #059669;
  --bad: #E53935;
  --gold: #D97706;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-md: 0 8px 20px -3px rgba(18, 52, 90, 0.08), 0 3px 8px -2px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 16px 32px -4px rgba(18, 52, 90, 0.12), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 14px 28px -4px rgba(18, 52, 90, 0.14), 0 0 0 1px rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] {
  --bg: #08182C;
  --mist: #08182C;
  --card: #0B2240;
  --card-alt: #0F2B4C;
  --ink: #f8fafc;
  --ink-secondary: #e2e8f0;
  --mut: #94a3b8;
  --line: #1c2b4d;
  --line-light: #15223e;
  --navy: #0B2240;

  --navy-50: rgba(37, 99, 235, 0.14);
  --brand-50: rgba(37, 99, 235, 0.16);
  --accent-50: rgba(229, 57, 53, 0.16);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 24px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 14px 30px -4px rgba(37, 99, 235, 0.25), 0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  color: var(--ink);
  font-weight: 750;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.025em; }
h2 { font-size: 1.55rem; font-weight: 750; }
h3 { font-size: 1.2rem; font-weight: 700; }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.2s;
}

/* ==========================================================================
   HEADER (Exact Executive Navy Navigation Bar)
   ========================================================================== */
header {
  height: 64px;
  background: var(--navy);
  color: #ffffff;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(8, 24, 44, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

#burger {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.25), 0 2px 6px rgba(0,0,0,0.25);
}

.brand-icon::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3.5px;
  background: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text b {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
}

.brand-red {
  color: var(--accent) !important;
  font-weight: 800;
}

.brand-text small {
  font-size: 11px;
  color: var(--navy-200);
  font-weight: 500;
  margin-top: 2px;
}

.brand-text small b {
  color: #ffffff;
  font-size: 11px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-select {
  background: var(--navy-800);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
}

.lang-select:focus, .lang-select:hover {
  border-color: rgba(255, 255, 255, 0.35);
  background: var(--navy-700);
}

.lang-select option {
  background: var(--navy-900);
  color: #ffffff;
}

.theme-toggle {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #ffffff;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   LAYOUT STRUCTURE (The Exact "Old Way": Left Sidebar + Main Stage)
   ========================================================================== */
.layout-wrap {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 64px);
}

#nav {
  width: 250px;
  background: var(--card);
  border-right: 1px solid var(--line);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

#nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  border-radius: 12px;
  color: var(--mut);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}

#nav a span:first-child {
  font-size: 17px;
  line-height: 1;
}

#nav a:hover {
  background: var(--navy-50);
  color: var(--navy);
}

#nav a.active {
  background: var(--brand);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}

[data-theme="dark"] #nav a.active {
  background: var(--brand);
  color: #ffffff;
}

#app {
  flex: 1;
  padding: 36px 40px;
  background: var(--bg);
  min-width: 0;
  max-width: 1320px;
}

/* ==========================================================================
   HERO BANNER
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, #12345A 0%, #0F2B4C 55%, #0B2240 100%);
  border-bottom: 4px solid var(--accent);
  border-radius: 20px;
  padding: 42px 38px;
  color: #ffffff;
  box-shadow: 0 12px 32px -4px rgba(18, 52, 90, 0.25);
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.hero-banner::after {
  content: '';
  position: absolute;
  right: -50px;
  top: -50px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 5px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-100);
  margin-bottom: 16px;
}

.hero-badge-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.hero-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--navy-100);
  line-height: 1.6;
  max-width: 760px;
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: var(--brand);
  color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  line-height: 1.2;
}

.btn:hover {
  background: var(--brand-600);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
  color: #ffffff;
}

.btn.s {
  padding: 7px 14px;
  font-size: 12px;
}

.btn.g {
  background: var(--card-alt);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.g:hover {
  background: var(--line);
  color: var(--ink);
}

.btn.btn-red {
  background: var(--accent) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.3);
}

.btn.btn-red:hover {
  background: var(--accent-600) !important;
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.45);
}

.btn.outline {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  box-shadow: none;
}

.btn.outline:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #ffffff;
}

.btn-example {
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-700);
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  padding: 6px 14px;
  font-size: 12px;
  transition: all 0.15s ease;
}

.btn-example:hover {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

/* ==========================================================================
   METRICS GRID
   ========================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.metric-tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

.metric-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(18, 52, 90, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

.tile-number {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

[data-theme="dark"] .tile-number {
  color: var(--brand-100);
}

.tile-label {
  font-size: 13.5px;
  font-weight: 750;
  color: var(--ink);
}

.tile-sub {
  font-size: 11.5px;
  color: var(--mut);
  line-height: 1.4;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.progress-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 24px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.bar-track {
  width: 100%;
  height: 9px;
  background: var(--line);
  border-radius: 9999px;
  overflow: hidden;
  margin-top: 10px;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ==========================================================================
   CEO WELCOME CARD
   ========================================================================== */
.ceo-welcome-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   CARDS & GRID
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.25s ease;
  position: relative;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px -4px rgba(18, 52, 90, 0.1);
  border-color: rgba(37, 99, 235, 0.35);
}

.card .card-icon {
  font-size: 30px;
  margin-bottom: 8px;
}

.card h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 750;
  color: var(--navy);
  margin-bottom: 6px;
  transition: color 0.2s;
}

[data-theme="dark"] .card h3 {
  color: var(--navy-100);
}

.card:hover h3 {
  color: var(--brand);
}

.card p {
  font-size: 13px;
  color: var(--mut);
  line-height: 1.55;
  flex: 1;
}

/* ==========================================================================
   BADGES & TAGS
   ========================================================================== */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tag-agf {
  background: var(--accent-50);
  color: var(--accent);
  border: 1px solid rgba(229, 57, 53, 0.2);
}

.tag-general {
  background: var(--navy-50);
  color: var(--navy);
  border: 1px solid rgba(18, 52, 90, 0.15);
}

[data-theme="dark"] .tag-general {
  background: var(--navy-50);
  color: var(--navy-200);
}

/* ==========================================================================
   INPUTS, FORMS & ROWS
   ========================================================================== */
input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

input[type="text"]:focus, input[type="number"]:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

[data-theme="dark"] label {
  color: var(--navy-200);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

/* ==========================================================================
   GLOSSARY STYLING
   ========================================================================== */
.gloss-filter-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin: 16px 0 24px 0;
  -webkit-overflow-scrolling: touch;
}

.gloss-pill {
  padding: 8px 16px;
  border-radius: 9999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.gloss-pill:hover {
  background: var(--navy-50);
  color: var(--navy);
}

.gloss-pill.active {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
  box-shadow: 0 2px 8px rgba(18, 52, 90, 0.25);
}

.gloss-pill.active .gloss-pill-count {
  background: var(--accent);
  color: #ffffff;
}

.gloss-pill-count {
  font-size: 10.5px;
  background: var(--navy-50);
  color: var(--navy);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 750;
}

.gloss-group-section {
  margin-bottom: 36px;
}

.gloss-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--navy-100);
}

.gloss-group-header h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: var(--navy);
}

[data-theme="dark"] .gloss-group-header h2 {
  color: var(--navy-100);
}

.gloss-group-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-50);
  padding: 3px 10px;
  border-radius: 9999px;
}

.gloss-card-item {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
}

.gloss-card-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px -2px rgba(15, 23, 42, 0.08);
  border-color: rgba(37, 99, 235, 0.3);
}

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

.gloss-tag {
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--brand-50);
  color: var(--brand-700);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gloss-card-item h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 750;
  color: var(--navy);
}

[data-theme="dark"] .gloss-card-item h3 {
  color: var(--navy-100);
}

.gloss-example-box {
  background: rgba(37, 99, 235, 0.04);
  border-left: 3.5px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink);
  margin-top: 10px;
}

/* ==========================================================================
   CALCULATORS
   ========================================================================== */
.calc-example-box {
  background: var(--mist);
  border-left: 3.5px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 14px 0;
}

.calc-result {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--navy-50);
  border: 1px solid var(--navy-100);
  color: var(--navy-900);
  font-size: 13px;
  line-height: 1.6;
}

/* ==========================================================================
   LESSONS & VISUALIZERS
   ========================================================================== */
.lesson-content {
  line-height: 1.7;
  font-size: 14.5px;
  color: var(--ink);
}

.lesson-content h3 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 17px;
  color: var(--navy);
}

[data-theme="dark"] .lesson-content h3 {
  color: var(--navy-100);
}

.lesson-content p {
  margin-bottom: 14px;
}

.lesson-content ul, .lesson-content ol {
  margin-left: 20px;
  margin-bottom: 16px;
}

.lesson-content li {
  margin-bottom: 6px;
}

.lesson-visual-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  margin: 28px 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.visual-box-header {
  margin-bottom: 18px;
}

.visual-box-header h3 {
  font-size: 18px;
  color: var(--navy);
  margin: 6px 0;
}

[data-theme="dark"] .visual-box-header h3 {
  color: var(--navy-100);
}

.visual-box-header p {
  font-size: 13px;
  color: var(--mut);
  margin: 0;
}

.visual-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 750;
  padding: 3px 8px;
  border-radius: 9999px;
  background: var(--navy-50);
  color: var(--navy);
  text-transform: uppercase;
}

/* Table container */
.tw {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  margin: 16px 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

thead th {
  background: var(--navy);
  color: #ffffff;
  padding: 10px 14px;
  font-weight: 700;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

tbody tr:hover td {
  background: var(--navy-50);
}

/* ==========================================================================
   QUIZ UI — EXECUTIVE EXAMINATION SYSTEM
   Prestigious typography, spacious card layout, authoritative badges
   ========================================================================== */
.quiz-q-card,
.card.quiz-card {
  background: var(--card);
  border-radius: 18px;
  border: 1.5px solid var(--line);
  padding: 32px 34px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px -4px rgba(18, 52, 90, 0.07), 0 2px 6px rgba(15, 23, 42, 0.03);
}

.quiz-question-title {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.48;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin-bottom: 24px;
}

.quiz-options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt-btn,
.quiz-opt-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.52;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(18, 52, 90, 0.03);
  position: relative;
}

.opt-badge {
  width: 36px;
  height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--navy-50);
  color: var(--navy);
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  border: 1.5px solid var(--navy-100);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.opt-text {
  flex: 1;
  font-size: 15.5px;
  line-height: 1.52;
  color: var(--ink);
  font-weight: 500;
}

.opt-btn:hover:not(:disabled),
.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--brand);
  background: var(--brand-50);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.12);
}

.opt-btn:hover:not(:disabled) .opt-badge,
.quiz-opt-btn:hover:not(:disabled) .opt-badge {
  background: var(--brand);
  color: #ffffff;
  border-color: var(--brand);
}

.opt-btn.correct,
.quiz-opt-btn.correct {
  border-color: var(--ok) !important;
  background: #ecfdf5 !important;
  color: #064e3b !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.15) !important;
}

.opt-btn.correct .opt-badge,
.quiz-opt-btn.correct .opt-badge {
  background: var(--ok) !important;
  color: #ffffff !important;
  border-color: var(--ok) !important;
}

.opt-btn.correct .opt-text,
.quiz-opt-btn.correct .opt-text {
  color: #064e3b !important;
  font-weight: 600;
}

.opt-btn.incorrect,
.opt-btn.wrong,
.quiz-opt-btn.incorrect,
.quiz-opt-btn.wrong {
  border-color: var(--accent) !important;
  background: #fef2f2 !important;
  color: #7f1d1d !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(229, 57, 53, 0.15) !important;
}

.opt-btn.incorrect .opt-badge,
.opt-btn.wrong .opt-badge,
.quiz-opt-btn.incorrect .opt-badge,
.quiz-opt-btn.wrong .opt-badge {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
}

.opt-btn.incorrect .opt-text,
.opt-btn.wrong .opt-text,
.quiz-opt-btn.incorrect .opt-text,
.quiz-opt-btn.wrong .opt-text {
  color: #7f1d1d !important;
  font-weight: 600;
}

.quiz-feedback-card,
.quiz-feedback-box {
  margin-top: 24px;
  padding: 24px 28px;
  border-radius: 16px;
  font-size: 15px;
  line-height: 1.6;
  animation: fadeIn 0.3s ease-out;
}

.quiz-feedback-card.correct,
.quiz-feedback-box.correct {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-left: 6px solid var(--ok);
  color: #14532d;
}

.quiz-feedback-card.incorrect,
.quiz-feedback-box.wrong {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  border-left: 6px solid var(--accent);
  color: #7f1d1d;
}

.quiz-why-false {
  background: #ffffff;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--accent);
  padding: 14px 18px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 14.5px;
  line-height: 1.58;
  color: #991b1b;
}

.quiz-right-answer {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--ok);
  padding: 14px 18px;
  border-radius: 10px;
  margin: 14px 0;
  font-size: 14.5px;
  line-height: 1.58;
  color: #166534;
}

.quiz-concept-explanation {
  background: rgba(18, 52, 90, 0.04);
  border: 1px solid var(--navy-100);
  border-left: 4px solid var(--navy);
  padding: 14px 18px;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--navy-800);
}

.quiz-review-section {
  margin-top: 36px;
  text-align: left;
}

.quiz-review-item {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(18, 52, 90, 0.03);
}

.quiz-review-item.pass {
  border-left: 5px solid var(--ok);
}

.quiz-review-item.fail {
  border-left: 5px solid var(--accent);
}

/* Dark mode adjustments for quiz */
[data-theme="dark"] .quiz-q-card,
[data-theme="dark"] .card.quiz-card {
  background: var(--card);
  border-color: var(--line);
}

[data-theme="dark"] .quiz-question-title {
  color: var(--ink);
}

[data-theme="dark"] .opt-btn,
[data-theme="dark"] .quiz-opt-btn {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

[data-theme="dark"] .opt-badge {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-color: rgba(37, 99, 235, 0.35);
}

[data-theme="dark"] .opt-text {
  color: var(--ink);
}

[data-theme="dark"] .opt-btn:hover:not(:disabled),
[data-theme="dark"] .quiz-opt-btn:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.15);
  border-color: var(--brand);
}

[data-theme="dark"] .opt-btn.correct,
[data-theme="dark"] .quiz-opt-btn.correct {
  background: rgba(5, 150, 105, 0.18) !important;
  border-color: #10b981 !important;
  color: #6ee7b7 !important;
}

[data-theme="dark"] .opt-btn.correct .opt-text,
[data-theme="dark"] .quiz-opt-btn.correct .opt-text {
  color: #a7f3d0 !important;
}

[data-theme="dark"] .opt-btn.incorrect,
[data-theme="dark"] .opt-btn.wrong,
[data-theme="dark"] .quiz-opt-btn.incorrect,
[data-theme="dark"] .quiz-opt-btn.wrong {
  background: rgba(229, 57, 53, 0.18) !important;
  border-color: #ef4444 !important;
  color: #fca5a5 !important;
}

[data-theme="dark"] .opt-btn.incorrect .opt-text,
[data-theme="dark"] .opt-btn.wrong .opt-text,
[data-theme="dark"] .quiz-opt-btn.incorrect .opt-text,
[data-theme="dark"] .quiz-opt-btn.wrong .opt-text {
  color: #fecaca !important;
}

[data-theme="dark"] .quiz-feedback-card.correct {
  background: rgba(5, 150, 105, 0.14);
  border-color: rgba(5, 150, 105, 0.4);
  color: #a7f3d0;
}

[data-theme="dark"] .quiz-feedback-card.incorrect {
  background: rgba(229, 57, 53, 0.14);
  border-color: rgba(229, 57, 53, 0.4);
  color: #fecaca;
}

[data-theme="dark"] .quiz-why-false {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(229, 57, 53, 0.4);
  color: #fca5a5;
}

[data-theme="dark"] .quiz-right-answer {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(5, 150, 105, 0.4);
  color: #6ee7b7;
}

[data-theme="dark"] .quiz-concept-explanation {
  background: rgba(18, 52, 90, 0.3);
  border-color: rgba(37, 99, 235, 0.35);
  color: #dbeafe;
}

/* ==========================================================================
   AI ASSISTANT
   ========================================================================== */
.chat-window {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 580px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
}

.chat-msg.assistant {
  align-self: flex-start;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 3px;
}

.chat-msg.user {
  align-self: flex-end;
  background: var(--brand);
  color: #ffffff;
  border-bottom-right-radius: 3px;
}

.chips-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px;
  background: var(--mist);
  border-top: 1px solid var(--line);
}

.chip {
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--mut);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip:hover {
  background: var(--brand-50);
  color: var(--brand-700);
  border-color: var(--brand-100);
}

.chat-input-row {
  padding: 12px 14px;
  background: var(--card);
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-attach {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 15px;
  color: var(--mut);
}

.attachment-preview-bar {
  display: flex;
  gap: 8px;
  padding: 8px 14px;
  background: var(--mist);
  border-top: 1px solid var(--line);
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}

.attachment-chip-thumb {
  width: 20px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
}

.btn-remove-attach {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-weight: bold;
}

.chat-attachment-img {
  max-width: 100%;
  border-radius: 8px;
  max-height: 180px;
  object-fit: cover;
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--mut);
  border-radius: 9999px;
  animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}

/* ==========================================================================
   FOOTER (Exact Executive Reference Theme)
   ========================================================================== */
footer {
  background: var(--navy) !important;
  color: var(--navy-100) !important;
  border-top: 4px solid var(--accent) !important;
  text-align: center;
  padding: 26px 28px !important;
  font-size: 13px;
  margin-top: auto;
}

footer div {
  color: #ffffff !important;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

footer b {
  color: #ffffff;
}

/* ==========================================================================
   BREADCRUMBS & INTERNAL LINKING (TECHNICAL SEO)
   ========================================================================== */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13.5px;
  margin-bottom: 18px;
  color: var(--mut);
}

.breadcrumbs a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s ease;
}

.breadcrumbs a:hover {
  color: var(--brand-700);
  text-decoration: underline;
}

.breadcrumbs .sep {
  color: var(--mut);
  opacity: 0.6;
  font-size: 12px;
  user-select: none;
}

.breadcrumbs .current {
  color: var(--ink);
  font-weight: 600;
}

.lesson-related-box {
  margin-top: 36px;
  padding: 24px;
  border-radius: 14px;
  background: var(--card-alt);
  border: 1.5px solid var(--line);
}

.lesson-related-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.lesson-related-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: all 0.15s ease;
  font-size: 13.5px;
  font-weight: 600;
}

.lesson-related-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
  color: var(--brand);
}

.lesson-related-card span.icon {
  font-size: 20px;
  flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile Friendly)
   ========================================================================== */
@media (max-width: 900px) {
  #burger { display: block; }
  #nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    z-index: 99;
    max-height: calc(100vh - 64px);
  }
  #nav.open { display: flex; }
  #app { padding: 24px 18px; }
  .hero-banner { padding: 30px 22px; }
  .hero-title { font-size: 1.85rem; }
  .grid { grid-template-columns: 1fr; }
}

@media print {
  .no-print, header, #nav, footer { display: none !important; }
  body { background: #ffffff !important; color: #000000 !important; }
  #app { padding: 0 !important; }
}
