/* ============================================================
   Binary Exploitation - Visual Tutorial
   Dark terminal theme + memory visualizer styling
   ============================================================ */

:root {
  --bg:        #0d1117;
  --bg-panel:  #161b22;
  --bg-elev:   #1c2330;
  --border:    #30363d;
  --fg:        #c9d1d9;
  --fg-dim:    #8b949e;
  --accent:    #58a6ff;
  --accent-2:  #bc8cff;
  --green:     #3fb950;
  --red:       #f85149;
  --orange:    #d29922;
  --yellow:    #e3b341;
  --mono: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  height: 100%;
}

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

/* ---------- Layout ---------- */
#app {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

#sidebar {
  background: var(--bg-panel);
  border-right: 1px solid var(--border);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

#sidebar .brand {
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--border);
}
#sidebar .brand h1 {
  font-size: 17px;
  margin: 0 0 4px;
  color: #fff;
  letter-spacing: 0.3px;
}
#sidebar .brand p {
  margin: 0;
  font-size: 12px;
  color: var(--fg-dim);
}

#toc { list-style: none; margin: 0; padding: 8px 0 40px; }
#toc li { margin: 0; }
#toc .chapter-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  cursor: pointer;
  border-left: 3px solid transparent;
  font-size: 14px;
  color: var(--fg-dim);
  transition: background 0.12s, color 0.12s;
}
#toc .chapter-link:hover { background: var(--bg-elev); color: var(--fg); }
#toc .chapter-link.active {
  background: var(--bg-elev);
  color: #fff;
  border-left-color: var(--accent);
}
#toc .ch-num {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--bg-elev);
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  min-width: 34px;
  text-align: center;
}
#toc .chapter-link.active .ch-num { background: var(--accent); color: #0d1117; border-color: var(--accent); }
#toc .ch-check { margin-left: auto; color: var(--green); font-size: 13px; opacity: 0; }
#toc .chapter-link.done .ch-check { opacity: 1; }

.level-divider {
  padding: 16px 20px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-dim);
  font-weight: 600;
}

/* ---------- Main content ---------- */
#content {
  padding: 40px 48px 120px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.chapter-header { border-bottom: 1px solid var(--border); margin-bottom: 28px; padding-bottom: 18px; }
.chapter-header .eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.chapter-header h2 { font-size: 30px; margin: 6px 0 10px; color: #fff; }
.chapter-header .subtitle { font-size: 16px; color: var(--fg-dim); margin: 0; }

.difficulty {
  display: inline-block;
  font-size: 11px;
  font-family: var(--mono);
  padding: 2px 8px;
  border-radius: 10px;
  margin-right: 8px;
  border: 1px solid var(--border);
}
.difficulty.beginner     { color: var(--green);  border-color: var(--green); }
.difficulty.intermediate { color: var(--orange); border-color: var(--orange); }
.difficulty.advanced     { color: var(--red);    border-color: var(--red); }

.prose { font-size: 15.5px; }
.prose h3 { font-size: 20px; color: #fff; margin: 32px 0 12px; }
.prose h4 { font-size: 16px; color: var(--accent); margin: 24px 0 8px; }
.prose p { margin: 12px 0; }
.prose ul, .prose ol { margin: 12px 0; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose strong { color: #fff; }
.prose code {
  font-family: var(--mono);
  font-size: 13.5px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--accent-2);
}

/* comparison tables (platform/arch chapter) */
.prose table.cmp {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13px;
}
.prose table.cmp th,
.prose table.cmp td {
  border: 1px solid var(--border);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}
.prose table.cmp th {
  background: var(--bg-elev);
  color: #fff;
  font-weight: 600;
  position: sticky;
  top: 0;
}
.prose table.cmp td { color: var(--fg-dim); }
.prose table.cmp td:first-child { color: var(--fg); font-weight: 600; }
.prose table.cmp code { white-space: nowrap; font-size: 12px; }
.prose table.cmp tr:nth-child(even) td { background: rgba(255,255,255,0.02); }
.prose .table-scroll { overflow-x: auto; }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--bg-panel);
  padding: 12px 16px;
  margin: 18px 0;
  border-radius: 0 6px 6px 0;
}
.callout.warn { border-left-color: var(--orange); }
.callout.danger { border-left-color: var(--red); }
.callout.tip { border-left-color: var(--green); }
.callout .label {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-dim);
  display: block;
  margin-bottom: 4px;
}

