/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg:          #060d08;
  --bg-window:   #0c160d;
  --bg-titlebar: #111e13;
  --bg-sidebar:  #0a1209;
  --bg-hover:    #162318;
  --bg-select:   #1a3d1f;
  --border:      #142516;
  --border-soft: #1e3022;
  --text:        #c4d4c0;
  --text-muted:  #4a6650;
  --text-dim:    #2a3d2c;
  --accent:      #4ade80;
  --accent2:     #9ece6a;
  --folder:      #e0af68;
  --red:         #f7768e;
  --yellow:      #e0af68;
  --radius:      8px;
  --radius-sm:   4px;
  --shadow:      0 24px 64px rgba(0,0,0,0.7), 0 4px 16px rgba(0,0,0,0.4);
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  cursor: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ─── Custom Cursor ─────────────────────────────────────── */
#cursor-dot {
  position: fixed;
  width: 6px; height: 6px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, background 0.15s;
}

#cursor-ring {
  position: fixed;
  width: 24px; height: 24px;
  border: 1.5px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, border-color 0.2s;
}

body.cursor-clicking #cursor-dot {
  width: 4px; height: 4px;
  background: var(--accent);
}
body.cursor-clicking #cursor-ring {
  width: 16px; height: 16px;
  border-color: var(--accent);
}

body.cursor-text #cursor-dot {
  width: 2px; height: 16px;
  border-radius: 1px;
}
body.cursor-text #cursor-ring { opacity: 0; }

/* ─── Desktop ───────────────────────────────────────────── */
#desktop {
  position: fixed;
  inset: 0;
  bottom: 40px;
}

/* ─── Wallpaper ─────────────────────────────────────────── */
#wallpaper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}

#wallpaper-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

#wallpaper-title {
  font-size: clamp(42px, 7.22vw, 104px);
  font-weight: 400;
  color: #fff;
  letter-spacing: -2px;
  line-height: 1;
}

#wallpaper-title span:first-child { color: var(--accent); }

#wallpaper-sub {
  font-size: clamp(16px, 2.78vw, 40px);
  font-weight: 300;
  color: #aaa;
  letter-spacing: -0.6px;
}

#wallpaper-sub #rotating-word { color: var(--accent); }

.wp-cursor {
  color: var(--accent);
  opacity: 1;
  animation: wp-blink 1s step-end infinite;
}

@keyframes wp-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

#wallpaper-btns {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  pointer-events: auto;
}

#wallpaper-btns a {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.11vw, 16px);
  padding: clamp(10px, 1.67vw, 24px) clamp(20px, 3.89vw, 56px);
  background: var(--accent);
  color: #000;
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(12px, 1.94vw, 28px);
  font-weight: 400;
  border-radius: clamp(8px, 1.39vw, 20px);
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  cursor: none;
}

#wallpaper-btns a svg {
  width: clamp(14px, 2.36vw, 34px);
  height: clamp(14px, 2.36vw, 34px);
}

#wallpaper-btns a:hover {
  background: #6be896;
  transform: translateY(-2px);
}

/* ─── Desktop Icons ─────────────────────────────────────── */
#desktop-icons {
  position: absolute;
  top: 20px; left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(6px, 0.76vw, 11px);
  padding: clamp(10px, 1.25vw, 18px) clamp(8px, 0.97vw, 14px) clamp(8px, 0.97vw, 14px);
  border-radius: var(--radius);
  border: 1px solid transparent;
  width: clamp(80px, 9.72vw, 140px);
  transition: background 0.15s, border-color 0.15s;
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-soft);
}

.desktop-icon.selected {
  background: var(--bg-select);
  border-color: var(--accent);
}

.desktop-icon-img { line-height: 0; }

.desktop-icon-img svg { width: clamp(28px, 4.38vw, 63px); height: clamp(28px, 4.38vw, 63px); }

