/* The developer documentation (pages/docs.js, components/docs-content.js): the real Stake Engine docs' layout — tabs
   and search, a section sidebar, the article, "On this page" or the API tester — in Bluestuff's tokens (studio.css). */

.dc {
  --dc-top: 56px; --dc-side: 248px; --dc-aside: 232px; --dc-aside-api: 380px;
  --hl-key: #0b5cad; --hl-str: #0a7a43; --hl-num: #b45309; --hl-kw: #7c3aed; --hl-fn: #1d4ed8; --hl-com: #6b7a90; --hl-dec: #c2410c;
  --dc-get: #047857; --dc-get-bg: #d1fae5; --dc-post: #1d4ed8; --dc-post-bg: #dbeafe; --dc-put: #b45309; --dc-put-bg: #fef3c7; --dc-del: #b91c1c; --dc-del-bg: #fee2e2;
  display: flex; flex-direction: column; min-height: calc(var(--vh, 100vh) - var(--topbar-h));
}
.dark .dc, :host([data-theme="dark"]) .dc {
  --hl-key: #7cb7ff; --hl-str: #6ee7a8; --hl-num: #fbbf24; --hl-kw: #c4a5ff; --hl-fn: #93c5fd; --hl-com: #8a93a8; --hl-dec: #fdba74;
  --dc-get: #6ee7b7; --dc-get-bg: rgba(16, 185, 129, .16); --dc-post: #93c5fd; --dc-post-bg: rgba(59, 130, 246, .18); --dc-put: #fcd34d; --dc-put-bg: rgba(245, 158, 11, .16); --dc-del: #fca5a5; --dc-del-bg: rgba(239, 68, 68, .16);
}

/* ---------------------------------------------------------------- top bar: areas + search */
.dc-top {
  position: sticky; top: var(--topbar-h); z-index: 20; display: flex; align-items: center; gap: 12px;
  height: var(--dc-top); padding: 0 24px; border-bottom: 1px solid var(--border); background: var(--background);
}
.dc-areas { display: flex; gap: 4px; }
.dc-area {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--muted-foreground); text-decoration: none; white-space: nowrap;
}
.dc-area .icon { width: 15px; height: 15px; }
.dc-area:hover { background: var(--accent); color: var(--foreground); }
.dc-area.active { background: var(--primary-tint-12); color: var(--primary); }
.dc-search { position: relative; margin-left: auto; width: min(380px, 100%); }
.dc-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-foreground); pointer-events: none; }
.dc-search-input {
  width: 100%; height: 36px; padding: 0 36px; border: 1px solid var(--input); border-radius: 8px;
  background: var(--input-bg); color: var(--foreground); font: inherit; font-size: 14px; outline: none;
}
.dc-search-input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px var(--primary-tint-12); }
.dc-search-input::-webkit-search-cancel-button { display: none; }
.dc-kbd {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%); min-width: 20px; height: 20px; padding: 0 5px;
  display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-foreground); background: var(--muted-30);
}
.dc-search-results {
  position: absolute; top: calc(100% + 6px); right: 0; width: min(560px, 92vw); max-height: min(70vh, 560px); overflow-y: auto;
  padding: 6px; background: var(--popover); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); z-index: 40;
}
.dc-result {
  display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--foreground); text-align: left; font: inherit; cursor: pointer;
}
.dc-result.active { background: var(--accent); }
.dc-result-title { font-size: 14px; font-weight: 600; }
.dc-result-heading { font-weight: 500; color: var(--text-mid); }
.dc-result-section { font-size: 12px; color: var(--muted-foreground); }
.dc-result-snippet { font-size: 13px; line-height: 1.45; color: var(--text-mid); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dc-result mark { background: var(--primary-tint-24); color: inherit; border-radius: 3px; padding: 0 1px; }
.dc-result-empty { padding: 14px 12px; font-size: 14px; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- columns */
.dc-body { display: flex; flex: 1; align-items: flex-start; min-height: 0; }
.dc-side {
  position: sticky; top: calc(var(--topbar-h) + var(--dc-top)); flex: none; width: var(--dc-side);
  height: calc(var(--vh, 100vh) - var(--topbar-h) - var(--dc-top)); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 12px 40px; border-right: 1px solid var(--border); background: var(--background);
}
.dc-main { flex: 1; min-width: 0; max-width: 860px; margin: 0 auto; padding: 32px 40px 96px; }
.dc-aside {
  position: sticky; top: calc(var(--topbar-h) + var(--dc-top)); flex: none; width: var(--dc-aside);
  max-height: calc(var(--vh, 100vh) - var(--topbar-h) - var(--dc-top)); overflow-y: auto; padding: 32px 20px 32px 0;
}
.dc-aside.wide { width: var(--dc-aside-api); padding-right: 24px; }
.dc-menu-btn, .dc-scrim { display: none; }

/* ---------------------------------------------------------------- sidebar */
.dc-nav-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 1px; }
.dc-nav-list .dc-nav-list { margin: 2px 0 6px 13px; padding-left: 9px; border-left: 1px solid var(--border); }
.dc-nav-link {
  display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 5px 10px; border-radius: 8px;
  font-size: 14px; line-height: 20px; color: var(--text-mid); text-decoration: none;
}
.dc-nav-link:hover { background: var(--hover-faint); color: var(--foreground); }
.dc-nav-link.active { background: var(--sidebar-accent); color: var(--primary); font-weight: 600; }
.dc-nav-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px;
  background: none; color: var(--foreground); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
}
.dc-nav-toggle:hover { background: var(--hover-faint); }
.dc-nav-section.depth-0 { margin-top: 6px; }
.dc-nav-section:not(.depth-0) > .dc-nav-toggle { font-weight: 500; color: var(--text-mid); min-height: 32px; }
.dc-nav-chevron { width: 14px; height: 14px; color: var(--muted-foreground); transition: transform .15s var(--ease-brand-out); }
.dc-nav-chevron.open { transform: rotate(90deg); }
.dc-nav-foot {
  display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 10px 0; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted-foreground); text-decoration: none;
}
.dc-nav-foot:hover { color: var(--foreground); }
.dc-nav-foot .icon { width: 15px; height: 15px; }

