/* BeeCore Docs V2 — shell + overview styles (DOCS-V2-A, 2026-10-04).
   Scoped to [data-docs-v2-root] inside the existing v49 .dp-page shell.
   Geometry reuses the API Reference / Docs baseline (Phase 0):
   sidebar 250px, main content x~280, H1 34, H2 21, body 15.
   No purple, no gradients, no glass, no marketing hero. */
[data-docs-v2-root] {
  /* .dp-page is itself a grid (250px sidebar + 1fr main, the original dp
     layout). The V2 shell must span the FULL grid, then reproduce the same
     two-track geometry internally — otherwise it lands in the 250px track
     and every descendant collapses. */
  grid-column: 1 / -1;
  width: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #181818;
  background: #ffffff;
  min-height: 60vh;
}
[data-docs-v2-root] .docs2-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
}

/* ------------------------------- Sidebar ------------------------------ */
[data-docs-v2-root] .docs2-toc {
  padding: 24px 18px 40px 26px;
  border-right: 1px solid #e5e7eb;
  position: sticky;
  top: 64px;
  align-self: start;
}
[data-docs-v2-root] .docs2-toc-title {
  color: #737373;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  margin: 0 10px 14px;
}
[data-docs-v2-root] .docs2-toc-group { margin-bottom: 14px; }
[data-docs-v2-root] .docs2-toc-group-label {
  color: #737373;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin: 0 10px 8px;
}
[data-docs-v2-root] .docs2-item {
  display: block;
  width: 100%;
  text-align: left;
  color: #252525;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  line-height: normal;
  border-radius: 5px;
  padding: 9px 10px;
  margin: 0 0 2px;
  background: transparent;
  border: 0;
  border-left: 3px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
[data-docs-v2-root] .docs2-item.is-active {
  background: #fff7dc;
  border-left: 3px solid #f5b800;
  color: #181818;
}
[data-docs-v2-root] .docs2-item--soon {
  color: #a3a3a3;
  cursor: default;
}
[data-docs-v2-root] .docs2-item--soon:hover { background: transparent; }

/* -------------------------------- Main -------------------------------- */
[data-docs-v2-root] .docs2-main {
  padding: 36px 48px 90px 30px;
  max-width: 860px;
}
[data-docs-v2-root] .docs2-h1 {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.6px;
  margin: 0 0 12px;
  color: #181818;
}
[data-docs-v2-root] .docs2-intro {
  font-size: 15px;
  line-height: 1.7;
  color: #444;
  margin: 0 0 34px;
  max-width: 640px;
}
[data-docs-v2-root] .docs2-section { margin: 0 0 40px; }
[data-docs-v2-root] .docs2-h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin: 0 0 14px;
  color: #181818;
}
[data-docs-v2-root] .docs2-note {
  font-size: 14px;
  color: #555;
  margin: 0 0 12px;
}
[data-docs-v2-root] .docs2-note--muted { color: #8a8a8a; font-size: 13px; }

/* Start here cards */
[data-docs-v2-root] .docs2-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
[data-docs-v2-root] .docs2-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 16px 14px;
  text-decoration: none;
  background: #fafafa;
  transition: border-color .15s ease, background .15s ease;
}
[data-docs-v2-root] .docs2-card:hover { border-color: #f5b800; background: #fffdf5; }
[data-docs-v2-root] .docs2-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #181818;
  margin-bottom: 6px;
}
[data-docs-v2-root] .docs2-card-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #667085;
}

/* Platform map */
[data-docs-v2-root] .docs2-flow {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 18px;
}
[data-docs-v2-root] .docs2-flow-node {
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: #252525;
}
[data-docs-v2-root] .docs2-flow-node--accent {
  background: #fff7dc;
  border-color: #f0d878;
}
[data-docs-v2-root] .docs2-flow-arrow {
  color: #b3b3b3;
  font-size: 13px;
  line-height: 1;
  margin-left: 22px;
}
[data-docs-v2-root] .docs2-rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
[data-docs-v2-root] .docs2-rowgroup {
  border: 1px solid #eef0f2;
  border-radius: 10px;
  padding: 12px 14px;
  background: #fcfcfc;
}
[data-docs-v2-root] .docs2-rowgroup-label {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin-bottom: 8px;
}
[data-docs-v2-root] .docs2-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 5px 0;
}
[data-docs-v2-root] .docs2-row-name {
  font-size: 13px;
  font-weight: 600;
  color: #252525;
}
[data-docs-v2-root] .docs2-row-desc {
  font-size: 12.5px;
  line-height: 1.5;
  color: #667085;
}