.desktop-icon span {
  font-size: clamp(10px, 1.32vw, 19px);
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.8);
}

/* ─── Windows ───────────────────────────────────────────── */
#windows {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  background: var(--bg-window);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  pointer-events: all;
  min-width: 320px;
  min-height: 200px;
  overflow: hidden;

  opacity: 0;
  transform: scale(0.97) translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.1s;
}

.window.open {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.window.minimized {
  opacity: 0;
  transform: scale(0.94) translateY(10px);
  pointer-events: none;
}

.window.closing {
  opacity: 0;
  transform: scale(0.95) translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.window.focused {
  border-color: var(--border-soft);
  box-shadow: var(--shadow), 0 0 0 1px rgba(122,162,247,0.12);
}

/* ─── Titlebar ──────────────────────────────────────────── */
.window-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  height: 38px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  user-select: none;
}

.window-controls {
  display: flex;
  gap: 7px;
  align-items: center;
}

.window-btn {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: none;
  background: var(--border-soft);
  cursor: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  transition: background 0.15s;
  flex-shrink: 0;
}

.wbtn-icon { opacity: 0; transition: opacity 0.1s; color: rgba(0,0,0,0.6); pointer-events: none; }
.window-btn:hover .wbtn-icon { opacity: 1; }

.window-btn.close { background: #ff0000; }
.window-btn.minimize { background: #ff9900; }

.window-btn.close:hover { background: #910000; }
.window-btn.minimize:hover { background: #db8300; }

.window-title {
  flex: 1;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.window-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── File Explorer ─────────────────────────────────────── */
.explorer {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.explorer-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-titlebar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.toolbar-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  cursor: none;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.toolbar-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.toolbar-btn:disabled {
  opacity: 0.3;
  pointer-events: none;
}

.toolbar-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  flex-shrink: 0;
}

.toolbar-spacer { flex: 1; }

.explorer-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  flex: 1;
}

.bc-part {
  color: var(--text);
  padding: 2px 4px;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.bc-part:hover { background: var(--bg-hover); }

.bc-sep { color: var(--text-dim); padding: 0 1px; }

.explorer-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.explorer-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 6px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  cursor: none;
  border-radius: 0;
  transition: background 0.1s;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-item:hover { background: var(--bg-hover); }
.sidebar-item.active { background: var(--bg-select); color: var(--accent); }

.sidebar-expand {
  width: 14px;
  color: var(--text-dim);
  font-size: 10px;
  flex-shrink: 0;
  text-align: center;
}

.sidebar-icon { font-size: 13px; flex-shrink: 0; }

.sidebar-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main area */
.explorer-main {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.exp-empty {
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
  margin-top: 60px;
}

/* Grid view */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 4px;
}

.exp-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: none;
  transition: background 0.1s, border-color 0.1s;
}

.exp-grid-item:hover { background: var(--bg-hover); border-color: var(--border); }
.exp-grid-item.selected { background: var(--bg-select); border-color: var(--accent); }

.exp-grid-item .exp-item-name {
  font-size: 11px;
  text-align: center;
  line-height: 1.3;
  word-break: break-word;
  color: var(--text);
}

/* List view */
.exp-list { display: flex; flex-direction: column; gap: 1px; }

.exp-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: none;
  transition: background 0.1s;
}

.exp-list-item:hover { background: var(--bg-hover); }
.exp-list-item.selected { background: var(--bg-select); border-color: var(--accent); }

.exp-list-item .exp-item-name {
  flex: 1;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exp-item-type {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
}

.exp-item-icon { line-height: 0; flex-shrink: 0; }

/* Status bar */
.explorer-statusbar {
  padding: 4px 12px;
  background: var(--bg-titlebar);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ─── Text Editor ───────────────────────────────────────── */
.text-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-window);
}

.editor-meta {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.editor-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.7;
  padding: 16px;
  resize: none;
  cursor: none;
}

.editor-save-indicator {
  position: absolute;
  top: 8px; right: 14px;
  font-size: 11px;
  color: var(--accent2);
  opacity: 0;
  transition: opacity 0.3s;
}
.editor-save-indicator.show { opacity: 1; }

/* ─── Context Menu ──────────────────────────────────────── */
.context-menu {
  position: fixed;
  background: var(--bg-titlebar);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 99990;
  min-width: 160px;
  padding: 4px;
  animation: ctx-in 0.1s ease;
}

@keyframes ctx-in {
  from { opacity: 0; transform: scale(0.96) translateY(-4px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  cursor: none;
  transition: background 0.1s;
}

.ctx-item:hover { background: var(--bg-hover); }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger:hover { background: rgba(247,118,142,0.1); }
.ctx-separator { height: 1px; background: var(--border); margin: 4px 0; }

/* ─── Taskbar ───────────────────────────────────────────── */
/* ─── Clock widget ───────────────────────────────────────── */
#clock-widget {
  position: fixed;
  top: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  background: rgba(6,13,8,0.6);
  backdrop-filter: blur(20px);
  border-bottom-left-radius: 10px;
  border-left: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  z-index: 9001;
}

#clock-time {
  font-size: 13px;
  color: var(--text);
  font-weight: 400;
}

#clock-date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ─── Mac Dock ───────────────────────────────────────────── */
#taskbar {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: clamp(5px, 0.63vw, 9px);
  padding: clamp(8px, 1.04vw, 15px) clamp(12px, 1.67vw, 24px);
  background: rgba(11,20,13,0.72);
  backdrop-filter: blur(32px) saturate(1.4);
  border: 1px solid rgba(74,222,128,0.09);
  border-radius: clamp(18px, 2.5vw, 36px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.55), 0 1px 0 rgba(255,255,255,0.03) inset;
  z-index: 9000;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  cursor: none;
}

.dock-item[title]::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10,18,11,0.92);
  border: 1px solid var(--border-soft);
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  color: var(--text);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  font-family: 'JetBrains Mono', monospace;
}
.dock-item[title]:hover::after { opacity: 1; }

.dock-icon-wrap {
  width: clamp(40px, 5vw, 72px);
  height: clamp(40px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: bottom center;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dock-icon-wrap svg { width: clamp(28px, 3.75vw, 54px); height: clamp(28px, 3.75vw, 54px); }

.dock-item:hover .dock-icon-wrap {
  transform: translateY(clamp(-8px, -1.04vw, -15px)) scale(1.32);
}

.dock-dot {
  width: clamp(3px, 0.42vw, 6px);
  height: clamp(3px, 0.42vw, 6px);
  border-radius: 50%;
  background: transparent;
  transition: background 0.2s;
  flex-shrink: 0;
}

.dock-item.running .dock-dot { background: var(--accent); }
.taskbar-win-item .dock-dot  { background: var(--accent); }

#dock-sep {
  width: 1px;
  height: clamp(24px, 3.33vw, 48px);
  background: var(--border-soft);
  border-radius: 1px;
  align-self: center;
  margin: 0 4px;
  display: none;
}
#dock-sep.visible { display: block; }

#taskbar-windows {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.taskbar-win-item {
  transition: opacity 0.2s;
}
.taskbar-win-item.minimized { opacity: 0.4; }

/* ─── Maximize button ──────────────────────────────────── */
.window-btn.maximize { background: #5aae00; }
.window-btn.maximize:hover { background: #b6df8a; }

/* ─── Window maximize state ─────────────────────────────── */
.window:not(.is-dragging) {
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.1s,
              left 0.22s ease, top 0.22s ease,
              width 0.22s ease, height 0.22s ease,
              border-radius 0.22s ease;
}

.window.maximized {
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* ─── Browser App ───────────────────────────────────────── */
.browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #0d0f14;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: #111318;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.browser-nav-btns {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.browser-nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: none;
  transition: background 0.12s, color 0.12s;
}

.browser-nav-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text); }
.browser-nav-btn:disabled { opacity: 0.3; pointer-events: none; }

.browser-url-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  padding: 5px 14px;
  max-width: 480px;
  margin: 0 auto;
}

