/* ============================================================
   Cucumber BDD Notes — 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;
  --header-height: 50px;
  --radius: 6px;
  --radius-sm: 4px;

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;

  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.5);
}

/* ── Light Mode Overrides ─────────────────────────────── */
.light {
  --bg:           #fafaf9;
  --surface:      #f4f4f5;
  --card:         #ffffff;
  --border:       #e4e4e7;
  --border-light: #d4d4d8;
  --text:         #09090b;
  --muted:        #52525b;
  --dim:          #a1a1aa;
  --shadow:       0 1px 3px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.08);
  --green-text:   #15803d;
  --amber-text:   #b45309;
  --coral-text:   #c2410c;
  --teal-text:    #0f766e;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ── Site Topbar ─────────────────────────────────────── */
.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: 200;
  flex-shrink: 0;
}

.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-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 8px;
  border-radius: var(--radius);
  transition: all .12s;
  flex-shrink: 0;
  margin-right: 8px;
  line-height: 1;
  font-family: var(--font);
}
.topbar-theme-toggle:hover { color: var(--text); border-color: var(--border-light); }

.topbar-request {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent3);
  text-decoration: none;
  border: 1px solid rgba(99,102,241,.35);
  padding: 3px 10px;
  border-radius: var(--radius);
  transition: all .12s;
  flex-shrink: 0;
  white-space: nowrap;
}
.topbar-request:hover { background: rgba(99,102,241,.12); border-color: var(--accent); color: var(--text); }

/* Icon swap */
.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);
  overflow: hidden;
}

/* ── Sidebar ──────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.sidebar-badge {
  display: inline-block;
  background: rgba(99,102,241,.15);
  color: var(--accent3);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

.sidebar-subtitle { font-size: 11px; color: var(--dim); margin-top: 2px; }

#toc-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 8px;
}

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

/* TOC items */
.toc-item { margin-bottom: 1px; }

a.toc-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all .12s ease;
  color: var(--muted);
  font-size: 13px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-right: 6px;
  text-decoration: none;
}

a.toc-header:hover { color: var(--text); background: rgba(255,255,255,.04); }
.light a.toc-header:hover { background: rgba(0,0,0,.04); }

a.toc-header.active {
  color: var(--accent3);
  border-left-color: var(--accent);
  background: rgba(99,102,241,.08);
}

.toc-icon { width: 16px; text-align: center; font-size: 12px; flex-shrink: 0; }
.toc-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toc-chevron { font-size: 9px; color: var(--dim); transition: transform .12s ease; flex-shrink: 0; }
.toc-item.open .toc-chevron { transform: rotate(90deg); }

.toc-subs { display: none; }
.toc-item.open .toc-subs { display: block; }

a.toc-sub {
  display: flex;
  align-items: center;
  padding: 4px 12px 4px 34px;
  color: var(--dim);
  font-size: 12px;
  transition: all .12s ease;
  border-left: 2px solid transparent;
  margin-right: 6px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  text-decoration: none;
}

a.toc-sub::before {
  content: '';
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--border-light);
  margin-right: 8px;
  flex-shrink: 0;
  transition: background .12s;
}

a.toc-sub:hover { color: var(--muted); background: rgba(255,255,255,.02); }
.light a.toc-sub:hover { background: rgba(0,0,0,.02); }
a.toc-sub:hover::before { background: var(--accent); }
a.toc-sub.active { color: var(--accent2); border-left-color: var(--accent); }
a.toc-sub.active::before { background: var(--accent); }

.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;
}

/* ── Main Content ─────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 8px;
  flex-shrink: 0;
  background: var(--surface);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--dim);
}

.bc-active { color: var(--text); font-weight: 500; }

.content-wrap {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: flex-start;
}

.content-wrap::-webkit-scrollbar { width: 5px; }
.content-wrap::-webkit-scrollbar-track { background: transparent; }
.content-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

#content-area {
  padding: 32px 48px 64px;
  max-width: 960px;
  width: 100%;
}

/* ── Difficulty Badges ────────────────────────────────── */
.difficulty-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin: 6px 0 20px;
}

