/* ================================================================
   Prompt Engineering Notes — Modern Enterprise Dark Theme
   Inspired by Linear, Vercel, GitHub Dark, Radix UI
   ================================================================ */

:root {
  --bg: #09090b;
  --surface: #111113;
  --card: #18181b;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --dim: #52525b;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent3: #a5b4fc;
  --green: #22c55e;
  --amber: #f59e0b;
  --coral: #f97316;
  --pink: #ec4899;
  --teal: #14b8a6;
  --sidebar-width: 272px;
  --topbar-height: 40px;
}

.light {
  --bg:           #fafaf9;
  --surface:      #f4f4f5;
  --card:         #ffffff;
  --border:       #e4e4e7;
  --border-light: #d4d4d8;
  --text:         #09090b;
  --muted:        #52525b;
  --dim:          #a1a1aa;
  --green-text:   #15803d;
  --amber-text:   #b45309;
  --teal-text:    #0f766e;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ── Site Top Navigation ─────────────────────────────── */
.site-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 300;
}

.topbar-inner {
  display: flex;
  align-items: center;
  padding: 0 16px;
  width: 100%;
  height: 100%;
  gap: 0;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 16px;
}

.topbar-logo-mark {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.topbar-logo-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.topbar-bc-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: color .12s;
}
.topbar-bc-link:hover { color: var(--text); }

.topbar-bc-sep { font-size: 12px; color: var(--dim); }
.topbar-bc-current { font-size: 12px; color: var(--accent3); font-weight: 500; }

.topbar-request {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent3);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid rgba(99,102,241,0.3);
  border-radius: 5px;
  margin-left: 12px;
  transition: background .12s, border-color .12s;
  flex-shrink: 0;
}
.topbar-request:hover { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.5); }

.topbar-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 8px;
  margin-left: auto;
  transition: border-color .12s, color .12s;
}
.topbar-theme-toggle:hover { color: var(--text); border-color: var(--border-light); }

.icon-light { display: none; }
.icon-dark  { display: inline; }
.light .icon-dark  { display: none; }
.light .icon-light { display: inline; }

/* ── Layout ──────────────────────────────────────────── */
.app-layout {
  display: flex;
  height: calc(100vh - var(--topbar-height));
  margin-top: var(--topbar-height);
}

/* ── Sidebar ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  height: calc(100vh - var(--topbar-height));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }

#toc-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 0 8px;
}
#toc-nav::-webkit-scrollbar { width: 3px; }
#toc-nav::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
#toc-nav::-webkit-scrollbar-track { background: transparent; }

.sidebar-label {
  padding: 10px 14px 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* TOC Items */
.toc-item { position: relative; }

/* Sidebar links — reset <a> defaults so styled divs and <a> tags look identical */
a.toc-header, a.toc-sub { text-decoration: none; color: inherit; display: flex; }

.toc-header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.12s ease;
  user-select: none;
  border-left: 2px solid transparent;
}
.toc-header:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.toc-header.active { color: var(--text); border-left-color: var(--accent); background: rgba(99,102,241,0.08); }

.toc-icon { font-size: 12px; flex-shrink: 0; }
.toc-label { flex: 1; }

.toc-chevron {
  font-size: 9px;
  color: var(--dim);
  transition: transform 0.12s ease;
  flex-shrink: 0;
}
.toc-item.open .toc-chevron { transform: rotate(90deg); }

.toc-subs { display: none; padding: 1px 0 4px; }
.toc-item.open .toc-subs { display: block; }

.toc-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px 5px 36px;
  cursor: pointer;
  color: var(--dim);
  font-size: 12px;
  transition: all 0.12s ease;
  border-left: 2px solid transparent;
}
.toc-sub:hover { color: var(--muted); background: rgba(255,255,255,0.02); }
.toc-sub.active { color: var(--accent3); border-left-color: var(--accent); background: rgba(99,102,241,0.06); }
.toc-sub::before { content: '·'; color: var(--dim); font-size: 18px; line-height: 1; flex-shrink: 0; }
.toc-sub.active::before { color: var(--accent); }

/* ── Main Content ────────────────────────────────────── */
.main-content {
  flex: 1;
  height: calc(100vh - var(--topbar-height));
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 48px;
}
.main-content::-webkit-scrollbar { width: 5px; }
.main-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.main-content::-webkit-scrollbar-track { background: transparent; }

