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

:root {
  --bg:          #080810;
  --surface:     #0f0f1a;
  --surface-2:   #141426;
  --surface-3:   #1a1a30;
  --border:      #1e1e38;
  --dim:         #2a2a4a;
  --text:        #f0f0ff;
  --text-2:      #9090b8;
  --muted:       #444466;
  --accent:      #7c6df8;
  --accent-2:    #a89dfa;
  --accent-dim:  rgba(124,109,248,.1);
  --accent-glow: rgba(124,109,248,.25);
  --ok:          #34d399;
  --ok-dim:      rgba(52,211,153,.08);
  --ok-border:   rgba(52,211,153,.3);
  --half:        #f59e0b;
  --half-dim:    rgba(245,158,11,.08);
  --half-border: rgba(245,158,11,.3);
  --err:         #f87171;
  --err-dim:     rgba(248,113,113,.08);
  --err-border:  rgba(248,113,113,.3);
  --font:        'Space Mono', monospace;
  --font-display:'Barlow Condensed', sans-serif;
  --stroke:      2px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  cursor: default;
}

/* Scanlines */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent, transparent 2px,
    rgba(0,0,0,0.06) 2px, rgba(0,0,0,0.06) 4px
  );
}

/* ── Header ──────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: var(--stroke) solid var(--accent);
}
.header-inner {
  max-width: 1100px; margin: 0 auto;
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.logo {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.4rem;
  letter-spacing: .1em; text-transform: uppercase;
  cursor: pointer;
}
.logo-mark {
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent), 0 0 40px rgba(124,109,248,.3);
  animation: flicker 8s infinite;
}
@keyframes flicker {
  0%,19%,21%,23%,25%,54%,56%,100% { opacity: 1; }
  20%,24%,55% { opacity: .4; }
}

/* ── Main ─────────────────────────────────── */
main {
  max-width: 900px; margin: 0 auto;
  padding: 0 2rem;
}
#state-quiz, #state-end {
  max-width: 700px; margin: 0 auto;
  padding-top: 4rem; padding-bottom: 6rem;
}

/* ── States ──────────────────────────────── */
.state { animation: appear .2s ease both; }
.hidden { display: none !important; }

@keyframes appear {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Home page ───────────────────────────── */
.home-quiz {
  padding: 4rem 0 3.5rem;
  border-bottom: var(--stroke) solid var(--dim);
  margin-bottom: 3.5rem;
}
.home-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2.5rem;
  align-items: start;
}
.hero-index {
  writing-mode: vertical-rl; text-orientation: mixed;
  font-family: var(--font-display);
  font-size: .65rem; letter-spacing: .3em; font-weight: 600;
  color: var(--accent); text-transform: uppercase;
  padding-top: .25rem;
  user-select: none;
}
.home-hero-content {}

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: .7rem; font-weight: 700; letter-spacing: .15em;
  text-transform: uppercase;
  padding: .2rem .75rem;
  margin-bottom: 1.75rem;
}

.home-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900; line-height: .9;
  text-transform: uppercase; letter-spacing: -.01em;
  color: var(--text);
  margin-bottom: 2.25rem;
}
.home-hero h1 .accent { color: var(--accent); }
.home-hero h1 .outline {
  -webkit-text-stroke: 2px var(--accent);
  color: transparent;
}
.home-tagline { display: none; }

.home-how {
  list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: var(--stroke) solid var(--dim);
  margin-bottom: 2.5rem;
}
.home-how li {
  padding: 1.25rem;
  border-right: var(--stroke) solid var(--dim);
  font-size: .78rem; color: var(--text-2);
  line-height: 1.65;
  display: flex; flex-direction: column; gap: .5rem;
}
.home-how li:last-child { border-right: none; }
.how-bullet {
  font-family: var(--font);
  font-size: .65rem; letter-spacing: .1em;
  color: var(--accent);
}