.difficulty-badge.beginner     { background: rgba(34,197,94,.12);   color: var(--green);  border: 1px solid rgba(34,197,94,.2);   }
.difficulty-badge.intermediate { background: rgba(245,158,11,.12);  color: var(--amber);  border: 1px solid rgba(245,158,11,.2);  }
.difficulty-badge.advanced     { background: rgba(249,115,22,.12);  color: var(--coral);  border: 1px solid rgba(249,115,22,.2);  }
.difficulty-badge.expert       { background: rgba(236,72,153,.12);  color: var(--pink);   border: 1px solid rgba(236,72,153,.2);  }

/* ── Typography ───────────────────────────────────────── */
.content-container { }

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

.page-desc {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 680px;
  line-height: 1.65;
}

h2 { font-size: 18px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; margin: 36px 0 14px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
h2:first-of-type { margin-top: 0; }
h3 { font-size: 15px; font-weight: 600; color: var(--text); margin: 22px 0 9px; }
h4 { font-size: 11px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.07em; margin: 18px 0 7px; }

p { color: var(--muted); margin-bottom: 12px; line-height: 1.72; font-size: 14px; }
p:last-child { margin-bottom: 0; }

strong { color: var(--text); font-weight: 600; }
em { color: var(--accent3); font-style: italic; }

ul, ol { padding-left: 22px; color: var(--muted); margin: 8px 0 14px; line-height: 1.75; }
li { margin-bottom: 4px; font-size: 14px; }
li::marker { color: var(--border-light); }

a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent3); text-decoration: underline; }

hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

/* ── Tabs ─────────────────────────────────────────────── */
.tabs-wrapper { margin: 20px 0; }

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  gap: 0;
}
.tab-nav::-webkit-scrollbar { height: 0; }

.tab-btn {
  padding: 7px 16px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  transition: all .12s ease;
  white-space: nowrap;
  font-family: var(--font);
  margin-bottom: -1px;
  user-select: none;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent3); border-bottom-color: var(--accent); }

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

/* ── Code ─────────────────────────────────────────────── */
.code-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 14px 0;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.code-label { font-size: 12px; color: var(--dim); }
.code-lang { font-size: 10px; font-weight: 600; background: var(--border); color: var(--muted); padding: 2px 7px; border-radius: 3px; letter-spacing: 0.03em; }

.code-block pre { padding: 16px; overflow-x: auto; margin: 0; }
.code-block code { font-family: var(--font-mono); font-size: 13px; color: var(--text); line-height: 1.65; white-space: pre; }

p code, li code, td code, span code {
  background: rgba(99,102,241,.1);
  border: 1px solid rgba(99,102,241,.15);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent3);
}

