/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Noto Sans SC', sans-serif;
  background: #F5F1EC;
  color: #1C2740;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── CSS Variables — Club Med 配色方案 ── */
:root {
  /* Club Med 品牌色 */
  --ultramarine: #1C2740;
  --saffron: #F2B300;
  --saffron-dim: rgba(242, 179, 0, 0.15);
  --sienna: #9A4B32;
  --sienna-dim: rgba(154, 75, 50, 0.15);
  --lavender: #9BAAE8;
  --lavender-dim: rgba(155, 170, 232, 0.15);
  --verdigris: #9EB9B0;

  /* 主题映射 — 浅色主题 */
  --accent: #F2B300;             /* Saffron Yellow — CTA/强调 */
  --accent-light: #E0A800;       /* 深一点，在浅色背景上可读 */
  --accent-dim: rgba(242,179,0,0.12);
  --bg: #F5F1EC;                 /* Light Sand */
  --bg2: #FFFFFF;
  --bg3: #EBE7E0;
  --card: #FFFFFF;
  --card-hover: #F5F1EC;
  --border: rgba(28,39,64,0.10);
  --text: #1C2740;               /* Ultramarine */
  --text-muted: #6B7A9A;
  --success: #2D9E52;
  --success-dim: rgba(45, 158, 82, 0.12);
  --danger: #D94F3D;
  --danger-dim: rgba(217, 79, 61, 0.12);
  --warning: #F2B300;
  --header-h: 56px;
  --nav-h: 60px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(28,39,64,0.12);
}

/* ── App Shell ── */
#app {
  max-width: 640px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ── Header ── */
#app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245,241,236,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: var(--header-h);
}
.header-title {
  flex: 1;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  transition: color .2s, background .2s;
}
.back-btn:hover { color: var(--text); background: var(--bg3); }
.xp-badge {
  background: var(--saffron-dim);
  border: 1px solid var(--saffron);
  color: var(--saffron);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.xp-icon { color: var(--saffron); }

/* Quiz progress bar in header */
.quiz-progress {
  height: 4px;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}
#quiz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--saffron), var(--lavender));
  transition: width 0.4s cubic-bezier(.4,0,.2,1);
  border-radius: 2px;
}
#quiz-progress-text {
  position: absolute;
  right: 12px;
  top: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ── Main Content ── */
#main-content {
  flex: 1;
  padding-bottom: calc(var(--nav-h) + 16px);
  overflow-y: auto;
}

/* ── Views ── */
.view { display: none; }
.view.active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── Home: Hero ── */
.hero-banner {
  position: relative;
  background: linear-gradient(135deg, #1C2740 0%, #0E1828 100%);
  padding: 28px 20px 24px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-label {
  font-size: 0.72rem;
  color: var(--saffron);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero-desc { color: var(--text-muted); font-size: 0.9rem; }
.hero-orb {
  position: absolute;
  right: -30px;
  top: -30px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,179,0,0.25) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Home: Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}
.stat-card {
  background: var(--bg2);
  padding: 16px 12px;
  text-align: center;
}
.stat-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* ── Home: Section Header ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px 12px;
  font-weight: 700;
  font-size: 0.95rem;
}
.section-sub { font-size: 0.8rem; color: var(--text-muted); font-weight: 400; }

/* ── Module Grid ── */
.module-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 12px 16px;
}
.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
  position: relative;
  overflow: hidden;
  min-height: 140px;
  display: flex;
  flex-direction: column;
}
.module-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  background: var(--card-hover);
}
.module-card:active { transform: translateY(-1px); }
.module-card-glow {
  position: absolute;
  top: -30px; right: -30px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: 0.25;
  pointer-events: none;
}
.module-emoji { font-size: 1.6rem; margin-bottom: 8px; }
.module-card-title { font-weight: 700; font-size: 0.85rem; line-height: 1.3; }
.module-card-sub { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; flex: 1; }
.module-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.module-status-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 10px;
  font-weight: 700;
}
.status-locked { background: var(--bg3); color: var(--text-muted); }
.status-available { background: var(--accent-dim); color: var(--accent-light); }
.status-done { background: var(--success-dim); color: var(--success); }
.module-score { font-size: 0.72rem; color: var(--text-muted); }

