/*! Central de Ajuda MYDashAI — © 2026 YOSHIDATA CONTROLE DE DADOS LTDA. Tema claro/escuro, responsivo, impressão. */

:root {
  --teal: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0c7d73;
  --teal-800: #0b5f58;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --top-h: 64px;
  --side-w: 288px;
  --toc-w: 232px;
  --content-max: 780px;

  --bg: #ffffff;
  --bg-soft: #f6faf9;
  --bg-sunk: #eef5f4;
  --surface: #ffffff;
  --ink: #132a27;
  --ink-2: #2b4440;
  --muted: #536864;
  --line: #e1eae8;
  --line-strong: #c9d8d5;
  --link: #0b6f66;
  --link-hover: #0b5f58;
  --accent: #0c7d73;
  --accent-soft: #e6f6f3;
  --accent-ink: #ffffff;
  --focus: #0d9488;
  --code-bg: #f1f6f5;
  --code-ink: #12312d;
  --pre-bg: #0f2a27;
  --pre-ink: #e3f3f0;
  --shadow: 0 1px 2px rgba(16, 48, 45, .06), 0 8px 24px rgba(16, 48, 45, .07);
  --shadow-lg: 0 18px 50px rgba(9, 30, 28, .22);

  --note-bg: #eef5ff; --note-line: #2563eb; --note-ink: #1e3a8a;
  --tip-bg: #ecfbf5; --tip-line: #0f9d6e; --tip-ink: #0b5e44;
  --imp-bg: #fff8e8; --imp-line: #c47a00; --imp-ink: #7a4a00;
  --warn-bg: #fff0f0; --warn-line: #d02f2f; --warn-ink: #8f1d1d;
  --badge-new-bg: #0c7d73; --badge-new-ink: #ffffff;
  --fig-bg: #f6faf9;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0d1716;
  --bg-soft: #111e1d;
  --bg-sunk: #0a1312;
  --surface: #142322;
  --ink: #e4f1ee;
  --ink-2: #c7dbd7;
  --muted: #9bb4af;
  --line: #223835;
  --line-strong: #2f4b47;
  --link: #4fd8c6;
  --link-hover: #7fe6d8;
  --accent: #2cc4b0;
  --accent-soft: #123532;
  --accent-ink: #062320;
  --focus: #4fd8c6;
  --code-bg: #182e2c;
  --code-ink: #d6efea;
  --pre-bg: #081413;
  --pre-ink: #dff3ef;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  --note-bg: #12233d; --note-line: #6aa1ff; --note-ink: #c9dcff;
  --tip-bg: #0f2b22; --tip-line: #34d399; --tip-ink: #bdf2dc;
  --imp-bg: #2e2410; --imp-line: #f0b44c; --imp-ink: #f6dcae;
  --warn-bg: #351818; --warn-line: #f87171; --warn-ink: #fecaca;
  --badge-new-bg: #2cc4b0; --badge-new-ink: #062320;
  --fig-bg: #e9f1ef;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.68 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; color: var(--accent-ink); }
.ico { width: 20px; height: 20px; flex: none; }
.logo { width: 34px; height: 34px; flex: none; border-radius: 9px; }

/* ------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 40; height: var(--top-h); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 16px; padding: 0 20px; max-width: 1560px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.brand-text span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.menu-btn { display: none; }
.btn-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.btn-icon:hover { background: var(--bg-sunk); color: var(--ink); }

.search { position: relative; flex: 1; max-width: 560px; margin-left: 12px; display: flex; align-items: center; }
.search > .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.search input { width: 100%; height: 40px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-soft); padding: 0 40px 0 40px; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); background: var(--surface); }
.search-key { position: absolute; right: 10px; font: 600 12px var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 6px; padding: 1px 6px; background: var(--surface); }
.search-pop { position: absolute; top: 46px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); max-height: min(70vh, 560px); overflow: auto; padding: 6px; z-index: 60; }
.search-pop a { display: block; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--ink); }
.search-pop a[aria-selected="true"], .search-pop a:hover { background: var(--accent-soft); }
.search-pop .sr-t { font-weight: 700; font-size: 14.5px; display: block; }
.search-pop .sr-s { font-size: 12px; color: var(--muted); display: block; }
.search-pop .sr-x { font-size: 13px; color: var(--ink-2); display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-pop .sr-all { font-weight: 700; color: var(--link); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; }
.search-pop .sr-empty { padding: 12px; color: var(--muted); font-size: 14px; }
mark { background: color-mix(in srgb, var(--teal) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

.top-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.top-actions select { height: 36px; border-radius: 9px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 28px 0 10px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.lang-wrap { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.theme-btn .ico-sun { display: none; }
[data-theme="dark"] .theme-btn .ico-sun { display: block; }
[data-theme="dark"] .theme-btn .ico-moon { display: none; }

/* ------------------------------------------------------------ layout */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); gap: 0; max-width: 1560px; margin: 0 auto; min-height: calc(100vh - var(--top-h)); }
.home .layout, .layout-wide { grid-template-columns: var(--side-w) minmax(0, 1fr); }
.search-page .layout { grid-template-columns: minmax(0, 1fr); }
.content { padding: 28px 48px 64px; min-width: 0; max-width: calc(var(--content-max) + 96px); width: 100%; justify-self: center; outline: none; }
.home .content { max-width: 1080px; }
.search-page .content { max-width: 860px; }

