/* ==========================================================
   DROS BOT — PRO FULL-WIDTH DOCUMENTATION PORTAL (v2)
   Top Search Command Center • Clean Sidebar • Spacious Reader
   ========================================================== */

body.docs-page {
    opacity: 1 !important;
    background: var(--bg-deep);
    color: var(--text-main);
    min-height: 100vh;
    position: relative;
}

/* Ambient Space Background */
.doc-space-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 42% at 50% 0%, rgba(122, 108, 255, 0.25) 0%, transparent 72%),
        radial-gradient(ellipse 55% 45% at 92% 88%, rgba(182, 245, 66, 0.08) 0%, transparent 65%),
        linear-gradient(180deg, #09051d 0%, #100832 55%, #0b0622 100%);
}
.doc-stars {
    position: absolute;
    inset: -5%;
    background-image:
        radial-gradient(1.5px 1.5px at 16% 22%, rgba(255,255,255,0.72), transparent),
        radial-gradient(1px 1px at 76% 14%, rgba(207,201,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 44% 64%, rgba(255,255,255,0.55), transparent),
        radial-gradient(1px 1px at 88% 72%, rgba(207,201,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 62% 36%, rgba(182,245,66,0.45), transparent);
    background-size: 520px 520px;
    opacity: 0.4;
}
.doc-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.22;
}
.doc-glow-1 { width: 520px; height: 520px; background: #6a63f7; top: -140px; left: -120px; }
.doc-glow-2 { width: 460px; height: 460px; background: #8b5cf6; bottom: 6%; right: -90px; }

/* Navbar */
.doc-navbar {
    background: rgba(9, 5, 29, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(190, 180, 255, 0.11);
}
.doc-mobile-menu-btn {
    display: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(190, 180, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Full-Width Page Wrapper */
.doc-page-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    padding: 96px 40px 80px;
    flex: 1;
}

/* ---------- Full-Width Top Hero & Search Hub ---------- */
.doc-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
    gap: 32px;
    align-items: center;
    padding: 34px 40px;
    margin-bottom: 28px;
    border-radius: 22px;
    background:
        radial-gradient(ellipse 60% 120% at 92% 40%, rgba(122, 108, 255, 0.24) 0%, transparent 70%),
        linear-gradient(155deg, rgba(28, 17, 82, 0.86) 0%, rgba(13, 8, 42, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.17);
    box-shadow: 0 22px 55px rgba(4, 2, 20, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    animation: docFadeUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes docFadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.doc-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(122, 108, 255, 0.16);
    border: 1px solid rgba(163, 157, 255, 0.34);
    color: #dedbff;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 12px;
}
.doc-hero-badge i { color: var(--lime); }

.doc-hero-title {
    font-size: clamp(30px, 3.6vw, 44px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: #fff;
    margin-bottom: 10px;
}
.doc-hero-title span {
    background: linear-gradient(135deg, #ffffff 0%, #b4beff 50%, #b6f542 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.doc-hero-sub {
    font-size: 15px;
    line-height: 1.68;
    color: #cac5f0;
    max-width: 680px;
    margin: 0;
}

.doc-hero-search-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.doc-hero-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 54px;
    padding: 0 16px;
    border-radius: 15px;
    background: rgba(9, 5, 29, 0.88);
    border: 1px solid rgba(190, 180, 255, 0.24);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.doc-hero-search-box:focus-within {
    border-color: var(--lime);
    box-shadow: 0 0 0 3px rgba(182, 245, 66, 0.16), 0 14px 34px rgba(0, 0, 0, 0.4);
}
.doc-hero-search-box > i {
    color: var(--lime);
    font-size: 16px;
}
.doc-hero-search-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14.5px;
    font-weight: 500;
}
.doc-hero-search-box input::placeholder { color: #847eb8; }

.doc-search-clear {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #dedbff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.doc-search-clear:hover { background: rgba(255, 107, 129, 0.28); color: #fff; }

.doc-kbd {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cfc9ff;
    white-space: nowrap;
}

.doc-quick-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.doc-qpill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 99px;
    background: rgba(10, 6, 32, 0.62);
    border: 1px solid rgba(190, 180, 255, 0.16);
    color: #cbc6f3;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-qpill i { color: var(--primary-light); font-size: 11px; }
.doc-qpill:hover {
    background: rgba(122, 108, 255, 0.22);
    border-color: rgba(163, 157, 255, 0.45);
    color: #fff;
    transform: translateY(-1px);
}
.doc-qpill.active {
    background: rgba(182, 245, 66, 0.14);
    border-color: rgba(182, 245, 66, 0.48);
    color: var(--lime);
}
.doc-qpill.active i { color: var(--lime); }

/* ---------- 3-Column Full-Width Documentation Shell ---------- */
.doc-shell {
    display: grid;
    grid-template-columns: 295px minmax(0, 1fr) 265px;
    gap: 28px;
    align-items: start;
}

/* ---------- Clean Left Sidebar ---------- */
.doc-sidebar-backdrop { display: none; }
.doc-sidebar {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 106px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.86) 0%, rgba(12, 7, 38, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.16);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(4, 2, 20, 0.48);
    animation: docFadeUp 0.55s 0.05s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.doc-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(190, 180, 255, 0.11);
    background: rgba(10, 6, 32, 0.45);
}
.doc-side-ico {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(122, 108, 255, 0.2);
    border: 1px solid rgba(163, 157, 255, 0.35);
    color: var(--lime);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.doc-sidebar-brand strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}
.doc-sidebar-brand span {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: #9e98d2;
    margin-top: 1px;
}
.doc-sidebar-close {
    display: none;
    margin-left: auto;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    cursor: pointer;
}

.doc-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.doc-nav-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9b95cf;
    padding: 0 10px 7px;
}
.doc-nav-group-title i { font-size: 12px; }
.doc-nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid transparent;
    border-left: 3px solid transparent;
    color: #c8c3ee;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateX(3px);
}
.doc-nav-item.active {
    background: linear-gradient(90deg, rgba(182, 245, 66, 0.14) 0%, rgba(122, 108, 255, 0.1) 100%);
    border-color: rgba(163, 157, 255, 0.28);
    border-left-color: var(--lime);
    color: #fff;
    font-weight: 700;
    transform: translateX(4px);
}
.doc-nav-badge {
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(182, 245, 66, 0.14);
    color: var(--lime);
    border: 1px solid rgba(182, 245, 66, 0.34);
    text-transform: uppercase;
}
.doc-nav-empty {
    text-align: center;
    padding: 28px 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.doc-sidebar-foot {
    padding: 14px;
    border-top: 1px solid rgba(190, 180, 255, 0.1);
}
.doc-side-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 12px;
    background: rgba(182, 245, 66, 0.12);
    border: 1px solid rgba(182, 245, 66, 0.38);
    color: #e6ffb2;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 800;
    transition: all 0.2s var(--ease-spring);
}
.doc-side-cta:hover {
    background: var(--lime);
    color: #0a0620;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px var(--lime-glow);
}

/* ---------- Center Spacious Reader Column ---------- */
.doc-content-col {
    min-width: 0;
    animation: docFadeUp 0.58s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.doc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 14px;
    padding: 0 4px;
    flex-wrap: wrap;
}
.doc-breadcrumb i { font-size: 10px; opacity: 0.6; }
.doc-breadcrumb strong { color: var(--lime); font-weight: 700; }

.doc-article {
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.82) 0%, rgba(12, 7, 38, 0.94) 100%);
    border: 1px solid rgba(190, 180, 255, 0.16);
    border-radius: 22px;
    padding: 38px 44px;
    box-shadow: 0 24px 60px rgba(4, 2, 20, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.doc-article.is-swapping {
    animation: docArticleSwap 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes docArticleSwap {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.doc-art-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--lime);
    margin-bottom: 10px;
}
.doc-art-title {
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 14px;
}
.doc-art-lead {
    font-size: 15.8px;
    line-height: 1.75;
    color: #d6d2fb;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(190, 180, 255, 0.13);
}

.doc-article h2 {
    font-size: 21.5px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin: 32px 0 14px;
    scroll-margin-top: 96px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.doc-article h2 i { color: var(--primary-light); font-size: 17px; }
.doc-article h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: #ece9ff;
    margin: 20px 0 9px;
}
.doc-article p {
    font-size: 15.2px;
    line-height: 1.82;
    color: #dbd7fa;
    margin-bottom: 15px;
}
.doc-article ul,
.doc-article ol {
    margin: 0 0 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.doc-article li {
    font-size: 15px;
    line-height: 1.72;
    color: #dbd7fa;
}
.doc-article li::marker { color: var(--lime); }
.doc-article strong { color: #fff; }
.doc-article code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    background: rgba(10, 6, 32, 0.88);
    border: 1px solid rgba(163, 157, 255, 0.28);
    color: #e4ffa8;
    padding: 2.5px 7px;
    border-radius: 6px;
}

/* Callout Boxes */
.doc-callout {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 15px;
    margin: 20px 0;
    font-size: 14.5px;
    line-height: 1.68;
}
.doc-callout > i { font-size: 18px; margin-top: 3px; flex-shrink: 0; }
.doc-callout strong { display: block; font-size: 14.8px; margin-bottom: 4px; color: #fff; }
.doc-callout.tip {
    background: rgba(182, 245, 66, 0.09);
    border: 1px solid rgba(182, 245, 66, 0.34);
    color: #e8ffbc;
}
.doc-callout.tip > i { color: var(--lime); }
.doc-callout.info {
    background: rgba(88, 101, 242, 0.15);
    border: 1px solid rgba(138, 147, 255, 0.38);
    color: #e2e6ff;
}
.doc-callout.info > i { color: var(--primary-light); }
.doc-callout.warn {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.36);
    color: #fef0b8;
}
.doc-callout.warn > i { color: #fbbf24; }

/* Step Cards */
.doc-steps {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 16px 0 24px;
}
.doc-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(9, 5, 30, 0.62);
    border: 1px solid rgba(190, 180, 255, 0.14);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.doc-step:hover {
    border-color: rgba(182, 245, 66, 0.36);
    transform: translateY(-1px);
}
.doc-step-num {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, #7a6cff, #5865F2);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(106, 99, 247, 0.45);
}
.doc-step h4 { font-size: 15.5px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.doc-step p { margin-bottom: 0; font-size: 14.2px; }

/* Code / Command Copy Block */
.doc-code-box {
    background: rgba(8, 5, 26, 0.92);
    border: 1px solid rgba(190, 180, 255, 0.18);
    border-radius: 14px;
    overflow: hidden;
    margin: 16px 0 20px;
}
.doc-code-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
}
.doc-copy-btn {
    background: rgba(88, 101, 242, 0.24);
    border: 1px solid rgba(138, 147, 255, 0.38);
    color: #e4e8ff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}
.doc-copy-btn:hover { background: var(--primary); color: #fff; }
.doc-code-pre {
    padding: 15px 18px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13.5px;
    line-height: 1.7;
    color: #e6ebff;
    overflow-x: auto;
    white-space: pre;
}

/* Spacious Data Tables */
.doc-table-wrap {
    overflow-x: auto;
    margin: 16px 0 22px;
    border-radius: 14px;
    border: 1px solid rgba(190, 180, 255, 0.16);
}
.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.2px;
    background: rgba(8, 5, 26, 0.72);
}
.doc-table th {
    text-align: left;
    padding: 13px 16px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #b7b1e6;
    background: rgba(122, 108, 255, 0.15);
    border-bottom: 1px solid rgba(190, 180, 255, 0.16);
}
.doc-table td {
    padding: 14px 16px;
    line-height: 1.65;
    color: #e3e0ff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: top;
}
.doc-table tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.02); }
.doc-table tr:last-child td { border-bottom: none; }

/* Mini Feature Grid */
.doc-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0 22px;
}
.doc-mini-card {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(9, 5, 30, 0.62);
    border: 1px solid rgba(190, 180, 255, 0.14);
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.doc-mini-card:hover {
    border-color: rgba(182, 245, 66, 0.36);
    transform: translateY(-2px);
}
.doc-mini-card h4 {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.doc-mini-card h4 i { color: var(--lime); font-size: 14px; }
.doc-mini-card p { font-size: 13.8px; margin-bottom: 0; color: #c5c0ec; }

/* Interactive Syntax Tabs */
.doc-tabs-box {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid rgba(190, 180, 255, 0.18);
    background: rgba(9, 5, 30, 0.72);
    margin: 18px 0 22px;
}
.doc-tabs-bar {
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 7px;
    gap: 7px;
}
.doc-tab-btn {
    padding: 8px 16px;
    border-radius: 9px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
}
.doc-tab-btn:hover { color: #fff; background: rgba(255, 255, 255, 0.05); }
.doc-tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(88, 101, 242, 0.42);
}
.doc-tab-panel {
    display: none;
    padding: 18px 20px;
}
.doc-tab-panel.active {
    display: block;
    animation: docArticleSwap 0.24s ease;
}

/* Interactive Calculators */
.doc-calc-card {
    background: linear-gradient(145deg, rgba(36, 22, 102, 0.74), rgba(12, 8, 38, 0.92));
    border: 1px solid rgba(182, 245, 66, 0.34);
    border-radius: 18px;
    padding: 22px 24px;
    margin: 20px 0 24px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}
.doc-calc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.doc-calc-title {
    font-size: 15.5px;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 9px;
}
.doc-calc-title i { color: var(--lime); }
.doc-calc-tag {
    font-size: 10.5px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 99px;
    background: rgba(182, 245, 66, 0.16);
    color: var(--lime);
}
.doc-calc-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.doc-calc-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #c7c2f0;
    margin-bottom: 6px;
}
.doc-calc-field input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border-radius: 11px;
    background: rgba(9, 5, 29, 0.88);
    border: 1px solid rgba(190, 180, 255, 0.24);
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    font-weight: 700;
    outline: none;
}
.doc-calc-field input:focus { border-color: var(--lime); }
.doc-calc-results {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.doc-calc-res-box {
    background: rgba(9, 5, 29, 0.78);
    border: 1px solid rgba(190, 180, 255, 0.15);
    border-radius: 13px;
    padding: 13px 14px;
    text-align: center;
}
.doc-calc-res-box small {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.doc-calc-res-box strong {
    font-size: 17.5px;
    font-weight: 900;
    color: #fff;
}
.doc-calc-res-box.lime strong { color: var(--lime); }

/* Deep-link Action Strip to Live Simulator */
.doc-try-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 20px;
    border-radius: 15px;
    background: rgba(88, 101, 242, 0.16);
    border: 1px solid rgba(138, 147, 255, 0.36);
    margin: 22px 0 6px;
}
.doc-try-strip span { font-size: 14px; font-weight: 700; color: #f0edff; }
.doc-try-links { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-try-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 9px;
    background: var(--lime);
    color: #0a0620;
    text-decoration: none;
    font-size: 12.5px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.doc-try-chip:hover { transform: translateY(-2px); box-shadow: 0 8px 18px var(--lime-glow); }

/* FAQ Accordion */
.doc-faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}
.doc-faq-item {
    border-radius: 15px;
    background: rgba(9, 5, 30, 0.65);
    border: 1px solid rgba(190, 180, 255, 0.15);
    overflow: hidden;
    transition: border-color 0.2s ease;
}
.doc-faq-item.open { border-color: rgba(182, 245, 66, 0.45); }
.doc-faq-q {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: #fff;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.doc-faq-q i { color: var(--primary-light); transition: transform 0.22s ease; }
.doc-faq-item.open .doc-faq-q i { transform: rotate(180deg); color: var(--lime); }
.doc-faq-a {
    display: none;
    padding: 0 18px 17px;
    font-size: 14.5px;
    line-height: 1.72;
    color: #d3cef6;
}
.doc-faq-item.open .doc-faq-a {
    display: block;
    animation: docArticleSwap 0.22s ease;
}

/* Prev / Next Pager */
.doc-pager {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 22px;
}
.doc-pager-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.8), rgba(12, 7, 38, 0.92));
    border: 1px solid rgba(190, 180, 255, 0.16);
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.22s var(--ease-spring);
}
.doc-pager-btn.next { text-align: right; }
.doc-pager-btn:hover {
    border-color: rgba(182, 245, 66, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(4, 2, 20, 0.45);
}
.doc-pager-btn small { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; }
.doc-pager-btn strong { font-size: 15px; font-weight: 800; color: #fff; }
.doc-pager-btn.next strong { color: var(--lime); }

/* ---------- Right Sticky TOC + Progress ---------- */
.doc-toc-col {
    position: sticky;
    top: 86px;
    animation: docFadeUp 0.6s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.doc-toc-box {
    background: linear-gradient(165deg, rgba(24, 15, 72, 0.82), rgba(12, 7, 38, 0.92));
    border: 1px solid rgba(190, 180, 255, 0.15);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 18px 46px rgba(4, 2, 20, 0.45);
}
.doc-toc-title {
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #a9a4d6;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.doc-toc-title i { color: var(--lime); }
.doc-toc-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.doc-toc-link {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #bfb9e8;
    text-decoration: none;
    padding: 7px 11px;
    border-left: 2.5px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 9px 9px 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-toc-link:hover { color: #fff; border-left-color: var(--primary-light); transform: translateX(3px); }
.doc-toc-link.active {
    color: var(--lime);
    border-left-color: var(--lime);
    background: rgba(182, 245, 66, 0.09);
    transform: translateX(4px);
}

.doc-progress-wrap {
    margin-top: 16px;
    padding: 12px 13px;
    border-radius: 12px;
    background: rgba(9, 5, 29, 0.72);
    border: 1px solid rgba(190, 180, 255, 0.14);
}
.doc-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 800;
    color: #b5b0df;
    margin-bottom: 7px;
}
.doc-progress-head strong {
    color: var(--lime);
    font-family: 'JetBrains Mono', monospace;
}
.doc-progress-track {
    height: 6px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.doc-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: linear-gradient(90deg, #5865F2, #8a93ff, #b6f542);
    transition: width 0.16s ease-out;
}

.doc-toc-divider {
    height: 1px;
    background: rgba(190, 180, 255, 0.12);
    margin: 16px 0;
}
.doc-toc-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.doc-toc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 12.8px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.18s var(--ease-spring);
}
.doc-toc-btn.lime { background: var(--lime); color: #0a0620; }
.doc-toc-btn.lime:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--lime-glow); }
.doc-toc-btn.glass {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(190, 180, 255, 0.16);
    color: #e4e1ff;
}
.doc-toc-btn.glass:hover { background: rgba(122, 108, 255, 0.25); color: #fff; }

/* Back-to-Top Floating Button */
.doc-top-btn {
    position: fixed;
    right: 26px;
    bottom: 84px;
    z-index: 90;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    border: 1px solid rgba(182, 245, 66, 0.42);
    background: rgba(18, 11, 56, 0.92);
    color: var(--lime);
    font-size: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
    opacity: 0;
    transform: translateY(14px) scale(0.92);
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.doc-top-btn.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.doc-top-btn:hover { background: var(--lime); color: #0a0620; transform: translateY(-3px); }

/* Toast */
.doc-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    background: rgba(18, 10, 53, 0.96);
    border: 1px solid rgba(182, 245, 66, 0.45);
    color: #fff;
    padding: 11px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(14px);
    pointer-events: none;
    transition: all 0.25s var(--ease-spring);
}
.doc-toast.show { opacity: 1; transform: translateY(0); }

.doc-footer { position: relative; z-index: 2; }
.doc-footer .nav-link.active-foot {
    color: var(--lime);
    font-weight: 700;
}

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .doc-page-wrap { padding: 92px 24px 70px; }
    .doc-shell { grid-template-columns: 270px minmax(0, 1fr); }
    .doc-toc-col { display: none; }
}
@media (max-width: 960px) {
    html,
    body.docs-page {
        overflow-x: clip !important;
        max-width: 100% !important;
    }

    .doc-hero-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 24px 18px;
        gap: 18px;
        max-width: 100%;
        overflow: hidden;
    }
    .doc-hero-left,
    .doc-hero-search-panel,
    .doc-hero-search-box,
    .doc-quick-pills,
    .doc-content-col,
    .doc-article {
        min-width: 0 !important;
        max-width: 100% !important;
    }
    .doc-mobile-menu-btn { display: inline-flex; }
    .doc-sidebar-close { display: inline-flex; align-items: center; justify-content: center; }
    .doc-shell { grid-template-columns: minmax(0, 1fr); }
    .doc-article { padding: 24px 18px; }
    .doc-card-grid,
    .doc-calc-grid,
    .doc-calc-results,
    .doc-pager { grid-template-columns: minmax(0, 1fr); }

    /* Release .doc-sidebar from .doc-page-wrap z-index:2 stacking trap */
    .doc-page-wrap {
        z-index: auto !important;
    }

    body.doc-mob-open {
        overflow: hidden !important;
    }

    .doc-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: min(320px, 86vw) !important;
        max-height: 100dvh !important;
        border-radius: 0 20px 20px 0 !important;
        background: linear-gradient(165deg, #160e42 0%, #0a0622 100%) !important;
        z-index: 1010 !important;
        animation: none !important;
        opacity: 1 !important;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(-108%) !important;
        transition: transform 0.28s var(--ease-spring), visibility 0.28s ease !important;
        box-shadow: 24px 0 60px rgba(0, 0, 0, 0.82) !important;
    }

    .doc-sidebar.mobile-open {
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateX(0) !important;
    }

    .doc-sidebar-backdrop.mobile-open {
        display: block !important;
        position: fixed !important;
        inset: 0 !important;
        z-index: 1005 !important;
        background: rgba(6, 3, 20, 0.76) !important;
        backdrop-filter: blur(6px) !important;
        -webkit-backdrop-filter: blur(6px) !important;
    }
}


/* ---------- Phone Ergonomics Polish (<= 640px) ---------- */
@media (max-width: 640px) {
    /* Keep docs navbar clean on phones (Live Command Simulator is inside the drawer & footer) */
    .doc-navbar .nav-links {
        display: none !important;
    }

    .doc-page-wrap {
        padding: 78px 14px 56px;
    }

    .doc-hero-card {
        padding: 20px 16px;
        border-radius: 18px;
        margin-bottom: 18px;
    }

    .doc-hero-title {
        font-size: 26px;
    }

    .doc-hero-sub {
        font-size: 13.8px;
    }

    .doc-kbd {
        display: none;
    }

    .doc-hero-search-box {
        height: 48px;
        padding: 0 12px;
    }

    .doc-hero-search-box input,
    .doc-calc-field input {
        font-size: 16px;
    }

    .doc-quick-pills {
        width: 100%;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .doc-article code {
        word-break: break-word;
    }
    .doc-quick-pills::-webkit-scrollbar { display: none; }
    .doc-qpill { flex: 0 0 auto; }

    .doc-article {
        padding: 20px 16px;
        border-radius: 18px;
    }

    .doc-art-title {
        font-size: 24px;
    }

    .doc-article h2 {
        font-size: 18.5px;
    }

    .doc-step {
        padding: 14px;
        gap: 12px;
    }

    .doc-calc-card {
        padding: 16px;
    }

    .doc-top-btn {
        right: 14px;
        bottom: 18px;
        width: 42px;
        height: 42px;
    }

    .doc-toast {
        left: 14px;
        right: 14px;
        bottom: 16px;
        text-align: center;
    }
}