/* ---------------------------------------------------------------- article head */
.dc-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; font-size: 13px; color: var(--muted-foreground); }
.dc-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--grey-300); }
.dc-crumbs a { color: inherit; text-decoration: none; }
.dc-crumbs a:hover { color: var(--foreground); }
.dc-crumbs [aria-current] { color: var(--foreground); }
.dc-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.dc-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0; font-size: 30px; line-height: 38px; font-weight: 700; letter-spacing: -.015em; }
.dc-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dc-lead { margin: 10px 0 0; font-size: 16px; line-height: 26px; color: var(--muted-foreground); }
.dc-updated { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--muted-foreground); }
.dc-updated .icon { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- content */
.dc-content { margin-top: 28px; font-size: 15px; line-height: 1.7; color: var(--foreground); overflow-wrap: anywhere; }
.dc-content > * + *, .dc-callout-body > * + *, .dc-step-body > * + *, .dc-tab-panel > * + *, .dc-details-body > * + *, .dc-quote > * + *, .dc-content li > * + * { margin-top: 14px; }
.dc-h { position: relative; scroll-margin-top: calc(var(--topbar-h) + var(--dc-top) + 20px); font-weight: 650; letter-spacing: -.01em; }
.dc-content > .dc-h2 { margin-top: 44px; padding-bottom: 8px; border-bottom: 1px solid var(--border); font-size: 22px; line-height: 30px; }
.dc-content > .dc-h3 { margin-top: 30px; font-size: 18px; line-height: 26px; }
.dc-content > .dc-h4 { margin-top: 22px; font-size: 15px; line-height: 22px; }
.dc-content > .dc-h:first-child { margin-top: 0; }
.dc-anchor { margin-left: 8px; color: var(--muted-foreground); text-decoration: none; font-weight: 400; opacity: 0; transition: opacity .1s; }
.dc-h:hover .dc-anchor, .dc-anchor:focus { opacity: 1; }
.dc-p { margin: 0; }
.dc-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.dc-link:hover { text-decoration-color: currentColor; }
.dc-ext { width: 12px !important; height: 12px !important; margin-left: 2px; vertical-align: -1px; }
.dc-icode {
  padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--chip-bg);
  font-family: var(--font-mono); font-size: .86em; overflow-wrap: anywhere;
}
.dc-ul, .dc-ol { margin: 0; padding-left: 24px; }
.dc-ul li + li, .dc-ol li + li { margin-top: 6px; }
.dc-ul .dc-ul, .dc-ol .dc-ol, .dc-ul .dc-ol, .dc-ol .dc-ul { margin-top: 6px; }
.dc-hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.dc-quote { margin: 0; padding: 2px 0 2px 16px; border-left: 3px solid var(--border); color: var(--text-mid); }
.dc-muted { color: var(--muted-foreground); }
.dc-small { font-size: 13px; }