.browser-lock { color: var(--accent2); flex-shrink: 0; }

.browser-url-text {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.browser-viewport {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ─── Start Button (dock) ───────────────────────────────── */
#start-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 0;
  transition: color 0.15s;
}
#start-btn:hover { color: var(--text); }
#start-btn.active { color: var(--accent); }

#dock-launcher-sep {
  width: 1px;
  height: 32px;
  background: var(--border-soft);
  border-radius: 1px;
  align-self: center;
  margin: 0 4px;
}

/* ─── Start Menu ────────────────────────────────────────── */
#start-menu {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(8px) scale(0.97);
  width: 280px;
  background: rgba(10,18,11,0.97);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
  z-index: 9500;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#start-menu.open {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
  pointer-events: all;
}

.start-search-wrap { position: relative; }

#start-search {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text);
  outline: none;
  cursor: none;
  transition: border-color 0.15s;
}
#start-search:focus { border-color: var(--accent); }
#start-search::placeholder { color: var(--text-dim); }

#start-apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.start-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px 8px;
  border-radius: var(--radius-sm);
  cursor: none;
  transition: background 0.1s;
}
.start-app-item:hover { background: var(--bg-hover); }
.start-app-ico { line-height: 0; }
.start-app-item span { font-size: 10px; color: var(--text-muted); text-align: center; }