/* Core entry point links */
[data-docs-v2-root] .docs2-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
[data-docs-v2-root] .docs2-link {
  display: inline-block;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  color: #252525;
  text-decoration: none;
  background: #fff;
  transition: border-color .15s ease;
}
[data-docs-v2-root] .docs2-link:hover { border-color: #f5b800; }

/* Code proof */
[data-docs-v2-root] .docs2-code {
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  overflow: hidden;
  background: #1e1e1e;
}
[data-docs-v2-root] .docs2-code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #262626;
  border-bottom: 1px solid #333;
}
[data-docs-v2-root] .docs2-code-lang {
  font-size: 12px;
  color: #9a9a9a;
  letter-spacing: .04em;
}
[data-docs-v2-root] .docs2-copy {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #333;
  color: #e8e8e8;
  border: 1px solid #454545;
  border-radius: 6px;
  font-size: 12px;
  font-family: inherit;
  padding: 5px 12px;
  cursor: pointer;
}
[data-docs-v2-root] .docs2-copy:hover { background: #3d3d3d; }
[data-docs-v2-root] .docs2-copy:focus-visible,
[data-docs-v2-root] .docs2-item:focus-visible,
[data-docs-v2-root] .docs2-card:focus-visible,
[data-docs-v2-root] .docs2-link:focus-visible {
  outline: 2px solid #f5b800;
  outline-offset: 2px;
}
[data-docs-v2-root] .docs2-code-pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
}
[data-docs-v2-root] .docs2-code-pre code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre;
}