/* ---------- Code blocks ---------- */
pre.code {
  background: #010409;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.55;
  margin: 16px 0;
}
pre.code .cm { color: var(--fg-dim); }
pre.code .kw { color: #ff7b72; }
pre.code .fn { color: #d2a8ff; }
pre.code .str { color: #a5d6ff; }
pre.code .num { color: #79c0ff; }
.code-title {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 6px 12px;
  margin-top: 16px;
  display: inline-block;
}
.code-title + pre.code { margin-top: 0; border-top-left-radius: 0; }

/* ============================================================
   MEMORY VISUALIZER
   ============================================================ */
.viz {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 24px 0;
  overflow: hidden;
}
.viz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}
.viz-head .title { font-family: var(--mono); font-size: 13px; color: var(--fg); }
.viz-head .title .addr-mode { color: var(--fg-dim); font-size: 11px; margin-left: 8px; }

/* body stacks an optional code pane above the memory+registers area */
.viz-body { display: flex; flex-direction: column; }
.viz-main {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
}
@media (max-width: 860px) { .viz-main { grid-template-columns: 1fr; } }

/* code pane (debugger-style source with a running-line arrow) */
.code-pane { border-bottom: 1px solid var(--border); background: #010409; }
.code-pane-head {
  display: flex;
  justify-content: space-between;
  padding: 7px 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: #0b0f16;
  border-bottom: 1px solid var(--border);
}
.code-lines { padding: 10px 0; }
.code-line {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  padding: 1px 16px 1px 0;
  border-left: 3px solid transparent;
  transition: background 0.3s, border-color 0.3s;
  white-space: pre;
}
.code-line .cl-gutter { color: transparent; text-align: center; font-size: 11px; }
.code-line .cl-text { color: var(--fg-dim); overflow-x: auto; }
.code-line.active {
  background: rgba(88,166,255,0.12);
  border-left-color: var(--accent);
}
.code-line.active .cl-gutter { color: var(--accent); animation: pc-blink 1s ease-in-out infinite; }
.code-line.active .cl-text { color: #fff; }
@keyframes pc-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.mem-col { padding: 18px; border-right: 1px solid var(--border); }
.mem-col .mem-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

/* stack cells */
.stack { display: flex; flex-direction: column; gap: 3px; }
.cell {
  position: relative;
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  font-family: var(--mono);
  font-size: 12.5px;
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.4s ease, transform 0.25s ease, box-shadow 0.3s ease;
}
.cell .addr {
  background: var(--bg-elev);
  color: var(--fg-dim);
  padding: 7px 8px;
  border-right: 1px solid var(--border);
  font-size: 11px;
  white-space: nowrap;
  display: flex;
  align-items: center;
}
.cell .val {
  padding: 7px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--fg);
  min-width: 0;
}
.cell .val .bytes { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .tag {
  font-size: 10px;
  color: var(--fg-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* cell roles */
.cell.buffer   { border-color: #1f6feb; }
.cell.buffer   .val { color: #79c0ff; }
.cell.saved-rbp{ border-color: var(--accent-2); }
.cell.ret      { border-color: var(--orange); }
.cell.ret      .val { color: var(--yellow); }
.cell.canary   { border-color: var(--green); }
.cell.canary   .val { color: var(--green); }
.cell.var      { border-color: var(--border); }
.cell.padding  { opacity: 0.55; }

/* state highlights */
.cell.write { animation: flash-write 0.9s ease; }
.cell.overflow { border-color: var(--red) !important; background: #2d1215; }
.cell.overflow .val { color: var(--red); }
.cell.corrupt { border-color: var(--red) !important; }
.cell.hijack {
  border-color: var(--red) !important;
  background: #3d1418;
  box-shadow: 0 0 0 2px var(--red), 0 0 18px rgba(248,81,73,0.55);
  animation: pulse-danger 1.4s ease-in-out infinite;
}
.cell.hijack .val { color: #ff9492; }
.cell.active {
  transform: translateX(6px);
  box-shadow: -5px 0 0 var(--accent), 0 0 14px rgba(88,166,255,0.35);
}
/* "CPU is here" marker glued to the active/hijacked cell */
.cell.active::before,
.cell.hijack::before {
  content: "CPU is here";
  position: absolute;
  left: -2px; top: -11px;
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--accent);
  color: #0d1117;
  z-index: 3;
}
.cell.hijack::before { content: "CPU jumps here"; background: var(--red); color: #fff; }

/* "changing in this step": the strongest signal, drawn on top of any role/state */
.cell.now {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
  z-index: 2;
  animation: now-pop 0.5s ease;
}
.cell.now::after {
  content: "this step";
  position: absolute;
  right: -1px; top: -11px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--yellow);
  color: #0d1117;
  z-index: 4;
}
/* if a cell is both the CPU location and changing, keep both tags readable */
.cell.now.active::after,
.cell.now.hijack::after { top: -11px; right: -1px; }
.reg.now { outline: 2px solid var(--yellow); outline-offset: 1px; }

@keyframes now-pop {
  0%   { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes flash-write {
  0%   { background: #1f3a16; box-shadow: 0 0 14px rgba(63,185,80,0.5); }
  100% { background: var(--bg); box-shadow: none; }
}
@keyframes pulse-danger {
  0%, 100% { box-shadow: 0 0 0 2px var(--red), 0 0 10px rgba(248,81,73,0.4); }
  50%      { box-shadow: 0 0 0 2px var(--red), 0 0 22px rgba(248,81,73,0.8); }
}

/* arrows / pointers */
.ptr-badge {
  position: absolute;
  right: 6px;
  font-size: 10px;
  font-family: var(--mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--accent);
  color: #0d1117;
}

/* registers panel */
.reg-col { padding: 18px; background: #0b0f16; }
.reg-col .mem-label { font-family: var(--mono); font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.registers { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; }
.reg {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
}
.reg .rname { color: var(--accent-2); }
.reg .rval { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg.changed { border-color: var(--yellow); }
.reg.changed .rval { color: var(--yellow); }
.reg.danger .rval { color: var(--red); }

/* ---------- Stepper controls ---------- */
.stepper {
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
}
.step-narrate {
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 46px;
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  transition: border-color 0.3s;
}
.step-narrate.is-danger { border-left-color: var(--red); }
.step-narrate.is-good { border-left-color: var(--green); }
.step-narrate .snum { font-family: var(--mono); color: var(--accent); font-size: 12px; margin-right: 8px; }
.step-narrate.is-danger .snum { color: var(--red); }
.step-narrate.is-good .snum { color: var(--green); }
.step-narrate .narr-icon { margin-right: 8px; font-size: 14px; }
.step-narrate.is-danger .narr-icon { color: var(--red); }
.step-narrate.is-good .narr-icon { color: var(--green); }
.step-narrate:not(.is-danger):not(.is-good) .narr-icon { color: var(--accent); }
.step-controls { display: flex; align-items: center; gap: 8px; }
.btn {
  font-family: var(--sans);
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--fg);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.btn:hover:not(:disabled) { background: var(--bg); border-color: var(--accent); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--accent); color: #0d1117; border-color: var(--accent); font-weight: 600; }
.btn.primary:hover:not(:disabled) { background: #79c0ff; }
.btn.play { background: var(--green); color: #0d1117; border-color: var(--green); font-weight: 600; }
.btn.play:hover:not(:disabled) { background: #56d364; }
.btn.play.playing { background: var(--orange); border-color: var(--orange); }
.step-progress { flex: 1; height: 6px; background: var(--bg); border-radius: 3px; overflow: hidden; }
.step-progress .bar { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0%; transition: width 0.5s ease; }
.step-count { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); min-width: 56px; text-align: right; }

/* ---------- Visualizer: legend, note, CPU overlay ---------- */
.viz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 11px 16px;
  background: #0b0f16;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--fg-dim);
}
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-swatch {
  width: 13px; height: 13px;
  border-radius: 3px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  display: inline-block;
  flex-shrink: 0;
}
.lg-swatch.buffer    { border-color: #1f6feb; background: rgba(31,111,235,0.25); }
.lg-swatch.canary    { border-color: var(--green); background: rgba(63,185,80,0.25); }
.lg-swatch.saved-rbp { border-color: var(--accent-2); background: rgba(188,140,255,0.2); }
.lg-swatch.ret       { border-color: var(--orange); background: rgba(210,153,34,0.25); }
.lg-swatch.heap-chunk{ border-color: #1f6feb; background: rgba(31,111,235,0.25); }
.lg-swatch.heap-meta { border-color: var(--accent-2); background: rgba(188,140,255,0.2); }
.lg-swatch.freed     { border-color: var(--fg-dim); background: rgba(139,148,158,0.2); }
.lg-swatch.var       { border-color: var(--border); }
.lg-swatch.padding   { border-color: var(--border); opacity: 0.55; }
.lg-swatch.lg-write  { border-color: var(--green); background: #1f3a16; }
.lg-swatch.lg-danger { border-color: var(--red); background: #3d1418; }
.lg-swatch.lg-now    { border-color: var(--yellow); outline: 2px solid var(--yellow); outline-offset: -1px; background: transparent; }

.viz-note {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fg-dim);
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 10px 12px;
}
.viz-note:empty { display: none; }
.viz-note-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 4px;
}

/* the main area positions the SVG overlay */
.viz-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 5;
  overflow: visible;
}
.jump-arrow {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
  animation: dash-flow 0.8s linear infinite;
  filter: drop-shadow(0 0 4px rgba(248,81,73,0.6));
}
@keyframes dash-flow { to { stroke-dashoffset: -20; } }

/* register "changed" gets a brief glow so the eye catches it */
.reg.changed { border-color: var(--yellow); animation: reg-glow 0.9s ease; }
@keyframes reg-glow {
  0% { box-shadow: 0 0 0 0 rgba(227,179,65,0.6); }
  100% { box-shadow: 0 0 0 6px rgba(227,179,65,0); }
}

@media (prefers-reduced-motion: reduce) {
  .cell, .step-progress .bar { transition: none; }
  .cell.hijack, .jump-arrow, .reg.changed, .cell.write { animation: none; }
}

/* ---------- References ---------- */
.refs { margin: 32px 0; }
.refs h3 { font-size: 18px; color: #fff; margin-bottom: 14px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ref-card {
  display: block;
  padding: 14px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.12s, transform 0.12s;
}
.ref-card:hover { border-color: var(--accent); transform: translateY(-2px); text-decoration: none; }
.ref-card .rtype {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--bg-elev);
  color: var(--accent-2);
}
.ref-card .rtype.video { color: var(--red); }
.ref-card .rtype.practice { color: var(--green); }
.ref-card .rtype.paper { color: var(--orange); }
.ref-card .rtype.tool { color: var(--yellow); }
.ref-card .rtitle { display: block; color: #fff; font-weight: 600; margin: 8px 0 4px; font-size: 14.5px; }
.ref-card .rdesc { font-size: 12.5px; color: var(--fg-dim); margin: 0; }
.ref-card .rhost { font-size: 11px; color: var(--accent); margin-top: 8px; display: block; font-family: var(--mono); }

/* ---------- Key takeaways / mitigation box ---------- */
.takeaways {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg));
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 24px;
  margin: 28px 0;
}
.takeaways h3 { margin-top: 0; }
.mitigation-row { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.mitigation-row:last-child { border-bottom: none; }
.mitigation-row .mk { font-family: var(--mono); color: var(--green); font-size: 13px; min-width: 20px; }

/* ---------- Chapter nav footer ---------- */
.chapter-nav { display: flex; justify-content: space-between; margin-top: 48px; gap: 16px; }
.chapter-nav a {
  flex: 1;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-panel);
}
.chapter-nav a:hover { border-color: var(--accent); text-decoration: none; }
.chapter-nav .nav-dir { font-size: 11px; color: var(--fg-dim); text-transform: uppercase; letter-spacing: 1px; }
.chapter-nav .nav-title { color: #fff; font-weight: 600; margin-top: 4px; }
.chapter-nav .next { text-align: right; }

/* ---------- Landing ---------- */
.hero { text-align: center; padding: 48px 0 32px; }
.hero h2 { font-size: 36px; color: #fff; margin: 0 0 12px; }
.hero p { font-size: 17px; color: var(--fg-dim); max-width: 620px; margin: 0 auto 8px; }
.hero .cta { margin-top: 28px; }
.roadmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 14px; margin-top: 32px; }
.roadmap-card { padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-panel); cursor: pointer; transition: border-color 0.12s, transform 0.12s; }
.roadmap-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.roadmap-card .rc-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.roadmap-card h4 { margin: 6px 0; color: #fff; font-size: 16px; }
.roadmap-card p { margin: 0; font-size: 13px; color: var(--fg-dim); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-dim); }