.home-launcher {
  display: flex; gap: 0;
  border: var(--stroke) solid var(--accent);
  box-shadow: 4px 4px 0 rgba(124,109,248,.3);
  max-width: 560px;
  transition: box-shadow .2s;
}
.home-launcher:focus-within {
  box-shadow: 6px 6px 0 var(--accent);
}
.topic-select {
  flex: 1;
  background: transparent;
  border: none; border-right: var(--stroke) solid var(--accent);
  color: var(--text-2);
  font-family: var(--font);
  font-size: .78rem;
  padding: .875rem 1.25rem;
  cursor: default; outline: none;
  transition: color .2s;
}
.topic-select:focus { color: var(--text); }
.topic-select option { background: var(--surface); }

.home-library {
  padding-bottom: 5rem;
}
.home-section-header {
  margin-bottom: 1.5rem;
  padding-bottom: .875rem;
  border-bottom: var(--stroke) solid var(--dim);
  display: flex; align-items: baseline; justify-content: space-between;
}
.home-section-title {
  font-family: var(--font-display);
  font-weight: 900; font-size: 2rem; letter-spacing: .06em;
  text-transform: uppercase;
}
.home-section-sub {
  font-size: .65rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
}
.rebuild-controls {
  display: flex; align-items: center; gap: .75rem;
}
.rebuild-status {
  font-size: .7rem; letter-spacing: .1em; color: var(--muted);
}
.btn-sm {
  font-size: .65rem; padding: .3rem .75rem;
  box-shadow: 2px 2px 0 var(--accent);
}

/* ── Library ─────────────────────────────── */
.library-list {
  display: flex; flex-direction: column; gap: 2rem;
}
.lib-section {}
.lib-folder {
  font-size: .6rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .625rem;
  border-bottom: 1px solid var(--dim);
  margin-bottom: .625rem;
}
.lib-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
  background: var(--dim);
}
.lib-file {
  display: flex; align-items: center; gap: .75rem;
  padding: .875rem 1rem;
  font-size: .78rem;
  color: var(--text-2);
  cursor: default;
  transition: all .15s;
  background: var(--bg);
  position: relative;
}
.lib-file::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s;
}
.lib-file:hover { background: var(--surface); color: var(--text); }
.lib-file:hover::before { transform: scaleX(1); }

