/* Public command and documentation pages */
.commands-page, .documentation { width: min(1368px, calc(100% - 72px)); }
.commands-page { padding-block: 42px 72px; }
.commands-intro { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 36px; margin-bottom: 26px; }
.commands-intro h1 { margin-top: 10px; font: 700 clamp(30px,3vw,40px)/1.2 'Onest',sans-serif; letter-spacing: -.035em; }
.commands-intro p { max-width: 650px; margin-top: 10px; font-size: 15px; }
.command-stats { display: grid; grid-template-columns: repeat(3,minmax(104px,1fr)); gap: 12px; }
.command-stats > div { display: grid; place-items: center; min-width: 112px; min-height: 82px; padding: 12px; border-radius: 14px; background: #1e1f26; }
.command-stats strong { color: #f2f4fb; font-size: 24px; line-height: 1.1; }
.command-stats span { color: #a9adbd; font-size: 12px; font-weight: 600; }
.command-browser { display: grid; grid-template-columns: 250px minmax(0,1fr); align-items: start; gap: 28px; }
.command-sidebar { position: sticky; top: 18px; display: grid; gap: 12px; }
.command-search { display: block; max-width: none; }
.command-search > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.command-search input { min-height: 42px; padding: 10px 13px; border: 0; border-radius: 9px; background: #16171c; font-size: 14px; }
.command-sidebar > h2 { margin: 5px 0 -6px; padding: 0 8px; color: #a9adbd; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.command-filters { display: grid; gap: 2px; max-height: min(54vh, 480px); overflow: auto; margin: 0; padding: 8px; border-radius: 14px; background: #1e1f26; scrollbar-color: #41424c transparent; }
.command-filters button { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 36px; padding: 7px 11px; border-radius: 9px; background: transparent; color: #aeb1c0; text-align: left; }
.command-filters button:hover { background: #292a32; color: #f2f4fb; }
.command-filters button[aria-pressed="true"] { background: #533544; color: #ffe0ea; }
.filter-count { display: inline-grid; place-items: center; min-width: 23px; min-height: 23px; padding: 0 6px; border-radius: 20px; background: #34353e; color: #b9bdcb; font-size: 11px; }
.command-filters [aria-pressed="true"] .filter-count { background: #70465c; color: #ffe0ea; }
.command-legend { margin: 0; padding: 15px 16px; border-radius: 14px; background: #1e1f26; }
.command-legend h3 { margin-bottom: 12px; color: #a9adbd; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.command-legend p { margin: 6px 0; }
.option-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.option-legend .option-type { border-radius: 20px; background: #34353e; color: #c3c6d3; }
.command-results-head { margin: 0 0 12px; }
.command-results-head h2 { color: #f2f4fb; font-size: 18px; }
.command-list { gap: 8px; }
.command-card { border-radius: 12px; background: #1e1f26; }
.command-card-head { min-height: 57px; padding: 15px 20px; }
.command-card-head:hover { background: #24252d; }
.command-name { flex: 0 0 94px; min-width: 0; color: #f2f4fb; font: 700 15px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; }
.command-description { overflow: hidden; color: #a9adbd; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.command-category { flex: none; border-radius: 20px; background: #34353e; color: #c3c6d3; white-space: nowrap; }
.command-chevron { flex: none; font-size: 17px; }
.command-body { padding: 0 20px 18px; }
.command-usage { border-radius: 7px; }
.command-option { grid-template-columns: minmax(100px,1fr) auto auto minmax(120px,2fr); }
.documentation { grid-template-columns: 270px minmax(0,1fr) 170px; gap: 32px; padding-block: 36px 72px; }
.documentation-nav { position: sticky; top: 18px; max-height: calc(100vh - 36px); overflow: auto; gap: 5px; padding: 12px; border-radius: 14px; background: #1e1f26; scrollbar-color: #41424c transparent; }
.documentation-nav strong { margin: 2px 8px 8px; }
.documentation-nav input { margin: 0; }
.docs-guide-list { gap: 2px; }
.docs-group summary { position: relative; padding: 9px 8px; color: #f2f4fb; letter-spacing: .025em; text-transform: uppercase; }
.docs-guide-list a { min-height: 36px; padding: 9px 10px; border-radius: 8px; font-size: 13px; }
.docs-guide-list .docs-group a { padding-left: 20px; }
.docs-guide-list a[aria-current="page"] { background: #533544; color: #ffe0ea; }
.documentation-body { width: min(100%, 824px); justify-self: center; padding: 30px 44px; border-radius: 14px; background: #1e1f26; color: #c4c7d4; font-size: 15px; line-height: 1.72; }
.documentation-body > h1:first-child { margin: 0 0 18px; color: #f2f4fb; font: 700 clamp(27px,2.5vw,34px)/1.2 'Onest',sans-serif; letter-spacing: -.03em; }
.documentation-body h2 { margin: 26px 0 12px; padding-top: 20px; border-top: 1px solid #ffffff12; color: #f2f4fb; font-size: 19px; }
.documentation-body h3 { margin: 22px 0 8px; color: #f2f4fb; font-size: 16px; }
.documentation-body p, .documentation-body ul, .documentation-body ol { margin-bottom: 14px; }
.documentation-body li { padding-left: 2px; }
.documentation-body a { color: #d6a6ff; text-decoration: underline; text-underline-offset: 3px; }
.documentation-body a:hover { color: #f0c8ff; }
.documentation-body h2[id], .documentation-body h3[id] { scroll-margin-top: 20px; }
.documentation-body .heading-anchor { margin-left: 8px; color: #777b8b; font-size: .8em; text-decoration: none; opacity: 0; }
.documentation-body h2:hover .heading-anchor, .documentation-body h3:hover .heading-anchor, .documentation-body .heading-anchor:focus-visible { opacity: 1; }
.documentation-body code { padding: 2px 5px; border-radius: 5px; background: #16171c; color: #d8c2ec; }
.documentation-body pre { margin: 16px 0 22px; padding: 16px 18px; border-radius: 10px; background: #16171c; color: #d8c2ec; }
.documentation-body pre code { padding: 0; background: none; }
.documentation-body blockquote { margin: 18px 0; padding: 12px 16px; border-left: 3px solid #f2abc0; border-radius: 0 8px 8px 0; background: #25232a; color: #c4c7d4; }
.documentation-body table { display: table; width: 100%; overflow: hidden; border-collapse: collapse; border-radius: 8px; background: #191a20; }
.documentation-body th, .documentation-body td { min-width: 0; padding: 10px 12px; border-bottom: 1px solid #ffffff12; }
.documentation-body th { color: #f2f4fb; }
.documentation-toc { position: sticky; top: 20px; padding-top: 6px; }
.documentation-toc > span { display: block; margin-bottom: 12px; color: #a9adbd; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.documentation-toc nav { display: grid; gap: 4px; }
.documentation-toc a { padding: 5px 8px; border-left: 1px solid #3d3e48; color: #9fa3b2; font-size: 13px; line-height: 1.4; }
.documentation-toc a:hover { border-color: #f2abc0; color: #f2f4fb; text-decoration: none; }
.documentation-toc a.toc-subitem { padding-left: 17px; font-size: 12px; }
.docs-pager { display: flex; justify-content: space-between; gap: 14px; margin-top: 34px; padding-top: 20px; border-top: 1px solid #ffffff12; }
.docs-pager a { display: grid; gap: 4px; min-width: 0; padding: 12px 14px; border-radius: 9px; background: #25262e; text-decoration: none; }
.docs-pager a:last-child { margin-left: auto; text-align: right; }
.docs-pager small { color: #a9adbd; font-size: 11px; }
.docs-pager strong { color: #f2f4fb; font-size: 13px; }
@media(max-width:1050px) { .documentation { grid-template-columns: 245px minmax(0,1fr); }.documentation-toc { display: none; }.documentation-body { padding-inline: 30px; } }
@media(max-width:700px) {
  .commands-page, .documentation { width: calc(100% - 36px); }
  .commands-page { padding-top: 30px; }
  .commands-intro { grid-template-columns: 1fr; gap: 20px; }
  .command-stats { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
  .command-stats > div { min-width: 0; min-height: 68px; padding: 9px 5px; }
  .command-stats strong { font-size: 20px; }
  .command-stats span { font-size: 10px; }
  .command-browser { grid-template-columns: 1fr; gap: 20px; }
  .command-sidebar { position: static; }
  .command-filters { grid-template-columns: repeat(2,minmax(0,1fr)); max-height: 210px; }
  .command-legend { display: none; }
  .command-card-head { display: grid; grid-template-columns: minmax(0,1fr) auto 20px; gap: 4px 8px; padding: 14px; }
  .command-name { grid-column: 1; font-size: 14px; }
  .command-description { grid-column: 1/-1; grid-row: 2; white-space: normal; }
  .command-category { grid-column: 2; grid-row: 1; }
  .command-chevron { grid-column: 3; grid-row: 1; justify-self: end; }
  .command-option { grid-template-columns: 1fr auto; gap: 5px 8px; }
  .command-option span:last-child { grid-column: 1/-1; }
  .documentation { grid-template-columns: 1fr; gap: 18px; padding-top: 24px; }
  .documentation-nav { position: static; max-height: none; }
  .documentation-body { width: 100%; padding: 24px 20px; font-size: 14px; }
  .documentation-body table { display: block; overflow-x: auto; }
  .documentation-body pre { max-width: 100%; }
}
@media(prefers-reduced-motion:reduce) { .command-card[open] .command-body { animation: none; } }