/* Syntax coloring */
.kw  { color: #818cf8; font-weight: 600; }
.str { color: #86efac; }
.cmt { color: #4a4a5a; font-style: italic; }
.cls { color: #f9a8d4; }
.fn  { color: #67e8f9; }
.num { color: #fda4af; }
.ann { color: #fbbf24; }
.op  { color: #a1a1aa; }
.type{ color: #c4b5fd; }
.gherkin-kw  { color: #a5b4fc; font-weight: 700; }
.gherkin-str { color: #86efac; }
.gherkin-tag { color: #fbbf24; }
.gherkin-cmt { color: #4a4a5a; font-style: italic; }
.gherkin-param { color: #fda4af; }

/* ── Callouts ─────────────────────────────────────────── */
.callout {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 14px 0;
  border-left: 3px solid;
  display: flex;
  gap: 10px;
}
.callout-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; line-height: 1.7; }
.callout-inner { flex: 1; }
.callout-title { font-size: 12px; font-weight: 700; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.callout-body  { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.callout-body code { background: rgba(255,255,255,.05); padding: 1px 5px; border-radius: 3px; font-size: 12px; color: var(--text); font-family: var(--font-mono); border: 1px solid var(--border); }

.callout.info    { background: rgba(99,102,241,.07); border-color: var(--accent); }
.callout.info    .callout-title { color: var(--accent3); }
.callout.warn    { background: rgba(245,158,11,.07); border-color: var(--amber); }
.callout.warn    .callout-title { color: var(--amber); }
.callout.danger  { background: rgba(249,115,22,.07); border-color: var(--coral); }
.callout.danger  .callout-title { color: var(--coral); }
.callout.success { background: rgba(34,197,94,.07);  border-color: var(--green); }
.callout.success .callout-title { color: var(--green); }
.callout.tip     { background: rgba(20,184,166,.07); border-color: var(--teal); }
.callout.tip     .callout-title { color: var(--teal); }

/* ── Insight Box ──────────────────────────────────────── */
.insight {
  background: rgba(20,184,166,.06);
  border: 1px solid rgba(20,184,166,.25);
  border-radius: var(--radius);
  padding: 13px 15px;
  margin: 16px 0;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.insight-icon { color: var(--teal); font-size: 15px; flex-shrink: 0; }
.insight-text { font-size: 13px; color: var(--muted); font-style: italic; margin: 0; line-height: 1.6; }
.insight-text strong { color: var(--teal); }

/* ── Mental Model ─────────────────────────────────────── */
.mental-model {
  background: rgba(99,102,241,.06);
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 14px 0;
}
.mental-model-label {
  font-size: 10px; font-weight: 700;
  color: var(--accent2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.mental-model p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.65; }

/* ── Tables ───────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 14px 0;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

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

thead th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 9px 13px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 9px 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.55;
}

tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
.light tr:hover td { background: rgba(0,0,0,.02); }
td strong { color: var(--text); }
tr.highlight td { background: rgba(99,102,241,.05); }
tr.good td { background: rgba(34,197,94,.04); }
tr.bad  td { background: rgba(249,115,22,.04); }

/* ── Cards & Stats ────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}
.card-title { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.stat-label { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 5px; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; }
.stat-note  { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Badges ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.b-accent { background: rgba(99,102,241,.15); color: var(--accent3); }
.b-green  { background: rgba(34,197,94,.12);  color: var(--green);   }
.b-amber  { background: rgba(245,158,11,.12); color: var(--amber);   }
.b-coral  { background: rgba(249,115,22,.12); color: var(--coral);   }
.b-teal   { background: rgba(20,184,166,.12); color: var(--teal);    }
.b-pink   { background: rgba(236,72,153,.12); color: var(--pink);    }
.b-dim    { background: var(--surface); color: var(--dim); border: 1px solid var(--border); }

/* ── Collapsibles ─────────────────────────────────────── */
.collapse { border: 1px solid var(--border); border-radius: var(--radius); margin: 10px 0; overflow: hidden; }
.collapse-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 15px; cursor: pointer;
  background: var(--surface); transition: background .12s ease; user-select: none;
}
.collapse-header:hover { background: var(--card); }
.collapse-title { font-size: 13px; font-weight: 600; color: var(--text); }
.collapse-icon  { color: var(--dim); font-size: 10px; transition: transform .12s ease; }
.collapse.open .collapse-icon { transform: rotate(90deg); }
.collapse-body  { display: none; padding: 16px; border-top: 1px solid var(--border); background: var(--card); }
.collapse.open .collapse-body { display: block; }

/* ── Diagram ──────────────────────────────────────────── */
.diagram {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 14px 0;
  overflow-x: auto;
}
.diagram-label {
  font-size: 10px; color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.07em;
  margin-bottom: 12px; font-weight: 600;
}
.diagram pre {
  background: none; border: none; padding: 0; margin: 0;
  color: var(--muted); font-family: var(--font-mono);
  font-size: 12.5px; line-height: 1.55; white-space: pre;
}

/* ── Steps ────────────────────────────────────────────── */
.steps { margin: 16px 0; }
.step { display: flex; gap: 14px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(99,102,241,.15); color: var(--accent3);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.step-content h4 { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; text-transform: none; letter-spacing: normal; }
.step-content p  { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }

/* ── Compare Grid ─────────────────────────────────────── */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.cmp-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.cmp-card.good    { border-top: 2px solid var(--green); }
.cmp-card.bad     { border-top: 2px solid var(--coral); }
.cmp-card.neutral { border-top: 2px solid var(--accent); }
.cmp-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.cmp-card.good    .cmp-label { color: var(--green); }
.cmp-card.bad     .cmp-label { color: var(--coral); }
.cmp-card.neutral .cmp-label { color: var(--accent3); }
.cmp-card ul { margin: 0; padding-left: 16px; }
.cmp-card li { font-size: 13px; color: var(--muted); margin-bottom: 5px; }

/* ── Interview Questions ──────────────────────────────── */
.interview-section { margin: 36px 0 0; border-top: 1px solid var(--border); padding-top: 24px; padding-bottom: 16px; }
.interview-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.interview-header h2 { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; margin: 0; border: none; padding: 0; }
.interview-badge { font-size: 10px; font-weight: 700; color: var(--amber); background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.2); padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap; }

.interview-q { border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0; overflow: hidden; }
.interview-q .collapse-header { background: var(--surface); }
.interview-q .collapse-header:hover { background: rgba(245,158,11,.05); }
.interview-q.open .collapse-header { border-bottom: 1px solid var(--border); background: rgba(245,158,11,.04); }
.interview-q .collapse-title { color: var(--muted); font-size: 13px; font-weight: 500; }
.interview-q.open .collapse-title { color: var(--text); }

.interview-answer { padding: 16px; background: var(--card); font-size: 13px; color: var(--muted); line-height: 1.72; }
.interview-answer p { margin-bottom: 10px; font-size: 13px; }
.interview-answer p:last-child { margin-bottom: 0; }
.interview-answer ul, .interview-answer ol { margin: 6px 0 10px; padding-left: 20px; }
.interview-answer li { font-size: 13px; margin-bottom: 4px; }
.interview-answer strong { color: var(--text); }
.interview-answer code { background: rgba(99,102,241,.1); border: 1px solid rgba(99,102,241,.15); border-radius: 3px; padding: 1px 5px; font-size: 11.5px; font-family: var(--font-mono); color: var(--accent3); }

/* ── Quiz ─────────────────────────────────────────────── */
.quiz-section { margin: 24px 0; }
.quiz-section-header { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.quiz-section-header h2 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0; border: none; padding: 0; }
.quiz-badge { font-size: 10px; font-weight: 700; color: var(--teal); background: rgba(20,184,166,.12); border: 1px solid rgba(20,184,166,.2); padding: 2px 8px; border-radius: 10px; text-transform: uppercase; letter-spacing: 0.06em; }

.quiz-question { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin: 12px 0; }
.quiz-q { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.quiz-options { display: flex; flex-direction: column; gap: 6px; }
.quiz-opt {
  padding: 8px 13px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer; text-align: left;
  font-size: 13px; color: var(--muted); font-family: var(--font);
  transition: all .12s ease;
}
.quiz-opt:hover { border-color: var(--accent2); color: var(--text); background: rgba(99,102,241,.06); }
.quiz-opt.correct { background: rgba(34,197,94,.1); border-color: var(--green); color: var(--green); }
.quiz-opt.wrong   { background: rgba(249,115,22,.1); border-color: var(--coral); color: var(--coral); }
.quiz-question.answered .quiz-opt { cursor: default; pointer-events: none; }
.quiz-explain { display: none; margin-top: 12px; padding: 10px 12px; background: rgba(20,184,166,.07); border: 1px solid rgba(20,184,166,.2); border-radius: var(--radius-sm); font-size: 13px; color: var(--muted); line-height: 1.6; }
.quiz-question.answered .quiz-explain { display: block; }

/* ── Subtopic Nav ─────────────────────────────────────── */
.subtopic-nav { margin-top: 36px; padding: 14px 0 10px; border-top: 1px solid var(--border); }
.subtopic-nav-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.subtopic-nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.subtopic-nav-link { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); text-decoration: none; transition: color .15s, border-color .15s; cursor: pointer; }
.subtopic-nav-link:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.subtopic-nav-link.active { color: var(--accent); border-color: var(--accent); background: rgba(99,102,241,.07); font-weight: 500; pointer-events: none; }

.topic-nav-footer { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 8px; }
.topic-nav-prev, .topic-nav-next { font-size: 13px; color: var(--accent2); text-decoration: none; transition: color .15s; }
.topic-nav-prev:hover, .topic-nav-next:hover { color: var(--accent); }
.topic-nav-next { margin-left: auto; }

/* ── Pill ─────────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; border: 1px solid var(--border); background: var(--card); color: var(--muted); margin: 2px; }

/* ── Var labels ───────────────────────────────────────── */
.var-label { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 8px; border-radius: 3px; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 6px; margin-top: 4px; }
.var-good      { background: rgba(34,197,94,.15);  color: var(--green);   }
.var-avoid     { background: rgba(249,115,22,.15); color: var(--coral);   }
.var-alt       { background: rgba(99,102,241,.15); color: var(--accent3); }
.var-preferred { background: rgba(20,184,166,.15); color: var(--teal);    }
.var-warn      { background: rgba(245,158,11,.15); color: var(--amber);   }

/* ── Utilities ────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0  { margin-bottom: 0 !important; }
.mb-8  { margin-bottom: 8px; }
.text-muted  { color: var(--muted); }
.text-dim    { color: var(--dim); }
.text-accent { color: var(--accent3); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-coral  { color: var(--coral); }
.text-teal   { color: var(--teal); }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }

[id] { scroll-margin-top: 16px; }

/* ── Light Mode: keep code blocks dark ───────────────── */
.light .code-block              { background: #18181b; border-color: #27272a; }
.light .code-block .code-header { background: #111113; border-color: #27272a; }
.light .code-block .code-label  { color: #71717a; }
.light .code-block .code-lang   { background: #27272a; color: #a1a1aa; }
.light .code-block code         { color: #fafafa; }
.light .diagram                 { background: #18181b; border-color: #27272a; }
.light .diagram .diagram-label  { color: #71717a; }
.light .diagram pre             { color: #a1a1aa; }
.light .callout-body code       { background: rgba(0,0,0,.06); color: #09090b; border-color: #d4d4d8; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-width: 240px; }
  #content-area { padding: 20px 20px 48px; }
  .compare-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .sidebar { display: none; }
  .card-grid { grid-template-columns: 1fr; }
}

/* ── Landing Page — Hero ──────────────────────────────── */
.notes-hero {
  text-align: center;
  padding: 32px 0 24px;
}
.notes-hero__icon { font-size: 40px; margin-bottom: 12px; }
.notes-hero__title {
  font-size: 28px; font-weight: 800;
  color: var(--text); letter-spacing: -0.03em;
  margin-bottom: 10px; line-height: 1.2;
}
.notes-hero__desc {
  font-size: 14px; color: var(--muted);
  max-width: 600px; margin: 0 auto 16px;
  line-height: 1.65;
}
.notes-hero__tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center;
}

/* ── Landing Page — Topic Grid ────────────────────────── */
.notes-topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
  margin: 16px 0 32px;
}

.notes-topic-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  transition: border-color .12s, box-shadow .12s;
}
.notes-topic-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(99,102,241,.15);
  text-decoration: none;
}
.notes-topic-card__icon { font-size: 20px; }
.notes-topic-card__title {
  font-size: 13px; font-weight: 600;
  color: var(--text); line-height: 1.4;
}
.notes-topic-card__count {
  font-size: 11px; color: var(--dim);
}