/* ── Session progress ────────────────────── */
.session-progress { margin-bottom: 2rem; }
.progress-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: .625rem;
}
.progress-label {
  font-size: .7rem; color: var(--muted); letter-spacing: .08em;
}
.score-badge {
  font-size: .7rem; font-weight: 700;
  color: var(--ok);
  background: var(--ok-dim);
  border: 1px solid var(--ok-border);
  padding: .2rem .625rem;
  letter-spacing: .04em;
}
.progress-track {
  height: 4px;
  background: var(--dim);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width .4s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* ── Source badge ────────────────────────── */
.source-badge {
  display: flex; align-items: center; gap: .5rem;
  font-size: .72rem; color: var(--muted);
  margin-bottom: 1.5rem;
  overflow: hidden; white-space: nowrap;
}
.badge-file {
  color: var(--accent-2); font-weight: 700; flex-shrink: 0;
  cursor: default;
  transition: color .15s;
  letter-spacing: .02em;
}
.badge-file:hover { color: var(--accent); text-decoration: underline; }
.badge-sep  { opacity: .3; flex-shrink: 0; }
.badge-section { overflow: hidden; text-overflow: ellipsis; }

/* ── Question card ───────────────────────── */
.question-card {
  background: var(--surface);
  border: var(--stroke) solid var(--dim);
  border-left: 4px solid var(--accent);
  padding: 2rem 2.25rem;
  margin-bottom: 2rem;
  min-height: 120px;
  box-shadow: 4px 4px 0 rgba(124,109,248,.08);
}
.q-text {
  font-size: 1.05rem; font-weight: 400;
  line-height: 1.75;
  color: var(--text);
}

/* ── Skeleton ────────────────────────────── */
.skeleton { display: flex; flex-direction: column; gap: .75rem; }
.sk-line {
  height: 16px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease infinite;
}
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* ── Answer area ─────────────────────────── */
.answer-area { margin-bottom: 2rem; }
.answer-input {
  width: 100%;
  background: var(--surface);
  border: var(--stroke) solid var(--dim);
  color: var(--text);
  font-family: var(--font);
  font-size: .875rem;
  line-height: 1.65;
  padding: 1.25rem 1.5rem;
  resize: none; outline: none;
  transition: border-color .2s, box-shadow .2s;
  margin-bottom: 1rem;
}
.answer-input:focus {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 rgba(124,109,248,.15);
}
.answer-input::placeholder { color: var(--muted); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ── Result ──────────────────────────────── */
.result-area { animation: appear .25s ease both; }
.result-card {
  border: var(--stroke) solid var(--dim);
  padding: 1.75rem 2rem;
}
.result-card.ok   { background: var(--ok-dim);   border-color: var(--ok-border);   border-left: 4px solid var(--ok); }
.result-card.half { background: var(--half-dim); border-color: var(--half-border); border-left: 4px solid var(--half); }
.result-card.err  { background: var(--err-dim);  border-color: var(--err-border);  border-left: 4px solid var(--err); }

.result-status {
  display: flex; align-items: center; gap: .625rem;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.1rem;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: .75rem;
}
.result-status.ok   { color: var(--ok); }
.result-status.half { color: var(--half); }
.result-status.err  { color: var(--err); }

.result-expl {
  font-size: .82rem; line-height: 1.7; color: var(--text-2);
}
.result-ideal {
  margin-top: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--dim);
  border-left: 2px solid var(--accent);
  font-size: .82rem; line-height: 1.75; color: var(--text);
}
.result-ideal-label {
  display: block;
  font-size: .6rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: .6rem;
}
.result-source {
  font-size: .72rem; color: var(--accent);
  margin-top: 1rem; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color .15s, opacity .15s;
}
.result-source:hover { opacity: .75; }

/* ── Buttons ─────────────────────────────── */
.btn {
  font-family: var(--font-display);
  font-weight: 700; font-size: .95rem;
  letter-spacing: .1em; text-transform: uppercase;
  border: none; cursor: default;
  padding: .7rem 1.5rem;
  transition: all .15s;
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(124,109,248,.3);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 6px 6px 0 rgba(124,109,248,.4);
  transform: translate(-1px, -1px);
}
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 rgba(124,109,248,.3); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: var(--stroke) solid var(--dim);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.btn-lg { padding: .9rem 2.25rem; font-size: 1.05rem; }
.btn-sm { padding: .35rem .875rem; font-size: .8rem; }

/* ── End screen ──────────────────────────── */
.end-wrap {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 4rem 2rem 2rem;
}
.end-icon {
  font-size: 3.5rem; color: var(--accent);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 40px var(--accent);
}
.end-wrap h1 {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 900;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.end-score {
  font-family: var(--font-display);
  font-size: 5rem; font-weight: 900;
  letter-spacing: -.02em;
  color: var(--accent);
  margin-bottom: 1.5rem;
  line-height: 1;
  text-shadow: 0 0 60px var(--accent-glow);
}
.end-bar-wrap {
  width: 280px; height: 4px;
  background: var(--dim);
  margin-bottom: 1.75rem;
}
.end-bar {
  height: 100%;
  background: var(--accent);
  transition: width .8s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 12px var(--accent-glow);
}
.end-msg {
  color: var(--text-2); font-size: .875rem;
  margin-bottom: 2rem; letter-spacing: .02em;
}
.end-actions {
  display: flex; gap: .875rem; flex-wrap: wrap; justify-content: center;
}

/* ── Récapitulatif de fin ────────────────── */
.end-recap {
  width: 100%; max-width: 720px; margin: 0 auto;
  padding: 0 1.5rem 4rem;
  display: flex; flex-direction: column; gap: 1.25rem;
}
.recap-title {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.4rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
  padding-bottom: .75rem;
  border-bottom: var(--stroke) solid var(--dim);
}
.recap-item {
  border: var(--stroke) solid var(--dim);
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--dim);
}
.recap-header {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  border-bottom: var(--stroke) solid var(--dim);
  background: var(--bg);
}
.recap-num {
  font-family: var(--font-display);
  font-weight: 900; font-size: .8rem; letter-spacing: .12em;
  color: var(--accent);
}
.recap-source {
  font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted);
}
.recap-question {
  padding: .875rem 1rem;
  border-bottom: var(--stroke) solid var(--dim);
  font-size: .9rem; line-height: 1.6;
}
.recap-answer {
  padding: .75rem 1rem;
  font-size: .85rem; color: var(--text-2);
}
.recap-answer-label {
  display: block;
  font-size: .6rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--muted); margin-bottom: .25rem;
}