/* sidebar tree */
.sidebar { border-right: 1px solid var(--line); background: var(--bg-soft); }
.sidebar-inner { position: sticky; top: var(--top-h); max-height: calc(100vh - var(--top-h)); overflow: auto; padding: 18px 12px 40px; scrollbar-width: thin; }
.sidebar-product { display: flex; align-items: center; gap: 10px; padding: 4px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sidebar-product .logo { width: 30px; height: 30px; }
.sidebar-product strong { display: block; font-size: 15px; }
.sidebar-product small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree-root > li { margin: 2px 0; }
.tree summary, .tree .tree-head { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; font-weight: 700; font-size: 14.5px; color: var(--ink); cursor: pointer; list-style: none; text-decoration: none; user-select: none; }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
.tree details[open] > summary::after { transform: rotate(45deg); }
.tree summary:hover, .tree .tree-head:hover { background: var(--bg-sunk); }
.tree .ico-sec { width: 18px; height: 18px; color: var(--accent); }
.tree details ul { margin: 2px 0 8px 19px; padding-left: 10px; border-left: 1px solid var(--line-strong); }
.tree details li a { display: block; padding: 5px 10px; border-radius: 7px; font-size: 14px; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.tree details li a:hover { background: var(--bg-sunk); color: var(--ink); }
.tree a.current { background: var(--accent-soft); color: var(--link) !important; font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.tree .tree-head.current { box-shadow: none; }

/* toc */
.toc { border-left: 1px solid var(--line); }
.toc-inner { position: sticky; top: var(--top-h); max-height: calc(100vh - var(--top-h)); overflow: auto; padding: 30px 18px 40px; }
.toc-title { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.toc-list { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc-list li a { display: block; padding: 4px 0 4px 12px; margin-left: -2px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.4; color: var(--muted); text-decoration: none; }
.toc-list li.lv3 a { padding-left: 24px; font-size: 13px; }
.toc-list li a:hover { color: var(--ink); }
.toc-list li a.active { color: var(--link); border-left-color: var(--accent); font-weight: 700; }
.toc-top { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--muted); }
.toc-inline { display: none; }

/* ------------------------------------------------------------ page head */
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 18px; padding: 0; font-size: 13.5px; color: var(--muted); }
.breadcrumb li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--line-strong); font-weight: 700; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--link); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink-2); font-weight: 600; }
.page-head { margin-bottom: 26px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .01em; }
.ico-eyebrow { width: 16px; height: 16px; }
h1 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.16; letter-spacing: -.02em; margin: 0 0 10px; font-weight: 800; }
.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 14px; line-height: 1.55; }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: var(--muted); }
.meta-actions { margin-left: auto; display: inline-flex; gap: 2px; }
.meta-actions .btn-icon { width: 34px; height: 34px; }
.badge { display: inline-block; vertical-align: middle; font-size: 11.5px; font-weight: 800; letter-spacing: .03em; line-height: 1; padding: 4px 7px 3px; border-radius: 999px; text-transform: uppercase; }
h1 .badge { font-size: 13px; padding: 5px 9px 4px; position: relative; top: -4px; }
.badge-new { background: var(--badge-new-bg); color: var(--badge-new-ink); }

