/* Hierarchical HTML sitemap */
.page-wrapper { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.site-header { padding-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.site-logo img { width: auto; height: auto; max-width: 240px; display: block; }
.sm-wrap { padding: 8px 0 48px; }
.sm-lead { color: #4b5563; line-height: 1.7; margin: 8px 0 16px; }
.sm-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin: 12px 0 20px; position: sticky; top: 0; z-index: 3;
  background: rgba(255,255,255,.94); padding: 10px 0; border-bottom: 1px solid #e5e7eb;
}
.sm-toolbar input {
  flex: 1 1 240px; min-width: 180px; padding: 8px 10px;
  border: 1px solid #d1d5db; border-radius: 6px; font-size: 15px;
}
.sm-count { color: #6b7280; font-size: 13px; }
.sm-toc { display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0; list-style: none; width: 100%; }
.sm-toc a { font-size: 14px; }
.sm-section { margin: 22px 0; }
.sm-section > h2 {
  margin: 0 0 10px; font-size: 20px; border-bottom: 2px solid #e5e7eb; padding-bottom: 6px;
}
.sm-section > h2 .n { color: #6b7280; font-weight: 500; font-size: 14px; }
.sm-tree, .sm-tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }
.sm-tree { padding-left: 0; }
.sm-tree li { margin: 3px 0; line-height: 1.55; }
.sm-tree a { display: inline; }
.sm-tree details { margin: 4px 0; }
.sm-tree summary {
  cursor: pointer; font-weight: 600; color: #111827;
  padding: 4px 0;
}
.sm-tree summary:hover { color: #0369a1; }
.sm-tree details[open] > summary { color: #0369a1; }
.sm-tree .dir-count { color: #9ca3af; font-weight: 500; font-size: 13px; }
.footer { margin-top: 28px; padding: 12px 0; border-top: 1px solid #ddd; font-size: 13px; color: #666; }
html[dir="rtl"] .sm-tree, html[dir="rtl"] .sm-tree ul { padding: 0 14px 0 0; }
html[dir="rtl"] .sm-tree { padding-right: 0; }
@media (max-width: 768px) {
  .page-wrapper { padding: 0 12px; }
  .site-header { display: block; }
  .sm-section > h2 { font-size: 18px; }
  .sm-toolbar { position: static; }
}
