/* RoboVision — shared lesson chrome (dark, amber accent) */
:root {
  --rv-bg: #0c0c14;
  --rv-panel: rgba(255, 255, 255, 0.04);
  --rv-border: rgba(251, 191, 36, 0.15);
  --rv-accent: #fbbf24;
  --rv-muted: #94a3b8;
  --rv-text: #e2e8f0;
}
body.rv-page {
  margin: 0;
  min-height: 100vh;
  background: var(--rv-bg);
  color: var(--rv-text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
.rv-top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.rv-top a {
  color: var(--rv-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.rv-top a:hover {
  text-decoration: underline;
}
/* Lesson toolbar (Ask, …) — algovision-ask.js injects .av-ti-ask-btn */
.rv-lesson-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto 1rem;
  padding: 0.5rem 1.15rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(251, 191, 36, 0.22);
  background: rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
}
.rv-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 900px) {
  .rv-layout {
    grid-template-columns: 1fr;
  }
}
.rv-canvas-wrap {
  position: relative;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--rv-border);
  background: radial-gradient(ellipse at 50% 80%, rgba(251, 191, 36, 0.06), transparent 55%),
    #08080f;
  min-height: 320px;
}
.rv-canvas-wrap canvas {
  display: block;
  width: 100% !important;
  height: auto !important;
}
.rv-panel {
  background: var(--rv-panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
}
.rv-panel h1 {
  font-size: 1.35rem;
  margin: 0 0 0.35rem;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rv-sub {
  font-size: 0.88rem;
  color: var(--rv-muted);
  margin: 0 0 1rem;
  line-height: 1.5;
}
.rv-step-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}
.rv-step-body {
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 1rem;
}
.rv-step-body code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}
.rv-code {
  font-family: "Fira Code", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.78rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  overflow-x: auto;
  white-space: pre;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin: 0 0 1rem;
}
.rv-code .hl {
  background: rgba(251, 191, 36, 0.15);
  display: block;
  margin: 0 -1rem;
  padding: 0 1rem;
}
.rv-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.rv-controls button {
  padding: 0.45rem 1rem;
  border-radius: 0.45rem;
  border: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
}
.rv-controls button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.rv-controls button.green {
  background: linear-gradient(135deg, #10b981, #059669);
}
.rv-controls button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.rv-label {
  font-size: 0.8rem;
  color: var(--rv-muted);
}
.rv-readout {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: #a5b4fc;
  margin-top: 0.5rem;
}

/* Inline glossary: clickable terms that open a dialog */
button.rv-term-link {
  display: inline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--rv-accent);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
button.rv-term-link:hover {
  color: #fde68a;
  text-decoration-style: solid;
}
.rv-step-body button.rv-term-link {
  vertical-align: baseline;
}

dialog.rv-dialog {
  max-width: min(32rem, calc(100vw - 2rem));
  margin: auto;
  padding: 0;
  border: 1px solid var(--rv-border);
  border-radius: 0.75rem;
  background: #12121c;
  color: var(--rv-text);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
}
dialog.rv-dialog::backdrop {
  background: rgba(0, 0, 0, 0.62);
}
dialog.rv-dialog form {
  margin: 0;
}
.rv-dialog-inner {
  padding: 1.15rem 1.25rem 1.25rem;
}
.rv-dialog-inner h2 {
  margin: 0 0 0.65rem;
  font-size: 1.1rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rv-dialog-inner p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
}
.rv-dialog-inner p:last-of-type {
  margin-bottom: 0;
}
.rv-dialog-inner code {
  background: rgba(0, 0, 0, 0.35);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}
.rv-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.rv-dialog-actions button {
  padding: 0.45rem 1rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #7c3aed);
  color: #fff;
}

/* ── Progress bar ──────────────────────────────────────────── */
.rv-progress-bar {
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 2px;
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.rv-progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-radius: 2px;
  transition: width 0.35s ease;
}

/* ── Speed control ─────────────────────────────────────────── */
.rv-speed-wrap {
  margin-left: auto;
}

/* ── TTS button ────────────────────────────────────────────── */
.rv-tts-btn {
  min-width: 2.2rem;
  text-align: center;
}
.rv-tts-btn.active {
  background: rgba(251, 191, 36, 0.18) !important;
  border-color: rgba(251, 191, 36, 0.4) !important;
  color: #fbbf24 !important;
}

/* ── Quiz ──────────────────────────────────────────────────── */
.rv-quiz-wrap {
  margin: 0.75rem 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: rgba(99, 102, 241, 0.06);
}
.rv-quiz-question {
  font-size: 0.88rem;
  font-weight: 600;
  color: #c7d2fe;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}
.rv-quiz-question i { color: #818cf8; margin-right: 0.3rem; }
.rv-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.rv-quiz-opt {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.rv-quiz-opt:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(99, 102, 241, 0.1);
}
.rv-quiz-opt:disabled { cursor: default; opacity: 0.7; }
.rv-quiz-opt.correct {
  border-color: rgba(16, 185, 129, 0.6) !important;
  background: rgba(16, 185, 129, 0.12) !important;
  color: #6ee7b7 !important;
  opacity: 1 !important;
}
.rv-quiz-opt.wrong {
  border-color: rgba(239, 68, 68, 0.5) !important;
  background: rgba(239, 68, 68, 0.1) !important;
  color: #fca5a5 !important;
  opacity: 1 !important;
}
.rv-quiz-feedback {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.4rem;
  font-size: 0.82rem;
  line-height: 1.5;
}
.rv-quiz-feedback.correct {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.rv-quiz-feedback.wrong {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.rv-quiz-feedback i { margin-right: 0.3rem; }

/* ── Next-lesson prompt ────────────────────────────────────── */
.rv-next-lesson {
  margin-top: 0.75rem;
}
.rv-next-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.08);
}
.rv-next-check {
  color: #34d399;
  font-weight: 700;
  font-size: 0.9rem;
}
.rv-next-check i { margin-right: 0.25rem; }
.rv-next-link {
  color: #fbbf24;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}
.rv-next-link:hover { color: #fde68a; text-decoration: underline; }
.rv-next-link i { margin-left: 0.25rem; font-size: 0.8rem; }

/* ── Elbow toggle ──────────────────────────────────────────── */
.rv-elbow-btn {
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(251, 191, 36, 0.08);
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.rv-elbow-btn:hover {
  background: rgba(251, 191, 36, 0.18);
  border-color: rgba(251, 191, 36, 0.5);
}

/* ── Hub progress badges ───────────────────────────────────── */
.rv-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.4rem;
}
.rv-hub-badge.completed {
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.rv-hub-badge.in-progress {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
}

/* ── Discuss in AIs Social (shared) ────────────────────────── */
.discuss-aissocial-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border-radius: 2rem;
  font-size: 0.8rem; font-weight: 600; text-decoration: none;
  color: #a78bfa; border: 1px solid rgba(167,139,250,0.4);
  background: rgba(167,139,250,0.08);
  transition: all 0.2s ease; white-space: nowrap;
}
.discuss-aissocial-btn:hover {
  color: #c4b5fd; border-color: rgba(167,139,250,0.6);
  background: rgba(167,139,250,0.15);
}

/* ── Three.js load error ───────────────────────────────────── */
.rv-3d-error {
  padding: 2rem;
  text-align: center;
  color: #f87171;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ── Pipeline / flowchart shared (cognitive lessons) ────────── */
.rv-pipeline-wrap {
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 0.75rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
  margin-bottom: 1rem;
}
.rv-pipeline-wrap svg text { font-family: system-ui, sans-serif; }
.rv-node { transition: opacity 0.25s, filter 0.25s; }
.rv-node.dim { opacity: 0.28; }
.rv-node.on {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(251, 191, 36, 0.45));
}
.rv-flow-line { stroke: #475569; stroke-width: 2; fill: none; transition: stroke 0.25s; }
.rv-flow-line.on { stroke: #fbbf24; stroke-width: 2.5; }

/* ── Jacobian matrix live display ──────────────────────────── */
.rv-jac-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}
.rv-jac-matrix {
  font-family: "Fira Code", "Cascadia Code", ui-monospace, monospace;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.5rem;
  padding: 0.6rem 0.75rem;
  line-height: 1.6;
  min-width: 180px;
}
.rv-jac-matrix .rv-jac-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.rv-jac-matrix .rv-jac-row {
  display: flex;
  gap: 0.75rem;
}
.rv-jac-matrix .rv-jac-cell {
  min-width: 3.5rem;
  text-align: right;
  color: #a5b4fc;
  transition: color 0.2s;
}
.rv-jac-matrix .rv-jac-cell.warn { color: #f87171; }

/* ── Condition number bar ──────────────────────────────────── */
.rv-cond-wrap {
  flex: 1;
  min-width: 120px;
}
.rv-cond-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}
.rv-cond-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}
.rv-cond-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
  background: #10b981;
}
.rv-cond-fill.medium { background: #f59e0b; }
.rv-cond-fill.high   { background: #ef4444; }
.rv-cond-value {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

/* ── DLS / toggle buttons row ──────────────────────────────── */
.rv-toggle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}
.rv-toggle-btn {
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(99, 102, 241, 0.3);
  background: rgba(99, 102, 241, 0.08);
  color: #a5b4fc;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.rv-toggle-btn:hover {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
}
.rv-toggle-btn.active {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(129, 140, 248, 0.6);
  color: #c7d2fe;
}

/* ── Split-screen sim/real (sim2real lesson) ──────────────── */
.rv-split-sim-real {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.rv-split-sim-real .rv-split-pane {
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}
.rv-split-pane-label {
  position: absolute;
  top: 0.35rem;
  left: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.1rem 0.4rem;
  border-radius: 0.25rem;
  z-index: 2;
}
.rv-split-pane-label.sim { background: rgba(34,211,238,0.2); color: #22d3ee; }
.rv-split-pane-label.real { background: rgba(251,191,36,0.2); color: #fbbf24; }
.rv-gap-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.5rem 0;
}
.rv-gap-fill {
  height: 100%;
  width: 80%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ef4444, #f59e0b 50%, #10b981);
  transition: width 0.3s;
}

/* ── Scenario cards (safety lesson) ──────────────────────── */
.rv-scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0;
}
.rv-scenario-card {
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  font-size: 0.82rem;
}
.rv-scenario-card:hover {
  border-color: rgba(251, 191, 36, 0.4);
  background: rgba(251, 191, 36, 0.06);
}
.rv-scenario-card.active {
  border-color: rgba(251, 191, 36, 0.5);
  background: rgba(251, 191, 36, 0.1);
}
.rv-scenario-card .rv-sc-icon {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

/* ── Force arrows overlay (force-control lesson) ──────────── */
.rv-force-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.5rem;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: #a5b4fc;
}
.rv-force-val { min-width: 4rem; }
.rv-force-val.danger { color: #f87171; }

/* ── Grounding overlay (vision lesson) ────────────────────── */
.rv-ground-canvas {
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: 0.75rem;
  background: #08080f;
  display: block;
  width: 100%;
}

/* ── Section headers for tier groups on hub ────────────────── */
.rv-tier-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  margin: 1.5rem auto 0.5rem;
  padding-left: 0.25rem;
  max-width: 900px;
}
.rv-tier-label:first-of-type { margin-top: 0; }
.rv-tier-label i { margin-right: 0.35rem; color: #fbbf24; }

/* ── Orientation indicator (3-DOF lesson) ──────────────────── */
.rv-orient-control {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}
.rv-orient-control label {
  font-size: 0.8rem;
  color: #94a3b8;
}

/* ── Step content fade-in animation ───────────────────────── */
@keyframes rvFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rv-fade-in {
  animation: rvFadeIn 0.28s ease-out;
}

/* ── Step dots navigation ─────────────────────────────────── */
.rv-step-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}
.rv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 191, 36, 0.3);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.rv-dot:hover {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.2);
  transform: scale(1.25);
}
.rv-dot.visited {
  background: rgba(251, 191, 36, 0.35);
  border-color: rgba(251, 191, 36, 0.5);
}
.rv-dot.active {
  background: #fbbf24;
  border-color: #fbbf24;
  box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
  transform: scale(1.3);
}

/* ── Keyboard shortcuts dialog ────────────────────────────── */
.rv-kb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem 1rem;
}
.rv-kb-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: #cbd5e1;
}
.rv-kb-row kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
  color: #e2e8f0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.rv-kb-hint {
  min-width: 2.2rem;
  text-align: center;
  font-size: 0.78rem;
}

/* ── Focus-visible for keyboard accessibility ─────────────── */
.rv-controls button:focus-visible,
.rv-dot:focus-visible,
.rv-card:focus-visible,
button.rv-term-link:focus-visible,
.rv-quiz-opt:focus-visible {
  outline: 2px solid #fbbf24;
  outline-offset: 2px;
}

/* ── Smooth hover lift for cards ──────────────────────────── */
.rv-card {
  will-change: transform;
}

/* ── Hub search/filter bar ────────────────────────────────── */
.rv-search-bar {
  max-width: 900px;
  margin: 0 auto 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.rv-search-input {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #e2e8f0;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.rv-search-input:focus {
  border-color: rgba(251, 191, 36, 0.5);
}
.rv-search-input::placeholder {
  color: #475569;
}
.rv-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.rv-search-wrap i {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #475569;
  font-size: 0.82rem;
  pointer-events: none;
}
.rv-tier-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.rv-tier-btn {
  padding: 0.35rem 0.7rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.rv-tier-btn:hover {
  border-color: rgba(251, 191, 36, 0.4);
  color: #e2e8f0;
}
.rv-tier-btn.active {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.4);
  color: #fbbf24;
}

/* ── Resume CTA banner ────────────────────────────────────── */
.rv-resume-cta {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  animation: rvFadeIn 0.4s ease-out;
}
.rv-resume-cta i { color: #fbbf24; font-size: 1.1rem; }
.rv-resume-cta span { color: #cbd5e1; font-size: 0.9rem; }
.rv-resume-cta a {
  margin-left: auto;
  padding: 0.4rem 1rem;
  border-radius: 0.4rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1410;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.rv-resume-cta a:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ── Print styles ─────────────────────────────────────────── */
@media print {
  body.rv-page {
    background: #fff !important;
    color: #1a1a1a !important;
  }
  .rv-controls, .rv-step-dots, .rv-progress-bar, .rv-tts-btn,
  .rv-kb-hint, .rv-speed-wrap, .rv-top, .rv-lesson-bar,
  .rv-next-lesson, .rv-search-bar, .rv-resume-cta,
  .rv-tier-filters, .discuss-aissocial-btn { display: none !important; }
  .rv-panel {
    border: 1px solid #ccc !important;
    background: #fff !important;
  }
  .rv-panel h1 {
    background: none !important;
    -webkit-text-fill-color: #1a1a1a !important;
    color: #1a1a1a !important;
  }
  .rv-step-body { color: #333 !important; }
  .rv-code {
    background: #f5f5f5 !important;
    border: 1px solid #ddd !important;
    color: #1a1a1a !important;
  }
  .rv-quiz-wrap {
    border: 1px solid #999 !important;
    background: #fafafa !important;
  }
  .rv-card {
    border: 1px solid #ccc !important;
    background: #fff !important;
    break-inside: avoid;
  }
  .rv-card h2 { color: #333 !important; }
  .rv-card p { color: #555 !important; }
}

/* ── Mobile polish ────────────────────────────────────────── */
@media (max-width: 600px) {
  .rv-step-dots {
    gap: 3px;
  }
  .rv-dot {
    width: 8px;
    height: 8px;
  }
  .rv-kb-grid {
    grid-template-columns: 1fr;
  }
  .rv-search-bar {
    flex-direction: column;
  }
  .rv-tier-filters {
    width: 100%;
    justify-content: center;
  }
}