/* ------------------------------------------------------------ prose */
.prose { font-size: 16.5px; }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.012em; margin: 44px 0 14px; padding-top: 4px; font-weight: 800; }
.prose h3 { font-size: 19.5px; line-height: 1.3; margin: 32px 0 10px; font-weight: 750; }
.prose h4 { font-size: 16.5px; margin: 24px 0 8px; font-weight: 750; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.anchor { margin-left: 8px; color: var(--line-strong); text-decoration: none; font-weight: 600; opacity: 0; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, .anchor:focus-visible { opacity: 1; }
.anchor:hover { color: var(--link); }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 26px; }
.prose li { margin: 6px 0; }
.prose li > p { margin: 0 0 10px; }
.prose li::marker { color: var(--muted); }
.prose strong { font-weight: 700; color: var(--ink); }
.prose code { font: 0.88em/1.4 var(--mono); background: var(--code-bg); color: var(--code-ink); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line); overflow-wrap: anywhere; }
code, pre, kbd { font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0; }
kbd { font: 600 0.82em/1 var(--mono); background: var(--surface); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; padding: 3px 6px; color: var(--ink); white-space: nowrap; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.prose blockquote { margin: 0 0 18px; padding: 4px 18px; border-left: 4px solid var(--line-strong); color: var(--ink-2); }
.do-this { font-weight: 700; margin-bottom: 10px !important; }

/* numbered procedures */
.prose ol.steps { list-style: none; padding-left: 0; }
.prose ol.steps > li { position: relative; padding-left: 46px; margin: 0 0 14px; min-height: 30px; }
.prose ol.steps > li::before { content: attr(data-n); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14.5px; display: grid; place-items: center; line-height: 1; }
.prose ol.steps > li > :last-child { margin-bottom: 0; }
.prose ol.steps ol.steps > li { padding-left: 38px; }
.prose ol.steps ol.steps > li::before { width: 26px; height: 26px; font-size: 13px; background: var(--accent-soft); color: var(--link); border: 1px solid var(--accent); }
.prose ul ol.steps, .prose ol.steps ul { margin-top: 8px; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.table-wrap:focus-visible { outline-offset: 0; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); font-weight: 750; color: var(--ink); font-size: 13.5px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
td code { white-space: normal; }
.al-center { text-align: center; } .al-right { text-align: right; }

/* code blocks */
.code-block { margin: 0 0 20px; border-radius: var(--radius); overflow: hidden; background: var(--pre-bg); border: 1px solid color-mix(in srgb, var(--pre-bg) 70%, var(--line)); }
.code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #9cc9c2; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.copy-code, .copy-prompt { font-size: 12.5px; font-weight: 700; border-radius: 7px; padding: 4px 10px; cursor: pointer; }
.copy-code { border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); color: #dff3ef; text-transform: none; letter-spacing: 0; }
.copy-code:hover { background: rgba(255, 255, 255, .14); }
.code-block pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13.5px/1.6 var(--mono); color: var(--pre-ink); tab-size: 2; }

/* callouts */
.callout { margin: 0 0 20px; border-radius: var(--radius); border: 1px solid; border-left-width: 5px; padding: 12px 16px 2px; }
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14.5px; margin-bottom: 6px; }
.callout-sub { font-weight: 700; }
.callout-body { font-size: 15.5px; }
.callout-body p { margin: 0 0 10px; }
.callout-body ul, .callout-body ol { margin-bottom: 10px; }
.callout-icon { width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.callout-note { background: var(--note-bg); border-color: color-mix(in srgb, var(--note-line) 35%, transparent); border-left-color: var(--note-line); }
.callout-note .callout-title { color: var(--note-ink); }
.callout-tip { background: var(--tip-bg); border-color: color-mix(in srgb, var(--tip-line) 35%, transparent); border-left-color: var(--tip-line); }
.callout-tip .callout-title { color: var(--tip-ink); }
.callout-important { background: var(--imp-bg); border-color: color-mix(in srgb, var(--imp-line) 35%, transparent); border-left-color: var(--imp-line); }
.callout-important .callout-title { color: var(--imp-ink); }
.callout-warning { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn-line) 35%, transparent); border-left-color: var(--warn-line); }
.callout-warning .callout-title { color: var(--warn-ink); }
.icon-info { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.01'/%3E%3C/svg%3E"); }
.icon-tip { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 00-3.5 10.9c.6.5 1 1.2 1 2.1h5c0-.9.4-1.6 1-2.1A6 6 0 0012 3z'/%3E%3C/svg%3E"); }
.icon-important { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 16H3L12 3z'/%3E%3Cpath d='M12 10v4M12 17v.01'/%3E%3C/svg%3E"); }
.icon-warning { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8.5 3h7L21 8.5v7L15.5 21h-7L3 15.5v-7L8.5 3z'/%3E%3Cpath d='M12 8v5M12 16v.01'/%3E%3C/svg%3E"); }

/* request examples */
.prompt-example { position: relative; margin: 0 0 18px; padding: 12px 16px 12px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.prompt-label { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--link); margin-bottom: 4px; }
.prompt-icon { width: 16px; height: 16px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4V5z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v11H9l-5 4V5z'/%3E%3C/svg%3E") center / contain no-repeat; }
.prompt-text { font-size: 16px; font-weight: 600; color: var(--ink); padding-right: 70px; }
.prompt-text p { margin: 0 0 6px; }
.prompt-text p:last-child { margin: 0; }
.copy-prompt { position: absolute; top: 10px; right: 10px; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); background: var(--surface); color: var(--link); }
.copy-prompt:hover { background: var(--bg-soft); }

/* details */
.expand { margin: 0 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.expand > summary { cursor: pointer; padding: 13px 44px 13px 16px; font-weight: 700; list-style: none; position: relative; }
.expand > summary::-webkit-details-marker { display: none; }
.expand > summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 22px; font-weight: 500; color: var(--accent); line-height: 1; }
.expand[open] > summary::after { content: "−"; }
.expand > summary:hover { background: var(--bg-soft); border-radius: var(--radius); }
.expand-body { padding: 2px 16px 6px; border-top: 1px solid var(--line); padding-top: 12px; }

/* figures */
.figure { margin: 8px 0 24px; }
.figure .zoom { display: block; border-radius: var(--radius); border: 1px solid var(--line); background: var(--fig-bg); overflow: hidden; cursor: zoom-in; line-height: 0; box-shadow: var(--shadow); }
.figure-diagram .zoom, .figure-illustration .zoom { background: #ffffff; padding: 0; }
.figure img { display: block; width: 100%; height: auto; margin: 0 auto; }
.figure-shot img { width: auto; max-width: 100%; }
.figure-video .video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; box-shadow: var(--shadow); }
.figure-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.figure-shot .zoom { display: flex; justify-content: center; }
.figure figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.fig-num { font-weight: 750; color: var(--ink-2); }
.ol-steps-figure { margin-top: 0; }
li .figure { margin-top: 10px; }

/* lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; }
.lightbox::backdrop { background: rgba(4, 14, 13, .82); }
.lightbox img { display: block; max-width: 94vw; max-height: 86vh; width: auto; height: auto; border-radius: 10px; background: #fff; box-shadow: var(--shadow-lg); margin: 0 auto; }
.lb-cap { color: #e6f4f2; text-align: center; font-size: 14px; margin: 10px auto 0; max-width: 80ch; }
.lb-close { position: fixed; top: 14px; right: 18px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; }
.lb-close:hover { background: rgba(255, 255, 255, .26); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.card-title { font-weight: 750; font-size: 15.5px; color: var(--link); }
.card-desc { font-size: 14px; color: var(--muted); line-height: 1.5; }
.child-cards, .home-sections { margin-top: 36px; }
.child-cards h2, .home-sections h2, .learn-more h2 { font-size: 22px; margin: 0 0 14px; font-weight: 800; letter-spacing: -.01em; }
.cards-home { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card-section { padding: 18px; }
.card-section .ico-card { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; box-sizing: content-box; }
.card-section .card-title { color: var(--ink); font-size: 16px; }

/* home hero */
.hero { margin: 6px 0 34px; padding: 40px 36px 34px; border-radius: 20px; background: radial-gradient(1200px 300px at 10% -20%, color-mix(in srgb, var(--teal) 30%, transparent), transparent 70%), linear-gradient(160deg, var(--accent-soft), var(--bg-soft)); border: 1px solid var(--line); }
.hero h1 { font-size: clamp(30px, 4.4vw, 46px); }
.hero .lead { max-width: 46em; }
.search-big { display: flex; align-items: center; gap: 8px; position: relative; max-width: 680px; margin-top: 18px; }
.search-big > .ico { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-big input { flex: 1; min-width: 0; height: 52px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 16px 0 44px; font-size: 16.5px; box-shadow: var(--shadow); }
.search-big input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.search-big button { height: 52px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 750; padding: 0 22px; cursor: pointer; }
.search-big button:hover { filter: brightness(1.08); }
.nf .search-big input { padding-left: 16px; }

/* learn more */
.learn-more { margin-top: 40px; padding: 22px 24px 10px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.learn-more ul { list-style: none; margin: 0; padding: 0; }
.learn-more li { margin: 0 0 12px; padding-left: 22px; position: relative; }
.learn-more li::before { content: "→"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.learn-more a { font-weight: 700; }
.lm-desc { display: block; font-size: 14px; color: var(--muted); }

/* feedback */
.feedback { margin-top: 32px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.fb-q { margin: 0; font-weight: 750; }
.fb-buttons { display: flex; gap: 8px; }
.fb-buttons button, .fb-actions button { border: 1px solid var(--line-strong); background: var(--surface); border-radius: 9px; padding: 7px 18px; font-weight: 700; cursor: pointer; }
.fb-buttons button:hover, .fb-actions button:hover { border-color: var(--accent); color: var(--link); }
.fb-buttons button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.fb-more { width: 100%; display: grid; gap: 8px; }
.fb-more label { font-size: 14px; font-weight: 600; }
.fb-more textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); resize: vertical; }
.fb-note { font-size: 13px; color: var(--muted); margin: 0; }
.fb-thanks { margin: 0; color: var(--tip-ink); font-weight: 700; width: 100%; }

/* prev / next */
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 28px; }
.prevnext a { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.35; }
.prevnext a:hover { border-color: var(--accent); color: var(--link); }
.prevnext small { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 2px; }
.prevnext .next { justify-content: flex-end; text-align: right; }
.prevnext .ico { color: var(--accent); }

/* search page */
.search-page .search-big { margin: 0 0 18px; }
.search-count { color: var(--muted); font-size: 14px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.search-results a.sr-title { font-size: 18px; font-weight: 750; text-decoration: none; }
.search-results a.sr-title:hover { text-decoration: underline; }
.search-results .sr-path { font-size: 13px; color: var(--muted); margin: 2px 0 4px; }
.search-results .sr-snip { margin: 0; font-size: 15px; color: var(--ink-2); }
.search-results .sr-heads { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.search-results .sr-heads a { font-size: 13px; padding: 2px 9px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); text-decoration: none; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-inner { max-width: 1560px; margin: 0 auto; padding: 28px 24px 34px; display: grid; grid-template-columns: auto 1fr; gap: 14px 40px; align-items: start; }
.f-brand { display: flex; gap: 12px; align-items: center; }
.f-brand p { margin: 0; color: var(--muted); font-size: 14px; }
.f-links { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; font-size: 14px; }
.f-links a { color: var(--ink-2); text-decoration: none; }
.f-links a:hover { color: var(--link); text-decoration: underline; }
.f-legal { grid-column: 1 / -1; margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; box-shadow: var(--shadow-lg); z-index: 90; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, var(--accent-soft), var(--bg)); }
.nf { max-width: 620px; padding: 40px 20px; }
.nf-code { font-size: 88px; font-weight: 800; color: var(--accent); margin: 30px 0 0; line-height: 1; letter-spacing: -.04em; }

.scrim { display: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .toc { display: none; }
  .toc-inline { display: block; margin: -8px 0 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
  .toc-inline summary { cursor: pointer; padding: 10px 14px; font-weight: 750; font-size: 14px; }
  .toc-inline .toc-list { margin: 0 14px 12px; }
  .content { padding: 26px 36px 56px; }
}
@media (max-width: 920px) {
  :root { --top-h: 58px; }
  .menu-btn { display: inline-grid; }
  .layout, .home .layout, .layout-wide { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 50; top: var(--top-h); bottom: 0; left: 0; width: min(88vw, 330px); transform: translateX(-102%); transition: transform .2s ease, visibility 0s linear .2s; box-shadow: var(--shadow-lg); visibility: hidden; }
  .sidebar-inner { position: static; max-height: none; height: 100%; }
  body.menu-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
  body.menu-open .scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; background: rgba(4, 14, 13, .45); z-index: 45; }
  .scrim[hidden] { display: none !important; }
  body.menu-open .scrim[hidden] { display: block !important; }
  .content { padding: 20px 16px 48px; }
  .select-ver { display: none; }
  .brand-text span { display: none; }
  .search { margin-left: 4px; }
  .search-key { display: none; }
  .search input { padding-right: 12px; }
}
@media (max-width: 600px) {
  .topbar-inner { gap: 6px; padding: 0 8px; }
  .brand-text { display: none; }
  .lang-wrap { display: none; }
  .hero { padding: 26px 18px 22px; border-radius: 16px; }
  .search-big { flex-direction: column; align-items: stretch; }
  .search-big input { flex: none; height: 50px; }
  .search-big button { height: 46px; }
  .search-big > .ico { top: 15px; }
  .prevnext { grid-template-columns: 1fr; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 22px; }
  .lead { font-size: 16.5px; }
  .footer-inner { grid-template-columns: 1fr; }
  .f-links { justify-content: flex-start; }
  .prompt-text { padding-right: 0; padding-top: 4px; }
  .copy-prompt { top: 8px; }
  .meta-actions { margin-left: 0; }
  .prose ol.steps > li { padding-left: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------ print */
@media print {
  :root, [data-theme="dark"] { --bg: #fff; --ink: #000; --ink-2: #222; --muted: #444; --surface: #fff; --bg-soft: #fff; --pre-bg: #f4f4f4; --pre-ink: #000; --link: #000; }
  .topbar, .sidebar, .toc, .toc-inline, .feedback, .prevnext, .site-footer, .meta-actions, .skip, .anchor, .copy-code, .copy-prompt, .lightbox, .toast, .child-cards, .scrim { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; max-width: none; }
  body { font-size: 11.5pt; }
  .prose a.ext::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  .figure, .callout, .code-block, table, .prompt-example { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  .figure .zoom { box-shadow: none; }
  .code-head { color: #333; }
  .learn-more { background: #fff; }
}
.tree .badge { margin-left: 6px; font-size: 10px; padding: 3px 6px 2px; }
.code-block pre code { background: none; border: 0; padding: 0; color: inherit; font: inherit; border-radius: 0; overflow-wrap: normal; }
@media (max-width: 600px) { .prose td:first-child, .prose th:first-child { min-width: 9.5em; } }