/* ── Learn View ── */
.learn-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg2);
}
.module-badge-large {
  font-size: 2.5rem;
  margin-bottom: 10px;
  line-height: 1;
}
.learn-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 4px; }
.learn-subtitle { color: var(--text-muted); font-size: 0.85rem; }
.learn-content { padding: 20px 16px; overflow-x: hidden; }
.lesson-section {
  margin-bottom: 24px;
}
.lesson-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--saffron);
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--saffron-dim);
}
.lesson-section p { line-height: 1.7; color: var(--text); font-size: 0.9rem; margin-bottom: 8px; }
.lesson-section ul { padding-left: 18px; }
.lesson-section li { line-height: 1.7; color: var(--text); font-size: 0.9rem; margin-bottom: 4px; }
.key-points {
  background: var(--bg3);
  border-left: 3px solid var(--sienna);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 16px;
  margin: 14px 0;
}
.key-points-title { font-size: 0.75rem; color: var(--verdigris); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.key-point { display: flex; gap: 8px; margin-bottom: 6px; font-size: 0.88rem; line-height: 1.5; }
.key-point::before { content: "→"; color: var(--sienna); flex-shrink: 0; font-weight: 700; }
.code-example {
  background: #0D0D1E;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 12px 0;
  overflow-x: auto;
}
.code-example-label { font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.08em; }
.code-example pre {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--lavender);
  white-space: pre-wrap;
  word-break: break-word;
}
.compare-box { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.compare-item { background: var(--bg3); border-radius: var(--radius-sm); padding: 12px; }
.compare-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.compare-label.bad { color: var(--danger); }
.compare-label.good { color: var(--success); }
.compare-item p { font-size: 0.82rem; line-height: 1.5; color: var(--text-muted); }
.learn-footer { padding: 16px; border-top: 1px solid var(--border); }

/* ── Quiz View ── */
.quiz-area { padding: 20px 16px; }
.quiz-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 14px;
}
.badge-mcq { background: var(--accent-dim); color: var(--accent-light); }
.badge-spot { background: rgba(251,191,36,0.15); color: var(--warning); }
.badge-fixit { background: var(--success-dim); color: var(--success); }
.badge-scenario { background: rgba(251,113,133,0.15); color: #F9A8D4; }
.quiz-question {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}
/* MCQ Options */
.options-list { display: flex; flex-direction: column; gap: 10px; }
.option-btn {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .2s, background .2s;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}
.option-btn:hover { border-color: var(--accent); background: var(--accent-dim); }
.option-letter {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted);
  transition: background .2s, color .2s;
}
.option-btn.selected { border-color: var(--accent); background: var(--accent-dim); }
.option-btn.selected .option-letter { background: var(--accent); color: #fff; }
.option-btn.correct { border-color: var(--success); background: var(--success-dim); }
.option-btn.correct .option-letter { background: var(--success); color: #0A0A16; }
.option-btn.wrong { border-color: var(--danger); background: var(--danger-dim); animation: shake .3s; }
.option-btn.wrong .option-letter { background: var(--danger); color: #fff; }
.option-btn:disabled { cursor: default; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}

/* Spot the Error (two options) */
.spot-options { display: grid; grid-template-columns: 1fr; gap: 12px; }
.spot-option {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--lavender);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  width: 100%;
}
.spot-option:hover { border-color: var(--accent); background: var(--accent-dim); }
.spot-label { font-size: 0.72rem; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'Noto Sans SC', sans-serif; }

/* Fix It */
.bad-prompt-box {
  background: #1A0A0A;
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: #F9A8D4;
  margin-bottom: 14px;
  white-space: pre-wrap;
}
.bad-prompt-label { font-size: 0.7rem; color: var(--danger); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.fixit-input {
  width: 100%;
  min-height: 120px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  resize: vertical;
  transition: border-color .2s;
  margin-bottom: 14px;
  line-height: 1.6;
}
.fixit-input:focus { outline: none; border-color: var(--accent); }
.fixit-input::placeholder { color: var(--text-muted); }

/* Quiz Feedback */
.quiz-feedback {
  padding: 20px 16px;
  animation: slideUp .3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.feedback-icon { font-size: 2.5rem; text-align: center; margin-bottom: 10px; }
.feedback-title { font-size: 1.1rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.feedback-explanation {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.model-answer {
  background: var(--success-dim);
  border: 1px solid var(--success);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.model-answer-label { font-size: 0.7rem; color: var(--success); font-weight: 700; text-transform: uppercase; margin-bottom: 8px; }
.model-answer pre {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Loading state for DeepSeek */
.ai-scoring {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: var(--bg3);
  border-radius: var(--radius);
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.ai-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* AI score display */
.ai-score-display {
  background: var(--bg3);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.ai-score-stars { font-size: 1.2rem; margin-bottom: 6px; }
.ai-score-text { font-size: 0.88rem; line-height: 1.6; color: var(--text-muted); }

/* ── Result View ── */
.result-container {
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.result-badge { font-size: 3rem; margin-bottom: 8px; }
.result-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 24px; }
.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 16px;
}
.score-ring svg { transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg3); stroke-width: 8; }
.ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 326.7;
  stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 1s cubic-bezier(.4,0,.2,1);
}
.score-ring-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.score-num { font-size: 1.8rem; font-weight: 700; color: var(--accent-light); }
.score-label { font-size: 0.72rem; color: var(--text-muted); }
.xp-gained {
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 6px 18px;
  font-weight: 700;
  color: var(--accent-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}
.result-stat {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  border: 1px solid var(--border);
}
.result-stat-num { font-size: 1.2rem; font-weight: 700; }
.result-stat-label { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.result-actions { display: flex; gap: 10px; width: 100%; }

/* Particles canvas */
.particles-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
}

/* ── Review View ── */
.review-header { padding: 20px 16px 12px; border-bottom: 1px solid var(--border); }
.review-header h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.review-count { font-size: 0.85rem; color: var(--text-muted); }
.review-content { padding: 16px; }
.empty-state { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }
#review-quiz-area { /* same as quiz area */ }

/* ── Stats View ── */
.stats-title { padding: 20px 16px 12px; font-size: 1.2rem; font-weight: 700; }
.stats-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px 16px;
}
.stats-overview-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}
.stats-overview-num { font-size: 1.5rem; font-weight: 700; color: var(--accent-light); }
.stats-overview-label { font-size: 0.75rem; color: var(--text-muted); margin-top: 4px; }
.stats-modules-list { padding: 0 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.stats-module-row {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.stats-module-emoji { font-size: 1.3rem; flex-shrink: 0; }
.stats-module-info { flex: 1; min-width: 0; }
.stats-module-name { font-size: 0.88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-module-bar { height: 4px; background: var(--bg3); border-radius: 2px; margin-top: 6px; }
.stats-module-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), var(--accent-light)); transition: width .5s; }
.stats-module-score { font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }

/* API Key Settings (in Stats view) */
.api-key-section {
  margin: 0 12px 16px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--border);
}
.api-key-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; }
.api-key-desc { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 12px; line-height: 1.5; }
.api-key-row { display: flex; gap: 8px; }
.api-key-input {
  flex: 1;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--text);
  transition: border-color .2s;
}
.api-key-input:focus { outline: none; border-color: var(--accent); }
.api-key-status { font-size: 0.78rem; margin-top: 8px; }
.status-set { color: var(--success); }
.status-unset { color: var(--text-muted); }

/* Danger Zone */
.danger-zone { padding: 0 12px 32px; }

/* ── Buttons ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, transform .1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary.btn-large { width: 100%; padding: 14px; font-size: 1rem; }
.btn-secondary {
  flex: 1;
  background: var(--bg3);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-secondary:hover { background: var(--card-hover); }
.btn-danger {
  width: 100%;
  background: var(--danger-dim);
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
  padding: 12px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-danger:hover { background: rgba(248,113,113,0.25); }
.btn-save {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* ── Bottom Nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  height: var(--nav-h);
  background: rgba(245,241,236,0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: color .2s;
  padding: 0;
}
.nav-btn.active { color: var(--accent-light); }
.nav-btn svg { transition: stroke .2s; }
.nav-btn.active svg { stroke: var(--accent-light); }
.nav-btn:hover { color: var(--text); }
.nav-btn span { line-height: 1; }

/* ── Utilities ── */
.hidden { display: none !important; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent-light); }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }

/* ── Large screens ── */
@media (min-width: 640px) {
  .module-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 2rem; }
}

