/* DekkoSecure Help Center */
:root {
  --brand: #1560d8;
  --brand-hover: #0f4fb8;
  --brand-soft: #eaf1fd;
  --accent: #00a7e7;
  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #f0f2f5;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --mark: #fff3bf;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .18);
  --radius: 10px;
  --radius-lg: 14px;
  --header-h: 112px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --c-info-bg: #eff6ff; --c-info-bd: #bfdbfe;
  --c-tip-bg: #fefce8; --c-tip-bd: #fde68a;
  --c-warning-bg: #fff7ed; --c-warning-bd: #fed7aa;
  --c-danger-bg: #fef2f2; --c-danger-bd: #fecaca;
  --c-success-bg: #f0fdf4; --c-success-bd: #bbf7d0;
  --c-note-bg: #f8fafc; --c-note-bd: #e2e8f0;
  color-scheme: light;
}
[data-theme="dark"] {
  --brand: #5b9bff;
  --brand-hover: #7cb0ff;
  --brand-soft: rgba(91, 155, 255, .14);
  --bg: #0b0f17;
  --surface: #111725;
  --surface-2: #182033;
  --border: #222b3c;
  --border-strong: #2f3a50;
  --text: #e7eaf0;
  --text-2: #c3cad6;
  --muted: #8d97a8;
  --mark: rgba(250, 204, 21, .3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .6);
  --c-info-bg: rgba(59, 130, 246, .1); --c-info-bd: rgba(59, 130, 246, .3);
  --c-tip-bg: rgba(234, 179, 8, .1); --c-tip-bd: rgba(234, 179, 8, .3);
  --c-warning-bg: rgba(249, 115, 22, .1); --c-warning-bd: rgba(249, 115, 22, .32);
  --c-danger-bg: rgba(239, 68, 68, .1); --c-danger-bd: rgba(239, 68, 68, .3);
  --c-success-bg: rgba(34, 197, 94, .1); --c-success-bd: rgba(34, 197, 94, .28);
  --c-note-bg: rgba(148, 163, 184, .08); --c-note-bd: rgba(148, 163, 184, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
.icon { flex-shrink: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 8px 12px; border-radius: 8px; box-shadow: var(--shadow); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.muted { color: var(--muted); }
.mobile-only { display: none !important; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 9px; border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
[data-theme="dark"] .btn-primary { color: #0b0f17; }
.btn-secondary { background: var(--bg); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; gap: 6px; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; border: 0; background: transparent; cursor: pointer; color: var(--text-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.i-moon { display: none; }
[data-theme="dark"] .i-sun { display: none; }
[data-theme="dark"] .i-moon { display: block; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 16px; max-width: 1480px; margin: 0 auto; padding: 14px 24px 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none !important; }
.logo { height: 22px; width: auto; display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }
.brand-sub { color: var(--muted); font-size: 14px; font-weight: 500; padding-left: 10px; border-left: 1px solid var(--border-strong); line-height: 1.1; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.search-trigger { display: flex; align-items: center; gap: 10px; width: 280px; height: 38px; padding: 0 10px 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; font-size: 14px; }
.search-trigger:hover { border-color: var(--border-strong); }
.search-trigger span { flex: 1; text-align: left; }
kbd { font-family: var(--font); font-size: 11px; color: var(--muted); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--bg); }
.ask-trigger { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: linear-gradient(135deg, var(--brand-soft), transparent); color: var(--brand); font-weight: 600; font-size: 14px; cursor: pointer; }
.ask-trigger:hover { border-color: var(--brand); }
.tabs { max-width: 1480px; margin: 0 auto; padding: 0 24px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs-inner { display: flex; gap: 4px; }
.tab { position: relative; padding: 10px 12px 12px; color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap; text-decoration: none !important; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); }
.tab.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--brand); }

/* Home */
.home { max-width: 1120px; margin: 0 auto; padding: 0 24px 64px; }
.hero { text-align: center; padding: 72px 0 48px; }
.hero h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -.025em; margin: 0 0 8px; line-height: 1.1; }
.hero-sub { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.hero-search { display: flex; align-items: center; gap: 10px; max-width: 640px; margin: 0 auto; padding: 6px 6px 6px 16px; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--bg); box-shadow: var(--shadow); color: var(--muted); }
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--text); height: 44px; }
.hero-search.compact { max-width: none; margin: 16px 0; box-shadow: none; }
.hero-search.compact input { height: 36px; font-size: 16px; }
.hero-ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 14px; }
.chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--text-2); }
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.home-section { margin-top: 48px; }
.section-title { font-size: 20px; margin: 0 0 16px; letter-spacing: -.01em; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.collection-card { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto 1fr; column-gap: 14px; row-gap: 4px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); text-decoration: none !important; transition: border-color .15s, box-shadow .15s, transform .15s; }
.collection-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-1px); }
.cc-icon { grid-row: 1 / span 3; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 11px; background: var(--brand-soft); color: var(--brand); }
.cc-icon.lg { width: 52px; height: 52px; border-radius: 13px; }
.cc-title { font-weight: 650; font-size: 16px; }
.cc-desc { color: var(--muted); font-size: 14px; line-height: 1.5; }
.cc-meta { color: var(--muted); font-size: 12px; margin-top: 6px; align-self: end; }
.popular-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 0 32px; }
.popular-item { display: grid; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; }
.popular-item:hover .pi-title { color: var(--brand); }
.pi-title { font-weight: 600; }
.pi-desc { color: var(--muted); font-size: 14px; }
.pi-coll { color: var(--muted); font-size: 12px; margin-top: 2px; }
.help-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 32px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-soft), var(--surface)); border: 1px solid var(--border); }
.help-cta h2 { margin: 0 0 4px; font-size: 20px; }
.help-cta p { margin: 0; color: var(--text-2); max-width: 560px; }
.cta-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Docs layout */
.docs-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); max-width: 1480px; margin: 0 auto; }
.docs-layout.has-toc { grid-template-columns: 290px minmax(0, 1fr) 240px; }
.sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 24px 16px 48px 24px; border-right: 1px solid var(--border); scrollbar-width: thin; }
.side-section { margin-bottom: 6px; }
.side-section summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; font-weight: 600; font-size: 14px; color: var(--text); cursor: pointer; list-style: none; border-radius: 6px; }
.side-section summary::-webkit-details-marker { display: none; }
.side-section summary:hover { background: var(--surface-2); }
.side-section .chev { color: var(--muted); transition: transform .15s; }
.side-section:not([open]) .chev { transform: rotate(-90deg); }
.side-section ul { list-style: none; margin: 2px 0 8px; padding: 0; }
.side-section li a { display: block; padding: 6px 10px 6px 16px; margin-left: 4px; border-left: 1px solid var(--border); color: var(--text-2); font-size: 14px; line-height: 1.4; text-decoration: none; }
.side-section li a:hover { color: var(--text); border-left-color: var(--border-strong); }
.side-section li a.active { color: var(--brand); border-left: 2px solid var(--brand); padding-left: 15px; font-weight: 600; background: linear-gradient(90deg, var(--brand-soft), transparent); border-radius: 0 6px 6px 0; }
.sidebar-scrim { display: none; }
.article-main, .collection-main { padding: 32px 48px 80px; min-width: 0; }
.article { max-width: 780px; margin: 0 auto; }
.collection-main { max-width: 1000px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }
.article h1, .collection-main h1 { font-size: clamp(28px, 4vw, 36px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 8px; }
.lede { font-size: 18px; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13px; color: var(--muted); padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--border); }
.article-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.meta-actions { margin-left: auto; gap: 2px !important; }
.collection-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.collection-head .cc-icon { grid-row: auto; }
.section-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.section-card { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; }
.section-card h2 { font-size: 16px; margin: 0 0 8px; }
.section-card ul { list-style: none; padding: 0; margin: 0; }
.section-card li a { display: grid; padding: 8px 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.section-card li:first-child a { border-top: 0; }
.section-card li a:hover span { color: var(--brand); }
.section-card li a span { font-weight: 550; font-size: 15px; }
.section-card li a small { color: var(--muted); font-size: 13px; line-height: 1.45; }

/* TOC */
.toc { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; padding: 36px 24px 48px 8px; }
.toc-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; font-size: 13px; color: var(--muted); line-height: 1.4; text-decoration: none; }
.toc li.d3 a { padding-left: 26px; }
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--brand); border-left-color: var(--brand); }

