/* Orion Admin documentation shell (docs only — not part of the library) */
:root { --docs-header-h: 3.5rem; --docs-sidebar-w: 16.5rem; --docs-toc-w: 13rem; }
body.docs { background: var(--o-bg); }
.docs-header {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: .75rem; height: var(--docs-header-h); padding: 0 1rem;
  background: color-mix(in srgb, var(--o-surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--o-border);
}
.docs-brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1rem; color: var(--o-text); text-decoration: none !important; white-space: nowrap; }
.docs-logo { width: 1.75rem; height: 1.75rem; border-radius: 8px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--o-primary), color-mix(in srgb, var(--o-primary) 45%, var(--o-info))); box-shadow: var(--o-shadow-sm); }
.docs-logo svg { width: 1rem; height: 1rem; }
.docs-version { font-size: .6875rem; font-weight: 600; color: var(--o-text-muted); background: var(--o-surface-3); border-radius: 999px; padding: .1rem .45rem; }
.docs-search { position: relative; flex: 0 1 18rem; margin-inline-start: auto; display: flex; align-items: center; }
.docs-search input { width: 100%; height: 2.125rem; padding-inline-start: 2.1rem; padding-inline-end: 2rem; background: var(--o-surface-2); }
.docs-search .o-icon { position: absolute; inset-inline-start: .65rem; top: 50%; transform: translateY(-50%); color: var(--o-text-subtle); pointer-events: none; }
.docs-search-clear, .docs-nav-search-clear {
  position: absolute; inset-inline-end: .45rem; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem;
  display: grid; place-items: center; border: 0; background: transparent;
  color: var(--o-text-muted); border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; padding: 0;
}
.docs-search-clear:hover, .docs-nav-search-clear:hover { background: var(--o-surface-3); color: var(--o-text); }
.docs-tools { display: flex; align-items: center; gap: .25rem; }
.docs-menu-btn { display: none; }
.docs-layout { display: grid; grid-template-columns: var(--docs-sidebar-w) minmax(0, 1fr); min-height: calc(100vh - var(--docs-header-h)); }
.docs-sidebar {
  position: sticky; top: var(--docs-header-h); height: calc(100vh - var(--docs-header-h)); overflow-y: auto;
  display: flex; flex-direction: column; padding: 0;
  border-inline-end: 1px solid var(--o-border); background: var(--o-surface); scrollbar-width: thin; scrollbar-color: var(--o-scrollbar) transparent;
}
.docs-sidebar-header {
  position: sticky; top: 0; z-index: 10; padding: .75rem .75rem .45rem;
  background: color-mix(in srgb, var(--o-surface) 96%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--o-border);
}
.docs-sidebar-search { position: relative; display: flex; align-items: center; width: 100%; }
.docs-sidebar-search .o-input {
  width: 100%; height: 2.125rem; padding-inline-start: 2rem; padding-inline-end: 2rem;
  font-size: .8125rem; background: var(--o-surface-2); border-radius: 6px;
}
.docs-sidebar-search .o-input:focus { background: var(--o-surface); }
.docs-sidebar-search-icon {
  position: absolute; inset-inline-start: .625rem; color: var(--o-text-subtle); pointer-events: none;
  display: inline-flex; align-items: center;
}
.docs-sidebar-search-icon .o-icon { width: .95rem; height: .95rem; }
.docs-search-kbd {
  position: absolute; inset-inline-end: .55rem; font-family: var(--o-font-mono); font-size: .6875rem;
  padding: .1rem .35rem; color: var(--o-text-subtle); background: var(--o-surface-3);
  border: 1px solid var(--o-border); border-radius: 4px; pointer-events: none; line-height: 1.2;
}
.docs-sidebar-toolbar {
  display: flex; align-items: center; justify-content: space-between; margin-top: .4rem; padding: 0 .2rem;
  font-size: .6875rem; color: var(--o-text-subtle);
}
.docs-sidebar-count { font-weight: 600; }
.docs-accordion-toggle {
  border: 0; background: transparent; font-size: .6875rem; font-weight: 500;
  color: var(--o-primary-text); cursor: pointer; padding: .1rem .35rem; border-radius: 4px;
  transition: background .12s, color .12s;
}
.docs-accordion-toggle:hover { background: var(--o-primary-subtle); }