/* ══ Module Card (supplemental) ══════════════════════ */
.module-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2px;
}
.module-badge {
  font-size: 1rem;
  line-height: 1;
}
.module-score-bar {
  height: 4px;
  background: var(--bg2);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.module-score-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.module-score-text {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.module-card-cta {
  font-size: 0.78rem;
  color: var(--accent-light);
  margin-top: auto;
  padding-top: 8px;
  font-weight: 700;
}
.module-card.completed {
  border-color: rgba(108,99,255,0.3);
}

/* ══ Quiz Options (new class names) ═════════════════ */
.quiz-option {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .2s, background .2s;
  width: 100%;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 10px;
}
.quiz-option:hover { border-color: var(--accent); background: var(--accent-dim); }
.quiz-option.correct { border-color: var(--success); background: var(--success-dim); }
.quiz-option.correct .option-label { background: var(--success); color: #0A0A16; }
.quiz-option.wrong { border-color: var(--danger); background: var(--danger-dim); animation: shake .3s; }
.quiz-option.wrong .option-label { background: var(--danger); color: #fff; }
.quiz-option:disabled { cursor: default; }
.option-label {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--bg3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
  color: var(--text-muted);
  transition: background .2s, color .2s;
}
.option-text { flex: 1; }

/* ══ AI feedback note ═══════════════════════════════ */
.ai-feedback-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--saffron-dim);
  border-left: 3px solid var(--saffron);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.ai-badge {
  display: inline-block;
  background: var(--saffron-dim);
  color: var(--saffron);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 8px;
  margin-right: 6px;
  letter-spacing: 0.05em;
}

/* Spot the Error — content pre inside button */
.spot-content {
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--lavender);
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
  background: none;
  border: none;
  margin: 0;
}
.spot-option.correct { border-color: var(--success); background: var(--success-dim); }
.spot-option.correct .spot-content { color: var(--success); }
.spot-option.wrong { border-color: var(--danger); background: var(--danger-dim); }

/* ══ Feedback Panel ══════════════════════════════════ */
.feedback-correct { border-top: 3px solid var(--success); }
.feedback-wrong   { border-top: 3px solid var(--danger); }
.model-answer-content {
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

/* ══ Result Page (rs- classes) ═══════════════════════ */
.rs-num {
  font-size: 1.4rem;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
}
.rs-num.green { color: var(--success); }
.rs-num.red   { color: var(--danger); }
.rs-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ══ Review Cards ════════════════════════════════════ */
.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
.review-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.review-module-name {
  font-size: 0.78rem;
  color: var(--accent-light);
  font-weight: 700;
}
.review-q-type {
  font-size: 0.68rem;
  color: var(--text-muted);
  background: var(--bg3);
  padding: 2px 8px;
  border-radius: 8px;
}
.review-question {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 10px;
}
.review-answer {
  background: var(--success-dim);
  border-left: 3px solid var(--success);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 10px 12px;
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 10px;
  color: #BBF7D0;
}
.review-explanation {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.btn-remove-review {
  background: none;
  border: 1px solid var(--success);
  color: var(--success);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background .2s;
}
.btn-remove-review:hover { background: var(--success-dim); }

/* ══ Stats View (so- and smi- classes) ══════════════ */
.so-num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
}
.so-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.stats-module-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.smi-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.smi-emoji { font-size: 1.1rem; flex-shrink: 0; }
.smi-title { flex: 1; font-size: 0.88rem; font-weight: 700; }
.smi-badge { font-size: 1rem; flex-shrink: 0; }
.smi-bar-wrap {
  height: 4px;
  background: var(--bg3);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}
.smi-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .5s cubic-bezier(.4,0,.2,1);
}
.smi-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.smi-redo-btn {
  background: var(--accent-dim);
  color: var(--accent-light);
  border: none;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.smi-redo-btn:hover { background: rgba(108,99,255,0.25); }

/* ══ API Key Section (supplemental) ═════════════════ */
.api-key-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
}
.status-on  { background: var(--success-dim); color: var(--success); }
.status-off { background: var(--bg3); color: var(--text-muted); }
.api-key-masked {
  font-family: 'Fira Code', monospace;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.api-key-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
  align-items: center;
}
.api-key-input-row input {
  flex: 1;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--text);
  transition: border-color .2s;
  min-width: 0;
}
.api-key-input-row input:focus { outline: none; border-color: var(--accent); }
.api-key-note {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.btn-sm {
  background: var(--bg3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.btn-sm:hover { background: var(--card-hover); }
.btn-danger.btn-sm {
  background: var(--danger-dim);
  color: var(--danger);
  border-color: var(--danger);
}

/* ══ Toast ═══════════════════════════════════════════ */
.app-toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 200;
  pointer-events: none;
  box-shadow: var(--shadow);
}
.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ══ Shake utility ═══════════════════════════════════ */
.shake { animation: shake .3s; }

/* ══ API Key title row ═══════════════════════════════ */
.api-key-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.9rem;
  font-weight: 700;
}

/* ══ Category Filter ══════════════════════════════════ */
.category-filter { display: flex; gap: 8px; padding: 0 12px 12px; flex-wrap: wrap; }
.cat-chip { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 5px 14px; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .2s; white-space: nowrap; font-family: inherit; }
.cat-chip:hover { border-color: var(--saffron); color: var(--text); }
.cat-chip.active { background: var(--saffron); border-color: var(--saffron); color: var(--ultramarine); }

/* ══ Learn Content Component Styles (from claude-learning) ══ */

/* Analogy box */
.learn-analogy-box { background: rgba(155,170,232,.08); border: 1px solid rgba(155,170,232,.2); border-left: 4px solid var(--lavender); border-radius: var(--radius-sm); padding: 1rem 1.2rem; display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1.5rem; }
.analogy-icon { font-size: 1.5rem; flex-shrink: 0; }
.analogy-text { font-size: .9rem; color: var(--text-muted); }
.analogy-text strong { color: var(--lavender); }

/* Learn section */
.learn-section { margin-bottom: 2rem; }
.learn-section h3 { color: var(--ultramarine); margin-bottom: .75rem; font-size: 1rem; font-weight: 700; }
.learn-section ul { padding-left: 1.4rem; }
.learn-section ul li { margin-bottom: .4rem; color: var(--text-muted); font-size: .9rem; }
.learn-section p { margin-bottom: .75rem; font-size: .9rem; color: var(--text-muted); }
.learn-section strong { color: var(--text); }
.learn-section em { color: var(--saffron); font-style: normal; }

/* Two column layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.info-card { padding: 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.info-card.card-blue { background: rgba(155,170,232,.08); border-color: rgba(155,170,232,.25); }
.info-card.card-yellow { background: rgba(242,179,0,.08); border-color: rgba(242,179,0,.25); }
.info-card strong { color: var(--text); display: block; margin-bottom: .4rem; font-size: .9rem; }
.info-card p { font-size: .85rem; margin: 0; color: var(--text-muted); }
.card-icon { font-size: 1.4rem; margin-bottom: .4rem; }

/* Benefit list */
.benefit-list { display: flex; flex-direction: column; gap: .75rem; }
.benefit-item { display: flex; gap: .75rem; align-items: flex-start; }
.benefit-icon { font-size: 1.3rem; flex-shrink: 0; }
.benefit-item strong { color: var(--text); }
.benefit-item div { font-size: .9rem; color: var(--text-muted); }

/* Level cards */
.level-cards { display: flex; flex-direction: column; gap: .75rem; }
.level-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .85rem 1.2rem; }
.level-badge { display: inline-block; background: var(--saffron); color: var(--ultramarine); font-size: .65rem; font-weight: 700; padding: .15rem .45rem; border-radius: 4px; margin-bottom: .4rem; letter-spacing: .03em; }
.level-1 { border-left: 3px solid var(--saffron); }
.level-2 { border-left: 3px solid var(--lavender); }
.level-3 { border-left: 3px solid var(--verdigris); }
.level-card strong { color: var(--text); display: block; margin-bottom: .25rem; font-size: .9rem; }
.level-card p { font-size: .85rem; margin: 0; color: var(--text-muted); }
.level-card em { color: var(--saffron); font-style: normal; }

/* Image showcase */
.image-showcase { text-align: center; margin: 1.5rem 0; overflow: hidden; }
.doc-image { width: 100%; max-width: 100%; display: block; height: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.image-caption { font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }

/* Comparison box */
.comparison-box { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.comp-item { padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.comp-item.good { background: rgba(45,158,82,.08); border-color: rgba(45,158,82,.25); }
.comp-item.bad { background: rgba(242,179,0,.08); border-color: rgba(242,179,0,.2); }
.comp-label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: .4rem; }
.comp-item p { font-size: .85rem; margin: 0; color: var(--text-muted); }
.good .comp-label { color: var(--success); }
.bad .comp-label { color: var(--saffron); }

/* Lang table */
.lang-table-wrap { overflow-x: auto; margin: 1rem 0; }
.lang-table { border-collapse: collapse; width: 100%; font-size: .85rem; }
.lang-table th, .lang-table td { padding: .6rem .9rem; text-align: left; border: 1px solid var(--border); }
.lang-table thead th { background: var(--bg3); color: var(--text-muted); font-weight: 600; }
.lang-table tbody tr:nth-child(even) { background: rgba(28,39,64,.03); }
.highlight-row td { background: rgba(158,185,176,.08) !important; }
.table-note { font-size: .8rem; color: var(--text-muted); }

/* Detect list */
.detect-list { display: flex; flex-direction: column; gap: .4rem; margin: .75rem 0; }
.detect-item { background: var(--bg3); border-radius: 6px; padding: .4rem .8rem; font-size: .85rem; color: var(--text-muted); }
.detect-item code { color: var(--lavender); }

/* Warn box */
.warn-box { background: rgba(242,179,0,.08); border: 1px solid rgba(242,179,0,.25); border-radius: var(--radius-sm); padding: .9rem 1.1rem; font-size: .88rem; color: var(--text-muted); margin-top: 1rem; }

/* Migration tasks */
.migration-tasks { display: flex; flex-direction: column; gap: .75rem; }
.task-item { display: flex; gap: .8rem; align-items: flex-start; }
.task-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: .1rem; }
.task-item strong { color: var(--text); display: block; margin-bottom: .2rem; }
.task-item div { font-size: .88rem; color: var(--text-muted); }

/* Tool grid */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.tool-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; text-align: center; }
.tool-icon { font-size: 1.8rem; margin-bottom: .4rem; }
.tool-card strong { color: var(--text); font-size: .9rem; display: block; margin-bottom: .3rem; }
.tool-card p { font-size: .8rem; margin: 0; color: var(--text-muted); }

/* Install tabs */
.install-tabs { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.install-item {}
.install-label { font-size: .8rem; color: var(--text-muted); margin-bottom: .3rem; }

/* Code block (always dark for readability) */
.code-block { background: #1C2740; border: 1px solid rgba(155,170,232,0.2); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .85em; color: #9EB9B0; white-space: pre-wrap; word-break: break-all; margin: .5rem 0; line-height: 1.6; }
.code-block code { font-family: 'Fira Code', monospace; }
.code-comment { color: #7A8FB5; }

/* Env grid */
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; margin: 1rem 0; }
.env-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; }
.env-item.env-highlight { border-color: rgba(242,179,0,.3); background: rgba(242,179,0,.06); }
.env-item strong { color: var(--text); display: block; margin-bottom: .3rem; font-size: .9rem; }
.env-item p { font-size: .82rem; margin: 0; color: var(--text-muted); }

/* Hotkey grid */
.hotkey-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; margin: .75rem 0; }
.hotkey-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: .5rem .8rem; display: flex; align-items: center; gap: .6rem; font-size: .85rem; }
kbd { background: #1C2740; border: 1px solid rgba(155,170,232,0.2); border-radius: 4px; padding: .15rem .4rem; font-family: 'Fira Code', monospace; font-size: .8em; color: var(--saffron); white-space: nowrap; }
.hotkey-item span { color: var(--text-muted); }

/* Tips list */
.tips-list { display: flex; flex-direction: column; gap: .5rem; }
.tip-item { font-size: .9rem; color: var(--text-muted); }
.tip-item strong { color: var(--text); }

/* Mode guide */
.mode-guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.mode-item { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .9rem; }
.mode-item.highlight { border-color: rgba(242,179,0,.3); background: rgba(242,179,0,.06); }
.mode-item strong { color: var(--text); display: block; margin-bottom: .3rem; font-size: .9rem; }
.mode-item p { font-size: .85rem; margin: 0; color: var(--text-muted); }

/* MCP examples */
.mcp-examples { display: flex; flex-direction: column; gap: .4rem; margin: .75rem 0; }
.mcp-item { font-size: .88rem; color: var(--text-muted); }
.mcp-item strong { color: var(--text); }

/* GitHub features */
.github-features { display: flex; flex-direction: column; gap: .75rem; margin: 1rem 0; }
.gh-feature { display: flex; gap: .75rem; align-items: flex-start; }
.gh-icon { font-size: 1.4rem; flex-shrink: 0; }
.gh-feature strong { color: var(--text); display: block; margin-bottom: .2rem; }
.gh-feature p { font-size: .88rem; margin: 0; color: var(--text-muted); }

/* Hooks list */
.hooks-list { display: flex; flex-direction: column; gap: .5rem; margin: .75rem 0; }
.hook-item { display: flex; gap: .75rem; align-items: center; background: var(--bg3); border-radius: 6px; padding: .6rem .9rem; }
.hook-name { font-family: 'Fira Code', monospace; font-size: .85em; color: var(--lavender); min-width: 110px; }
.hook-desc { font-size: .85rem; color: var(--text-muted); }

/* ── Terminal Window Mockups ── */
.term-window { border-radius: var(--radius-sm); overflow: hidden; margin: 1rem 0; box-shadow: 0 4px 20px rgba(0,0,0,.25); font-family: 'Fira Code', monospace; font-size: .82rem; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #3C3C3C; }
.term-bar.ps-bar { background: #012456; }
.term-bar.cmd-bar { background: #1C1C1C; }
.term-bar.linux-bar { background: #2D2D2D; }
.term-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.term-dot.red    { background: #FF5F57; }
.term-dot.yellow { background: #FFBD2E; }
.term-dot.green  { background: #28C840; }
.term-title { color: #CCC; font-size: .72rem; flex: 1; text-align: center; font-family: 'Noto Sans SC', sans-serif; }
.term-body { background: #0C0C0C; padding: .9rem 1rem; overflow-x: auto; line-height: 1.7; }
.term-body.ps-body { background: #012456; }
.term-body.cmd-body { background: #0C0C0C; }
.term-body.linux-body { background: #1A1A1A; }
.term-line { display: block; white-space: pre; }
.term-ps { color: #FFFF00; }
.term-cmd-bar .term-ps { color: #CCCCCC; }
.term-prompt { color: #4EC94E; }
.term-root { color: #FF6B6B; }
.term-input { color: #FFFFFF; }
.term-out { color: #AAAAAA; display: block; white-space: pre-wrap; word-break: break-all; }
.term-out.success { color: #4EC94E; }
.term-out.error   { color: #FF6B6B; }
.term-out.info    { color: #5BB8F5; }
.term-out.yellow  { color: #FFBD2E; }
.term-comment { color: #666; font-style: italic; display: block; }
.term-blank { display: block; height: .4rem; }

/* Keyboard shortcut tables */
.kbd-section { margin-bottom: 1.2rem; }
.kbd-section-title { font-size: .78rem; font-weight: 700; color: var(--sienna); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }
.kbd-rows { display: flex; flex-direction: column; gap: .3rem; }
.kbd-row { display: flex; align-items: flex-start; gap: .75rem; padding: .35rem .5rem; border-radius: 6px; }
.kbd-row:hover { background: var(--bg3); }
.kbd-keys { display: flex; gap: .25rem; flex-wrap: wrap; min-width: 120px; flex-shrink: 0; }
.kbd-key { background: var(--bg); border: 1.5px solid rgba(28,39,64,.25); border-bottom-width: 3px; border-radius: 4px; padding: .1rem .45rem; font-family: 'Fira Code', monospace; font-size: .72rem; color: var(--text); white-space: nowrap; }
.kbd-desc { font-size: .84rem; color: var(--text-muted); line-height: 1.45; padding-top: .05rem; }
.kbd-desc strong { color: var(--text); }

/* CLI command reference table */
.cli-table { width: 100%; border-collapse: collapse; font-size: .84rem; margin: .75rem 0; overflow-x: auto; display: block; }
.cli-table th { background: var(--ultramarine); color: #FFF; padding: .5rem .75rem; text-align: left; font-size: .75rem; letter-spacing: .04em; white-space: nowrap; }
.cli-table td { padding: .45rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cli-table tr:hover td { background: var(--bg3); }
.cli-table td:first-child { font-family: 'Fira Code', monospace; font-size: .8rem; color: var(--lavender); white-space: nowrap; }
.cli-table td.danger { color: var(--danger); }
.cli-table .td-desc { color: var(--text-muted); }
.cli-table .td-ex { color: var(--text-muted); font-family: 'Fira Code', monospace; font-size: .78rem; }
.warn-inline { display: inline-block; background: rgba(217,79,61,.1); border: 1px solid rgba(217,79,61,.3); color: var(--danger); border-radius: 4px; padding: .15rem .5rem; font-size: .8rem; margin: .4rem 0; }

/* Term glossary annotations */
.term-gloss { display: block; font-size: .73rem; color: var(--text-muted); line-height: 1.4; margin: .1rem 0 .45rem .3rem; padding-left: .55rem; border-left: 2px solid var(--border); font-style: italic; }

/* Image interpretation box */
.image-desc { background: var(--bg3); border-radius: var(--radius-sm); padding: .9rem 1.1rem; margin-top: .75rem; }
.image-desc-title { font-size: .72rem; font-weight: 700; color: var(--verdigris); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .5rem; }
.image-desc p { font-size: .84rem; line-height: 1.65; color: var(--text-muted); margin-bottom: .4rem; }
.image-desc p:last-child { margin-bottom: 0; }
.image-desc strong { color: var(--text); }
