:root {
  --warning: #ff6428;
  --on-warning: #fff;
  --surface: #fff;
  --surface-secondary: #fbfaf9;
  --border-color: #ebe8e4;
  --content-width: 1180px;
  --solo-width: 760px;
}

/* Dox's persistent application shell and recursive documentation tree are not
   ArtistCSS components. Everything inside the main content area is. */
.dox-shell { min-height: 100vh; display: grid; grid-template-columns: 340px minmax(0, 1fr); }
.dox-sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 22px 18px; border-right: 1px solid var(--border-color); background: var(--surface-secondary); z-index: 30; }
.dox-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.dox-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 20px; line-height: 1; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.dox-brand-logo { width: 42px; height: 48px; object-fit: contain; flex: none; }
.dox-sidebar-close, .dox-mobile-header { display: none; }
.dox-new-document { width: 100%; margin-top: 24px; }
.dox-search { margin: 12px 0 18px; }
.dox-tree { font-size: 14px; flex: 1; }
.dox-tree-folder > summary { display: flex; align-items: center; gap: 4px; min-height: 34px; cursor: pointer; font-weight: 700; list-style: none; padding: 4px 8px; border-radius: 7px; }
.dox-tree-folder > summary::-webkit-details-marker { display: none; }
.dox-tree-folder > summary::before { content: "›"; flex: 0 0 16px; width: 16px; color: var(--muted); font-size: 18px; line-height: 1; text-align: center; transform: rotate(0); transition: transform var(--motion-fast); }
.dox-tree-folder[open] > summary::before { transform: rotate(90deg); }
.dox-tree-folder > summary:hover { background: #f0efed; }
.dox-tree-folder > summary > a { min-width: 0; flex: 1; padding: 3px 0; color: var(--ink); text-decoration: none; }
.dox-tree-folder > summary > a:hover { color: var(--ink); text-decoration: none; }
.dox-tree-children { margin-left: 16px; padding-left: 8px; border-left: 1px solid var(--border-color); }
.dox-tree-document { display: block; padding: 6px 8px; color: var(--ink); text-decoration: none; border-radius: 7px; }
.dox-tree-document:hover, .dox-tree-document.is-current { background: #f0efed; color: var(--ink); }
.dox-tree-document.is-locked { color: var(--muted); cursor: not-allowed; }
.dox-sidebar-footer { display: grid; gap: 7px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); color: var(--muted); font-size: 13px; }
.dox-sidebar-footer a, .dox-link-button { color: var(--ink); font: inherit; text-align: left; text-decoration: underline; border: 0; padding: 0; background: none; cursor: pointer; }
.dox-page { min-width: 0; background: var(--surface); }
.dox-main { padding-top: 64px; padding-bottom: 100px; }
.dox-document { max-width: var(--solo-width); }
.dox-rich-text { margin-top: 44px; font-size: 18px; line-height: 1.7; }
.dox-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--surface-secondary); }
.dox-auth-card { width: min(100%, 430px); }
.dox-public-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }
.dox-public-main { padding-top: 64px; padding-bottom: 100px; }
.dox-public-main .dox-auth-card { margin-inline: auto; }
.stack > * + * { margin-top: 10px; }
lexxy-editor { --lexxy-editor-rows: 18lh; }

@media (max-width: 760px) {
  .dox-shell { display: block; }
  .dox-sidebar { position: fixed; inset: 0 auto 0 0; width: min(90vw, 340px); transform: translateX(-105%); box-shadow: var(--shadow); transition: transform var(--motion-medium) var(--motion-ease); }
  .dox-shell.is-sidebar-open .dox-sidebar { transform: translateX(0); }
  .dox-sidebar-close, .dox-mobile-header { display: flex; }
  .dox-mobile-header { position: sticky; top: 0; z-index: 20; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--border-color); background: rgb(255 255 255 / 92%); backdrop-filter: blur(10px); }
  .dox-main { padding-top: 36px; padding-bottom: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  .dox-sidebar, .dox-tree-folder > summary::before { transition: none; }
}
