:root {
  --sidebar-w: 280px;
  --bg: #f8fafc;
  --panel: #fff;
  --border: rgba(148, 163, 184, 0.22);
  --text: #0f172a;
  --muted: #64748b;
  --accent: #4f46e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: #e2e8f0;
  color: var(--text);
}

.demo-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.demo-top h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.demo-top p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.demo-top a {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.demo-stage {
  display: flex;
  justify-content: center;
  padding: 24px 16px 40px;
}

.sidebar-mock {
  width: var(--sidebar-w);
  min-height: 640px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.sidebar-mock-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.sidebar-mock-head strong {
  display: block;
  font-size: 13px;
}

.sidebar-mock-head span {
  font-size: 11px;
  color: var(--muted);
}

.sidebar-mock-tree {
  flex: 1;
  padding: 10px 12px;
  overflow: auto;
}

.tree-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #334155;
}

.tree-item.is-muted {
  color: var(--muted);
  padding-left: 22px;
}

.sidebar-mock-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.mock-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.mock-stat {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.9);
}

.mock-stat b {
  font-size: 11px;
}

.footer-panel {
  display: flex;
  flex-direction: column;
}

.footer-panel.is-collapsed .footer-body {
  display: none;
}

.footer-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0 10px 10px 12px;
}

.mock-section {
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
}

.mock-section summary {
  list-style: none;
  cursor: pointer;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 600;
}

.mock-section summary::-webkit-details-marker {
  display: none;
}

.mock-section--purple {
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.mock-section--blue {
  border-color: #a5b4fc;
  background: #eef2ff;
}

.mock-section--slate {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

.mock-section-body {
  padding: 6px 10px 8px;
  font-size: 10px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.chevron {
  width: 7px;
  height: 7px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.footer-panel:not(.is-collapsed) .chevron {
  transform: rotate(45deg);
}

.mock-sub {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 500;
  color: var(--muted);
}

.mock-env-band {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 55%, #818cf8 100%);
  color: #fff;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-stats-band {
  padding: 10px 12px;
  background: linear-gradient(135deg, #64748b 0%, #78859a 55%, #94a3b8 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}

/* ── Mock tree (variants 21–30) ── */

.mock-tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mock-tree-node {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.3;
  color: #334155;
  cursor: pointer;
  user-select: none;
}

.mock-tree-node:hover {
  background: rgba(148, 163, 184, 0.12);
}

.mock-tree-toggle {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}

.mock-tree-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-tree-meta {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 9px;
  color: var(--muted);
}

.mock-tree-branch.is-collapsed > ul {
  display: none;
}

.mock-tree-body {
  padding: 6px 8px 8px;
  background: #f8fafc;
}
