:root { color-scheme: light; --ink: #202d3f; --muted: #6b7788; --blue: #285ac7; --line: #e0e5ec; --paper: #fff; --page: #f5f6f8; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: "Sarasa Gothic SC", "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; font-size: 15px; line-height: 1.65; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #adc7fb; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 5; padding: 10px 16px; background: white; }
.skip-link:focus { top: 8px; }
.site-header { height: 78px; max-width: 1360px; margin: auto; padding: 0 40px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.8px; }
.brand span { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 1px; margin-left: 14px; }
.site-header nav { display: flex; gap: 28px; font-size: 14px; }
.site-header nav a { color: var(--muted); }
.site-header nav a[aria-current] { color: var(--blue); font-weight: 700; }
main { max-width: 1280px; margin: 0 auto; padding: 48px 40px 70px; }
.hero { padding-bottom: 28px; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2.5px; color: var(--blue); margin: 0 0 14px; }
h1 { font-size: clamp(32px, 4vw, 46px); line-height: 1.25; margin: 0 0 18px; font-weight: 800; letter-spacing: -1px; }
h1 span { display: inline-block; margin-left: 26px; font-size: 18px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.intro { color: var(--muted); margin: 0 0 30px; }
.hero-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.totals { display: flex; gap: 28px; flex-wrap: wrap; }
.totals div { display: flex; align-items: baseline; gap: 10px; }
.totals strong { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.totals span, .legend { font-size: 12px; color: var(--muted); }
.legend { text-align: right; margin: 0; line-height: 1.9; }
.toolbar { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.search-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.search-box { background: var(--paper); border: 1px solid #d3dbe6; border-radius: 8px; padding: 0 14px; flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.search-box > span { color: var(--blue); font-size: 25px; }
.search-box input { width: 100%; min-width: 0; height: 46px; border: 0; background: transparent; color: var(--ink); outline: none; font-size: 14px; }
.search-box:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px #285ac710; }
.search-box kbd { color: #99a3b2; border: 1px solid var(--line); padding: 0 6px; border-radius: 4px; }
.status-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
#state { height: 46px; padding: 0 30px 0 12px; border: 1px solid #d3dbe6; border-radius: 8px; color: var(--ink); background: white; }
#reset { border: 0; background: transparent; color: var(--muted); font-size: 13px; white-space: nowrap; padding: 10px 0 10px 6px; }
#reset:hover { color: var(--blue); }
.layout { display: grid; grid-template-columns: 194px minmax(0, 1fr); gap: 32px; align-items: start; }
.sidebar { position: sticky; top: 22px; max-height: calc(100vh - 44px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.sidebar h2 { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 1.5px; margin: 0 0 15px 12px; }
.categories { display: flex; flex-direction: column; gap: 3px; }
.category { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 12px; border: 0; border-radius: 7px; background: transparent; text-align: left; font-size: 13px; }
.category-parent { font-size: 14px; font-weight: 700; }
.subcategories { margin: 3px 0 9px 15px; padding-left: 7px; border-left: 1px solid #d8e0ed; display: flex; flex-direction: column; gap: 2px; }
.subcategory { padding: 6px 9px; font-size: 12px; }
.category small { color: #939dad; font-size: 11px; font-variant-numeric: tabular-nums; }
.category:hover { background: #e9edf3; }
.category.active { color: var(--blue); background: #e8eefb; font-weight: 700; }
.category.active small { color: var(--blue); }
.directory { min-width: 0; }
.results-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 10px; }
.results-heading h2 { font-size: 20px; margin: 0; font-weight: 750; }
.results-heading p { font-size: 12px; color: var(--muted); margin: 0; }
.directory-note { margin: 0 0 22px; font-size: 12px; line-height: 1.85; color: var(--muted); }
.command-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.command-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.command-card:hover { border-color: #b4c6e6; }
.card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; width: 100%; font-size: 10px; margin-bottom: 12px; }
.card-category { color: var(--blue); font-weight: 600; }
.source { color: #939dad; margin-left: auto; }
.badge { padding: 1px 7px; border-radius: 4px; }
.badge.paused { color: #8b6946; background: #f5eee3; }
.command-card h3 { max-width: 100%; margin: 0 0 9px; font-size: 18px; font-weight: 700; line-height: 1.55; }
code { font-family: "Sarasa Mono SC", "Cascadia Code", Consolas, "Microsoft YaHei", monospace; overflow-wrap: anywhere; }
.description { margin: 0 0 17px; font-size: 13px; color: #5f6b7c; line-height: 1.8; }
.usage { width: 100%; margin-top: auto; padding: 10px 12px; border-radius: 6px; background: #f5f7fa; display: flex; flex-direction: column; gap: 4px; }
.usage > span { color: #909aad; font-size: 10px; }
.usage code { font-size: 12px; line-height: 1.8; }
.copy { border: 0; padding: 0; margin-top: 12px; background: transparent; color: var(--blue); font-size: 11px; }
.copy span { margin-left: 6px; }
#empty { padding: 70px 20px; text-align: center; border: 1px dashed #c9d2df; border-radius: 10px; color: var(--muted); }
footer { max-width: 1280px; margin: auto; border-top: 1px solid var(--line); padding: 24px 40px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 11px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--ink); color: white; border-radius: 8px; padding: 10px 20px; font-size: 13px; z-index: 4; }
@media (max-width: 1000px) {
  .layout { grid-template-columns: 165px minmax(0, 1fr); gap: 24px; }
  .command-grid { grid-template-columns: 1fr; }
  h1 span { display: block; margin: 14px 0 0; }
}
@media (max-width: 720px) {
  .site-header { padding: 0 20px; height: 64px; }
  .brand { font-size: 22px; }
  .brand span { display: none; }
  .site-header nav { gap: 16px; font-size: 12px; }
  main { padding: 30px 20px 45px; }
  .hero-bottom { align-items: flex-start; flex-direction: column; gap: 15px; }
  .totals { gap: 22px; flex-wrap: wrap; }
  .totals div { gap: 7px; }
  .totals strong { font-size: 25px; }
  .legend { text-align: left; }
  .toolbar { flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
  .search-box { flex-basis: 100%; }
  #reset { margin-left: auto; }
  .layout { display: block; }
  .sidebar { position: static; max-height: none; padding: 0 0 20px; overflow: visible; }
  .sidebar h2 { margin-left: 0; }
  .categories { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 3px 0 8px; }
  .category-group.has-children { grid-column: 1 / -1; }
  .subcategories { margin: 6px 0 4px; padding: 0 0 0 8px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .category { border: 1px solid var(--line); min-width: 0; }
  .category.active { border-color: #c3d4f5; }
  .command-card { padding: 18px; }
  footer { padding: 20px; flex-direction: column; gap: 8px; }
}
