/* Help centre (/docs). Builds on css/home-modern.css — same tokens, same
   cards — and adds only the docs layout: sidebar, article typography,
   "on this page" list and the search dialog.

   style.css is loaded on every page and brings a few global rules this layout
   has to undo locally: `* { margin:0; padding:0 }`, yellow links, and
   `min-height:44px; user-select:none` on every a/button/input. */

.docs-page { --dx-top: 96px; --dx-side-w: 272px; --dx-toc-w: 220px; background: #fff; }
.docs-page main { min-height: 60vh; }
/* style.css gives every <nav> the sticky dark top-bar look; the sidebar,
   breadcrumb and pager are <nav>s too. */
.docs-page main nav { background: none; box-shadow: none; border: 0; padding: 0; position: static; top: auto; z-index: auto; }
.docs-page :where(a, button, input) { min-height: 0; }
.docs-page .doc-body a, .docs-page .doc-body { user-select: text; -webkit-user-select: text; }

/* ---------- Shared bits ---------- */
.docs-page .dx-btn { display: inline-flex; align-items: center; gap: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff; padding: 11px 22px; border-radius: 10px; font-weight: 700; font-size: .93rem; border: 0; cursor: pointer;
    transition: transform .2s, box-shadow .2s; white-space: nowrap; }
.docs-page .dx-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(37,99,235,.32); color: #fff; text-decoration: none; }
.docs-page .dx-btn.ghost { background: #fff; color: var(--brand); border: 2px solid var(--brand); padding: 9px 20px; }
.docs-page .dx-btn.ghost:hover { background: var(--brand); color: #fff; }
.docs-page kbd, .docs-page .doc-body kbd { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78em; font-weight: 600;
    background: #fff; border: 1px solid #cbd5e1; border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: #334155; white-space: nowrap; }

/* Search trigger (looks like an input, opens the dialog) */
.docs-page .dx-search-btn { display: flex; align-items: center; gap: 10px; width: 100%; background: #f8fafc; border: 1px solid var(--line);
    border-radius: 10px; padding: 9px 12px; color: var(--muted); font: inherit; font-size: .9rem; cursor: text; text-align: left;
    transition: border-color .2s, box-shadow .2s, background .2s; }
.docs-page .dx-search-btn:hover { border-color: #93c5fd; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.08); }
.docs-page .dx-search-btn span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-page .dx-search-btn i { color: var(--brand); }
.docs-page .dx-search-btn.big { padding: 18px 20px; font-size: 1.05rem; border-radius: 16px; background: #fff; border-width: 2px;
    box-shadow: 0 14px 40px rgba(37,99,235,.12); }
.docs-page .dx-search-btn.big i { font-size: 1.15rem; }
.docs-page .dx-search-btn.compact { width: auto; flex: 1; }
@media (max-width: 640px) { .docs-page .dx-kbd-hint { display: none; } }

/* ---------- Home ---------- */
.docs-page .dx-hero { text-align: center; max-width: 820px; margin: 0 auto; padding: 72px 20px 24px; }
.docs-page .dx-hero.small { padding-bottom: 80px; }
.docs-page .dx-hero h1.lq-title { font-size: clamp(2rem, 5vw, 3rem); text-shadow: none; text-align: center; color: var(--ink); margin-bottom: 14px; }
.docs-page .dx-hero .lq-eyebrow i { margin-right: 6px; }
.docs-page .dx-hero .lq-sub { max-width: 60ch; margin: 0 auto 30px; }
.docs-page .dx-hero-search { max-width: 680px; margin: 0 auto 22px; }
.docs-page .dx-popular { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.docs-page .dx-popular span { font-weight: 600; }
.docs-page .dx-popular a { background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; padding: 5px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.docs-page .dx-popular a:hover { background: var(--brand); color: #fff; text-decoration: none; }
.docs-page .dx-hero p > .dx-btn { margin-top: 10px; }

.docs-page .dx-start { max-width: 1160px; margin: 34px auto 0; display: flex; align-items: center; gap: 22px; padding: 26px 30px;
    border-radius: 20px; background: linear-gradient(120deg, #0b1220, #1e3a8a 60%, #0369a1); color: #e2e8f0; box-shadow: 0 20px 50px rgba(15,23,42,.18); }
.docs-page .dx-start-ic { flex: 0 0 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; color: #fff;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.docs-page .dx-start-txt { flex: 1; }
.docs-page .dx-start h2 { color: #fff; font-size: 1.3rem; font-weight: 800; margin: 0 0 4px; text-transform: none; }
.docs-page .dx-start h2::after { display: none; }
.docs-page .dx-start p { margin: 0; color: #cbd5e1; }
.docs-page .dx-start .dx-btn { background: #fff; color: #1d4ed8; }
@media (max-width: 1200px) { .docs-page .dx-start { margin-left: 20px; margin-right: 20px; } }
@media (max-width: 720px) { .docs-page .dx-start { flex-direction: column; text-align: center; } }

.docs-page .dx-topics .lq-head { margin-bottom: 34px; }
.docs-page .dx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.docs-page .dx-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 26px 26px 20px;
    box-shadow: 0 1px 2px rgba(15,23,42,.06); transition: box-shadow .3s, border-color .3s; scroll-margin-top: var(--dx-top); display: flex; flex-direction: column; }
.docs-page .dx-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--bc); }
.docs-page .dx-card:hover { box-shadow: 0 18px 40px rgba(37,99,235,.12); border-color: #cbd5e1; }
.docs-page .dx-card:target { box-shadow: 0 0 0 3px rgba(37,99,235,.35); }
.docs-page .dx-card-head { display: flex; gap: 16px; margin-bottom: 14px; }
.docs-page .dx-card .ic { flex: 0 0 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 19px;
    background: var(--bc); box-shadow: 0 8px 20px rgba(15,23,42,.15); }
.docs-page .dx-card h3 { font-size: 1.12rem; font-weight: 800; color: var(--ink); margin: 2px 0 4px; }
.docs-page .dx-card p { color: var(--muted); font-size: .9rem; margin: 0; line-height: 1.5; }
.docs-page .dx-card ul { list-style: none; margin: 4px 0 12px; padding: 0; }
.docs-page .dx-card li a { display: flex; align-items: baseline; gap: 10px; padding: 7px 10px; margin: 0 -10px; border-radius: 8px; color: #1e293b;
    font-weight: 500; font-size: .95rem; }
.docs-page .dx-card li a i { color: #94a3b8; font-size: .85em; }
.docs-page .dx-card li a:hover { background: #eff6ff; color: var(--brand); text-decoration: none; }
.docs-page .dx-card li a:hover i { color: var(--brand); }
.docs-page .dx-count { margin-top: auto; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }

.docs-page .dx-extra { max-width: 1200px; margin: 0 auto; padding: 0 20px var(--sec-y); display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.docs-page .dx-extra-card { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; align-items: flex-start; }
.docs-page .dx-extra-card .ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; color: #fff; margin-bottom: 14px; }
.docs-page .dx-extra-card .ic.yt { background: #ef4444; }
.docs-page .dx-extra-card .ic.pdf { background: linear-gradient(135deg, #f59e0b, #f97316); }
.docs-page .dx-extra-card .ic.wa { background: #25d366; }
.docs-page .dx-extra-card h3 { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin: 0 0 6px; }
.docs-page .dx-extra-card p { color: var(--muted); font-size: .92rem; margin: 0 0 18px; flex: 1; }
@media (max-width: 900px) { .docs-page .dx-extra { grid-template-columns: 1fr; } }

/* ---------- Article layout ---------- */
.docs-page .dx-layout { max-width: 1440px; margin: 0 auto; display: grid; grid-template-columns: var(--dx-side-w) minmax(0, 1fr) var(--dx-toc-w);
    gap: 48px; padding: 0 28px; align-items: start; }
.docs-page .dx-side { position: sticky; top: var(--dx-top); max-height: calc(100vh - var(--dx-top)); overflow-y: auto; padding: 28px 4px 40px 0;
    scrollbar-width: thin; }
.docs-page .dx-side-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.docs-page .dx-side-home { color: var(--ink); font-weight: 800; font-size: 1rem; display: inline-flex; gap: 9px; align-items: center; }
.docs-page .dx-side-home i { color: var(--brand); }
.docs-page .dx-side-home:hover { color: var(--brand); text-decoration: none; }
.docs-page .dx-side-close { display: none; background: none; border: 0; font-size: 1.2rem; color: var(--muted); cursor: pointer; padding: 6px; }
.docs-page .dx-side .dx-search-btn { margin-bottom: 18px; }
.docs-page .dx-group { border-bottom: 1px solid #f1f5f9; padding: 4px 0; }
.docs-page .dx-group summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 8px;
    font-weight: 700; font-size: .9rem; color: var(--ink); user-select: none; }
.docs-page .dx-group summary::-webkit-details-marker { display: none; }
.docs-page .dx-group summary::after { content: '\f107'; font-family: 'Font Awesome 5 Free'; font-weight: 900; margin-left: auto; color: #94a3b8; transition: transform .2s; }
.docs-page .dx-group[open] summary::after { transform: rotate(180deg); }
.docs-page .dx-group summary i { width: 18px; text-align: center; color: #64748b; }
.docs-page .dx-group summary:hover { background: #f8fafc; }
.docs-page .dx-group ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 18px; border-left: 2px solid #f1f5f9; margin-left: 16px; }
.docs-page .dx-group li a { display: block; padding: 6px 12px; margin-left: -2px; border-left: 2px solid transparent; color: #475569; font-weight: 500;
    font-size: .89rem; line-height: 1.4; }
.docs-page .dx-group li a:hover { color: var(--brand); text-decoration: none; border-left-color: #93c5fd; }
.docs-page .dx-group li a.is-current { color: var(--brand); font-weight: 700; border-left-color: var(--brand); background: linear-gradient(90deg, #eff6ff, transparent); }

.docs-page .dx-main { padding: 28px 0 64px; min-width: 0; max-width: 820px; }
.docs-page .dx-mobilebar { display: none; gap: 10px; margin-bottom: 18px; }
.docs-page .dx-menu-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: 9px 14px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--ink); cursor: pointer; }
.docs-page .dx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .85rem; margin-bottom: 12px; }
.docs-page .dx-crumbs a { color: var(--muted); font-weight: 600; }
.docs-page .dx-crumbs a:hover { color: var(--brand); }
.docs-page .dx-crumbs i { font-size: .6rem; color: #cbd5e1; }
.docs-page .dx-head { padding-bottom: 22px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.docs-page .dx-head h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.15; color: var(--ink);
    text-align: left; margin: 0 0 10px; text-shadow: none; }
.docs-page .dx-desc { font-size: 1.12rem; color: var(--muted); margin: 0 0 16px; line-height: 1.55; }
.docs-page .dx-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: .84rem; color: #94a3b8; }
.docs-page .dx-meta i { margin-right: 4px; }
.docs-page .dx-print { background: none; border: 0; color: #94a3b8; font: inherit; font-size: .84rem; cursor: pointer; padding: 0; margin-left: auto; }
.docs-page .dx-print:hover { color: var(--brand); }

.docs-page .dx-toc { position: sticky; top: var(--dx-top); max-height: calc(100vh - var(--dx-top)); overflow-y: auto; padding: 34px 0 40px; scrollbar-width: thin; }
.docs-page .dx-toc-title { font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin: 0 0 10px; }
.docs-page .dx-toc ul { list-style: none; margin: 0 0 16px; padding: 0; border-left: 1px solid var(--line); }
.docs-page .dx-toc li a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted);
    font-weight: 500; font-size: .84rem; line-height: 1.4; }
.docs-page .dx-toc li.l3 a { padding-left: 26px; font-size: .8rem; }
.docs-page .dx-toc li a:hover { color: var(--ink); text-decoration: none; }
.docs-page .dx-toc li a.is-active { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.docs-page .dx-top { font-size: .8rem; color: #94a3b8; font-weight: 600; }
.docs-page .dx-top:hover { color: var(--brand); text-decoration: none; }

.docs-page .dx-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 28px; }
.docs-page .dx-pager a { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px;
    color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.docs-page .dx-pager a:hover { border-color: var(--brand); box-shadow: 0 8px 22px rgba(37,99,235,.1); text-decoration: none; }
.docs-page .dx-pager a.next { text-align: right; grid-column: 2; }
.docs-page .dx-pager small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.docs-page .dx-pager span { color: var(--brand); font-weight: 700; }

.docs-page .dx-help { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(180deg, #f5f8ff, #eef4ff);
    border: 1px solid #dbeafe; border-radius: 16px; padding: 22px 26px; }
.docs-page .dx-help h2 { font-size: 1.1rem; font-weight: 800; color: var(--ink); margin: 0 0 4px; text-transform: none; }
.docs-page .dx-help h2::after { display: none; }
.docs-page .dx-help p { margin: 0; color: var(--muted); font-size: .92rem; max-width: 52ch; }
.docs-page .dx-help .dx-btn { background: #25d366; }
.docs-page .dx-help .dx-btn:hover { box-shadow: 0 10px 22px rgba(37,211,102,.35); }

/* Narrow screens: the TOC goes first, then the sidebar becomes a drawer. */
@media (max-width: 1180px) {
    .docs-page .dx-layout { grid-template-columns: var(--dx-side-w) minmax(0, 1fr); gap: 40px; }
    .docs-page .dx-toc { display: none; }
}
@media (max-width: 900px) {
    .docs-page .dx-layout { grid-template-columns: minmax(0, 1fr); padding: 0 18px; }
    .docs-page .dx-main { max-width: none; padding-top: 18px; }
    .docs-page .dx-mobilebar { display: flex; }
    .docs-page .dx-side { position: fixed; z-index: 1300; top: 0; left: 0; bottom: 0; width: min(86vw, 330px); max-height: none; background: #fff;
        padding: 18px 16px 40px; box-shadow: 20px 0 50px rgba(15,23,42,.25); transform: translateX(-105%); transition: transform .25s ease; visibility: hidden; }
    .docs-page .dx-side.open { transform: none; visibility: visible; }
    .docs-page .dx-side-close { display: block; }
    .docs-page .dx-scrim { position: fixed; inset: 0; z-index: 1250; background: rgba(15,23,42,.45); }
    .docs-page .dx-pager { grid-template-columns: 1fr; }
    .docs-page .dx-pager a.next { grid-column: 1; }
}

/* ---------- Article typography (.doc-body) ---------- */
.docs-page .doc-body { color: #1e293b; font-size: 1.02rem; line-height: 1.75; overflow-wrap: break-word; }
.docs-page .doc-body > * + * { margin-top: 1.05em; }
.docs-page .doc-body p { margin: 0; }
.docs-page .doc-body * + p { margin-top: 1em; }
.docs-page .doc-body .lead { font-size: 1.12rem; color: #334155; }
.docs-page .doc-body h2 { font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); line-height: 1.25; margin: 2.2em 0 .2em;
    padding-top: .9em; border-top: 1px solid #f1f5f9; text-transform: none; text-shadow: none; text-align: left; scroll-margin-top: var(--dx-top); position: relative; }
.docs-page .doc-body > h2:first-child { margin-top: 0; border-top: 0; padding-top: 0; }
.docs-page .doc-body h2::after { display: none; }
.docs-page .doc-body h3 { font-size: 1.18rem; font-weight: 700; color: var(--ink); margin: 1.8em 0 .1em; scroll-margin-top: var(--dx-top); position: relative; }
.docs-page .doc-body h4 { font-size: 1rem; font-weight: 700; color: var(--ink); margin: 1.5em 0 0; }
.docs-page .doc-body .dx-anchor { position: absolute; left: -1.1em; top: auto; padding-right: .3em; color: #cbd5e1; font-weight: 600; opacity: 0;
    text-decoration: none; transition: opacity .15s; border: 0; background: none; cursor: pointer; font-size: .85em; }
.docs-page .doc-body h2:hover .dx-anchor, .docs-page .doc-body h3:hover .dx-anchor, .docs-page .doc-body .dx-anchor:focus { opacity: 1; }
.docs-page .doc-body .dx-anchor:hover { color: var(--brand); }
.docs-page .doc-body a { color: var(--brand); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(37,99,235,.3); text-underline-offset: 3px; }
.docs-page .doc-body a:hover { color: #1d4ed8; text-decoration-color: currentColor; }
.docs-page .doc-body strong { font-weight: 700; color: var(--ink); }
.docs-page .doc-body ul, .docs-page .doc-body ol { padding-left: 1.5em; }
.docs-page .doc-body li + li { margin-top: .35em; }
.docs-page .doc-body li > ul, .docs-page .doc-body li > ol { margin-top: .35em; }
.docs-page .doc-body ul li::marker { color: #94a3b8; }
.docs-page .doc-body ol li::marker { color: var(--brand); font-weight: 700; }
.docs-page .doc-body code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; background: #f1f5f9; border: 1px solid #e2e8f0;
    border-radius: 6px; padding: 1px 6px; color: #0f172a; overflow-wrap: anywhere; }
.docs-page .doc-body pre { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 16px 18px; overflow-x: auto; font-size: .88rem; line-height: 1.6; }
.docs-page .doc-body pre code { background: none; border: 0; color: inherit; padding: 0; font-size: inherit; }
.docs-page .doc-body hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

/* UI label: a button, tab or field name exactly as it appears in Q-Booth. */
.docs-page .doc-body .ui { display: inline; font-weight: 600; color: #0f172a; background: #eef2ff; border: 1px solid #e0e7ff; border-radius: 6px;
    padding: 0 6px; white-space: nowrap; font-size: .95em; }
.docs-page .doc-body .path { color: #475569; font-weight: 600; }
.docs-page .doc-body .path .ui + .ui::before { content: none; }

/* Numbered steps */
.docs-page .doc-body ol.steps { list-style: none; padding: 0; counter-reset: step; }
.docs-page .doc-body ol.steps > li { counter-increment: step; position: relative; padding: 0 0 0 48px; min-height: 34px; }
.docs-page .doc-body ol.steps > li + li { margin-top: 1em; }
.docs-page .doc-body ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: -1px; width: 32px; height: 32px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 800; font-size: .9rem; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 4px 10px rgba(37,99,235,.25); }
.docs-page .doc-body ol.steps > li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 36px; bottom: -.9em; width: 2px; background: #e2e8f0; }

/* Callouts */
.docs-page .doc-body .callout, .docs-page .callout { position: relative; border: 1px solid; border-left-width: 4px; border-radius: 12px; padding: 14px 18px 14px 50px;
    font-size: .97rem; line-height: 1.65; }
.docs-page .callout::before { font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 18px; top: 14px; font-size: 1rem; }
.docs-page .callout > * + * { margin-top: .6em; }
.docs-page .callout p { margin: 0; }
.docs-page .callout ul, .docs-page .callout ol { padding-left: 1.2em; }
.docs-page .callout .callout-t { font-weight: 800; display: block; margin-bottom: 2px; }
.docs-page .callout.tip   { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #22c55e; }
.docs-page .callout.tip::before   { content: '\f0eb'; color: #16a34a; }
.docs-page .callout.tip .callout-t { color: #15803d; }
.docs-page .callout.note  { background: #eff6ff; border-color: #bfdbfe; border-left-color: #3b82f6; }
.docs-page .callout.note::before  { content: '\f05a'; color: #2563eb; }
.docs-page .callout.note .callout-t { color: #1d4ed8; }
.docs-page .callout.warn  { background: #fffbeb; border-color: #fde68a; border-left-color: #f59e0b; }
.docs-page .callout.warn::before  { content: '\f071'; color: #d97706; }
.docs-page .callout.warn .callout-t { color: #b45309; }
.docs-page .callout.danger { background: #fef2f2; border-color: #fecaca; border-left-color: #ef4444; }
.docs-page .callout.danger::before { content: '\f06a'; color: #dc2626; }
.docs-page .callout.danger .callout-t { color: #b91c1c; }
.docs-page .dx-fallback { margin-bottom: 24px; }

/* Tables (docs.js wraps each in .dx-table for horizontal scroll) */
.docs-page .doc-body .dx-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.docs-page .doc-body table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.55; }
.docs-page .doc-body th { background: #f8fafc; text-align: left; font-weight: 700; color: var(--ink); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.docs-page .doc-body td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.docs-page .doc-body tr:last-child td { border-bottom: 0; }
.docs-page .doc-body td:first-child { font-weight: 600; color: var(--ink); }
.docs-page .doc-body table.plain td:first-child { font-weight: 400; color: inherit; }

/* Figures */
.docs-page .doc-body figure { margin: 1.6em 0; }
.docs-page .doc-body figure img { display: block; max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15,23,42,.08); cursor: zoom-in; background: #f8fafc; }
.docs-page .doc-body figure.small img { max-width: 420px; }
.docs-page .doc-body figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; text-align: center; }

/* Collapsible Q&A */
.docs-page .doc-body details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; background: #fff; }
.docs-page .doc-body details + details { margin-top: 10px; }
.docs-page .doc-body details > summary { cursor: pointer; list-style: none; font-weight: 700; color: var(--ink); padding: 14px 24px 14px 0; position: relative; }
.docs-page .doc-body details > summary::-webkit-details-marker { display: none; }
.docs-page .doc-body details > summary::after { content: '\f067'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; right: 0; top: 15px;
    font-size: .8rem; color: var(--brand); transition: transform .2s; }
.docs-page .doc-body details[open] > summary::after { transform: rotate(45deg); }
.docs-page .doc-body details > :not(summary) { margin-bottom: 14px; }
.docs-page .doc-body details > summary + * { margin-top: 0; }

/* Link cards ("Next steps", "Related") */
.docs-page .doc-body .cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.docs-page .doc-body .cards a { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; text-decoration: none; color: var(--ink);
    font-weight: 700; transition: border-color .2s, box-shadow .2s, transform .2s; }
.docs-page .doc-body .cards a span { display: block; font-weight: 400; color: var(--muted); font-size: .88rem; margin-top: 4px; line-height: 1.5; }
.docs-page .doc-body .cards a:hover { border-color: var(--brand); box-shadow: 0 10px 24px rgba(37,99,235,.1); transform: translateY(-2px); }
.docs-page .doc-body .cards a i { color: var(--brand); margin-right: 6px; }

/* Definition-style key/value list */
.docs-page .doc-body dl { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 8px 20px; }
.docs-page .doc-body dt { font-weight: 700; color: var(--ink); }
.docs-page .doc-body dd { margin: 0; }
@media (max-width: 640px) { .docs-page .doc-body dl { grid-template-columns: 1fr; gap: 2px; } .docs-page .doc-body dd { margin-bottom: 10px; } }

/* Edition badge (Basic / Advanced / Pro) */
.docs-page .doc-body .badge { display: inline-block; font-size: .7rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 9px;
    border-radius: 999px; background: #e0f2fe; color: #0369a1; vertical-align: middle; white-space: nowrap; }
.docs-page .doc-body .badge.pro { background: #dcfce7; color: #15803d; }
.docs-page .doc-body .badge.adv { background: #fce7f3; color: #be185d; }

/* ---------- Video tutorials ---------- */
/* Player: a thumbnail until pressed, then a YouTube iframe in the same 16:9 box. */
.docs-page .dx-video { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 16px;
    overflow: hidden; background: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.07); scroll-margin-top: var(--dx-top); margin: 1.6em 0; }
.docs-page .dx-video:target { box-shadow: 0 0 0 3px rgba(37,99,235,.35), 0 10px 30px rgba(15,23,42,.07); }
.docs-page .dx-video-frame { position: relative; aspect-ratio: 16 / 9; background: #0b1220; }
.docs-page .dx-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.docs-page .doc-body .dx-video-play, .docs-page .dx-video-play { position: absolute; inset: 0; display: block; text-decoration: none; cursor: pointer; }
.docs-page .dx-video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s, filter .3s; }
.docs-page .dx-video-play:hover img { transform: scale(1.03); filter: brightness(.85); }
.docs-page .dx-video-btn { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 68px; height: 48px; border-radius: 14px;
    background: #ef4444; color: #fff; display: grid; place-items: center; font-size: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .2s, background .2s; }
.docs-page .dx-video-btn i { margin-left: 3px; }
.docs-page .dx-video-play:hover .dx-video-btn { transform: translate(-50%, -50%) scale(1.08); background: #dc2626; }
.docs-page .dx-video-len { position: absolute; right: 10px; bottom: 10px; background: rgba(2,6,23,.82); color: #fff; font-size: .75rem; font-weight: 700;
    padding: 2px 7px; border-radius: 6px; letter-spacing: .02em; }
.docs-page .dx-video-info { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; font-size: .92rem; line-height: 1.5; max-height: 100%; }
.docs-page .doc-body .dx-video-info > * + * { margin-top: 0; }
.docs-page .dx-video-eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #ef4444; }
.docs-page .dx-video-title { font-size: 1.02rem; font-weight: 800; color: var(--ink); line-height: 1.35; }
.docs-page .doc-body details.dx-chapters, .docs-page details.dx-chapters { border: 0; padding: 0; background: none; border-radius: 0; }
.docs-page .doc-body details.dx-chapters > summary, .docs-page .dx-chapters > summary { padding: 4px 0; font-size: .85rem; font-weight: 700; color: var(--brand); }
.docs-page .doc-body details.dx-chapters > summary::after { top: 7px; }
.docs-page .dx-chapters ol { list-style: none; margin: 4px 0 0; padding: 0; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.docs-page .doc-body .dx-chapters li + li { margin-top: 0; }
.docs-page .doc-body .dx-chapters a, .docs-page .dx-chapters a { display: flex; gap: 10px; padding: 4px 6px; border-radius: 6px; color: #334155; font-weight: 500;
    text-decoration: none; font-size: .85rem; line-height: 1.4; }
.docs-page .dx-chapters a span { flex: 0 0 auto; min-width: 38px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--brand); }
.docs-page .doc-body .dx-chapters a:hover, .docs-page .dx-chapters a.is-playing { background: #eff6ff; color: var(--ink); }
.docs-page .dx-video-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: .8rem; color: var(--muted); }
.docs-page .doc-body .dx-video-links a { font-weight: 600; text-decoration: none; }
.docs-page .doc-body .dx-video-links a:hover { text-decoration: underline; }
@media (max-width: 1100px) { .docs-page .dx-video { grid-template-columns: 1fr; } .docs-page .dx-chapters ol { max-height: 260px; } }

/* /docs/videos */
.docs-page .dx-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.docs-page .dx-video-grid .dx-video { margin: 0; grid-template-columns: 1fr; }
@media (max-width: 640px) { .docs-page .dx-video-grid { grid-template-columns: 1fr; } }
.docs-page .doc-body .dx-video-langs { font-size: .92rem; color: var(--muted); }
.docs-page .dx-videos-page .dx-help { margin-top: 48px; }

/* Sidebar link and header shortcut */
.docs-page .dx-side-videos { display: flex; align-items: center; gap: 10px; padding: 10px 8px; margin-bottom: 6px; border-radius: 10px; font-weight: 700;
    font-size: .9rem; color: var(--ink); border: 1px solid #fee2e2; background: linear-gradient(90deg, #fef2f2, #fff); }
.docs-page .dx-side-videos i { color: #ef4444; width: 18px; text-align: center; }
.docs-page .dx-side-videos span { margin-left: auto; font-size: .72rem; font-weight: 800; color: #b91c1c; background: #fee2e2; border-radius: 999px; padding: 1px 8px; }
.docs-page .dx-side-videos:hover, .docs-page .dx-side-videos.is-current { border-color: #fca5a5; color: #b91c1c; text-decoration: none; }
.docs-page .dx-meta .dx-meta-video { color: #dc2626; font-weight: 700; }
.docs-page .dx-meta .dx-meta-video:hover { color: #b91c1c; }

/* Home: video cards */
.docs-page .dx-home-videos { padding-top: 0; }
.docs-page .dx-home-videos .lq-head { margin-bottom: 30px; }
.docs-page .dx-home-videos .lq-eyebrow { color: #dc2626; background: #fef2f2; }
.docs-page .dx-home-videos .lq-eyebrow i { margin-right: 6px; }
.docs-page .dx-vcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.docs-page .dx-vcard { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.docs-page .dx-vcard .th { position: relative; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #0b1220; box-shadow: 0 8px 22px rgba(15,23,42,.1); }
.docs-page .dx-vcard .th img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.docs-page .dx-vcard .pl { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 52px; height: 38px; border-radius: 11px; background: rgba(239,68,68,.92);
    color: #fff; display: grid; place-items: center; font-size: 15px; transition: transform .2s; }
.docs-page .dx-vcard .pl i { margin-left: 2px; }
.docs-page .dx-vcard .len { position: absolute; right: 8px; bottom: 8px; background: rgba(2,6,23,.82); color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 6px; border-radius: 5px; }
.docs-page .dx-vcard .tt { font-weight: 700; font-size: .93rem; line-height: 1.4; }
.docs-page .dx-vcard:hover .th img { transform: scale(1.05); }
.docs-page .dx-vcard:hover .pl { transform: translate(-50%, -50%) scale(1.1); }
.docs-page .dx-vcard:hover .tt { color: var(--brand); }
.docs-page .dx-vcards-more { text-align: center; margin-top: 30px; }
@media (max-width: 1000px) { .docs-page .dx-vcards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .docs-page .dx-vcards { grid-template-columns: 1fr; } }

/* Image zoom */
.dx-zoom { position: fixed; inset: 0; z-index: 3000; background: rgba(2,6,23,.88); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.dx-zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }

/* Toast */
.dx-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 3100; background: #0f172a; color: #fff; padding: 10px 18px;
    border-radius: 10px; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 30px rgba(15,23,42,.3); }

/* ---------- Search dialog ---------- */
.dx-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(15,23,42,.55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: flex-start; padding: 9vh 16px 16px; }
.dx-modal[hidden] { display: none; }
.dx-modal-box { width: 100%; max-width: 680px; max-height: 80vh; display: flex; flex-direction: column; background: #fff; border-radius: 18px;
    box-shadow: 0 30px 80px rgba(15,23,42,.35); overflow: hidden; font-family: 'Inter', 'Poppins', sans-serif; }
.dx-modal-input { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #e2e8f0; }
.dx-modal-input i { color: #2563eb; font-size: 1.1rem; }
.dx-modal-input input { flex: 1; border: 0; outline: 0; font: inherit; font-size: 1.08rem; color: #0f172a; background: transparent; min-height: 0; padding: 6px 0;
    user-select: text; -webkit-user-select: text; }
.dx-modal-input input::-webkit-search-cancel-button { display: none; }
.dx-modal-esc { background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; font-size: .72rem; font-weight: 700; color: #64748b; padding: 4px 8px; cursor: pointer; min-height: 0; }
.dx-results { overflow-y: auto; padding: 8px; flex: 1; min-height: 80px; }
.dx-results .dx-empty { padding: 34px 20px; text-align: center; color: #64748b; font-size: .95rem; }
.dx-results .dx-empty strong { color: #0f172a; }
.dx-results .dx-empty small { display: block; margin-top: 6px; }
.dx-results .dx-grp { font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; padding: 12px 12px 6px; }
.dx-results a.dx-hit { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: #0f172a; text-decoration: none;
    min-height: 0; font-weight: 400; scroll-margin: 8px; }
.dx-results a.dx-hit .ico { flex: 0 0 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #f1f5f9; color: #64748b; font-size: .82rem; margin-top: 2px; }
.dx-results a.dx-hit .txt { min-width: 0; flex: 1; }
.dx-results a.dx-hit .t { display: block; font-weight: 700; font-size: .95rem; line-height: 1.35; }
.dx-results a.dx-hit .p { display: block; font-size: .78rem; color: #94a3b8; font-weight: 600; margin-top: 1px; }
.dx-results a.dx-hit .s { display: block; font-size: .86rem; color: #64748b; line-height: 1.5; margin-top: 3px; overflow: hidden; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dx-results a.dx-hit mark { background: #fef08a; color: inherit; border-radius: 3px; padding: 0 1px; }
.dx-results a.dx-hit.active, .dx-results a.dx-hit:hover { background: #2563eb; color: #fff; }
.dx-results a.dx-hit.active .p, .dx-results a.dx-hit.active .s, .dx-results a.dx-hit:hover .p, .dx-results a.dx-hit:hover .s { color: #dbeafe; }
.dx-results a.dx-hit.active .ico, .dx-results a.dx-hit:hover .ico { background: rgba(255,255,255,.18); color: #fff; }
.dx-results a.dx-hit.active mark, .dx-results a.dx-hit:hover mark { background: rgba(255,255,255,.3); color: #fff; }
.dx-modal-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid #e2e8f0; background: #f8fafc; font-size: .76rem; color: #64748b; }
.dx-modal-foot kbd { margin-right: 3px; }
@media (max-width: 640px) {
    .dx-modal { padding: 0; }
    .dx-modal-box { max-width: none; max-height: none; height: 100%; border-radius: 0; }
    .dx-modal-foot { display: none; }
}
body.dx-lock { overflow: hidden; }

/* ---------- Print ---------- */
@media print {
    .docs-page > nav, .docs-page footer, .docs-page .dx-side, .docs-page .dx-toc, .docs-page .dx-mobilebar, .docs-page .dx-pager,
    .docs-page .dx-help, .docs-page .wa-float, .docs-page .dx-print, .docs-page .dx-crumbs, .dx-modal { display: none !important; }
    .docs-page .dx-layout { display: block; padding: 0; }
    .docs-page .dx-main { max-width: none; padding: 0; }
    .docs-page .doc-body { font-size: 11pt; }
    .docs-page .doc-body figure img { box-shadow: none; max-height: 9cm; width: auto; }
    .docs-page .doc-body h2, .docs-page .doc-body h3 { break-after: avoid; }
    .docs-page .doc-body details { border: 0; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .docs-page *, .dx-modal * { transition: none !important; }
}
