
/* ═══════════════════════════════════════════════════════════
   CATEGORY TREE (categories.html)
   ═══════════════════════════════════════════════════════════ */

.cat-tree,
.cat-children {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cat-tree {
  max-width: 760px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-surface);
}

.cat-node {
  border-bottom: 1px solid var(--line);
}
.cat-node:last-child { border-bottom: 0; }

.cat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

.cat-toggle,
.cat-toggle-spacer {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;
}

.cat-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.cat-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(212,175,55,0.06);
}

.cat-toggle-spacer {
  border: 1px solid transparent;
}

.cat-link {
  flex: 1;
  color: var(--text);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  transition: color 0.15s;
}
.cat-link:hover { color: var(--gold); }

.cat-count {
  font-size: 0.72rem;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.cat-children {
  padding-left: 2rem;
  margin: 0 0 0.5rem;
  border-left: 1px solid var(--line);
}
.cat-children .cat-row { padding: 0.4rem 0; }
.cat-children .cat-link { font-size: 0.9rem; color: var(--text-dim); }
.cat-children .cat-link:hover { color: var(--gold); }

@media (max-width: 720px) {
  .cat-tree { padding: 0.5rem 0.75rem 1rem; }
  .cat-children { padding-left: 1rem; }
}
