/* ============================================================
   REST Assured 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: 268px;
  --header-height: 50px;
  --topbar-height: 40px;
  --radius: 6px;
  --radius-sm: 4px;

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

/* ── 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;
  --teal-text:    #0f766e;
}

/* ── Site Top Navigation Bar ────────────────────────────── */
.site-topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 100;
}

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

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

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

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

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0; margin: 0;
  gap: 0;
}

.breadcrumb li { display: flex; align-items: center; }

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

/* ── Layout ─────────────────────────────────────────────── */
.app-layout { display: flex; height: calc(100vh - 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;
}

.sidebar-search-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.sidebar-search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 9px;
}

.sidebar-search .s-icon { color: var(--dim); font-size: 11px; flex-shrink: 0; }

.sidebar-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
}

.sidebar-search input::placeholder { color: var(--dim); }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 12px;
}

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

.nav-section { margin-bottom: 1px; }

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

.nav-item:hover { color: var(--text); background: rgba(255,255,255,.04); }
.light .nav-item:hover { background: rgba(0,0,0,.04); }

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

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

.nav-subitems { display: none; }
.nav-section.open .nav-subitems { display: block; }

.nav-subitem {
  display: flex;
  align-items: center;
  padding: 4px 12px 4px 34px;
  cursor: pointer;
  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;
  user-select: none;
  text-decoration: none;
}

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

.nav-subitem:hover { color: var(--muted); background: rgba(255,255,255,.02); }
.light .nav-subitem:hover { background: rgba(0,0,0,.02); }
.nav-subitem:hover::before { background: var(--accent); }
.nav-subitem.active { color: var(--accent2); border-left-color: var(--accent); }
.nav-subitem.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 Area ───────────────────────────────────────────── */
.main { 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 28px;
  gap: 8px;
  flex-shrink: 0;
  background: var(--surface);
}

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.bc-item { color: var(--dim); }
.bc-item.current { color: var(--text); font-weight: 500; }
.bc-sep { color: var(--border-light); font-size: 11px; }

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

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

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

/* ── Typography ──────────────────────────────────────────── */
.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.sec {
  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.sec:first-of-type { margin-top: 0; }

h3.sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 22px 0 9px;
}

h4.lbl {
  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); }

ul.compact li { margin-bottom: 2px; font-size: 13px; }

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

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { margin: 20px 0; }
.tabs-wrap { 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; }
.tab-pane { display: none; }
.tab-pane.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 {
  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; }

/* ── 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); }
.callout.pink { background: rgba(236,72,153,.07); border-color: var(--pink); }
.callout.pink .callout-title { color: var(--pink); }

/* ── Core Insight ─────────────────────────────────────────── */
.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 ────────────────────────────────────────────────── */
.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 / ASCII ──────────────────────────────────────── */
.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; }
.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; }
.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); }

/* ── Misc Utilities ───────────────────────────────────────── */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; }
.gap-8 { gap: 8px; }
.items-center { align-items: center; }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.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; }

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

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

/* 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); }

/* Light mode: code blocks stay 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; }

/* ── Interactive Quiz (MCQ) ──────────────────────────────── */
.quiz-block { margin: 36px 0 0; border-top: 1px solid var(--border); padding-top: 24px; padding-bottom: 8px; }
.quiz-block-header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.quiz-block-header h2 { font-size: 16px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; margin: 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; white-space: nowrap; }
.quiz-q { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 14px; }
.quiz-q:last-child { margin-bottom: 0; }
.quiz-question { font-size: 14px; font-weight: 500; color: var(--text); margin: 0 0 14px; line-height: 1.55; }
.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; font-size: 13px; color: var(--muted); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, color .15s; font-family: inherit; }
.quiz-opt:hover:not(:disabled) { border-color: var(--accent); color: var(--text); background: rgba(99,102,241,.07); }
.quiz-opt:disabled { cursor: default; opacity: .9; }
.quiz-opt.correct { background: rgba(34,197,94,.1); border-color: var(--green); color: var(--green); font-weight: 600; }
.quiz-opt.wrong { background: rgba(249,115,22,.1); border-color: var(--coral); color: var(--coral); }
.quiz-opt.revealed { background: rgba(34,197,94,.07); border-color: rgba(34,197,94,.5); color: var(--green); }
.quiz-result { margin-top: 12px; padding: 12px 14px; background: var(--bg); border-radius: 6px; border: 1px solid var(--border); display: none; }
.quiz-result-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.quiz-result-label.ok { color: var(--green); }
.quiz-result-label.fail { color: var(--coral); }
.quiz-explanation { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.6; }
.quiz-explanation 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); }

/* ── Mobile ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-width: 240px; }
  .sidebar { display: none; }
  .main-content { padding: 20px 20px 48px; }
}
