:root {
  --bg: #1b1b1d;
  --text: #e3e3e3;
  --muted: #a8a8ad;
  --line: #3a3a3e;
  --hover: #2a2a2d;
  --accent: #ffe27a;
  --accent-bg: rgba(255, 226, 122, 0.12);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

body { display: flex; }

#sidebar {
  width: 280px;
  flex-shrink: 0;
  height: 100%;
  overflow-y: auto;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
}

.item {
  display: block;
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.item:hover { background: var(--hover); }
.item.active { color: var(--accent); background: var(--accent-bg); }

.row { display: flex; align-items: center; }
.row .item { flex: 1; }

.toggle {
  width: 34px;
  height: 34px;
  margin-left: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.toggle:hover { background: var(--hover); }
.toggle::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s;
}
.group.collapsed .toggle::before { transform: rotate(-45deg); }

.children { padding-left: 16px; }
.group.collapsed .children { display: none; }

#content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 32px 48px;
}
#content h1 { margin-top: 0; font-size: 2.4rem; }
#content a { color: var(--accent); }

@media (max-width: 700px) {
  body { flex-direction: column; }
  #sidebar { width: 100%; height: 40%; border-right: 0; border-bottom: 1px solid var(--line); }
  #content { padding: 20px; }
}
