.page-docs { --docs-bg: #080b0a; --docs-panel: #111615; --docs-panel-2: #171d1c; --docs-line: #303937; --docs-green: #00ff88; --docs-amber: #ffbd00; --docs-muted: #9ca7a3; background: var(--docs-bg); }
.docs-page { width: min(1440px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 96px; color: #edf2f0; }
.docs-masthead { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr); gap: 56px; padding: 52px; border: 1px solid var(--docs-line); border-top: 3px solid var(--docs-green); background: linear-gradient(125deg, rgba(0,255,136,.06), transparent 45%), #0c100f; box-shadow: 8px 8px 0 #000; }
.docs-eyebrow, .docs-section-head p, .docs-search-label { margin: 0 0 12px; color: var(--docs-green); font: 700 11px/1.4 "JetBrains Mono", monospace; letter-spacing: .12em; }
.docs-masthead h1 { max-width: 860px; margin: 0; font: 700 clamp(36px, 5vw, 68px)/.98 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.docs-intro { max-width: 780px; margin: 24px 0 0; color: var(--docs-muted); font-size: 18px; line-height: 1.65; }
.docs-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.docs-status { display: grid; align-content: start; border: 1px solid var(--docs-line); background: #080b0a; }
.docs-status div { padding: 18px 20px; border-bottom: 1px solid var(--docs-line); }
.docs-status div:last-child { border-bottom: 0; }
.docs-status span, .docs-facts span { display: block; margin-bottom: 6px; color: var(--docs-muted); font: 500 9px/1.2 "JetBrains Mono", monospace; letter-spacing: .11em; }
.docs-status strong { font: 600 13px/1.4 "JetBrains Mono", monospace; }
.docs-workspace { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 34px; margin-top: 34px; align-items: start; }
.docs-sidebar { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--docs-line) #080b0a; padding: 20px; border: 1px solid var(--docs-line); background: rgba(13,17,16,.97); box-shadow: 5px 5px 0 #000; }
.docs-search-label { display: block; color: var(--docs-amber); }
.docs-search { width: 100%; border: 1px solid var(--docs-line); border-radius: 0; padding: 12px; color: #fff; background: #080b0a; font: 12px/1.4 "JetBrains Mono", monospace; outline: none; }
.docs-search:focus { border-color: var(--docs-green); box-shadow: 0 0 0 2px rgba(0,255,136,.16); }
.docs-search-status { margin: 10px 0 14px; color: var(--docs-muted); font: 10px/1.4 "JetBrains Mono", monospace; }
.docs-toc { display: grid; gap: 2px; }
.docs-nav-group { margin: 14px 10px 4px; padding-top: 10px; border-top: 1px solid var(--docs-line); color: var(--docs-amber); font: 700 9px/1.3 "JetBrains Mono", monospace; letter-spacing: .12em; }
.docs-nav-group:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.docs-toc a { padding: 9px 10px; border-left: 2px solid transparent; color: var(--docs-muted); font: 500 11px/1.3 "JetBrains Mono", monospace; text-decoration: none; }
.docs-toc a:hover, .docs-toc a.is-active { border-color: var(--docs-green); color: #fff; background: rgba(0,255,136,.07); }
.docs-content { min-width: 0; display: grid; gap: 22px; }
.docs-section { scroll-margin-top: 96px; padding: 36px; border: 1px solid var(--docs-line); background: var(--docs-panel); box-shadow: 5px 5px 0 #000; }
.docs-section[hidden] { display: none; }
.docs-section-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--docs-line); }
.docs-section-head > span { display: grid; place-items: center; width: 35px; height: 35px; flex: 0 0 auto; border: 1px solid var(--docs-green); color: var(--docs-green); font: 700 11px/1 "JetBrains Mono", monospace; }
.docs-section-head p { margin: 0 0 5px; color: var(--docs-amber); }
.docs-section h2 { margin: 0; font: 700 clamp(25px, 3vw, 36px)/1.1 "Space Grotesk", sans-serif; letter-spacing: -.025em; }
.docs-section h3 { margin: 24px 0 10px; font: 700 17px/1.3 "Space Grotesk", sans-serif; }
.docs-section p, .docs-section li, .docs-section dd { color: #b6bfbc; font-size: 14px; line-height: 1.75; }
.docs-section strong { color: #eef3f1; }
.docs-lead { max-width: 900px; font-size: 17px !important; }
.docs-card-grid, .docs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.docs-card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.docs-card { padding: 20px; border: 1px solid var(--docs-line); background: var(--docs-panel-2); }
.docs-card > b { color: var(--docs-green); font: 700 10px/1.3 "JetBrains Mono", monospace; letter-spacing: .09em; }
.docs-card h3 { margin-top: 10px; }
.docs-card p { margin-bottom: 0; }
.docs-card a { display: inline-block; margin-top: 16px; color: var(--docs-amber); font: 700 11px/1.4 "JetBrains Mono", monospace; }
.docs-card ul { padding-left: 18px; margin-bottom: 0; }
.docs-callout { margin-top: 22px; padding: 18px 20px; border-left: 3px solid var(--docs-green); background: rgba(0,255,136,.06); }
.docs-callout--warn { border-color: var(--docs-amber); background: rgba(255,189,0,.06); }
.docs-callout strong { display: block; margin-bottom: 5px; color: var(--docs-green); font: 700 11px/1.4 "JetBrains Mono", monospace; text-transform: uppercase; }
.docs-callout--warn strong { color: var(--docs-amber); }
.docs-callout p { margin: 0; }
.docs-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 22px; border: 1px solid var(--docs-line); }
.docs-facts div { padding: 18px; border-right: 1px solid var(--docs-line); }
.docs-facts div:last-child { border-right: 0; }
.docs-facts b { color: var(--docs-amber); font: 700 15px/1.2 "JetBrains Mono", monospace; }
.docs-architecture { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 8px; }
.docs-architecture div { min-width: 0; padding: 16px 12px; border: 1px solid var(--docs-line); background: #090c0b; text-align: center; }
.docs-architecture small { display: block; color: var(--docs-green); font: 700 10px/1 monospace; }
.docs-architecture b { display: block; margin: 8px 0 4px; font-size: 12px; }
.docs-architecture span { color: var(--docs-muted); font: 9px/1.4 "JetBrains Mono", monospace; }
.docs-architecture i { align-self: center; color: var(--docs-amber); font-style: normal; }
.docs-table-wrap { overflow-x: auto; border: 1px solid var(--docs-line); }
.docs-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.docs-table th, .docs-table td { padding: 15px 16px; border-bottom: 1px solid var(--docs-line); text-align: left; vertical-align: top; }
.docs-table tr:last-child td { border-bottom: 0; }
.docs-table th { color: var(--docs-green); background: #090c0b; font: 700 10px/1.4 "JetBrains Mono", monospace; letter-spacing: .07em; }
.docs-table td { color: #b6bfbc; font-size: 13px; line-height: 1.6; }
.docs-table td:first-child { color: #fff; white-space: nowrap; font-family: "JetBrains Mono", monospace; }
.docs-steps { list-style: none; padding: 0; margin: 22px 0 0; counter-reset: docs-step; border-top: 1px solid var(--docs-line); }
.docs-steps li { display: grid; grid-template-columns: minmax(150px, .35fr) 1fr; gap: 20px; padding: 17px 8px; border-bottom: 1px solid var(--docs-line); }
.docs-steps b { font-family: "JetBrains Mono", monospace; }
.docs-action-flow { display: grid; grid-template-columns: repeat(5, 1fr); margin: 24px 0; border: 1px solid var(--docs-line); }
.docs-action-flow div { position: relative; padding: 17px 14px; border-right: 1px solid var(--docs-line); }
.docs-action-flow div:last-child { border: 0; }
.docs-action-flow b, .docs-action-flow span { display: block; }
.docs-action-flow b { color: var(--docs-green); font: 700 9px/1.3 "JetBrains Mono", monospace; }
.docs-action-flow span { margin-top: 7px; color: var(--docs-muted); font-size: 11px; line-height: 1.45; }
.docs-code { position: relative; overflow-x: auto; margin: 22px 0 0; padding: 24px; border: 1px solid var(--docs-line); border-left: 3px solid var(--docs-green); color: #ccffdf; background: #060807; font: 12px/1.7 "JetBrains Mono", monospace; }
.docs-copy { position: absolute; top: 8px; right: 8px; padding: 7px 9px; border: 1px solid var(--docs-line); color: var(--docs-green); background: #111615; font: 700 9px/1 "JetBrains Mono", monospace; cursor: pointer; }
.docs-state-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.docs-state-grid div { padding: 18px; border-top: 2px solid var(--docs-green); background: #090c0b; }
.docs-state-grid b { font: 700 10px/1.3 "JetBrains Mono", monospace; color: var(--docs-green); }
.docs-state-grid p { margin-bottom: 0; font-size: 12px; }
.docs-endpoints { border: 1px solid var(--docs-line); }
.docs-endpoints div { display: grid; grid-template-columns: minmax(250px, .45fr) 1fr; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--docs-line); }
.docs-endpoints div:last-child { border: 0; }
.docs-endpoints code { color: var(--docs-green); }
.docs-endpoints span { color: var(--docs-muted); font-size: 13px; }
.docs-source-tree { display: grid; margin-top: 16px; border: 1px solid var(--docs-line); }
.docs-source-tree div { display: grid; grid-template-columns: minmax(150px, .25fr) 1fr; gap: 18px; padding: 13px 16px; border-bottom: 1px solid var(--docs-line); }
.docs-source-tree div:last-child { border-bottom: 0; }
.docs-source-tree code { color: var(--docs-green); }
.docs-source-tree span { color: var(--docs-muted); font-size: 13px; line-height: 1.55; }
.docs-faq--api { margin-top: 18px; }
.docs-note { margin-top: 18px; padding-top: 15px; border-top: 1px dashed var(--docs-line); font-family: "JetBrains Mono", monospace; font-size: 11px !important; }
.docs-faq { display: grid; gap: 8px; }
.docs-faq details { border: 1px solid var(--docs-line); background: #0a0e0d; }
.docs-faq summary { padding: 17px 20px; color: #eef3f1; font: 600 13px/1.5 "JetBrains Mono", monospace; cursor: pointer; }
.docs-faq details[open] summary { border-bottom: 1px solid var(--docs-line); color: var(--docs-green); }
.docs-faq details p { margin: 0; padding: 16px 20px; }
.docs-glossary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--docs-line); background: var(--docs-line); }
.docs-glossary div { padding: 17px; background: #0a0e0d; }
.docs-glossary dt { color: var(--docs-amber); font: 700 11px/1.4 "JetBrains Mono", monospace; }
.docs-glossary dd { margin: 7px 0 0; }
.docs-empty { padding: 28px; border: 1px solid var(--docs-amber); color: var(--docs-amber); background: rgba(255,189,0,.06); font-family: "JetBrains Mono", monospace; }
#legacy-docs-template { display: none !important; }
@media (max-width: 1050px) { .docs-masthead { grid-template-columns: 1fr; } .docs-workspace { grid-template-columns: 1fr; } .docs-sidebar { position: static; max-height: none; } .docs-toc { grid-template-columns: repeat(2, 1fr); } .docs-nav-group { grid-column: 1 / -1; } .docs-card-grid--3, .docs-state-grid { grid-template-columns: repeat(2, 1fr); } .docs-architecture { grid-template-columns: 1fr; } .docs-architecture i { transform: rotate(90deg); justify-self: center; } .docs-action-flow { grid-template-columns: 1fr; } .docs-action-flow div { border-right: 0; border-bottom: 1px solid var(--docs-line); } }
@media (max-width: 680px) { .docs-page { width: min(100% - 20px, 1440px); padding-top: 24px; } .docs-masthead, .docs-section { padding: 24px 18px; } .docs-masthead { gap: 28px; } .docs-workspace { gap: 18px; } .docs-toc, .docs-card-grid, .docs-card-grid--3, .docs-two, .docs-state-grid, .docs-glossary, .docs-facts { grid-template-columns: 1fr; } .docs-facts div { border-right: 0; border-bottom: 1px solid var(--docs-line); } .docs-facts div:last-child { border-bottom: 0; } .docs-steps li, .docs-endpoints div, .docs-source-tree div { grid-template-columns: 1fr; gap: 6px; } .docs-endpoints code { overflow-wrap: anywhere; } }
@media (prefers-reduced-motion: reduce) { .docs-page * { scroll-behavior: auto !important; } }

/* Docs Day contrast contract — kept last because docs.css loads after the
   shared theme. Every light surface is paired with an explicit readable
   foreground so later component rules cannot recreate pale-on-pale text. */
html[data-sb-theme="light"] .page-docs {
  --docs-bg: #e9ece6;
  --docs-panel: #ffffff;
  --docs-panel-2: #f2f5f1;
  --docs-line: #aebbb1;
  --docs-green: #087247;
  --docs-amber: #835900;
  --docs-muted: #526159;
  background: var(--docs-bg);
}

html[data-sb-theme="light"] .docs-page { color: #17211c; }
html[data-sb-theme="light"] .docs-masthead {
  background: linear-gradient(125deg, rgba(8, 114, 71, .09), transparent 48%), #ffffff;
  border-color: var(--docs-line);
  box-shadow: 7px 7px 0 rgba(38, 50, 44, .24);
}
html[data-sb-theme="light"] .docs-status,
html[data-sb-theme="light"] .docs-sidebar,
html[data-sb-theme="light"] .docs-section {
  background: #ffffff;
  border-color: var(--docs-line);
  box-shadow: 5px 5px 0 rgba(38, 50, 44, .2);
  color: #17211c;
}
html[data-sb-theme="light"] .docs-search {
  background: #ffffff;
  border-color: #839289;
  color: #17211c;
}
html[data-sb-theme="light"] .docs-search::placeholder { color: #66746c; opacity: 1; }
html[data-sb-theme="light"] .docs-toc a { color: #4a5951; }
html[data-sb-theme="light"] .docs-toc a:hover,
html[data-sb-theme="light"] .docs-toc a.is-active {
  background: #e5f3e9;
  color: #075f3b;
}
html[data-sb-theme="light"] .docs-section :is(h2, h3) { color: #17211c; }
html[data-sb-theme="light"] .docs-section :is(p, li, dd) { color: #44534b; }
html[data-sb-theme="light"] .docs-section strong { color: #17211c; }
html[data-sb-theme="light"] .docs-card,
html[data-sb-theme="light"] .docs-architecture div,
html[data-sb-theme="light"] .docs-state-grid div,
html[data-sb-theme="light"] .docs-faq details,
html[data-sb-theme="light"] .docs-glossary div {
  background: var(--docs-panel-2);
  border-color: var(--docs-line);
  color: #17211c;
}
html[data-sb-theme="light"] .docs-callout { background: #eaf6ed; }
html[data-sb-theme="light"] .docs-callout--warn { background: #fff7df; }
html[data-sb-theme="light"] :is(.docs-facts, .docs-action-flow, .docs-endpoints, .docs-source-tree, .docs-table-wrap, .docs-glossary) {
  background: #ffffff;
  border-color: var(--docs-line);
}
html[data-sb-theme="light"] .docs-table th {
  background: #e1ebe4;
  color: #075f3b;
}
html[data-sb-theme="light"] .docs-table td { color: #3f4d45; }
html[data-sb-theme="light"] .docs-table td:first-child { color: #173b2b; }
html[data-sb-theme="light"] .docs-action-flow div { background: #f7f9f7; }
html[data-sb-theme="light"] .docs-action-flow span,
html[data-sb-theme="light"] .docs-endpoints span,
html[data-sb-theme="light"] .docs-source-tree span,
html[data-sb-theme="light"] .docs-architecture span { color: #526159; }
html[data-sb-theme="light"] .docs-faq summary { color: #17211c; }
html[data-sb-theme="light"] .docs-code {
  background: #102019;
  border-color: #4f7761;
  color: #e3ffed;
}
html[data-sb-theme="light"] .docs-copy {
  background: #f3f7f4;
  border-color: #71857a;
  color: #075f3b;
}
