/* Site map tree — /sitemap */
.sm-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}

.sm-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.sm-lead {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 28px;
  max-width: 640px;
}

.sm-tree {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sm-branch {
  padding: 18px 20px;
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border);
  border-radius: 10px;
}

.sm-branch-muted {
  opacity: 0.92;
  background: var(--bg-secondary);
}

.sm-label-root {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.sm-hint {
  display: inline-block;
  font-size: 11px;
  color: var(--text-muted);
  margin: -4px 0 10px;
  font-weight: 500;
}

.sm-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Two-column rows: label (left) | description (right), aligned across the page */
.sm-cols {
  display: grid;
  grid-template-columns: minmax(140px, 38%) minmax(0, 1fr);
  gap: 6px 18px;
  align-items: start;
}

.sm-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.sm-cols-label {
  min-width: 0;
}

.sm-cols .sm-sub {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-secondary);
}

.sm-list-root > li {
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.45;
}

.sm-list-root > li:last-child {
  margin-bottom: 0;
}

.sm-list-nested {
  margin: 8px 0 0 14px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
}

.sm-list-nested > li {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.sm-list-nested > li:last-child {
  margin-bottom: 0;
}

.sm-list-nested .sm-cols .sm-desc {
  font-size: 12px;
}

.sm-list-compact .sm-link {
  font-size: 13px;
}

.sm-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.sm-link:hover {
  text-decoration: underline;
}

.sm-link-sub {
  font-weight: 500;
}

.sm-tab {
  color: var(--text-secondary);
  font-weight: 500;
}

.sm-pseudo {
  color: var(--text-muted);
  font-size: 13px;
}

.sm-url {
  font-size: 11px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: var(--text-muted);
}

.sm-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.sm-sub-nested {
  padding-left: 12px;
  margin-top: 0;
  list-style: none;
}

.sm-cols.sm-sub-nested {
  padding-left: 12px;
  border-left: 2px solid var(--border);
  margin-left: 4px;
}

.sm-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: var(--purple, #a78bfa);
  margin-left: 6px;
  vertical-align: middle;
}

.sm-code {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  background: var(--bg-tertiary);
  padding: 1px 6px;
  border-radius: 4px;
}

.sm-branch-internal .sm-label-root::after {
  content: '';
}

@media (max-width: 640px) {
  .sm-page {
    padding: 20px 16px 48px;
  }

  .sm-cols {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .sm-desc {
    padding-bottom: 6px;
  }
}