.main-header { padding: 16px 48px 0; max-width: 960px; margin: 0 auto; }

.breadcrumb {
  font-size: 12px;
  color: var(--dim);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.breadcrumb .bc-active { color: var(--muted); }

.content-container { max-width: 960px; margin: 0 auto; padding: 24px 48px 0; }

.page-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.page-subtitle {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 720px;
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 40px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-icon { font-size: 15px; }

.subsection-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}

.body-text {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 14px;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; display: flex; align-items: center; gap: 7px; }
.card-desc { font-size: 13px; color: var(--muted); line-height: 1.7; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.card-3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }

/* ── Stat Cards ──────────────────────────────────────── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.stat-label { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-desc { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ── Callouts ─────────────────────────────────────────── */
.callout { display: flex; gap: 11px; padding: 13px 15px; border-radius: 7px; margin: 14px 0; font-size: 13px; line-height: 1.65; }
.callout-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.callout-body { flex: 1; }
.callout-title { font-weight: 600; margin-bottom: 3px; font-size: 13px; }

.callout.info    { background: rgba(99,102,241,0.07);  border: 1px solid rgba(99,102,241,0.18);  color: #c7d2fe; }
.callout.info    .callout-title { color: var(--accent2); }
.callout.warning { background: rgba(245,158,11,0.07);  border: 1px solid rgba(245,158,11,0.2);   color: #fde68a; }
.callout.warning .callout-title { color: var(--amber); }
.callout.tip     { background: rgba(34,197,94,0.07);   border: 1px solid rgba(34,197,94,0.18);   color: #bbf7d0; }
.callout.tip     .callout-title { color: var(--green); }
.callout.danger  { background: rgba(249,115,22,0.07);  border: 1px solid rgba(249,115,22,0.18);  color: #fed7aa; }
.callout.danger  .callout-title { color: var(--coral); }
.callout.exam    { background: rgba(236,72,153,0.07);  border: 1px solid rgba(236,72,153,0.18);  color: #fce7f3; }
.callout.exam    .callout-title { color: var(--pink); }

/* ── Difficulty badge strip ──────────────────────────── */
.difficulty-strip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 0.03em;
}
.difficulty-strip.beginner  { background: rgba(34,197,94,0.08);   border: 1px solid rgba(34,197,94,0.2);   color: #86efac; }
.difficulty-strip.intermediate { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2); color: var(--accent3); }
.difficulty-strip.advanced  { background: rgba(245,158,11,0.08);  border: 1px solid rgba(245,158,11,0.2);  color: #fde68a; }
.difficulty-strip.expert    { background: rgba(249,115,22,0.08);  border: 1px solid rgba(249,115,22,0.2);  color: #fed7aa; }

/* ── Badges ──────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.badge-accent { background: rgba(99,102,241,0.14);  color: var(--accent3);  border: 1px solid rgba(99,102,241,0.22); }
.badge-green  { background: rgba(34,197,94,0.1);    color: #86efac;         border: 1px solid rgba(34,197,94,0.2); }
.badge-amber  { background: rgba(245,158,11,0.1);   color: #fde68a;         border: 1px solid rgba(245,158,11,0.2); }
.badge-coral  { background: rgba(249,115,22,0.1);   color: #fed7aa;         border: 1px solid rgba(249,115,22,0.2); }
.badge-teal   { background: rgba(20,184,166,0.1);   color: #99f6e4;         border: 1px solid rgba(20,184,166,0.2); }
.badge-pink   { background: rgba(236,72,153,0.1);   color: #f9a8d4;         border: 1px solid rgba(236,72,153,0.2); }
.badge-dim    { background: rgba(82,82,91,0.18);     color: var(--muted);    border: 1px solid var(--border); }

/* ── Tables ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13px; }
.data-table th { text-align: left; padding: 9px 13px; background: rgba(255,255,255,0.025); color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--border); }
.data-table td { padding: 9px 13px; color: var(--muted); border-bottom: 1px solid rgba(39,39,42,0.5); vertical-align: top; line-height: 1.6; }
.data-table tr:hover td { background: rgba(255,255,255,0.015); }
.data-table td:first-child { color: var(--text); font-weight: 500; }

/* ── Code ────────────────────────────────────────────── */
code { font-family: 'Cascadia Code', 'Consolas', 'SF Mono', 'Fira Code', monospace; font-size: 12px; background: rgba(255,255,255,0.06); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; color: var(--accent3); }

pre { background: #0c0c0e; border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; overflow-x: auto; margin: 14px 0; }
pre code { background: none; border: none; padding: 0; font-size: 12.5px; color: #e2e8f0; line-height: 1.75; }

.hl-keyword  { color: #c792ea; }
.hl-string   { color: #c3e88d; }
.hl-comment  { color: #546e7a; font-style: italic; }
.hl-number   { color: #f78c6c; }
.hl-fn       { color: #82aaff; }
.hl-type     { color: #ffcb6b; }

/* ── Prompt Block ─────────────────────────────────────── */
.prompt-block {
  background: #0d0f1a;
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 8px;
  margin: 14px 0;
  overflow: hidden;
}
.prompt-block-header {
  background: rgba(99,102,241,0.08);
  border-bottom: 1px solid rgba(99,102,241,0.2);
  padding: 7px 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 7px;
}
.prompt-block pre {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 16px 20px;
}
.prompt-block pre code { color: #e2e8f0; font-size: 12.5px; }

/* ── Response Block ──────────────────────────────────── */
.response-block {
  background: #0c1208;
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: 8px;
  margin: 8px 0 14px;
  overflow: hidden;
}
.response-block-header {
  background: rgba(34,197,94,0.06);
  border-bottom: 1px solid rgba(34,197,94,0.15);
  padding: 7px 14px;
  font-size: 10px;
  font-weight: 700;
  color: #86efac;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.response-block pre {
  background: transparent;
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 16px 20px;
}
.response-block pre code { color: #d1fae5; font-size: 12.5px; }

/* ── Comparison Table ─────────────────────────────────── */
.comparison-pair { margin: 18px 0; }
.comparison-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }

/* ── Flow Diagrams ───────────────────────────────────── */
.arch-diagram { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 22px 24px; margin: 18px 0; overflow-x: auto; }
.arch-title { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 18px; }

.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.flow-node { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 7px 13px; font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap; }
.flow-node.accent { border-color: rgba(99,102,241,0.5);  color: var(--accent3);  background: rgba(99,102,241,0.08); }
.flow-node.green  { border-color: rgba(34,197,94,0.4);   color: #86efac;         background: rgba(34,197,94,0.07); }
.flow-node.amber  { border-color: rgba(245,158,11,0.4);  color: #fde68a;         background: rgba(245,158,11,0.07); }
.flow-node.coral  { border-color: rgba(249,115,22,0.4);  color: #fed7aa;         background: rgba(249,115,22,0.07); }
.flow-node.teal   { border-color: rgba(20,184,166,0.4);  color: #99f6e4;         background: rgba(20,184,166,0.07); }
.flow-node.pink   { border-color: rgba(236,72,153,0.4);  color: #f9a8d4;         background: rgba(236,72,153,0.07); }
.flow-arrow { color: var(--dim); font-size: 16px; line-height: 1; }

/* ── Tabs ─────────────────────────────────────────────── */
.tabs-wrap { margin: 18px 0; }
.tabs-nav { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-btn { padding: 8px 16px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--muted); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all 0.12s ease; margin-bottom: -1px; font-family: inherit; }
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Expandable ──────────────────────────────────────── */
.expand-block { border: 1px solid var(--border); border-radius: 7px; margin-bottom: 8px; overflow: hidden; }
.expand-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; cursor: pointer; background: var(--card); transition: background 0.12s ease; }
.expand-head:hover { background: rgba(255,255,255,0.03); }
.expand-head-title { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; }
.expand-chevron { color: var(--dim); font-size: 10px; transition: transform 0.12s ease; }
.expand-block.open .expand-chevron { transform: rotate(90deg); }
.expand-body { display: none; padding: 15px 16px; background: var(--surface); border-top: 1px solid var(--border); }
.expand-block.open .expand-body { display: block; }

/* ── Lists ────────────────────────────────────────────── */
.feat-list { list-style: none; padding: 0; margin: 10px 0; }
.feat-list li { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.feat-list li::before { content: '▸'; color: var(--accent); font-size: 10px; flex-shrink: 0; margin-top: 4px; }

.check-list { list-style: none; padding: 0; margin: 10px 0; }
.check-list li { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.check-list li::before { content: '✓'; color: var(--green); font-size: 11px; flex-shrink: 0; margin-top: 2px; }

.warn-list { list-style: none; padding: 0; margin: 10px 0; }
.warn-list li { display: flex; align-items: flex-start; gap: 7px; padding: 4px 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.warn-list li::before { content: '✗'; color: var(--coral); font-size: 11px; flex-shrink: 0; margin-top: 2px; }

/* ── Timeline ─────────────────────────────────────────── */
.timeline { position: relative; padding-left: 22px; margin: 14px 0; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 1px; background: var(--border); }
.tl-item { position: relative; margin-bottom: 18px; }
.tl-item::before { content: ''; position: absolute; left: -18px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.tl-item.green::before { background: var(--green); }
.tl-item.amber::before { background: var(--amber); }
.tl-item.coral::before { background: var(--coral); }
.tl-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.tl-desc  { font-size: 12.5px; color: var(--muted); line-height: 1.65; }

/* ── Compare bars ─────────────────────────────────────── */
.cmp-bar { margin: 8px 0; }
.cmp-bar-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.cmp-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.cmp-fill { height: 100%; border-radius: 3px; width: 0; transition: width 0.5s ease; }

/* ── KV list ──────────────────────────────────────────── */
.kv-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; margin: 12px 0; align-items: baseline; }
.kv-k { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.kv-v { font-size: 13px; color: var(--text); }

/* ── Divider ──────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 28px 0; }

/* ── Tag row ──────────────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0; }

/* ── Loading ──────────────────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; height: 200px; color: var(--dim); font-size: 13px; }

/* ── Nav links inside content ──────────────────────────── */
.nav-link-inline { color: var(--accent2); cursor: pointer; font-size: 13px; text-decoration: none; }
.nav-link-inline:hover { color: var(--accent3); }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) { .card-3col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 900px) {
  .card-2col, .card-3col { grid-template-columns: 1fr; }
  .content-container { padding: 20px 20px 0; }
  .main-header { padding: 14px 20px 0; }
  .sidebar { width: 240px; }
}

/* ── Light mode overrides ────────────────────────────── */
.toc-header:hover        { background: rgba(255,255,255,0.03); }
.light .toc-header:hover { background: rgba(0,0,0,0.04); }
.toc-sub:hover        { background: rgba(255,255,255,0.02); }
.light .toc-sub:hover { background: rgba(0,0,0,0.02); }
.data-table tr:hover td        { background: rgba(255,255,255,0.015); }
.light .data-table tr:hover td { background: rgba(0,0,0,0.02); }
.expand-head:hover        { background: rgba(255,255,255,0.03); }
.light .expand-head:hover { background: rgba(0,0,0,0.03); }
.light pre             { background: #18181b; border-color: #27272a; }
.light pre code        { color: #e2e8f0; }
.light .arch-diagram   { background: #18181b; border-color: #27272a; }
.light code            { background: rgba(0,0,0,0.06); border-color: #d4d4d8; color: var(--accent); }
.light .prompt-block   { background: #111827; border-color: rgba(99,102,241,0.3); }
.light .response-block { background: #052e16; border-color: rgba(34,197,94,0.3); }

/* ── Sidebar Progress Bar ────────────────────────────── */
.sidebar-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 5px;
}

.progress-bar {
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width .4s ease;
}

/* ── Quiz Component ──────────────────────────────────── */
.quiz-block { display: flex; flex-direction: column; gap: 16px; margin-bottom: 8px; }
.quiz-question { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; }
.quiz-q { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 14px; line-height: 1.5; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-opt {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 14px; text-align: left; cursor: pointer; font-size: 13px;
  color: var(--text); transition: background 0.12s, border-color 0.12s;
  font-family: inherit; width: 100%;
}
.quiz-opt:hover:not([disabled]):not(.correct):not(.wrong) { background: var(--card); border-color: var(--accent); }
.quiz-opt.correct { background: rgba(34,197,94,0.12); border-color: #22c55e; color: #22c55e; }
.quiz-opt.wrong { background: rgba(239,68,68,0.12); border-color: #ef4444; color: #ef4444; }
.quiz-question.answered .quiz-opt { cursor: default; pointer-events: none; }
.quiz-explain {
  margin-top: 12px; padding: 10px 14px;
  background: rgba(99,102,241,0.08); border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0; font-size: 13px; color: var(--dim);
  line-height: 1.6; display: none;
}
.quiz-question.answered .quiz-explain { display: block; }