/* Prose */
.prose { color: var(--text-2); font-size: 16px; line-height: 1.75; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2, .prose h3, .prose h4 { position: relative; color: var(--text); letter-spacing: -.01em; line-height: 1.3; }
.prose h2 { font-size: 24px; margin: 2.2em 0 .6em; padding-top: .2em; }
.prose h3 { font-size: 19px; margin: 1.8em 0 .5em; }
.prose h4 { font-size: 16px; margin: 1.5em 0 .4em; }
.kb-anchor { position: absolute; left: -1.1em; color: var(--muted); opacity: 0; text-decoration: none !important; font-weight: 400; }
.prose h2:hover .kb-anchor, .prose h3:hover .kb-anchor, .prose h4:hover .kb-anchor { opacity: .6; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose li > p { margin: 0 0 .5em; }
.prose li::marker { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 650; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--brand) 35%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose code { font-family: var(--mono); font-size: .875em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: .1em .35em; }
.prose pre { position: relative; background: #0f172a; color: #e2e8f0; border-radius: var(--radius); padding: 16px 18px; overflow-x: auto; font-size: 14px; line-height: 1.6; margin: 0 0 1.2em; }
[data-theme="dark"] .prose pre { background: #070a10; border: 1px solid var(--border); }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
.copy-code { position: absolute; top: 8px; right: 8px; opacity: 0; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #e2e8f0; border-radius: 6px; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.prose pre:hover .copy-code { opacity: 1; }
.prose blockquote { margin: 0 0 1.1em; padding: 4px 0 4px 16px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.prose blockquote p { margin: .3em 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }
.prose img { display: block; border-radius: var(--radius); border: 1px solid var(--border); cursor: zoom-in; background: var(--surface); }
.prose figure { margin: 1.4em 0; }
.prose figcaption { text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.prose li img { margin: .6em 0; }
.kb-table { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { border-collapse: collapse; width: 100%; font-size: 14.5px; line-height: 1.55; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.prose th { background: var(--surface); color: var(--text); font-weight: 650; }
.prose tr:last-child td { border-bottom: 0; }
.kb-callout { display: flex; gap: 12px; padding: 14px 16px; margin: 0 0 1.2em; border-radius: var(--radius); border: 1px solid var(--c-info-bd); background: var(--c-info-bg); font-size: 15px; line-height: 1.65; }
.kb-callout-icon { font-size: 18px; line-height: 1.5; }
.kb-callout-body { min-width: 0; flex: 1; }
.kb-callout-body > :last-child { margin-bottom: 0; }
.kb-callout-body > :first-child { margin-top: 0; }
.kb-callout-title { font-weight: 650; color: var(--text); margin-bottom: 2px; }
.kb-callout-tip { background: var(--c-tip-bg); border-color: var(--c-tip-bd); }
.kb-callout-warning { background: var(--c-warning-bg); border-color: var(--c-warning-bd); }
.kb-callout-danger { background: var(--c-danger-bg); border-color: var(--c-danger-bd); }
.kb-callout-success { background: var(--c-success-bg); border-color: var(--c-success-bd); }
.kb-callout-note { background: var(--c-note-bg); border-color: var(--c-note-bd); }
.kb-video video { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); background: #000; }
.kb-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.kb-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

/* Article footer */
.helpful { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 48px 0 24px; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); font-weight: 600; font-size: 15px; }
.helpful span { margin-right: auto; }
.helpful.done { color: var(--muted); font-weight: 500; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.pager-link { display: grid; gap: 4px; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius-lg); color: var(--text); text-decoration: none !important; }
.pager-link:hover { border-color: var(--brand); }
.pager-link small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.pager-link span { font-weight: 600; }
.pager-link.next { text-align: right; }
.pager-link.next small { justify-content: flex-end; }
.article-help { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 20px; border-radius: var(--radius-lg); background: linear-gradient(135deg, var(--brand-soft), transparent); border: 1px solid var(--border); color: var(--brand); }
.article-help div { display: grid; flex: 1; min-width: 200px; color: var(--text); font-size: 14px; }
.article-help div span { color: var(--muted); }

/* Search page */
.narrow { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }
.search-results { list-style: none; padding: 0; margin: 0; }
.search-results li a { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.search-results li a:hover strong { color: var(--brand); }
.sr-path { font-size: 12px; color: var(--muted); }
.sr-snippet { font-size: 14px; color: var(--text-2); }
.empty-state { text-align: center; padding: 40px 0; color: var(--muted); }
.not-found { text-align: center; }
.nf-code { font-size: 72px; font-weight: 800; letter-spacing: -.04em; background: linear-gradient(135deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { max-width: 1480px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }

/* Search palette */
.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.palette { width: 100%; max-width: 640px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .15s ease-out; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); color: var(--muted); }
.palette-input input { flex: 1; height: 56px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--text); }
.palette-results { max-height: min(60vh, 520px); overflow-y: auto; padding: 8px; }
.palette-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none !important; cursor: pointer; }
.palette-item.sel { background: var(--brand-soft); }
.palette-item .p-path { font-size: 12px; color: var(--muted); }
.palette-item .p-title { font-weight: 600; }
.palette-item .p-snip { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.palette-ask { display: flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 600; }
.palette-empty { padding: 28px; text-align: center; color: var(--muted); font-size: 14px; }
.palette-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); background: var(--surface); }

/* Chat panel */
.chat-panel { position: fixed; z-index: 90; right: 20px; bottom: 20px; top: 20px; width: min(440px, calc(100vw - 40px)); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .18s ease-out; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 14px 14px 18px; border-bottom: 1px solid var(--border); }
.chat-head .avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--accent)); color: #fff; }
.chat-head .title { flex: 1; display: grid; line-height: 1.25; }
.chat-head .title strong { font-size: 15px; }
.chat-head .title span { font-size: 12px; color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.chat-welcome { text-align: center; padding: 16px 8px; color: var(--muted); font-size: 14px; }
.chat-welcome h3 { color: var(--text); margin: 8px 0 4px; font-size: 18px; }
.chat-welcome .chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.msg { max-width: 100%; font-size: 14.5px; line-height: 1.6; }
.msg.user { align-self: flex-end; max-width: 85%; background: var(--brand); color: #fff; padding: 9px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
[data-theme="dark"] .msg.user { color: #0b0f17; }
.msg.bot .bubble { color: var(--text-2); }
.msg.bot .prose { font-size: 14.5px; line-height: 1.65; }
.msg.bot .prose h2, .msg.bot .prose h3 { font-size: 15px; margin: 1em 0 .4em; }
.msg.bot .prose p { margin: 0 0 .7em; }
.msg.bot .prose ul, .msg.bot .prose ol { margin-bottom: .7em; }
.msg.bot .prose > :last-child { margin-bottom: 0; }
.msg-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.msg-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.msg-sources a { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); text-decoration: none; }
.msg-sources a:hover { border-color: var(--brand); color: var(--brand); }
.msg-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.msg-actions button { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.msg-actions button:hover { background: var(--surface-2); color: var(--text); }
.msg-actions button.on { color: var(--brand); background: var(--brand-soft); }
.msg-escalate { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); }
.chat-input { border-top: 1px solid var(--border); padding: 12px; }
.chat-input form { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--border-strong); border-radius: 14px; padding: 6px 6px 6px 14px; background: var(--bg); }
.chat-input form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.chat-input textarea { flex: 1; border: 0; outline: 0; resize: none; background: transparent; font: inherit; font-size: 14.5px; color: var(--text); max-height: 140px; padding: 7px 0; line-height: 1.45; }
.chat-input .send { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; }
.chat-input .send:disabled { opacity: .4; cursor: default; }
.chat-disclaimer { text-align: center; font-size: 11px; color: var(--muted); margin-top: 8px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 24px; cursor: zoom-out; animation: fade .12s; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: var(--shadow-lg); }

.toast { position: fixed; z-index: 99; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-lg); animation: pop .15s; }

/* Responsive */
@media (max-width: 1200px) {
  .docs-layout.has-toc { grid-template-columns: 270px minmax(0, 1fr); }
  .toc { display: none; }
  .search-trigger { width: 220px; }
}
@media (max-width: 900px) {
  :root { --header-h: 104px; }
  .mobile-only { display: inline-grid !important; }
  .desktop-only { display: none !important; }
  .header-row { padding: 10px 12px 6px; gap: 8px; }
  .brand-sub { display: none; }
  .logo { height: 18px; }
  .search-trigger { width: auto; padding: 0 10px; }
  .search-trigger span, .search-trigger kbd, .ask-trigger span { display: none; }
  .ask-trigger { padding: 0 10px; }
  .tabs { padding: 0 8px; }
  .docs-layout, .docs-layout.has-toc { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--bg); transform: translateX(-100%); transition: transform .2s ease; padding-top: 12px; visibility: hidden; }
  .sidebar-head { display: flex !important; align-items: center; justify-content: space-between; padding: 0 0 12px 8px; }
  body.sidebar-open .sidebar { transform: none; visibility: visible; box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(15,23,42,.4); }
  .article-main, .collection-main { padding: 20px 16px 64px; }
  .section-cards { grid-template-columns: 1fr; }
  .help-cta { flex-direction: column; align-items: flex-start; padding: 22px; }
  .popular-list { grid-template-columns: 1fr; }
  .meta-actions { margin-left: 0; }
  .pager { grid-template-columns: 1fr; }
  .chat-panel { inset: 0; width: auto; border-radius: 0; border: 0; }
  .hero { padding: 40px 0 28px; }
  .home { padding: 0 16px 48px; }
}

@media print {
  .site-header, .sidebar, .toc, .site-footer, .helpful, .pager, .article-help, .meta-actions, #chat-root, #search-root { display: none !important; }
  .docs-layout { display: block; }
  .article-main { padding: 0; }
  .prose { color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