/* ─── Skills App ────────────────────────────────────────── */
.skills-app {
  height: 100%;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.sk-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sk-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sk-group-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  flex-shrink: 0;
}

.sk-group-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.sk-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sk-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.1s;
}

.sk-row:hover { background: var(--bg-hover); }

.sk-name {
  font-size: 12px;
  color: var(--text);
  min-width: 180px;
  flex-shrink: 0;
  padding-top: 1px;
}

.sk-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.sk-tag {
  font-size: 10px;
  padding: 2px 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-soft);
  border-radius: 3px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sk-tag-link {
  cursor: pointer;
  color: var(--accent2);
  border-color: rgba(158,206,106,0.3);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.sk-tag-link:hover {
  background: rgba(158,206,106,0.1);
  color: var(--accent);
  border-color: rgba(74,222,128,0.4);
}

/* ─── Markdown Viewer ───────────────────────────────────── */
.md-viewer {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-window);
  overflow: hidden;
}

.md-viewer-path {
  padding: 6px 16px;
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.md-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 28px;
  line-height: 1.75;
  color: var(--text);
}

.md-h1 {
  font-size: 18px;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}
.md-h2 {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent2);
  margin: 22px 0 8px;
}
.md-h3 {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.md-p {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text);
}

.md-ul {
  margin: 0 0 12px 0;
  padding-left: 18px;
  list-style: none;
}
.md-li {
  font-size: 12.5px;
  padding: 2px 0;
  position: relative;
}
.md-li::before {
  content: '–';
  position: absolute;
  left: -14px;
  color: var(--text-muted);
}

.md-pre {
  background: var(--bg);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 12px 14px;
  margin: 0 0 14px;
  overflow-x: auto;
  font-size: 11.5px;
  line-height: 1.6;
}
.md-pre code {
  color: var(--accent2);
}

.md-inline {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 11.5px;
  color: var(--accent2);
}

.md-hr {
  border: none;
  border-top: 1px solid var(--border-soft);
  margin: 18px 0;
}

.md-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.md-body strong { color: var(--text); font-weight: 500; }
.md-body em     { color: var(--text-muted); font-style: italic; }

/* ─── Scrollbars ────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-soft); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── Selection ─────────────────────────────────────────── */
::selection { background: var(--bg-select); color: var(--text); }
