/*
 * AI tutorial / docs page - 36_ai_tutorial.html
 * Docs-style layout (top tabs, left nav, article, right "on this page") modelled on docs.gravitex.ai.
 * Everything is scoped under .doc-wrap so the HostSight template styles are not affected.
 */

.doc-wrap {
  --doc-primary: #4f46e5;
  --doc-primary-dark: #4338ca;
  --doc-primary-soft: #eef2ff;
  --doc-ink: #111827;
  --doc-body: #374151;
  --doc-mute: #6b7280;
  --doc-line: #e5e7eb;
  --doc-bg: #fff;
  --doc-code-bg: #0f172a;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--doc-body);
  background: var(--doc-bg);
  font-size: 16px;
  line-height: 1.75;
}

.doc-wrap *, .doc-wrap *::before, .doc-wrap *::after { box-sizing: border-box; }

/* ---- top tabs + search ---- */
.doc-top { position: sticky; top: 74px; z-index: 40; border-bottom: 1px solid var(--doc-line); background: #fff; }
.doc-top-inner { max-width: 1440px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.doc-tabs { display: flex; gap: 26px; overflow-x: auto; }
.doc-tab { position: relative; display: block; padding: 16px 0 14px; font-size: 14.5px; font-weight: 500; color: var(--doc-mute); white-space: nowrap; border-bottom: 2px solid transparent; text-decoration: none; }
.doc-tab:hover { color: var(--doc-ink); text-decoration: none; }
.doc-tab.is-active { color: var(--doc-ink); font-weight: 600; border-bottom-color: var(--doc-primary); }

.doc-search { position: relative; width: 320px; max-width: 100%; margin: 8px 0; }
.doc-search input { width: 100%; height: 38px; padding: 0 56px 0 38px; border: 1px solid var(--doc-line); border-radius: 10px; font: inherit; font-size: 14px; color: var(--doc-ink); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.doc-search input:focus { border-color: var(--doc-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .15); }
.doc-search > svg { position: absolute; left: 12px; top: 11px; width: 16px; height: 16px; color: var(--doc-mute); }
.doc-search kbd { position: absolute; right: 10px; top: 9px; padding: 0 6px; border: 1px solid var(--doc-line); border-radius: 5px; font: 11px/18px Consolas, monospace; color: var(--doc-mute); background: #f9fafb; }
.doc-results { position: absolute; z-index: 30; left: 0; right: 0; top: 44px; max-height: 360px; overflow-y: auto; border: 1px solid var(--doc-line); border-radius: 12px; background: #fff; box-shadow: 0 16px 40px rgba(17, 24, 39, .14); display: none; }
.doc-results.is-open { display: block; }
.doc-results a { display: block; padding: 10px 14px; border-bottom: 1px solid #f3f4f6; text-decoration: none; }
.doc-results a:last-child { border-bottom: 0; }
.doc-results a:hover { background: var(--doc-primary-soft); }
.doc-results b { display: block; font-size: 14px; color: var(--doc-ink); }
.doc-results span { display: block; font-size: 12.5px; color: var(--doc-mute); line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-results .doc-none { padding: 16px; font-size: 14px; color: var(--doc-mute); text-align: center; }

/* ---- 3-column layout ---- */
.doc-layout { max-width: 1440px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 256px minmax(0, 1fr) 224px; gap: 0 48px; }

.doc-side, .doc-toc { position: sticky; top: 140px; align-self: start; max-height: calc(100vh - 156px); overflow-y: auto; padding: 32px 0 24px; }
.doc-side::-webkit-scrollbar, .doc-toc::-webkit-scrollbar { width: 4px; }
.doc-side::-webkit-scrollbar-thumb, .doc-toc::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }

.doc-group { margin-bottom: 22px; }
.doc-group-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px 12px; padding-right: 10px; cursor: pointer; user-select: none; font-size: 14px; font-weight: 700; color: var(--doc-ink); }
.doc-group-title svg { width: 16px; height: 16px; }
.doc-nav-link { display: block; margin: 2px 0; padding: 7px 12px; border-radius: 9px; font-size: 14px; line-height: 1.5; color: var(--doc-body); text-decoration: none; transition: background .15s, color .15s; }
.doc-nav-link:hover { background: #f3f4f6; color: var(--doc-ink); text-decoration: none; }
.doc-nav-link.is-active { font-weight: 600; color: var(--doc-primary); background: var(--doc-primary-soft); }

.doc-main { min-width: 0; padding: 32px 0 80px; }
.doc-article { max-width: 760px; }

.doc-cat { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--doc-primary); }
.doc-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.doc-wrap h1.doc-h1 { margin: 0; font-size: 34px; line-height: 1.2; font-weight: 800; letter-spacing: -.5px; color: var(--doc-ink); }
.doc-desc { margin: 8px 0 28px; font-size: 18px; line-height: 1.6; color: var(--doc-mute); }

.doc-copy-page { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--doc-line); border-radius: 9px; font: inherit; font-size: 13px; font-weight: 500; color: var(--doc-body); background: #fff; cursor: pointer; transition: all .2s; }
.doc-copy-page:hover { border-color: var(--doc-primary); color: var(--doc-primary); }
.doc-copy-page svg { width: 14px; height: 14px; }

/* ---- article typography ---- */
.doc-body h2, .doc-body h3, .doc-body h4 { color: var(--doc-ink); font-weight: 700; scroll-margin-top: 150px; }
.doc-body h2 { margin: 44px 0 14px; font-size: 26px; line-height: 1.3; letter-spacing: -.3px; }
.doc-body h3 { margin: 32px 0 10px; font-size: 20px; line-height: 1.4; }
.doc-body h4 { margin: 22px 0 8px; font-size: 16px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 16px; }
.doc-body a { color: var(--doc-ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--doc-primary); }
.doc-body a:hover { color: var(--doc-primary); }
.doc-body ul, .doc-body ol { margin: 0 0 18px; padding-left: 24px; }
.doc-body li { margin: 6px 0; }
.doc-body li::marker { color: var(--doc-mute); }
.doc-body strong { color: var(--doc-ink); font-weight: 700; }
.doc-body code { padding: 2px 6px; border: 1px solid var(--doc-line); border-radius: 6px; font: 0.88em/1.4 "JetBrains Mono", Consolas, Menlo, monospace; color: var(--doc-ink); background: #f9fafb; }
.doc-body hr { margin: 36px 0; border: 0; border-top: 1px solid var(--doc-line); }

/* ---- cards ---- */
.doc-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 18px 0 24px; }
.doc-cards.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.doc-body a.doc-card, .doc-card { display: block; padding: 20px 22px; border: 1px solid var(--doc-line); border-radius: 14px; color: var(--doc-body); font-weight: 400; background: #fff; text-decoration: none; transition: all .2s; }
.doc-body a.doc-card:hover { border-color: var(--doc-primary); box-shadow: 0 8px 24px rgba(79, 70, 229, .12); color: var(--doc-body); transform: translateY(-2px); }
.doc-card svg.doc-ico { width: 26px; height: 26px; margin-bottom: 14px; color: var(--doc-primary); }
.doc-card h5 { margin: 0 0 4px; font-size: 16px; font-weight: 700; color: var(--doc-ink); }
.doc-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--doc-mute); }

/* ---- callouts ---- */
.doc-callout { display: flex; gap: 12px; margin: 20px 0; padding: 14px 18px; border: 1px solid #bfdbfe; border-radius: 12px; font-size: 15px; line-height: 1.65; color: #1e3a8a; background: #eff6ff; }
.doc-callout > svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px; }
.doc-callout > div { min-width: 0; }
.doc-callout p:last-child { margin-bottom: 0; }
.doc-callout.tip { border-color: #bbf7d0; color: #14532d; background: #f0fdf4; }
.doc-callout.warn { border-color: #fde68a; color: #78350f; background: #fffbeb; }
.doc-callout.danger { border-color: #fecaca; color: #7f1d1d; background: #fef2f2; }
.doc-callout strong { color: inherit; }
.doc-callout code { background: rgba(255, 255, 255, .7); }

/* ---- steps ---- */
.doc-wrap .doc-body .doc-steps, .doc-wrap .doc-steps { list-style: none; margin: 22px 0; padding: 0; counter-reset: s; }
.doc-steps > li { position: relative; margin: 0; padding: 0 0 22px 48px; counter-increment: s; }
.doc-steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; font-size: 14px; font-weight: 700; line-height: 30px; text-align: center; color: var(--doc-primary); background: var(--doc-primary-soft); }
.doc-steps > li::after { content: ""; position: absolute; left: 14px; top: 36px; bottom: 6px; width: 2px; background: var(--doc-line); }
.doc-steps > li:last-child::after { display: none; }
.doc-steps > li > strong { display: block; margin-bottom: 4px; font-size: 16.5px; }

/* ---- tables ---- */
.doc-table { margin: 20px 0; overflow-x: auto; border: 1px solid var(--doc-line); border-radius: 12px; }
.doc-table table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; }
.doc-table th, .doc-table td { padding: 11px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--doc-line); }
.doc-table th { font-size: 13px; font-weight: 600; color: var(--doc-mute); background: #f9fafb; white-space: nowrap; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td code { white-space: nowrap; }

/* ---- code blocks ---- */
.doc-code { margin: 20px 0; overflow: hidden; border-radius: 12px; background: var(--doc-code-bg); }
.doc-code-bar { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 0 4px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(255, 255, 255, .03); }
.doc-code-tabs { display: flex; overflow-x: auto; }
.doc-code-tab { padding: 10px 14px; border: 0; border-bottom: 2px solid transparent; font: 600 12.5px/1 Inter, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #94a3b8; background: none; cursor: pointer; white-space: nowrap; }
.doc-code-tab:hover { color: #e2e8f0; }
.doc-code-tab.is-active { color: #fff; border-bottom-color: #818cf8; }
.doc-code-cp { padding: 5px 10px; border: 0; border-radius: 7px; font: 500 12px/1 Inter, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; color: #94a3b8; background: none; cursor: pointer; }
.doc-code-cp:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.doc-code-cp.is-copied { color: #4ade80; }
.doc-code pre { display: none; margin: 0; padding: 16px 20px; overflow-x: auto; border: 0; border-radius: 0; font: 13.5px/1.7 "JetBrains Mono", Consolas, Menlo, monospace; color: #e2e8f0; background: none; }
.doc-code pre.is-active { display: block; }
.doc-code pre code { padding: 0; border: 0; font: inherit; color: inherit; background: none; white-space: pre; }
.doc-code .k { color: #c4b5fd; } .doc-code .s { color: #86efac; } .doc-code .c { color: #64748b; } .doc-code .n { color: #fda4af; } .doc-code .f { color: #7dd3fc; }

/* ---- accordion (FAQ) ---- */
.doc-qa { margin: 12px 0 20px; border: 1px solid var(--doc-line); border-radius: 12px; overflow: hidden; }
.doc-qa details { border-bottom: 1px solid var(--doc-line); }
.doc-qa details:last-child { border-bottom: 0; }
.doc-qa summary { position: relative; padding: 15px 48px 15px 20px; font-weight: 600; color: var(--doc-ink); cursor: pointer; list-style: none; }
.doc-qa summary::-webkit-details-marker { display: none; }
.doc-qa summary::after { content: ""; position: absolute; right: 22px; top: 50%; width: 8px; height: 8px; margin-top: -6px; border: solid var(--doc-mute); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform .2s; }
.doc-qa details[open] summary::after { margin-top: -2px; transform: rotate(-135deg); }
.doc-qa details[open] summary { color: var(--doc-primary); }
.doc-qa .doc-a { padding: 0 20px 16px; font-size: 15px; }
.doc-qa .doc-a p:last-child { margin-bottom: 0; }

/* ---- pager ---- */
.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--doc-line); }
.doc-pager a { display: block; padding: 14px 18px; border: 1px solid var(--doc-line); border-radius: 12px; text-decoration: none; transition: all .2s; }
.doc-pager a:hover { border-color: var(--doc-primary); box-shadow: 0 6px 18px rgba(79, 70, 229, .1); }
.doc-pager small { display: block; font-size: 12.5px; color: var(--doc-mute); }
.doc-pager b { display: block; font-size: 15.5px; color: var(--doc-ink); }
.doc-pager .next { grid-column: 2; text-align: right; }
.doc-pager .prev { grid-column: 1; }
.doc-pager .next:only-child { grid-column: 2; }

/* ---- right TOC ---- */
.doc-toc-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13.5px; font-weight: 600; color: var(--doc-ink); }
.doc-toc-title svg { width: 14px; height: 14px; }
.doc-toc a { display: block; padding: 5px 0 5px 14px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.5; color: var(--doc-mute); text-decoration: none; }
.doc-toc a.lv3 { padding-left: 28px; }
.doc-toc a:hover { color: var(--doc-ink); text-decoration: none; }
.doc-toc a.is-active { font-weight: 600; color: var(--doc-primary); border-left-color: var(--doc-primary); }

/* toast (shared look with the models page) */
.doc-toast { position: fixed; left: 50%; top: 90px; z-index: 99999; max-width: 90vw; padding: 10px 22px 10px 40px; border-radius: 50px; font-size: 14px; font-weight: 600; color: #fff; background: #272a2c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); pointer-events: none; opacity: 0; transform: translate(-50%, -12px); transition: opacity .25s ease, transform .25s ease; }
.doc-toast::before { content: "\2713"; position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; font-size: 12px; line-height: 18px; text-align: center; color: #fff; background: #16a34a; }
.doc-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ---- responsive ---- */
@media (max-width: 1180px) {
  .doc-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .doc-toc { display: none; }
}

@media (max-width: 860px) {
  .doc-top { position: static; }
  .doc-top-inner, .doc-layout { padding: 0 16px; }
  .doc-layout { display: block; }
  .doc-side { position: static; max-height: none; padding: 16px 0 0; display: flex; gap: 8px; overflow-x: auto; }
  .doc-group { display: contents; }
  .doc-group-title { display: none; }
  .doc-nav-link { flex: 0 0 auto; margin: 0; padding: 6px 14px; border: 1px solid var(--doc-line); border-radius: 50px; white-space: nowrap; }
  .doc-main { padding-top: 22px; }
  .doc-wrap h1.doc-h1 { font-size: 28px; }
  .doc-cards, .doc-cards.cols-3 { grid-template-columns: 1fr; }
  .doc-search { width: 100%; }
  .doc-title-row { flex-direction: column; }
}

/* ---- ported docs additions ---- */
.doc-group-title span { flex: 1 1 auto; min-width: 0; }
.doc-caret { flex: 0 0 auto; width: 7px; height: 7px; margin-right: 4px; border: solid var(--doc-mute); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .2s; }
.doc-group.is-collapsed .doc-caret { transform: rotate(-45deg); }
.doc-group.is-collapsed .doc-group-items { display: none; }
.doc-group.is-sub .doc-group-title { font-weight: 600; font-size: 13px; color: var(--doc-body); }
.doc-group.is-sub .doc-group-title svg { display: none; }
.doc-group.is-sub { margin-left: 8px; margin-bottom: 14px; }

.doc-wrap p.doc-param { margin: 18px 0 4px; padding-top: 14px; border-top: 1px solid var(--doc-line); font-size: 15px; }
.doc-wrap p.doc-param + p { color: var(--doc-body); }
.doc-wrap p.doc-param em.req { margin-left: 4px; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-style: normal; font-weight: 600; color: #be123c; background: #fff1f2; }
.doc-wrap p.doc-param code { color: var(--doc-primary); background: var(--doc-primary-soft); border-color: transparent; }
.doc-body blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--doc-line); color: var(--doc-mute); }
.doc-body img { max-width: 100%; border-radius: 10px; }
.doc-shot { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding: 22px 20px; border: 1px dashed #c7cbd6; border-radius: 12px; font-size: 14px; color: var(--doc-mute); background: #f9fafb; }
.doc-shot span { flex: 0 0 auto; padding: 1px 10px; border-radius: 50px; font-size: 12px; font-weight: 600; color: var(--doc-primary); background: var(--doc-primary-soft); }
.doc-body h2 { word-break: break-word; }
.doc-code pre { max-height: 560px; }
.doc-body ul ul, .doc-body ol ul, .doc-body ul ol { margin: 6px 0; }
.doc-wrap .doc-body h2, .doc-wrap .doc-body h3, .doc-wrap .doc-body h4 { padding: 0; border: 0; text-transform: none; font-family: inherit; }
.doc-wrap .doc-body h2::before, .doc-wrap .doc-body h2::after, .doc-wrap .doc-body h3::after { display: none; }
.doc-wrap .doc-body h2 { margin: 44px 0 14px; }

/* =====================================================================
   Polish pass
   ===================================================================== */
.doc-wrap { -webkit-font-smoothing: antialiased; }
.doc-top-inner, .doc-layout { max-width: 1360px; padding-left: 40px; padding-right: 40px; }
.doc-layout { grid-template-columns: 252px minmax(0, 1fr) 216px; gap: 0 56px; }
.doc-top { box-shadow: 0 1px 0 var(--doc-line), 0 6px 16px -12px rgba(17, 24, 39, .18); border-bottom: 0; }

/* article header */
.doc-main { padding-top: 40px; }
.doc-cat { margin-bottom: 10px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.doc-wrap h1.doc-h1 { font-size: 38px; letter-spacing: -.8px; line-height: 1.15; }
.doc-desc { margin: 12px 0 8px; font-size: 17.5px; line-height: 1.65; }
.doc-head { margin-bottom: 8px; padding-bottom: 26px; border-bottom: 1px solid var(--doc-line); }
.doc-head .doc-desc { margin-bottom: 0; }
.doc-body { padding-top: 6px; }
.doc-article, .doc-page { animation: docIn .35s ease both; }
@keyframes docIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* body text */
.doc-body p, .doc-body li { line-height: 1.85; }
.doc-body h2 { margin-top: 52px; padding-top: 4px; font-size: 25px; }
.doc-body h3 { margin-top: 34px; font-size: 19px; }
.doc-wrap .doc-body h2 + h3 { margin-top: 18px; }
.doc-body code { padding: 1px 6px; border-radius: 5px; font-size: .84em; word-break: break-word; }
.doc-body a code { border-color: transparent; }
.doc-table td code { white-space: normal; }
.doc-body li > p { margin-bottom: 6px; }
.doc-body hr { margin: 44px 0; }

/* sidebar */
.doc-side { padding-top: 34px; }
.doc-group { margin-bottom: 18px; }
.doc-group-title { margin: 0 0 6px; padding: 4px 10px; gap: 0; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--doc-mute); }
.doc-group-title svg { display: none; }
.doc-group-title:hover { color: var(--doc-ink); }
.doc-nav-link { position: relative; margin: 1px 0; padding: 7px 12px 7px 14px; border-radius: 8px; font-size: 14px; color: #4b5563; }
.doc-nav-link:hover { background: #f5f6f8; color: var(--doc-ink); }
.doc-nav-link.is-active { color: var(--doc-primary); font-weight: 600; background: var(--doc-primary-soft); }
.doc-nav-link.is-active::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--doc-primary); }
.doc-group.is-sub { margin-left: 0; }
.doc-group.is-sub .doc-group-title { text-transform: none; letter-spacing: 0; font-size: 12.5px; padding-left: 10px; }

/* right TOC */
.doc-toc { padding-top: 38px; }
.doc-toc-title { margin-bottom: 10px; font-size: 12px; letter-spacing: .07em; text-transform: uppercase; color: var(--doc-mute); }
.doc-toc-title svg { display: none; }
.doc-toc { border-left: 0; }
.doc-toc a { margin-left: 0; border-left: 2px solid #eceef2; padding-left: 14px; }
.doc-toc a.lv3 { padding-left: 28px; }
.doc-toc a.is-active { border-left-color: var(--doc-primary); }

/* parameters */
.doc-wrap p.doc-param { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 22px 0 6px; padding-top: 16px; font-size: 14px; }
.doc-wrap p.doc-param strong { font: 600 14.5px/1.4 "JetBrains Mono", Consolas, Menlo, monospace; color: var(--doc-ink); }
.doc-wrap p.doc-param code { padding: 1px 8px; font-size: 12.5px; }
.doc-wrap p.doc-param em.req { margin: 0; font-size: 11.5px; }
.doc-wrap p.doc-param + p, .doc-wrap p.doc-param + ul { margin-top: 0; }

/* code */
.doc-code { margin: 22px 0; border: 1px solid #1e293b; border-radius: 14px; box-shadow: 0 12px 28px -18px rgba(15, 23, 42, .55); }
.doc-code-bar { padding: 0 10px 0 6px; background: #111a2f; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.doc-code-tab { padding: 12px 14px; font-size: 12.5px; letter-spacing: .02em; }
.doc-code-cp { padding: 5px 11px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 7px; }
.doc-code pre { padding: 18px 22px; font-size: 13px; line-height: 1.75; tab-size: 2; }
.doc-code .key { color: #93c5fd; } .doc-code .n { color: #fdba74; } .doc-code .c { color: #64748b; font-style: italic; } .doc-code .f { color: #7dd3fc; } .doc-code .k { color: #c4b5fd; } .doc-code .s { color: #86efac; }

/* tables */
.doc-table { border-radius: 14px; box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.doc-table th { padding: 12px 18px; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; background: #f8f9fb; }
.doc-table td { padding: 12px 18px; line-height: 1.65; }
.doc-table tbody tr:hover td { background: #fafbff; }
.doc-table td:first-child { color: var(--doc-ink); }

/* callouts */
.doc-callout { position: relative; padding: 15px 20px 15px 18px; border-width: 1px; border-radius: 12px; }
.doc-callout > svg { margin-top: 4px; }
.doc-callout p { margin: 0 0 8px; line-height: 1.75; }
.doc-callout ul, .doc-callout ol { margin: 6px 0; }

/* cards */
.doc-card { padding: 20px 22px; border-radius: 14px; }
.doc-card h5 { margin-bottom: 6px; font-size: 15.5px; }
.doc-body a.doc-card:hover { transform: translateY(-2px); }
.doc-body a.doc-card h5::after { content: "\2192"; margin-left: 6px; color: var(--doc-primary); opacity: 0; transition: opacity .2s, margin .2s; }
.doc-body a.doc-card:hover h5::after { opacity: 1; margin-left: 10px; }

/* feedback + pager */
.doc-feedback { display: flex; align-items: center; gap: 10px; margin-top: 52px; padding: 16px 20px; border: 1px solid var(--doc-line); border-radius: 12px; font-size: 14px; color: var(--doc-body); background: #fafbfc; }
.doc-feedback span { margin-right: auto; font-weight: 500; }
.doc-feedback button { padding: 6px 16px; border: 1px solid var(--doc-line); border-radius: 50px; font: inherit; font-size: 13px; color: var(--doc-body); background: #fff; cursor: pointer; transition: all .2s; }
.doc-feedback button:hover { border-color: var(--doc-primary); color: var(--doc-primary); }
.doc-feedback button.is-on { border-color: var(--doc-primary); color: #fff; background: var(--doc-primary); }
.doc-pager { margin-top: 20px; padding-top: 0; border-top: 0; }
.doc-pager a { padding: 16px 20px; border-radius: 12px; }
.doc-pager a.prev small::before { content: "\2190  "; }
.doc-pager a.next small::after { content: "  \2192"; }
.doc-pager b { margin-top: 2px; }

/* search */
.doc-search input { height: 40px; border-radius: 12px; background: #f8f9fb; }
.doc-search input:focus { background: #fff; }

@media (max-width: 1180px) { .doc-layout { grid-template-columns: 236px minmax(0, 1fr); gap: 0 40px; } }
@media (max-width: 860px) {
  .doc-top-inner, .doc-layout { padding-left: 16px; padding-right: 16px; }
  .doc-wrap h1.doc-h1 { font-size: 28px; }
  .doc-feedback { flex-wrap: wrap; }
  .doc-nav-link.is-active::before { display: none; }
}


/* ---- icons: card badges + inline status marks ---- */
.doc-card-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 11px; color: var(--doc-primary); background: linear-gradient(135deg, #eef2ff, #e0e7ff); transition: all .25s; }
.doc-card-ico svg { width: 20px; height: 20px; }
.doc-body a.doc-card:hover .doc-card-ico { color: #fff; background: linear-gradient(135deg, #6366f1, #4f46e5); transform: translateY(-1px); box-shadow: 0 8px 16px -8px rgba(79, 70, 229, .7); }

.doc-yes, .doc-no, .doc-warn { display: inline-block; width: 16px; height: 16px; margin: 0 4px 0 0; vertical-align: -3px; border-radius: 50%; background-repeat: no-repeat; background-position: center; background-size: 10px 10px; }
.doc-yes { background-color: #10b981; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.500l4.500 4.500L19 7.500'/%3E%3C/svg%3E"); }
.doc-no { background-color: #f1f5f9; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='3.400' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.doc-warn { background-color: #f59e0b; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.400' stroke-linecap='round'%3E%3Cpath d='M12 6v8M12 18.500v.01'/%3E%3C/svg%3E"); }
.doc-table td .doc-yes:only-child, .doc-table td .doc-no:only-child { margin: 0; }
.doc-card-body { font-size: 14.5px; line-height: 1.7; color: var(--doc-mute); }
.doc-card-body p { margin: 0 0 6px; font-size: inherit; }
.doc-card-body ul, .doc-card-body ol { margin: 6px 0 0; padding-left: 20px; }
.doc-card-body li { margin: 3px 0; line-height: 1.7; }
.doc-card-body > :last-child { margin-bottom: 0; }
.doc-cards > .doc-card:only-child { grid-column: 1 / -1; }


/* =====================================================================
   Width aligned with the rest of the site (Bootstrap container = 1170px) + more icons
   ===================================================================== */
.doc-top-inner, .doc-layout { max-width: 1200px; padding-left: 15px; padding-right: 15px; }
.doc-layout { grid-template-columns: 216px minmax(0, 1fr) 184px; gap: 0 40px; }
.doc-article, .doc-page { max-width: none; }
.doc-wrap h1.doc-h1 { font-size: 34px; }
.doc-desc { font-size: 16.5px; }
.doc-table th, .doc-table td { padding-left: 14px; padding-right: 14px; }
.doc-code pre { padding: 16px 18px; font-size: 12.8px; }

/* tabs */
.doc-tab { display: inline-flex; align-items: center; gap: 7px; }
.doc-tab svg { width: 15px; height: 15px; opacity: .75; }
.doc-tab.is-active svg { color: var(--doc-primary); opacity: 1; }

/* sidebar group icons */
.doc-group-title svg { display: block; flex: 0 0 auto; width: 15px; height: 15px; margin-right: 8px; color: var(--doc-primary); }
.doc-group.is-sub .doc-group-title svg { display: none; }

/* page title tile */
.doc-title-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.doc-h1-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #6366f1, #4f46e5); box-shadow: 0 10px 20px -10px rgba(79, 70, 229, .8); }
.doc-h1-ico svg { width: 23px; height: 23px; }

/* section heading tiles */
.doc-wrap .doc-body h2.has-ico { display: flex; align-items: center; gap: 12px; }
.doc-h2-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 10px; color: var(--doc-primary); background: var(--doc-primary-soft); }
.doc-h2-ico svg { width: 17px; height: 17px; }

/* feedback buttons */
.doc-feedback button { display: inline-flex; align-items: center; gap: 6px; }
.doc-feedback button svg { width: 14px; height: 14px; }

@media (max-width: 1180px) { .doc-layout { grid-template-columns: 216px minmax(0, 1fr); gap: 0 32px; } }
@media (max-width: 860px) { .doc-h1-ico { width: 38px; height: 38px; border-radius: 11px; } .doc-h1-ico svg { width: 19px; height: 19px; } }

/* model monogram tile (vendor letter, tinted) */
.doc-card-ico.mono { font-size: 18px; font-weight: 700; letter-spacing: 0; color: var(--mc, #4f46e5); background: color-mix(in srgb, var(--mc, #4f46e5) 12%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mc, #4f46e5) 22%, transparent); }
.doc-body a.doc-card:hover .doc-card-ico.mono { color: #fff; background: var(--mc, #4f46e5); }
.doc-group.is-sub .doc-group-title svg { display: block; }
.doc-table td.nw { white-space: nowrap; }
.doc-table td.nw code { word-break: normal; white-space: nowrap; }

/* ---- final polish ---- */
.doc-wrap .doc-top { position: sticky; }
.doc-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, #6366f1, #8b5cf6 60%, #ec4899); transform-origin: 0 50%; transform: scaleX(0); transition: transform .12s linear; pointer-events: none; }
.doc-meta { display: flex; gap: 14px; margin-top: 14px; color: #8a90a2; font-size: 13px; }
.doc-meta span { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta svg { width: 15px; height: 15px; }
.doc-totop { position: fixed; right: 28px; bottom: 28px; z-index: 40; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 1px solid #e5e7f0; border-radius: 50%; color: #4f46e5; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); box-shadow: 0 10px 24px -10px rgba(30, 27, 75, .35); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .25s; }
.doc-totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.doc-totop:hover { color: #fff; background: #4f46e5; border-color: #4f46e5; }
.doc-totop svg { width: 18px; height: 18px; }
.doc-wrap .doc-h1 { font-size: 36px; letter-spacing: -.01em; }
.doc-body a.doc-card { transition: transform .25s, box-shadow .25s, border-color .25s; }
.doc-body a.doc-card:hover { transform: translateY(-2px); }
::selection { background: rgba(99, 102, 241, .2); }
@media (max-width: 860px) { .doc-totop { right: 16px; bottom: 16px; } .doc-wrap .doc-h1 { font-size: 28px; } }