/* ── Chat inline ─────────────────────────── */
.inline-chat {
  margin-top: 1.5rem;
  border: var(--stroke) solid var(--dim);
  background: var(--surface);
}
.inline-msgs {
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.25rem 1.5rem;
  max-height: 520px;
  overflow-y: auto;
}
.inline-msgs:empty { display: none; }
.imsg {
  max-width: 88%;
  padding: .65rem 1rem;
  font-size: .78rem;
  line-height: 1.65;
}
.imsg.user {
  align-self: flex-end;
  background: var(--accent-dim);
  border: 1px solid rgba(124,109,248,.25);
  color: var(--text);
}
.imsg.bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--dim);
  color: var(--text-2);
}
.imsg.bot p { margin-bottom: .4rem; }
.imsg.bot p:last-child { margin-bottom: 0; }
.imsg.bot ul, .imsg.bot ol { padding-left: 1.5rem; }
.imsg.bot strong { color: var(--text); }
.imsg.typing {
  display: flex; gap: .35rem; align-items: center;
  padding: .875rem 1rem; align-self: flex-start;
}
.inline-chat-row {
  display: flex; gap: 0; align-items: flex-end;
  border-top: var(--stroke) solid var(--dim);
}
.inline-input {
  flex: 1;
  background: var(--surface-2);
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: .78rem;
  line-height: 1.5;
  padding: .75rem 1rem;
  resize: none; outline: none;
}
.inline-input::placeholder { color: var(--muted); }

.dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: bounce .9s ease infinite;
}
.dot:nth-child(2) { animation-delay: .18s; }
.dot:nth-child(3) { animation-delay: .36s; }
@keyframes bounce {
  0%,80%,100% { transform: translateY(0); opacity: .4; }
  40%          { transform: translateY(-5px); opacity: 1; }
}

/* ── Note viewer ─────────────────────────── */
main:has(#state-note:not(.hidden)) {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}
#state-note { padding: 0 0 6rem; }

.note-nav {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.5rem 2.5rem 1.25rem;
  margin-bottom: 2rem;
  border-bottom: var(--stroke) solid var(--dim);
}
.note-view-title {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 900;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); flex: 1;
}

