:root {
  --background: #181a1b;
  --card: #252a33;
  --row: #2f2f30;
  --row-open: #212c42;
  --accent: #738adb;
  --text: #ffffff;
  --muted: #bdbdbd;
  --line: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); font-family: Roboto, Arial, sans-serif; letter-spacing: 0.2px; }
button, input { font: inherit; }
.directory-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 26px 0 56px; }
.site-header { display: flex; align-items: center; gap: 28px; min-height: 62px; margin-bottom: 38px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); font-size: 1.2rem; font-weight: 700; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); }
.site-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.site-nav a { color: var(--muted); font-size: 0.9rem; text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a.active { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 7px; }
.site-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; }
.site-status i { width: 7px; height: 7px; border-radius: 50%; background: #70d142; box-shadow: 0 0 10px rgba(112, 209, 66, 0.6); }
.directory-layout { display: grid; grid-template-columns: minmax(230px, 0.78fr) minmax(0, 2fr); gap: 32px; align-items: start; }
.category-card { position: sticky; top: 22px; padding: 26px; background: var(--card); border-radius: 8px; box-shadow: 0 0 24px rgba(0, 0, 0, 0.35); }
.overline { margin: 0 0 10px; color: var(--accent); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
.category-card h1 { margin-bottom: 14px; font-size: clamp(1.75rem, 3vw, 2.45rem); line-height: 1.05; }
.category-copy { margin-bottom: 24px; color: var(--muted); line-height: 1.5; }
.rule { height: 1px; margin: 0 -2px 20px; background: var(--line); }
.category-label { margin-bottom: 10px; color: var(--muted); font-size: 0.82rem; }
.module-list { display: grid; gap: 7px; }
.module-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text); cursor: pointer; text-align: left; transition: background 0.18s ease, border-color 0.18s ease; }
.module-btn:hover, .module-btn.active { background: var(--accent); border-color: var(--accent); }
.module-name { font-size: 0.92rem; font-weight: 500; }
.module-count { color: rgba(255, 255, 255, 0.65); font-size: 0.75rem; }
.module-btn.active .module-count { color: rgba(255, 255, 255, 0.9); }
.commands-column { min-width: 0; }
.commands-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 10px 0 20px; }
.commands-heading h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.45rem); }
.result-count { color: var(--muted); font-size: 0.82rem; }
.search-wrap { display: flex; align-items: center; gap: 10px; width: 100%; margin-bottom: 18px; padding: 11px 16px; border: 2px solid var(--row); border-radius: 22px; background: var(--row); color: var(--muted); }
.search-wrap:focus-within { border-color: var(--accent); }
.search-wrap span { font-size: 1.2rem; line-height: 1; }
.search-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-wrap input::placeholder { color: var(--muted); }
.command-list { display: grid; gap: 8px; }
.command-item { overflow: hidden; border-radius: 8px; background: var(--row); }
.command-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 18px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; }
.command-toggle:hover, .command-item.open .command-toggle { background: var(--row-open); }
.command-title { font-size: 0.98rem; font-weight: 500; }
.command-title::before { content: "/"; margin-right: 2px; color: var(--accent); }
.command-description { color: var(--muted); font-size: 0.86rem; }
.command-chevron { color: var(--muted); font-size: 1.1rem; transition: transform 0.18s ease; }
.command-item.open .command-chevron { transform: rotate(180deg); }
.command-details { display: none; padding: 0 18px 17px; background: var(--row-open); color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.command-item.open .command-details { display: block; }
.command-details strong { color: var(--text); font-weight: 500; }
.command-details code { display: inline-block; margin-top: 7px; padding: 5px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.2); color: var(--text); font-family: Consolas, monospace; font-size: 0.8rem; white-space: pre-wrap; }
.empty-state { padding: 28px; border-radius: 8px; background: var(--card); color: var(--muted); text-align: center; }
@media (max-width: 760px) {
  .directory-shell { width: min(100% - 22px, 600px); padding-top: 16px; }
  .site-header { flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
  .site-nav { order: 3; width: 100%; justify-content: space-between; gap: 10px; overflow-x: auto; }
  .site-status { margin-left: auto; }
  .directory-layout { grid-template-columns: 1fr; gap: 24px; }
  .category-card { position: static; }
  .module-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 430px) {
  .module-list { grid-template-columns: 1fr; }
  .command-toggle { padding: 14px; }
  .command-description { display: block; margin-top: 4px; }
}