/* tables */
.dc-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.dc-table th { padding: 10px 12px; background: var(--muted-30); border-bottom: 1px solid var(--border); text-align: left; font-weight: 600; white-space: nowrap; }
.dc-table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.dc-table tr:first-child td { border-top: 0; }
.dc-table td > .dc-icode { white-space: nowrap; }

/* code */
.dc-codeblock { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; background: var(--grey-950); }
.dark .dc-codeblock, :host([data-theme="dark"]) .dc-codeblock { background: color-mix(in srgb, var(--card) 70%, black); }
.dc-code-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 4px 14px;
  border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 12px; color: var(--muted-foreground);
}
.dc-pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; tab-size: 2; }
.dc-pre code { font-family: inherit; white-space: pre; overflow-wrap: normal; }
.hl-key { color: var(--hl-key); } .hl-str { color: var(--hl-str); } .hl-num { color: var(--hl-num); } .hl-kw { color: var(--hl-kw); }
.hl-fn { color: var(--hl-fn); } .hl-com { color: var(--hl-com); font-style: italic; } .hl-dec, .hl-flag, .hl-var { color: var(--hl-dec); }
.dc-icon-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted-foreground); cursor: pointer;
}
.dc-icon-btn:hover { background: var(--accent); color: var(--foreground); }
.dc-icon-btn .icon { width: 15px; height: 15px; }

/* callouts */
.dc-callout { display: flex; gap: 12px; padding: 14px 16px; border: 1px solid; border-left-width: 4px; border-radius: 10px; }
.dc-callout-icon { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.dc-callout-body { flex: 1; min-width: 0; }
.dc-callout-title { font-weight: 600; }
.dc-callout-title + * { margin-top: 4px !important; }
.dc-callout-info { border-color: color-mix(in srgb, var(--primary) 35%, transparent); background: color-mix(in srgb, var(--primary) 6%, transparent); }
.dc-callout-info .dc-callout-icon { color: var(--primary); }
.dc-callout-tip { border-color: color-mix(in srgb, var(--success) 35%, transparent); background: color-mix(in srgb, var(--success) 6%, transparent); }
.dc-callout-tip .dc-callout-icon { color: var(--success); }
.dc-callout-warning { border-color: color-mix(in srgb, var(--partner-yellow) 45%, transparent); background: color-mix(in srgb, var(--partner-yellow) 8%, transparent); }
.dc-callout-warning .dc-callout-icon { color: var(--warning); }
.dc-callout-danger { border-color: color-mix(in srgb, var(--danger) 35%, transparent); background: color-mix(in srgb, var(--danger) 6%, transparent); }
.dc-callout-danger .dc-callout-icon { color: var(--danger); }

/* steps */
.dc-steps { margin: 0; padding: 0; list-style: none; }
.dc-step { position: relative; display: flex; gap: 16px; padding-bottom: 22px; }
.dc-step:last-child { padding-bottom: 0; }
.dc-step:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 36px; bottom: 6px; width: 1px; background: var(--border); }
.dc-step-num {
  flex: none; display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--border); border-radius: 50%;
  background: var(--background); color: var(--primary); font-size: 14px; font-weight: 600;
}
.dc-step-body { flex: 1; min-width: 0; }
.dc-step-title { margin: 4px 0 0; font-size: 16px; line-height: 24px; font-weight: 600; scroll-margin-top: calc(var(--topbar-h) + var(--dc-top) + 20px); }