.note-layout { display: block; }
#note-view-body {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ── TOC ─────────────────────────────────── */
.note-toc {
  position: fixed;
  right: 2rem; top: 10rem;
  width: 280px;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: .1rem;
  padding: 1rem;
  background: var(--surface);
  border: var(--stroke) solid var(--dim);
  border-top: var(--stroke) solid var(--accent);
}
.toc-label {
  flex-shrink: 0;
  font-size: .6rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--dim);
}
.toc-link {
  flex-shrink: 0;
  display: block;
  font-size: .72rem; line-height: 1.5;
  color: var(--muted);
  text-decoration: none;
  padding: .3rem .5rem;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s, background .15s;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toc-link:hover { color: var(--text-2); background: var(--surface-2); }
.toc-link.toc-active {
  color: var(--accent-2);
  border-left-color: var(--accent);
  background: var(--accent-dim);
}
.toc-h1 { font-weight: 700; color: var(--text-2); }
.toc-h2 { padding-left: .75rem; }
.toc-h3 { padding-left: 1.25rem; font-size: .67rem; }
.toc-h4 { padding-left: 1.75rem; font-size: .64rem; opacity: .6; }

@media (max-width: 1200px) { .note-toc { display: none !important; } }

/* ── Note editor ─────────────────────────── */
.note-edit-area {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.note-editor {
  width: 100%;
  min-height: 65vh;
  background: var(--surface);
  border: var(--stroke) solid var(--dim);
  color: var(--text);
  font-family: var(--font);
  font-size: .8rem;
  line-height: 1.8;
  padding: 1.75rem;
  resize: vertical; outline: none;
  transition: border-color .2s, box-shadow .2s;
  tab-size: 2;
}
.note-editor:focus {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 rgba(124,109,248,.15);
}
.edit-actions {
  display: flex; gap: .75rem; margin-top: 1rem;
}

/* ── Note body ───────────────────────────── */
.note-body {
  font-size: .9rem; line-height: 1.85; color: var(--text-2);
}
.note-body h1, .note-body h2, .note-body h3, .note-body h4 {
  font-family: var(--font-display);
  font-weight: 700; color: var(--text);
  letter-spacing: .04em; text-transform: uppercase;
  scroll-margin-top: 5rem;
}
.note-body h1 { font-size: 1.8rem; margin: 2.5rem 0 1rem; }
.note-body h2 {
  font-size: 1.3rem; margin: 2rem 0 .875rem;
  padding-bottom: .5rem;
  border-bottom: var(--stroke) solid var(--dim);
}
.note-body h3 { font-size: 1.05rem; margin: 1.5rem 0 .625rem; }
.note-body h4 { font-size: .9rem; margin: 1.25rem 0 .5rem; color: var(--text-2); }
.note-body p  { margin-bottom: 1rem; }
.note-body ul, .note-body ol {
  padding-left: 1.75rem; margin-bottom: 1rem;
}
.note-body li { margin-bottom: .4rem; }
.note-body strong { color: var(--text); font-weight: 700; }
.note-body em { color: var(--text-2); font-style: italic; }
.note-body a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.note-body code {
  background: var(--surface-2);
  border: 1px solid var(--dim);
  padding: .15em .5em;
  font-size: .85em; font-family: var(--font);
  color: var(--accent-2);
}
.note-body pre {
  background: var(--surface-2);
  border: var(--stroke) solid var(--dim);
  border-left: 4px solid var(--accent);
  padding: 1.25rem 1.5rem;
  overflow-x: auto; margin: 1.25rem 0;
}
.note-body pre code { background: none; border: none; padding: 0; }
.note-body blockquote {
  border-left: 4px solid var(--accent);
  padding: .75rem 1.25rem;
  color: var(--text-2); margin: 1.25rem 0;
  background: var(--accent-dim);
  font-style: italic;
}
.note-body img {
  max-width: 100%; margin: 1.5rem 0; display: block;
  border: var(--stroke) solid var(--dim);
}
.note-body table {
  width: 100%; border-collapse: collapse;
  margin: 1.25rem 0; font-size: .82rem;
}
.note-body th {
  background: var(--surface-2);
  border: 1px solid var(--dim);
  padding: .625rem 1rem;
  text-align: left; font-weight: 700; color: var(--text);
  text-transform: uppercase; font-size: .72rem; letter-spacing: .08em;
}
.note-body td {
  border: 1px solid var(--dim);
  padding: .55rem 1rem; color: var(--text-2);
}
.note-body tr:nth-child(even) td { background: rgba(255,255,255,.02); }

.note-highlight {
  background: var(--accent-dim);
  border-left: 4px solid var(--accent);
  padding-left: .875rem; margin-left: -.875rem;
}
.note-link { cursor: default; transition: color .15s; }
.note-link:hover { color: var(--text-2); }

/* ── Scrollbar ───────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--dim); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