/* Accordion Nav List */
.docs-sidebar-nav { padding: .5rem .5rem 3rem; flex: 1; min-height: 0; }
details.docs-nav-section { margin-bottom: .25rem; border-radius: 6px; }
summary.docs-nav-title {
  display: flex; align-items: center; justify-content: space-between; gap: .35rem;
  padding: .35rem .5rem; font-size: .75rem; font-weight: 700; letter-spacing: .02em;
  color: var(--o-text-subtle); border-radius: 6px; cursor: pointer; user-select: none;
  list-style: none; transition: background .12s, color .12s;
}
summary.docs-nav-title::-webkit-details-marker { display: none; }
summary.docs-nav-title:hover { color: var(--o-text); background: var(--o-surface-2); }
details[open] > summary.docs-nav-title { color: var(--o-text); }
.docs-nav-section.has-active > summary.docs-nav-title { color: var(--o-primary-text); }
.docs-nav-title-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-nav-count {
  font-size: .65rem; font-weight: 600; color: var(--o-text-subtle);
  background: var(--o-surface-3); border-radius: 999px; padding: .05rem .35rem; line-height: 1.2;
}
.docs-nav-chevron {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1rem; height: 1rem; color: var(--o-text-subtle);
  transition: transform .18s cubic-bezier(0.4, 0, 0.2, 1);
}
.docs-nav-chevron .o-icon { width: .8rem; height: .8rem; }
details[open] > summary .docs-nav-chevron { transform: rotate(90deg); color: var(--o-primary); }
[dir="rtl"] details[open] > summary .docs-nav-chevron { transform: rotate(-90deg); }
.docs-nav-body {
  padding: .15rem 0 .35rem .5rem; margin-inline-start: .5rem;
  border-inline-start: 1.5px solid color-mix(in srgb, var(--o-border) 80%, transparent);
}
.docs-nav-link {
  display: block; padding: .3rem .55rem; margin: 1px 0; font-size: .8125rem;
  color: var(--o-text-muted); border-radius: 6px; text-decoration: none !important;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .12s, background .12s;
}
.docs-nav-link:hover { color: var(--o-text); background: var(--o-surface-3); }
.docs-nav-link.is-active { color: var(--o-primary-text); background: var(--o-primary-subtle); font-weight: 600; }
.docs-nav-link[hidden] { display: none !important; }
details.docs-nav-section[hidden] { display: none !important; }

/* Empty Search State */
.docs-nav-empty { padding: 2rem 1rem; text-align: center; color: var(--o-text-muted); }
.docs-nav-empty-icon {
  width: 2rem; height: 2rem; margin: 0 auto .5rem; color: var(--o-text-subtle); opacity: .7;
  display: flex; align-items: center; justify-content: center;
}
.docs-nav-empty-icon .o-icon { width: 1.5rem; height: 1.5rem; }
.docs-nav-empty-text { font-size: .8125rem; margin-bottom: .75rem; }
.docs-nav-empty-text strong { color: var(--o-text); word-break: break-all; }
.docs-content { display: grid; grid-template-columns: minmax(0, 1fr) var(--docs-toc-w); gap: 2.5rem; padding: 2rem clamp(1.25rem, 3vw, 3rem) 5rem; width: 100%; max-width: 100rem; margin-inline: auto; }
.docs-main { min-width: 0; }
.docs-toc { position: sticky; top: calc(var(--docs-header-h) + 2rem); align-self: start; max-height: calc(100vh - var(--docs-header-h) - 4rem); overflow: auto; font-size: .8125rem; }
.docs-toc-title { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--o-text-subtle); margin-bottom: .5rem; }
.docs-toc a { display: block; padding: .2rem 0 .2rem .75rem; color: var(--o-text-muted); border-inline-start: 2px solid var(--o-border); text-decoration: none !important; }
.docs-toc a:hover { color: var(--o-text); }
.docs-toc a.is-active { color: var(--o-primary-text); border-inline-start-color: var(--o-primary); }
.docs-hero { margin-bottom: 2rem; }
.docs-hero h1, .docs-main > h1 { font-size: 2.125rem; font-weight: 750; letter-spacing: -.025em; margin: 0 0 .5rem; }
.docs-lead { font-size: 1.0625rem; color: var(--o-text-muted); max-width: 48rem; margin: 0; }
.docs-main section { margin-bottom: 3rem; scroll-margin-top: calc(var(--docs-header-h) + 1rem); }
.docs-main h2 { font-size: 1.375rem; margin: 0 0 .75rem; padding-top: .25rem; scroll-margin-top: calc(var(--docs-header-h) + 1rem); }
.docs-main h3 { font-size: 1.0625rem; margin: 1.75rem 0 .5rem; scroll-margin-top: calc(var(--docs-header-h) + 1rem); }
.docs-main > section > p, .docs-main > p, .docs-main li { color: color-mix(in srgb, var(--o-text) 88%, var(--o-text-muted)); max-width: 52rem; }
.docs-main code:not(pre code) { padding: .1em .35em; font-size: .85em; color: var(--o-primary-text); background: var(--o-primary-subtle); border-radius: 4px; }