/* tabs */
.dc-tabs, .dc-responses { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.dc-tabs-bar { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--muted-30); scrollbar-width: none; }
.dc-tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 0; background: none;
  color: var(--muted-foreground); font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.dc-tab:hover { color: var(--foreground); }
.dc-tab.active { color: var(--primary); }
.dc-tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--primary); }
.dc-tab-panel { padding: 14px 16px; }

/* details */
.dc-details { border: 1px solid var(--border); border-radius: 10px; }
.dc-details > summary, .dc-ck-group > summary, .dc-levels > summary { display: flex; align-items: center; gap: 8px; list-style: none; cursor: pointer; }
.dc-details > summary::-webkit-details-marker, .dc-ck-group > summary::-webkit-details-marker, .dc-levels > summary::-webkit-details-marker { display: none; }
.dc-details > summary { padding: 12px 14px; font-weight: 500; }
.dc-details-chevron { flex: none; width: 16px; height: 16px; color: var(--muted-foreground); transition: transform .15s var(--ease-brand-out); }
details[open] > summary > .dc-details-chevron { transform: rotate(90deg); }
.dc-details-body { padding: 14px 16px; border-top: 1px solid var(--border); }

/* cards */
.dc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dc-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--card); color: var(--foreground); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.dc-card:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow-sm); }
.dc-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; line-height: 22px; }
.dc-card-arrow { flex: none; width: 16px !important; height: 16px !important; color: var(--muted-foreground); transition: transform .15s; }
.dc-card:hover .dc-card-arrow { transform: translateX(2px); color: var(--primary); }
.dc-card-text { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }

/* flow */
.dc-flow { display: flex; flex-direction: column; gap: 22px; margin: 0; padding: 0; list-style: none; }
.dc-flow-node { position: relative; }
.dc-flow-vertical .dc-flow-node:not(:last-child)::after {
  content: ""; position: absolute; left: 24px; bottom: -18px; width: 0; height: 0;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--grey-300);
}
.dc-flow-vertical .dc-flow-node:not(:last-child)::before { content: ""; position: absolute; left: 29px; bottom: -14px; width: 2px; height: 12px; background: var(--grey-300); }
.dc-flow-horizontal { flex-direction: row; flex-wrap: wrap; gap: 28px; }
.dc-flow-horizontal .dc-flow-node:not(:last-child)::after { content: "→"; position: absolute; right: -21px; top: 50%; transform: translateY(-50%); color: var(--grey-300); font-size: 16px; }
.dc-flow-box { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); }
.dc-flow-label { font-weight: 600; line-height: 22px; }
.dc-flow-text { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }

/* ---------------------------------------------------------------- API methods */
.dc-api { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.dc-api-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dc-api-path { min-width: 0; font-family: var(--font-mono); font-size: 15px; font-weight: 600; overflow-wrap: anywhere; }
.dc-api-head .dc-icon-btn { margin-left: auto; }
.dc-api-base { font-size: 13px; }
.dc-api-sub { margin-top: 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground); }
.dc-method { flex: none; padding: 3px 8px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.dc-method-get { color: var(--dc-get); background: var(--dc-get-bg); }
.dc-method-post { color: var(--dc-post); background: var(--dc-post-bg); }
.dc-method-put, .dc-method-patch { color: var(--dc-put); background: var(--dc-put-bg); }
.dc-method-delete { color: var(--dc-del); background: var(--dc-del-bg); }
.dc-required { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--danger); }
.dc-required-dot { color: var(--danger); }
.dc-type { font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.dc-param-example { margin-top: 4px; font-size: 12px; color: var(--muted-foreground); }
.dc-status { padding: 1px 6px; border-radius: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 700; }
.dc-status-ok { color: var(--dc-get); background: var(--dc-get-bg); }
.dc-status-info { color: var(--dc-post); background: var(--dc-post-bg); }
.dc-status-warn { color: var(--dc-put); background: var(--dc-put-bg); }
.dc-status-err { color: var(--dc-del); background: var(--dc-del-bg); }
/* each API block shows its tester, unless the tester is beside the page */
.dc.aside-tester .dc-api-inline { display: none; }
.dc-params td:nth-child(-n+3) { white-space: nowrap; }
.dc-params .dc-required { display: block; margin: 4px 0 0; }

/* the tester */
.dc-tester { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.dc-aside-tester .dc-tester { box-shadow: var(--shadow-sm); }
.dc-tester-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.dc-tester-head .icon { width: 15px; height: 15px; color: var(--primary); }
.dc-tester-endpoint { display: flex; align-items: center; gap: 8px; min-width: 0; font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.dc-field { display: flex; flex-direction: column; gap: 4px; }
.dc-field-label { display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 600; }
.dc-input {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--input); border-radius: 8px; outline: none;
  background: var(--input-bg); color: var(--foreground); font-family: var(--font-mono); font-size: 13px;
}
.dc-input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px var(--primary-tint-12); }
select.dc-input { font-family: inherit; }
.dc-tester-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dc-tester-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted-foreground); }
.dc-tester-result { display: flex; flex-direction: column; gap: 8px; }
.dc-tester-status { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dc-tester-status .dc-muted { margin-left: auto; }
.dc-tester .dc-pre { max-height: 360px; }

/* "On this page" */
.dc-toc { font-size: 13px; }
.dc-toc-title { margin-bottom: 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-foreground); }
.dc-toc ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--border); }
.dc-toc a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 2px solid transparent; color: var(--muted-foreground); line-height: 1.45; text-decoration: none; }
.dc-toc li.level-3 a { padding-left: 24px; }
.dc-toc a:hover { color: var(--foreground); }
.dc-toc a.active { border-left-color: var(--primary); color: var(--primary); font-weight: 500; }

/* an overview's own pages (FAQ questions, changelog entries) */
.dc-children { display: flex; flex-direction: column; gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.dc-child {
  display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--foreground); text-decoration: none; transition: border-color .15s;
}
.dc-child:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.dc-child-title { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; }
.dc-child-date { flex: none; font-size: 13px; font-weight: 400; color: var(--muted-foreground); }
.dc-child-text { font-size: 14px; line-height: 1.5; color: var(--muted-foreground); }

/* previous / next */
.dc-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border); }
.dc-pn {
  display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px;
  color: var(--foreground); text-decoration: none; transition: border-color .15s;
}
.dc-pn:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); }
.dc-pn.next { justify-content: flex-end; text-align: right; }
.dc-pn > span { min-width: 0; }
.dc-pn .icon { flex: none; width: 16px; height: 16px; color: var(--muted-foreground); }
.dc-pn-label { display: block; font-size: 12px; color: var(--muted-foreground); }
.dc-pn-title { display: block; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }

/* badges, errors, not found */
.dc-badge { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
.dc-title .dc-badge { height: 22px; font-size: 12px; }
.dc-badge-new { background: var(--primary-tint-12); color: var(--primary); }
.dc-badge-ok { background: var(--success-tint-12); color: var(--success); }
.dc-badge-warn { background: var(--warning-tint-12); color: var(--warning); }
.dc-badge-muted { background: var(--chip-bg); color: var(--muted-foreground); }
.dark .dc-badge-ok, :host([data-theme="dark"]) .dc-badge-ok { background: rgba(22, 163, 74, .16); color: #6ee7a8; }
.dark .dc-badge-warn, :host([data-theme="dark"]) .dc-badge-warn { background: rgba(245, 158, 11, .16); color: #fcd34d; }
.dc-error { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); border-radius: 10px; background: color-mix(in srgb, var(--danger) 7%, transparent); color: var(--danger); font-size: 14px; }
.dc-error .icon { flex: none; width: 16px; height: 16px; margin-top: 2px; }
.dc-notfound { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 24px; color: var(--muted-foreground); }
.dc-notfound .dc-title { color: var(--foreground); }

/* ---------------------------------------------------------------- data blocks */
.dc-checklist { display: flex; flex-direction: column; gap: 8px; }
.dc-ck-head { display: flex; align-items: center; gap: 12px; }
.dc-progress { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--muted); }
.dc-progress span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .2s var(--ease-brand-out); }
.dc-ck-count { flex: none; font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.dc-ck-group { border: 1px solid var(--border); border-radius: 10px; }
.dc-ck-group > summary { padding: 10px 12px; font-size: 14px; font-weight: 600; }
.dc-ck-children { display: flex; flex-direction: column; padding: 0 12px 8px 12px; }
.dc-ck-children .dc-ck-group { margin: 6px 0; }
.dc-ck-item { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; line-height: 1.55; }
.dc-ck-item > .dc-ck-children { flex-basis: 100%; padding: 0 0 0 26px; }
.dc-checklist > .dc-ck-item { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.dc-ck-label { display: flex; flex: 1; align-items: flex-start; gap: 10px; min-width: 240px; cursor: pointer; }
.dc-ck-label input { flex: none; width: 16px; height: 16px; margin-top: 3px; accent-color: var(--primary); }
.dc-ck-supp-title { margin-top: 12px; font-size: 13px; font-weight: 600; color: var(--muted-foreground); }
.dc-rating { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.dc-rating-inputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dc-rating-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 0; }
.dc-rating-out > div { padding: 10px 12px; border-radius: 10px; background: var(--muted-30); }
.dc-rating-out dt { font-size: 12px; color: var(--muted-foreground); }
.dc-rating-out dd { margin: 2px 0 0; font-size: 18px; font-weight: 600; color: var(--foreground); }
.dc-rating-out dd.dc-pass { color: var(--success); }
.dc-rating-out dd.dc-fail { color: var(--danger); }
.dc-bets td { white-space: nowrap; font-variant-numeric: tabular-nums; }
.dc-levels > summary { color: var(--primary); font-size: 13px; }
.dc-chips { display: flex; flex-wrap: wrap; gap: 4px; max-width: 520px; margin-top: 8px; white-space: normal; }
.dc-chip { padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; font-family: var(--font-mono); font-size: 12px; }
.dc-chip.default { border-color: var(--primary); color: var(--primary); }

/* ---------------------------------------------------------------- narrower documentation
   The classes follow the documentation's own width (pages/docs.js useWidth): embedded, the host's sidebar takes part
   of the window, so the window's width says little. Which column sits beside the page is decided there too. */
.dc.w-drawer .dc-menu-btn { display: inline-flex; }
.dc.w-drawer .dc-side {
  position: fixed; z-index: 60; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw);
  transform: translateX(-102%); transition: transform .2s var(--ease-brand-out); box-shadow: var(--shadow-lg);
}
.dc.w-drawer .dc-side.open { transform: none; }
.dc.w-drawer .dc-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--scrim); }
.dc.w-drawer .dc-main { padding: 24px 24px 72px; }
.dc.w-narrow .dc-top { flex-wrap: wrap; height: auto; gap: 8px; padding: 8px 12px; }
.dc.w-narrow .dc-search { order: 3; width: 100%; margin-left: 0; }
.dc.w-narrow .dc-area { padding: 0 9px; }
.dc.w-narrow .dc-main { padding: 20px 16px 56px; }
.dc.w-narrow .dc-title { font-size: 24px; line-height: 32px; }
.dc.w-narrow .dc-prevnext { grid-template-columns: 1fr; }
.dc.w-narrow .dc-tab { padding: 9px 11px; }