/* RTL (docs-local, ar only). Code stays LTR via .docs2-code[dir] above. */
[data-docs-v2-root][dir="rtl"] .docs2-toc { border-right: 0; border-left: 1px solid #e5e7eb; }
[data-docs-v2-root][dir="rtl"] .docs2-item { text-align: right; border-left: 0; border-right: 3px solid transparent; }
[data-docs-v2-root][dir="rtl"] .docs2-item.is-active { border-right-color: #f5b800; }
[data-docs-v2-root][dir="rtl"] .docs2-flow-arrow { margin-left: 0; margin-right: 22px; }

/* ------------------------------- Mobile ------------------------------- */
@media (max-width: 960px) {
  [data-docs-v2-root] .docs2-layout { grid-template-columns: minmax(0, 1fr); }
  [data-docs-v2-root] .docs2-toc {
    position: static;
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 16px 10px;
  }
  [data-docs-v2-root] .docs2-main { padding: 22px 16px 70px; }
  [data-docs-v2-root] .docs2-h1 { font-size: 30px; }
  [data-docs-v2-root] .docs2-cards { grid-template-columns: minmax(0, 1fr); }
  [data-docs-v2-root] .docs2-rows { grid-template-columns: minmax(0, 1fr); }
}

/* ====================================================================
   DOCS-V2-B additions — documentation-page density.
   The V2-A baseline above is untouched: sidebar 250px, main max 860px,
   H1 34 / H2 21 / body 14-15, #181818 text, #E5E7EB borders, yellow only
   as active/accent. Nothing here adds gradients, purple, glass or hero
   spacing — Docs must read DENSER than Homepage, not roomier.
   ==================================================================== */

/* Page switch is an in-place main swap: never animate or reflow the shell. */
[data-docs-v2-root] .docs2-main { overflow-wrap: break-word; }

/* Definition / comparison grids used by the Core Concepts pages. */
[data-docs-v2-root] .docs2-rows--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
[data-docs-v2-root] .docs2-rows--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* A bare rowgroup used purely as a statement keeps normal text metrics. */
[data-docs-v2-root] .docs2-rowgroup > .docs2-row:first-child { padding-top: 0; }
[data-docs-v2-root] .docs2-rowgroup > .docs2-row-name + .docs2-row { padding-top: 5px; }

/* Small caption above a code block (e.g. "Request header", "Example"). */
[data-docs-v2-root] .docs2-code-label {
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8a8a8a;
  margin: 0 0 7px;
}
/* A code label directly after prose needs a little air above it. */
[data-docs-v2-root] .docs2-note + .docs2-code-label { margin-top: 14px; }

/* Enabled nav rows are real buttons: keep the UA focus ring suppressed but
   provide our own, and make sure the soon rows can never look focusable. */
[data-docs-v2-root] button.docs2-item {
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
}
[data-docs-v2-root] .docs2-item--soon { user-select: text; }

/* Keyboard focus must be visible on the ACTIVE item too. */
[data-docs-v2-root] .docs2-item.is-active:focus-visible {
  outline: 2px solid #f5b800;
  outline-offset: -2px;
}

/* Code labels are UI chrome, not content: keep them out of Copy output by
   living OUTSIDE .docs2-code-pre (already true) and never translating them. */
[data-docs-v2-root] .docs2-code-lang { direction: ltr; unicode-bidi: isolate; }

/* Long model IDs / URLs inside notes must break rather than widen the page. */
[data-docs-v2-root] .docs2-note,
[data-docs-v2-root] .docs2-row-desc,
[data-docs-v2-root] .docs2-card-desc {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* Tables are not used in V2-B; grids must never force a page-level scrollbar
   at any desktop width. */
@media (max-width: 1100px) {
  [data-docs-v2-root] .docs2-rows--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  [data-docs-v2-root] .docs2-rows--2,
  [data-docs-v2-root] .docs2-rows--3 { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile: the 17-row rail must never survive as a 250px desktop column. */
@media (max-width: 960px) {
  [data-docs-v2-root] .docs2-toc { max-width: 100%; }
  [data-docs-v2-root] .docs2-item { padding: 8px 10px; }
  [data-docs-v2-root] .docs2-code-pre { padding: 14px 14px; }
  [data-docs-v2-root] .docs2-copy { padding: 6px 12px; }
}

/* ---------------- DOCS-V2-C (2026-10-06): Build with BeeCORE additions ---------------- */
/* Internal Docs cross-navigation buttons reuse the .docs2-link pill look. */
[data-docs-v2-root] button.docs2-link {
  font-family: inherit;
  cursor: pointer;
  appearance: none;
}

/* ================= dsi1-20261010: sidebar nav icons ================= */
/* 16x16 linear SVG icons on all docs2 nav items (injected by
   documentation-alignment.js). Icon-to-text gap matches API Reference (10px);
   item text set to 14px so every label stays on a single line. */
[data-docs-v2-root] .docs2-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
[data-docs-v2-root] button.docs2-item {
  font-size: 14px;
}
[data-docs-v2-root] .docs2-item .docs2-item-icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555555;
}
[data-docs-v2-root] .docs2-item .docs2-item-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* ====================================================================
   dcw1-20261010 — documentation content width expansion.
   Root cause: .docs2-main was capped at max-width 860px while its grid
   column (.docs2-layout: 250px minmax(0,1fr)) already spans to the
   viewport edge — leaving 330px (1440) to 810px (1920) of dead space
   right of the content. Removing the cap lets the Start-here cards,
   capability rows, code blocks and links fill the available width.
   Plain prose keeps today's reading width (782px = the previous 860px
   container minus its 30/48 padding); .docs2-intro keeps its existing
   640px cap. Sidebar, header, footer and all other pages untouched.
   ==================================================================== */
[data-docs-v2-root] .docs2-main {
  max-width: none;
}
[data-docs-v2-root] .docs2-note {
  max-width: 782px;
}
/* Safety: wide children never force a page-level scrollbar */
[data-docs-v2-root] .docs2-code,
[data-docs-v2-root] .docs2-cards,
[data-docs-v2-root] .docs2-rows,
[data-docs-v2-root] .docs2-flow,
[data-docs-v2-root] .docs2-links {
  max-width: 100%;
}
