/* ==========================================================================
   Elephanta Docs: theme built from the Elephanta logo violet (#8C56ED)
   Plain CSS: no build step, no npm.
   ========================================================================== */

:root {
    --brand: #8c56ed;
    --brand-600: #7440dc;
    --brand-700: #5f2fc2;
    --brand-50: #f5f0ff;
    --brand-100: #ece2fe;
    --brand-200: #dccbfd;
    --accent: #ff7ab6;
    --ink: #1c1433;
    --text: #3d3557;
    --muted: #6d6587;
    --line: #e9e4f5;
    --bg: #ffffff;
    --bg-soft: #faf8ff;
    --bg-card: #ffffff;
    --code-bg: #1d1631;
    --ok: #12a26b;
    --bad: #e0464e;
    --warn: #e59a12;
    --shadow-sm: 0 1px 2px rgba(42, 20, 92, .06), 0 1px 3px rgba(42, 20, 92, .06);
    --shadow: 0 10px 30px -12px rgba(60, 28, 140, .22), 0 4px 10px -6px rgba(60, 28, 140, .10);
    --shadow-lg: 0 30px 60px -20px rgba(60, 28, 140, .35);
    --radius: 14px;
    --radius-sm: 9px;
    --header-h: 68px;
    --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
}

[data-theme="dark"] {
    --brand: #a57cf4;
    --brand-600: #b592f7;
    --brand-700: #c7abfa;
    --brand-50: #1f1835;
    --brand-100: #2a2047;
    --brand-200: #3b2d63;
    --ink: #f3f0fb;
    --text: #cfc8e4;
    --muted: #9b93b6;
    --line: #2d2645;
    --bg: #110d1f;
    --bg-soft: #161127;
    --bg-card: #1a142d;
    --code-bg: #0c0917;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
    margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; color: var(--text);
    background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 800; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 999; }