/* demo blocks */
.docs-demo { margin: 1rem 0 1.5rem; border: 1px solid var(--o-border); border-radius: var(--o-radius-lg); background: var(--o-surface); overflow: hidden; }
.docs-preview { position: relative; padding: 1.5rem; min-width: 0; }
.docs-preview.is-center { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.docs-preview.is-flush { padding: 0; }
.docs-preview.is-bg { background: var(--o-bg); }
.docs-preview.is-dotted { background-image: radial-gradient(var(--o-border) 1px, transparent 1px); background-size: 16px 16px; }
.docs-demo-bar { display: flex; align-items: center; gap: .25rem; padding: .375rem .5rem; border-top: 1px solid var(--o-border); background: var(--o-surface-2); }
.docs-demo-bar .o-btn { --o-btn-h: 1.75rem; font-size: .75rem; }
.docs-code { position: relative; margin: 0; border-top: 1px solid var(--o-border); }
.docs-code pre { margin: 0; padding: 1rem 1.25rem; max-height: 32rem; overflow: auto; font: .8125rem/1.65 var(--o-font-mono); color: var(--o-text); background: var(--o-surface-2); border: 0; border-radius: 0; tab-size: 2; }
.docs-code-standalone { margin: 1rem 0 1.5rem; border: 1px solid var(--o-border); border-radius: var(--o-radius-lg); overflow: hidden; }
.docs-code-standalone .docs-code { border-top: 0; }
.docs-code .docs-copy { position: absolute; top: .5rem; inset-inline-end: .5rem; opacity: .8; }
/* On phones a long unwrapped first line runs under the floating Copy button; give the block a header strip for it. */
@media (max-width: 767px) { .docs-code pre { padding-top: 2.75rem; } }
.tk-tag { color: #d6336c; } .tk-attr { color: #b35900; } .tk-str { color: #1f8a4c; } .tk-com { color: #8a94a6; font-style: italic; }
.tk-kw { color: #7048e8; } .tk-num { color: #0b7285; } .tk-fn { color: #1864ab; }
:root[data-theme="dark"] .tk-tag, .o-theme-dark .tk-tag { color: #ff8fab; }
:root[data-theme="dark"] .tk-attr { color: #ffc078; } :root[data-theme="dark"] .tk-str { color: #8ce99a; } :root[data-theme="dark"] .tk-kw { color: #b197fc; }
:root[data-theme="dark"] .tk-num { color: #66d9e8; } :root[data-theme="dark"] .tk-fn { color: #74c0fc; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tk-tag { color: #ff8fab; } :root:not([data-theme="light"]) .tk-attr { color: #ffc078; } :root:not([data-theme="light"]) .tk-str { color: #8ce99a; } :root:not([data-theme="light"]) .tk-kw { color: #b197fc; } :root:not([data-theme="light"]) .tk-num { color: #66d9e8; } :root:not([data-theme="light"]) .tk-fn { color: #74c0fc; } }

.docs-log { margin-top: 1rem; max-height: 9rem; overflow: auto; padding: .5rem .75rem; font: .75rem/1.6 var(--o-font-mono); color: var(--o-text-muted); background: var(--o-surface-2); border: 1px dashed var(--o-border-strong); border-radius: var(--o-radius); }
.docs-log:empty::before { content: "Events will appear here…"; color: var(--o-text-subtle); }
.docs-api-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--o-border); border-radius: var(--o-radius-lg); }
table.docs-api { width: 100%; border-collapse: collapse; font-size: .8125rem; background: var(--o-surface); }
table.docs-api th, table.docs-api td { padding: .55rem .8rem; text-align: start; vertical-align: top; border-bottom: 1px solid var(--o-border); }
table.docs-api th { font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; color: var(--o-text-muted); background: var(--o-surface-2); white-space: nowrap; }
table.docs-api tr:last-child td { border-bottom: 0; }
table.docs-api td:first-child { font-family: var(--o-font-mono); font-weight: 600; color: var(--o-primary-text); min-width: 9rem; max-width: 20rem; overflow-wrap: anywhere; }
table.docs-api td code { white-space: nowrap; }
.docs-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.docs-card { display: block; padding: 1rem 1.125rem; border: 1px solid var(--o-border); border-radius: var(--o-radius-lg); background: var(--o-surface); color: var(--o-text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.docs-card:hover { border-color: var(--o-primary-border); box-shadow: var(--o-shadow); transform: translateY(-1px); }
.docs-card-title { font-weight: 600; margin-bottom: .2rem; }
.docs-card-desc { font-size: .8125rem; color: var(--o-text-muted); }
.docs-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--o-border); }
.docs-pager a { display: flex; flex-direction: column; padding: .75rem 1rem; border: 1px solid var(--o-border); border-radius: var(--o-radius); text-decoration: none !important; color: var(--o-text); min-width: 10rem; }
.docs-pager a:hover { border-color: var(--o-primary-border); }
.docs-pager small { color: var(--o-text-muted); font-size: .75rem; }
.docs-pager .is-next { text-align: end; margin-inline-start: auto; }
.docs-footer { margin-top: 4rem; padding: 2rem 0 1.5rem; border-top: 1px solid var(--o-border); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.25rem; font-size: .875rem; color: var(--o-text-muted); }
.docs-footer a { color: var(--o-primary); text-decoration: none !important; font-weight: 500; }
.docs-footer a:hover { text-decoration: underline !important; }
.docs-footer-sep { margin: 0 .4rem; opacity: .5; }
.docs-footer-links { display: flex; align-items: center; flex-wrap: wrap; }
.docs-backdrop { display: none; }

@media (max-width: 1199.98px) { .docs-content { grid-template-columns: minmax(0, 1fr); } .docs-toc { display: none; } }
@media (max-width: 991.98px) {
  .docs-layout { grid-template-columns: minmax(0, 1fr); }
  .docs-menu-btn { display: inline-flex; }
  .docs-sidebar { position: fixed; top: var(--docs-header-h); bottom: 0; inset-inline-start: 0; z-index: 1030; width: min(var(--docs-sidebar-w), 85vw); height: auto; transform: translateX(-100%); transition: transform .22s var(--o-ease); box-shadow: var(--o-shadow-xl); }
  [dir="rtl"] .docs-sidebar { transform: translateX(100%); }
  body.docs-nav-open .docs-sidebar { transform: none; }
  body.docs-nav-open .docs-backdrop { display: block; position: fixed; inset: var(--docs-header-h) 0 0; z-index: 1025; background: var(--o-backdrop); }
  .docs-search { flex-basis: 10rem; }
}
@media (max-width: 575.98px) {
  .docs-version, .docs-search, .docs-tools > a, .docs-lang { display: none; }
  .docs-preview { padding: 1rem; }
  .docs-tools { margin-inline-start: auto; }
  .docs-brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .docs-header { overflow: hidden; }
}