.skip-link:focus { left: 12px; color: #fff; }
.icon { flex-shrink: 0; vertical-align: middle; }
.icon.flip { transform: rotate(180deg); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--muted); }
kbd {
    display: inline-block; font-size: 11px; line-height: 1; padding: 4px 6px; border-radius: 6px;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); font-weight: 500;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 15px/1 var(--font);
    padding: 13px 20px; border-radius: 11px; border: 1px solid transparent; cursor: pointer; transition: .18s ease; white-space: nowrap;
}
.btn-sm { padding: 9px 14px; font-size: 14px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-primary { background: linear-gradient(135deg, #9a66f5, #7440dc); color: #fff; box-shadow: 0 8px 20px -8px rgba(116, 64, 220, .7); }
.btn-primary:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(116, 64, 220, .8); }
.btn-ghost { background: var(--bg-card); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand-600); }
.btn-light { background: #fff; color: #5f2fc2; }
.btn-light:hover { color: #4a1fa3; transform: translateY(-1px); }
.btn-outline-light { border-color: rgba(255, 255, 255, .5); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.icon-btn {
    display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line);
    background: var(--bg-card); color: var(--ink); cursor: pointer; transition: .15s;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 42px; width: auto; display: block; }
[data-theme="dark"] .brand img, [data-theme="dark"] .footer-brand img { filter: brightness(1.15) saturate(1.1); }
.brand-tag {
    font-size: 12px; font-weight: 700; color: var(--brand-600); background: var(--brand-50);
    border: 1px solid var(--brand-200); padding: 3px 8px; border-radius: 999px; letter-spacing: .02em;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a { color: var(--text); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 9px; }
.main-nav a:hover, .main-nav a.active { color: var(--brand-600); background: var(--brand-50); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-trigger {
    display: flex; align-items: center; gap: 10px; min-width: 240px; height: 40px; padding: 0 10px 0 12px;
    border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); border-radius: 10px; cursor: pointer;
    font: 500 14px var(--font); transition: .15s;
}
.search-trigger:hover { border-color: var(--brand); color: var(--ink); }
.search-trigger kbd { margin-left: auto; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 70px 0 50px; background: radial-gradient(1000px 500px at 85% -10%, var(--brand-100), transparent 60%), radial-gradient(700px 400px at -10% 10%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%); }
.hero-glow { position: absolute; inset: auto -200px -300px auto; width: 600px; height: 600px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 18%, transparent), transparent); pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--brand-600); margin-bottom: 14px;
}
.hero h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -.035em; margin-bottom: 18px; }
.grad { background: linear-gradient(120deg, #8c56ed 10%, #c06ef0 55%, #ff7ab6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.lead-sm { font-size: 17px; color: var(--muted); }
.hero-search {
    display: flex; align-items: center; gap: 10px; margin-top: 28px; padding: 7px 7px 7px 16px; border-radius: 14px;
    background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 600px; color: var(--muted);
}
.hero-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent), var(--shadow); }
.hero-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 500 16px var(--font); color: var(--ink); padding: 10px 0; }
.hero-search-btn { width: 100%; cursor: pointer; font: 500 16px var(--font); text-align: left; padding: 16px 18px; }
.hero-search-btn span { flex: 1; }
.hero-hints { margin-top: 16px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-hints a { padding: 4px 10px; border-radius: 999px; background: var(--bg-card); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 13px; }
.hero-hints a:hover { border-color: var(--brand); color: var(--brand-600); }
.hero-visual .shot { margin: 0; transform: perspective(1600px) rotateY(-6deg) rotateX(3deg); transition: transform .5s; }
.hero-visual .shot:hover { transform: none; }
.stats { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 56px; }
.stat { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow-sm); }
.stat strong { display: block; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 84px 0; }
.section-tight { padding: 44px 0 80px; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { color: var(--muted); font-size: 17px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cat-card {
    display: flex; flex-direction: column; padding: 24px; border-radius: var(--radius); background: var(--bg-card);
    border: 1px solid var(--line); color: var(--text); transition: .2s; box-shadow: var(--shadow-sm);
}
.cat-card:hover { transform: translateY(-3px); border-color: var(--brand-200); box-shadow: var(--shadow); color: var(--text); }
.cat-card h3 { font-size: 18px; margin: 14px 0 6px; }
.cat-card p { font-size: 14.5px; color: var(--muted); flex: 1; }
.cat-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; color: var(--brand-600); background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); border: 1px solid var(--brand-200); flex-shrink: 0; }
.cat-meta { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; font-weight: 700; color: var(--brand-600); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split h2 { font-size: clamp(28px, 3.2vw, 38px); }
.checks { list-style: none; padding: 0; margin: 0 0 26px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.checks li .icon { color: #fff; background: var(--brand); border-radius: 50%; padding: 3px; margin-top: 3px; width: 20px; height: 20px; }
.replace-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.replace-item { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 11px; background: var(--bg-card); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; color: var(--ink); box-shadow: var(--shadow-sm); }
.replace-item .icon { color: var(--brand); }
.how { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: how; }
.how li { position: relative; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.how-n { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #9a66f5, #7440dc); color: #fff; font-weight: 800; margin-bottom: 14px; }
.how h3 { font-size: 19px; }
.how p { color: var(--muted); font-size: 15px; }
.how a { font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 980px; margin: 0 auto 22px; }
.plan { position: relative; padding: 32px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-card); box-shadow: var(--shadow-sm); }
.plan h3 { font-size: 26px; margin-bottom: 4px; }
.plan-sub { color: var(--muted); margin-bottom: 22px; }
.plan-pro { border: 2px solid var(--brand); box-shadow: var(--shadow-lg); background: linear-gradient(180deg, var(--brand-50), var(--bg-card) 40%); }
.plan-badge { position: absolute; top: -13px; right: 24px; display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg, #9a66f5, #7440dc); color: #fff; font-size: 12px; font-weight: 800; padding: 5px 12px; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase; }
.article-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.article-card { display: flex; flex-direction: column; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-card); color: var(--text); transition: .2s; }
.article-card:hover { border-color: var(--brand-200); transform: translateY(-3px); box-shadow: var(--shadow); color: var(--text); }
.article-card h3 { font-size: 17px; margin: 8px 0; }
.article-card p { font-size: 14px; color: var(--muted); flex: 1; }
.article-cat { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--brand-600); }
.article-meta { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.cta { padding: 64px 0; background: linear-gradient(120deg, #4b23a8, #7a46e6 50%, #a35ce8); color: #fff; }
.cta-inner { display: flex; align-items: center; gap: 28px; }
.cta-inner img { background: #fff; border-radius: 18px; padding: 8px; }
.cta h2 { color: #fff; margin: 0 0 4px; font-size: clamp(22px, 2.6vw, 30px); }
.cta p { margin: 0; opacity: .85; }
.cta-actions { margin-left: auto; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Page hero ---------- */
.page-hero { padding: 48px 0 40px; background: radial-gradient(800px 300px at 80% -20%, var(--brand-100), transparent 70%); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(32px, 4vw, 46px); }
.page-hero .hero-search { margin-top: 22px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--brand-600); }
.breadcrumbs .icon { opacity: .6; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.jump a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text); font-weight: 600; font-size: 14px; }
.jump a:hover { border-color: var(--brand); color: var(--brand-600); }
.doc-cat { margin-bottom: 44px; }
.doc-cat-head { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.doc-cat-head h2 { margin: 0; font-size: 24px; }
.doc-cat-head p { margin: 0; color: var(--muted); }
.doc-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.doc-link { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text); transition: .15s; }
.doc-link:hover { border-color: var(--brand-200); box-shadow: var(--shadow); color: var(--text); }
.doc-link-title { font-weight: 700; color: var(--ink); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.doc-link-desc { font-size: 13.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; line-height: 1.2; background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-200); vertical-align: middle; }
.badge-pro { background: linear-gradient(135deg, #9a66f5, #7440dc); color: #fff; border-color: transparent; }
.badge-free { background: #e6f7ef; color: #0d7a50; border-color: #bfe8d4; }
.badge-free-pro, .badge-partly-pro { background: #fff4e0; color: #9a5a00; border-color: #f6dcab; }
.badge-woocommerce { background: #f3eafe; color: #7f54b3; border-color: #e1d0f7; }
.badge-developer { background: #eaf2ff; color: #2853b8; border-color: #cfe0fd; }
[data-theme="dark"] .badge-free { background: #0f2b20; color: #6be0ac; border-color: #1c4d39; }
[data-theme="dark"] .badge-free-pro, [data-theme="dark"] .badge-partly-pro { background: #2d2210; color: #f5c46b; border-color: #4d3a17; }
[data-theme="dark"] .badge-developer { background: #12203d; color: #8cb4ff; border-color: #22396a; }

/* ---------- Docs layout ---------- */
.docs-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr) 230px; gap: 44px; padding-top: 30px; padding-bottom: 80px; align-items: start; }
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 18px); max-height: calc(100vh - var(--header-h) - 36px); overflow-y: auto; scrollbar-width: thin; padding-right: 6px; }
.sidebar-filter { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); margin-bottom: 14px; }
.sidebar-filter input { border: 0; outline: 0; background: transparent; font: 500 14px var(--font); color: var(--ink); flex: 1; min-width: 0; }
.nav-group { margin-bottom: 4px; }
.nav-group summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 8px 8px; cursor: pointer; font-weight: 700; font-size: 14px; color: var(--ink); border-radius: 8px; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--bg-soft); }
.nav-group summary .icon:first-child { color: var(--brand); }
.nav-group summary .chev { margin-left: auto; transition: transform .2s; opacity: .6; }
.nav-group:not([open]) summary .chev { transform: rotate(-90deg); }
.nav-group ul { list-style: none; margin: 2px 0 10px 16px; padding: 0 0 0 10px; border-left: 1px solid var(--line); }
.nav-group li a { display: flex; align-items: center; gap: 6px; justify-content: space-between; padding: 6px 10px; font-size: 14px; color: var(--text); border-radius: 7px; line-height: 1.4; margin-left: -11px; border-left: 2px solid transparent; }
.nav-group li a:hover { color: var(--brand-600); background: var(--bg-soft); }
.nav-group li a.active { color: var(--brand-600); background: var(--brand-50); font-weight: 700; border-left-color: var(--brand); }
.nav-group li a .badge { font-size: 9px; padding: 2px 5px; }
.nav-hidden { display: none !important; }

.doc { min-width: 0; }
.doc-header { border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 28px; }
.doc-header h1 { font-size: clamp(30px, 3.6vw, 42px); letter-spacing: -.03em; margin-bottom: 12px; }
.doc-lead { font-size: 18.5px; color: var(--muted); margin-bottom: 16px; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13.5px; color: var(--muted); }
.doc-meta > span { display: inline-flex; gap: 6px; align-items: center; }
.doc-path { background: var(--bg-soft); border: 1px solid var(--line); padding: 3px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; }

.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; font-size: 13.5px; scrollbar-width: thin; }
.toc-title { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; margin: 0 0 16px; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--muted); line-height: 1.4; margin-left: -1px; border-left: 2px solid transparent; }
.toc li.lvl-3 a { padding-left: 26px; font-size: 13px; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { color: var(--brand-600); border-left-color: var(--brand); font-weight: 700; }
.toc-top { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-weight: 600; }
.mobile-guides { display: none; align-items: center; gap: 8px; margin-bottom: 16px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-soft); font: 700 14px var(--font); color: var(--ink); cursor: pointer; }
.toc-mobile { display: none; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft); }
.toc-mobile summary { display: flex; gap: 8px; align-items: center; padding: 12px 16px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary .chev { margin-left: auto; }
.toc-mobile ul { list-style: none; margin: 0; padding: 0 16px 14px; }
.toc-mobile li a { display: block; padding: 4px 0; color: var(--text); font-size: 14.5px; }
.toc-mobile li.lvl-3 a { padding-left: 14px; font-size: 14px; color: var(--muted); }

/* ---------- Prose ---------- */
.prose { font-size: 16.5px; color: var(--text); }
.prose > * + * { margin-top: 0; }
.prose h2 { font-size: 26px; margin: 46px 0 14px; padding-top: 6px; position: relative; }
.prose h3 { font-size: 20px; margin: 32px 0 10px; position: relative; }
.prose h4 { font-size: 17px; margin: 24px 0 8px; }
.prose .anchor { position: absolute; left: -22px; color: var(--brand-200); opacity: 0; font-weight: 600; transition: .15s; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin-bottom: 7px; }
.prose li::marker { color: var(--brand); font-weight: 700; }
.prose strong { color: var(--ink); font-weight: 700; }
.prose a { text-decoration: underline; text-decoration-color: var(--brand-200); text-underline-offset: 3px; font-weight: 600; }
.prose a:hover { text-decoration-color: var(--brand); }
.prose a.anchor { text-decoration: none; }
.prose :not(pre) > code { font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); word-break: break-word; }
.prose pre { position: relative; margin: 0 0 22px; padding: 18px 20px; border-radius: 12px; background: var(--code-bg); color: #ece6ff; overflow-x: auto; font-size: 14px; line-height: 1.65; border: 1px solid rgba(140, 86, 237, .25); }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 8px; right: 52px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #9d8fc7; font-family: var(--font); font-weight: 700; }
.prose pre code { background: transparent !important; padding: 0 !important; font-size: inherit; }
.copy-btn { position: absolute; top: 7px; right: 8px; display: grid; place-items: center; width: 32px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(255, 255, 255, .06); color: #cbbff0; cursor: pointer; }
.copy-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.copy-btn.copied { color: #6be0ac; border-color: #6be0ac; }
.prose blockquote { margin: 0 0 20px; padding: 14px 18px; border-left: 4px solid var(--brand); background: var(--bg-soft); border-radius: 0 10px 10px 0; color: var(--text); }
.prose blockquote p:last-child { margin: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.prose th, .prose td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { background: var(--bg-soft); color: var(--ink); font-weight: 700; font-size: 13.5px; }
.prose tr:last-child td { border-bottom: 0; }
.prose tbody tr:hover { background: color-mix(in srgb, var(--brand-50) 50%, transparent); }

.callout { margin: 0 0 22px; border-radius: 12px; padding: 14px 18px 4px; border: 1px solid; }
.callout-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14.5px; margin-bottom: 6px; }
.callout-body { font-size: 15.5px; }
.callout-body p { margin-bottom: 10px; }
.callout-tip { background: #effaf4; border-color: #c6ead6; } .callout-tip .callout-title { color: #0d7a50; }
.callout-note, .callout-info { background: #eff5ff; border-color: #cfe0fd; } .callout-note .callout-title, .callout-info .callout-title { color: #2853b8; }
.callout-warning { background: #fff7e8; border-color: #f6dcab; } .callout-warning .callout-title { color: #9a5a00; }
.callout-pro { background: linear-gradient(135deg, var(--brand-50), #fff); border-color: var(--brand-200); } .callout-pro .callout-title { color: var(--brand-600); }
[data-theme="dark"] .callout-tip { background: #0f2219; border-color: #1c4d39; } [data-theme="dark"] .callout-tip .callout-title { color: #6be0ac; }
[data-theme="dark"] .callout-note, [data-theme="dark"] .callout-info { background: #101a30; border-color: #22396a; } [data-theme="dark"] .callout-note .callout-title, [data-theme="dark"] .callout-info .callout-title { color: #8cb4ff; }
[data-theme="dark"] .callout-warning { background: #241b0c; border-color: #4d3a17; } [data-theme="dark"] .callout-warning .callout-title { color: #f5c46b; }
[data-theme="dark"] .callout-pro { background: linear-gradient(135deg, var(--brand-50), var(--bg-card)); }

.steps ol { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps ol > li { counter-increment: step; position: relative; padding: 0 0 18px 50px; margin: 0; }
.steps ol > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #9a66f5, #7440dc); color: #fff; font-weight: 800; font-size: 14px; }
.steps ol > li::after { content: ""; position: absolute; left: 15px; top: 36px; bottom: 4px; width: 2px; background: var(--brand-100); }
.steps ol > li:last-child::after { display: none; }

/* ---------- Screenshots ---------- */
.shot { margin: 8px 0 28px; }
.shot figcaption { font-size: 13.5px; color: var(--muted); text-align: center; margin-top: 10px; }
.shot-real img { display: block; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); cursor: zoom-in; }
.mock { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: #f0f0f1; font-family: var(--font); font-size: 12px; line-height: 1.4; color: #1d2327; user-select: none; }
.mock-bar { display: flex; align-items: center; gap: 12px; height: 32px; padding: 0 12px; background: #e7e5ee; border-bottom: 1px solid #d9d6e3; }
.mock-dots { display: flex; gap: 6px; } .mock-dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; } .mock-dots i:nth-child(2) { background: #febc2e; } .mock-dots i:nth-child(3) { background: #28c840; }
.mock-url { display: inline-flex; align-items: center; gap: 5px; background: #fff; border-radius: 6px; padding: 3px 10px; color: #6b6780; font-size: 11px; min-width: 0; overflow: hidden; white-space: nowrap; }
.mock-body { display: grid; grid-template-columns: 118px 1fr; min-height: 230px; }
.mock-side { background: #1d2327; padding: 8px 0; display: flex; flex-direction: column; }
.mock-side span { display: flex; align-items: center; gap: 7px; color: #c3c4c7; padding: 6px 10px; font-size: 11px; white-space: nowrap; overflow: hidden; }
.mock-side span i { width: 10px; height: 10px; border-radius: 3px; background: #50575e; flex-shrink: 0; }
.mock-side span.on { background: #8c56ed; color: #fff; font-weight: 700; }
.mock-side span.on i { background: #fff; }
.mock-main { padding: 14px 16px 16px; min-width: 0; background: #f6f5fa; }
.mock-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mock-head strong { font-size: 14px; color: #1d2327; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-logo { width: 26px; height: 26px; border-radius: 7px; background: #fff; display: grid; place-items: center; border: 1px solid #e3def0; flex-shrink: 0; }
.mock-logo img { width: 18px; height: 18px; }
.mock-btn { display: inline-block; padding: 5px 10px; border-radius: 6px; background: #8c56ed; color: #fff; font-weight: 700; font-size: 11px; white-space: nowrap; }
.mock-head .mock-btn { margin-left: auto; }
.mock-tabs { display: flex; gap: 2px; border-bottom: 1px solid #ddd8ea; margin-bottom: 12px; overflow: hidden; }
.mock-tabs span { padding: 6px 10px; color: #5b5670; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 11.5px; }
.mock-tabs span.on { color: #7440dc; border-bottom-color: #8c56ed; }
.mock-cards { display: grid; gap: 10px; }
.mock-card { background: #fff; border: 1px solid #e6e2f0; border-radius: 9px; padding: 10px 12px; min-width: 0; }
.mock-card-title { font-weight: 800; color: #1d2327; font-size: 12px; margin-bottom: 6px; grid-column: 1 / -1; }
.mock-grid { display: grid; gap: 4px 14px; }
.mock-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mock-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mock-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mock-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px dashed #efecf6; min-width: 0; }
.mock-row:last-child { border-bottom: 0; }
.mock-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2c3338; }
.mock-meta { color: #8a8599; font-size: 11px; white-space: nowrap; }
.mock-dot { width: 7px; height: 7px; border-radius: 50%; background: #c9b6f7; flex-shrink: 0; }
.mock-switch { position: relative; width: 26px; height: 15px; border-radius: 999px; background: #d0cddb; flex-shrink: 0; }
.mock-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.mock-switch.on { background: #8c56ed; } .mock-switch.on::after { left: 13px; }
.mock-pill { font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 999px; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.mock-pill.ok { background: #e3f6ec; color: #0d7a50; } .mock-pill.bad { background: #fde7e8; color: #c22f37; } .mock-pill.pro { background: #efe6fe; color: #7440dc; }
.mock-field { display: grid; grid-template-columns: 40% 1fr; gap: 10px; align-items: center; padding: 4px 0; min-width: 0; }
.mock-flabel { color: #50575e; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-input { border: 1px solid #dcd7e8; border-radius: 6px; padding: 4px 8px; background: #fff; color: #2c3338; min-height: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-chips { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px 0; }
.mock-chips span { padding: 3px 8px; border-radius: 999px; border: 1px solid #ddd8ea; background: #faf9fd; color: #50575e; font-weight: 600; font-size: 11px; }
.mock-chips span.on { background: #8c56ed; border-color: #8c56ed; color: #fff; }
.mock-actions { padding-top: 8px; }
.mock-notice { border-left: 3px solid #8c56ed; background: #f5f0ff; padding: 6px 10px; border-radius: 0 6px 6px 0; color: #3c2a6b; margin: 4px 0; }
.mock-stat { display: flex; flex-direction: column; padding: 6px 4px; }
.mock-stat-v { font-size: 18px; font-weight: 800; color: #1d2327; line-height: 1.2; }
.mock-stat-l { font-size: 10.5px; color: #8a8599; font-weight: 600; }
[data-theme="dark"] .mock { border-color: #3b2d63; }

/* ---------- Article footer ---------- */
.doc-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 44px 0 26px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-soft); font-weight: 700; color: var(--ink); }
.doc-feedback button { display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-card); font: 600 14px var(--font); color: var(--text); cursor: pointer; }
.doc-feedback button:hover { border-color: var(--brand); color: var(--brand-600); }
.doc-feedback-thanks { font-weight: 500; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-card); transition: .15s; }
.pager a:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.pager span { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pager strong { color: var(--ink); }
.pager-next { text-align: right; align-items: flex-end; grid-column: 2; }
.related { margin-top: 36px; }
.related h2 { font-size: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.related-grid a { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14.5px; background: var(--bg-card); }
.related-grid a:hover { border-color: var(--brand); color: var(--brand-600); }
.related-grid .icon { color: var(--brand); }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(12, 8, 24, .88); display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 92vh; border-radius: 10px; }
.lightbox button { position: absolute; top: 18px; right: 18px; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; }

/* ---------- FAQ ---------- */
.faq-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; max-width: 1100px; }
.faq-nav { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 4px; }
.faq-nav a { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 9px; color: var(--text); font-weight: 600; font-size: 14.5px; }
.faq-nav a:hover { background: var(--brand-50); color: var(--brand-600); }
.faq-nav a .icon { color: var(--brand); }
.faq-nav a span { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; }
.faq-group { margin-bottom: 40px; }
.faq-group h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; }
.faq-group h2 .icon { color: var(--brand); }
.faq-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: var(--bg-card); transition: .15s; }
.faq-item[open] { border-color: var(--brand-200); box-shadow: var(--shadow); }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; font-weight: 700; color: var(--ink); font-size: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { margin-left: auto; color: var(--brand); transition: transform .2s; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-a { padding: 0 18px 4px; color: var(--text); font-size: 15.5px; }
.faq-a code { font-size: .86em; padding: 2px 6px; border-radius: 6px; background: var(--brand-50); color: var(--brand-700); }
.faq-empty { padding: 20px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }

/* ---------- Search ---------- */
.search-modal { position: fixed; inset: 0; z-index: 100; }
.search-modal[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; background: rgba(16, 10, 34, .55); backdrop-filter: blur(4px); }
.search-dialog { position: relative; width: min(720px, calc(100% - 32px)); margin: 8vh auto 0; background: var(--bg-card); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; max-height: 80vh; animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.search-box { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--brand); }
.search-box input { flex: 1; border: 0; outline: 0; background: transparent; font: 500 18px var(--font); color: var(--ink); min-width: 0; }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-esc { font: 600 11px var(--font); padding: 5px 8px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--muted); cursor: pointer; }
.search-filters { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.search-filters button { font: 600 13px var(--font); padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-card); color: var(--muted); cursor: pointer; }
.search-filters button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.search-results { overflow-y: auto; padding: 8px; min-height: 120px; }
.search-group-title { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; color: var(--muted); padding: 10px 12px 6px; }
.sr-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: var(--text); }
.sr-item.active, .sr-item:hover { background: var(--brand-50); color: var(--text); }
.sr-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--brand); flex-shrink: 0; }
.sr-item.active .sr-icon { background: var(--brand); color: #fff; border-color: var(--brand); }
.sr-body { min-width: 0; flex: 1; }
.sr-title { display: block; font-weight: 700; color: var(--ink); }
.sr-cat { display: block; font-size: 12px; color: var(--brand-600); font-weight: 600; margin-bottom: 2px; }
.sr-snip { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: color-mix(in srgb, var(--brand) 22%, transparent); color: inherit; border-radius: 3px; padding: 0; }
.search-empty { padding: 30px 16px; text-align: center; color: var(--muted); }
.search-foot { display: flex; gap: 18px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--bg-soft); }
.search-foot kbd { margin-right: 3px; }
.results-count { color: var(--muted); }
.result { display: block; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; background: var(--bg-card); color: var(--text); transition: .15s; }
.result:hover { border-color: var(--brand); box-shadow: var(--shadow); color: var(--text); }
.result-type { display: inline-block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; padding: 2px 7px; border-radius: 5px; background: var(--brand-50); color: var(--brand-600); margin-right: 8px; }
.result-cat { font-size: 13px; color: var(--muted); }
.result-title { display: block; font-size: 18px; color: var(--ink); margin: 6px 0 4px; }
.result-snippet { display: block; font-size: 14.5px; color: var(--muted); }
.empty { padding: 22px; border: 1px dashed var(--line); border-radius: 12px; margin-bottom: 28px; }
.h3 { font-size: 20px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); padding: 56px 0 0; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { color: var(--muted); max-width: 340px; margin: 14px 0 18px; }
.footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: var(--text); }
.site-footer li a:hover { color: var(--brand-600); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 22px; padding-bottom: 22px; margin-top: 40px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); font-weight: 600; }
.not-found img { margin-bottom: 10px; }
.not-found .hero-search { margin: 26px auto 18px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .docs-layout { grid-template-columns: 250px minmax(0, 1fr); }
    .toc { display: none; }
    .toc-mobile { display: block; }
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .search-trigger { min-width: 0; }
    .search-trigger-text, .search-trigger kbd { display: none; }
}
@media (max-width: 980px) {
    .hero-grid, .split { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual .shot { transform: none; }
    .stats { grid-template-columns: repeat(3, 1fr); }
    .doc-links { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .how, .plans { grid-template-columns: 1fr; }
    .faq-layout { grid-template-columns: 1fr; }
    .faq-nav { position: static; flex-direction: row; flex-wrap: wrap; }
    .faq-nav a span { display: none; }
    .cta-inner { flex-direction: column; text-align: center; }
    .cta-actions { margin: 0; justify-content: center; }
    .main-nav { display: none; }
    .menu-btn { display: inline-grid; }
    body.menu-open .main-nav {
        display: flex; flex-direction: column; position: fixed; top: var(--header-h); left: 0; right: 0; padding: 14px 16px 20px;
        background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); z-index: 49;
    }
    body.menu-open .main-nav a { padding: 12px 14px; font-size: 16px; }
    .docs-layout { grid-template-columns: 1fr; gap: 0; }
    .docs-sidebar { display: none; position: static; max-height: none; margin-bottom: 20px; }
    body.sidebar-open .docs-sidebar {
        display: block; position: fixed; z-index: 48; top: var(--header-h); left: 0; right: 0; bottom: 0;
        background: var(--bg); padding: 16px; overflow-y: auto; border-top: 1px solid var(--line);
    }
    .mobile-guides { display: inline-flex; }
}
@media (max-width: 640px) {
    .container { padding: 0 16px; }
    .hero { padding: 40px 0 34px; }
    .lead { font-size: 17px; }
    .stats { grid-template-columns: repeat(2, 1fr); margin-top: 36px; }
    .stat:last-child { grid-column: 1 / -1; }
    .section { padding: 56px 0; }
    .article-grid, .doc-links, .related-grid, .replace-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 26px; }
    .hide-sm { display: none; }
    .brand img { height: 36px; }
    .brand-tag { display: none; }
    .hero-search .btn { padding: 11px 14px; }
    .pager { grid-template-columns: 1fr; }
    .pager-next { grid-column: 1; }
    .prose { font-size: 16px; }
    .prose h2 { font-size: 22px; }
    .prose .anchor { display: none; }
    .mock-body { grid-template-columns: 1fr; }
    .mock-side { display: none; }
    .mock-grid-3, .mock-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .search-dialog { margin-top: 12px; max-height: calc(100vh - 24px); }
    .search-foot { display: none; }
    .plan { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
    .site-header, .site-footer, .docs-sidebar, .toc, .doc-feedback, .pager, .related, .search-modal { display: none !important; }
    .docs-layout { display: block; }
}
