/* ============================
   GitBook/Laravel-style Docs UI
   ============================ */

:root {
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --soft: #f8fafc;
    --border: #e2e8f0;

    --primary: #6d28d9; /* adjust to your brand */
    --primary-2: #7c3aed;

    --radius: 14px;
    --shadow: 0 8px 30px rgba(2, 6, 23, 0.06);

    --sidebar-w: 290px;
    --toc-w: 260px;
    --topbar-h: 64px;

    --font:
        ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial,
        "Noto Sans", "Liberation Sans", sans-serif;
    --mono:
        ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    max-width: 100%;
}
body {
    margin: 0;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    overflow-x: clip;
}

/* Topbar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    min-width: 0;
    gap: 12px;
}
.topbar__left,
.topbar__right,
.brand,
.brand__text {
    min-width: 0;
}
.topbar__right {
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-weight: 800;
}
.brand__text small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.pill {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    background: var(--soft);
}

/* Search */
.search {
    position: relative;
    width: min(620px, 56vw);
}
.search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 12px 110px 12px 44px;
    outline: none;
    background: #fff;
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.03);
}
.search input:focus {
    border-color: rgba(109, 40, 217, 0.35);
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.12);
}
.search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--muted);
}
.kbd,
.kbdInline {
    font-family: var(--mono);
    font-size: 11px;
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 7px;
    background: var(--soft);
    color: var(--muted);
}
.kbdInline {
    margin: 0 4px;
}
.kbdPlus {
    color: var(--muted);
    margin: 0 6px;
    font-size: 12px;
}
.search .kbd,
.search .kbdPlus {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}
.search .kbd:nth-of-type(1) {
    right: 70px;
}
.search .kbdPlus {
    right: 58px;
}
.search .kbd:nth-of-type(2) {
    right: 28px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.btn--ghost {
    background: transparent;
}
.btn--primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: transparent;
    color: #fff;
}
.btn--block {
    width: 100%;
}

/* Layout */
.layout {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
    min-height: calc(100vh - var(--topbar-h));
    min-width: 0;
}

.sidebar {
    border-right: 1px solid var(--border);
    padding: 18px;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    background: #fff;
}
.sidebar__title {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 14px 0 8px;
}
.sidebar__section {
    margin-bottom: 10px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.nav__link {
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
}
.nav__link:hover {
    background: var(--soft);
    border-color: var(--border);
}
.nav__link.is-active {
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.22);
    color: #2e1065;
}

.sidebar__footer {
    margin-top: 18px;
}
.supportCard {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: var(--soft);
}
.supportCard__title {
    font-weight: 800;
    margin-bottom: 6px;
}
.supportCard__text {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

/* Main */
.main {
    padding: 24px 22px 40px;
    background: #fff;
    min-width: 0;
}

.docs-sidebar-note {
    margin-top: 18px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    background: var(--soft);
    font-size: 13px;
}
.docs-sidebar-note strong,
.docs-sidebar-note span { display: block; }
.docs-sidebar-note strong { margin-bottom: 4px; color: var(--text); }
.docs-internal-nav { border-top: 1px solid var(--border); padding-top: 8px; }

.docs-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 30px;
    border: 1px solid rgba(109, 40, 217, .2);
    border-radius: 20px;
    background: linear-gradient(135deg, #f5f3ff, #fff 64%);
}
.docs-hero::after {
    position: absolute;
    width: 180px;
    height: 180px;
    right: -58px;
    bottom: -74px;
    border: 28px solid rgba(124, 58, 237, .14);
    border-radius: 38px;
    content: '';
    transform: rotate(28deg);
}
.docs-hero > * { position: relative; z-index: 1; }
.docs-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    color: #5b21b6;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.docs-hero h1 { max-width: 720px; margin: 0 0 10px; font-size: clamp(32px, 5vw, 48px); }
.docs-hero .lead { max-width: 720px; margin-bottom: 0; }
.docs-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.docs-card {
    display: block;
    min-height: 150px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background: #fff;
    box-shadow: var(--shadow);
    text-decoration: none;
}
.docs-card:hover { border-color: rgba(109, 40, 217, .35); text-decoration: none; transform: translateY(-1px); }
.docs-card strong, .docs-card span { display: block; }
.docs-card strong { margin-bottom: 8px; font-size: 17px; }
.docs-card span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.docs-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    margin: 20px 0;
}
.docs-flow__step {
    position: relative;
    min-height: 110px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.docs-flow__step:not(:last-child)::after {
    position: absolute;
    z-index: 1;
    top: 50%;
    right: -8px;
    color: var(--primary);
    content: '→';
    font-size: 20px;
    transform: translateY(-50%);
}
.docs-flow__step strong, .docs-flow__step span { display: block; }
.docs-flow__step strong { margin-bottom: 6px; }
.docs-flow__step span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.docs-route-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.docs-route-table th, .docs-route-table td { padding: 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.docs-route-table th { color: var(--muted); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.docs-route-table code { white-space: normal; }
.docs-internal-banner {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    color: #78350f;
    background: #fffbeb;
}
.docs-internal-banner span { font-size: 14px; }
body[data-docs-audience="internal"] .docs-hero { border-color: rgba(245, 158, 11, .4); background: #fffbeb; }
.docs-archive-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 16px;
    align-items: center;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    color: #1e3a8a;
    background: #eff6ff;
}
.docs-archive-banner strong { grid-column: 1; }
.docs-archive-banner span { grid-column: 1; font-size: 14px; }
.docs-archive-banner a { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; }
.docs-menu-toggle,
.docs-nav-backdrop { display: none; }
.docs-search-results {
    position: absolute;
    z-index: 70;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.docs-search-results a { display: block; padding: 12px 14px; color: var(--text); text-decoration: none; }
.docs-search-results a + a { border-top: 1px solid var(--border); }
.docs-search-results a:hover { background: var(--soft); }
.docs-search-results strong,
.docs-search-results span { display: block; }
.docs-search-results strong { font-size: 14px; }
.docs-search-results span,
.docs-search-results p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.docs-search-results p { padding: 12px 14px; }
.content {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    min-width: 0;
}

.breadcrumbs {
    font-size: 13px;
    color: var(--muted);
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}
.breadcrumbs a {
    color: inherit;
    text-decoration: none;
}
.breadcrumbs a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 32px;
    margin: 10px 0 8px;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}
.lead {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 18px;
}

h2 {
    margin-top: 26px;
    padding-top: 10px;
    font-size: 22px;
    letter-spacing: -0.01em;
}
h3 {
    margin-top: 18px;
    font-size: 18px;
}
p {
    line-height: 1.8;
    color: var(--text);
    overflow-wrap: anywhere;
}
a {
    color: var(--primary);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
code,
pre,
.lx-route,
.lx-card-link,
.lx-module-card,
.lx-dev-note,
.lx-example,
.lx-faq-card {
    overflow-wrap: anywhere;
}

.grid2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 18px 0;
}
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    background: #fff;
    box-shadow: var(--shadow);
}
.card__title {
    font-weight: 800;
    margin-bottom: 10px;
}
.list {
    margin: 0;
    padding-left: 18px;
    color: var(--text);
}
.steps {
    margin: 0;
    padding-left: 18px;
}
.steps li {
    margin: 8px 0;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 22px 0;
}

/* Callouts */
.callout {
    border-radius: var(--radius);
    padding: 14px 14px;
    border: 1px solid var(--border);
    margin: 12px 0;
    background: var(--soft);
}
.callout--note {
    border-left: 5px solid #3b82f6;
}
.callout--tip {
    border-left: 5px solid #22c55e;
}
.callout--warn {
    border-left: 5px solid #f59e0b;
}

/* Code blocks */
/* =========================
   Inline code vs code blocks
   ========================= */

/* Inline code (default) */
:not(pre) > code {
    font-family: var(--mono);
    font-size: 0.92em;
    color: var(--text); /* dark readable text */
    background: var(--soft); /* light chip */
    border: 1px solid var(--border);
    padding: 2px 6px;
    border-radius: 8px;
    white-space: nowrap;
}

/* Code blocks */
pre {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    background: #0b1220;
    overflow: auto;
    box-shadow: var(--shadow);
}

/* Code inside pre should be light */
pre code {
    font-family: var(--mono);
    font-size: 13px;
    color: #e5e7eb;
    background: transparent;
    border: 0;
    padding: 0;
    white-space: pre; /* keep formatting */
}

/* IMPORTANT: remove/override the old global rule if it exists */
code {
    font-family: var(--mono);
}
.copyBtn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 12px;
    border-radius: 10px;
    padding: 6px 10px;
    cursor: pointer;
}
.copyBtn:hover {
    background: rgba(255, 255, 255, 0.14);
}

/* Pager */
.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}
.pager__next,
.pager__prev {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

/* TOC */
.toc {
    border-left: 1px solid var(--border);
    padding: 18px;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
    overflow: auto;
    background: #fff;
}
.toc__title {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 10px;
}
.toc__list a {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
}
.toc__list a:hover {
    background: var(--soft);
    border-color: var(--border);
    color: var(--text);
}
.toc__list a.is-active {
    color: #2e1065;
    background: rgba(109, 40, 217, 0.08);
    border-color: rgba(109, 40, 217, 0.22);
}

/* Responsive */
@media (max-width: 1100px) {
    :root {
        --toc-w: 0px;
    }
    .layout {
        grid-template-columns: var(--sidebar-w) 1fr;
    }
    .toc {
        display: none;
    }
}
@media (max-width: 860px) {
    :root {
        --sidebar-w: 0px;
    }
    .layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    .grid2 {
        grid-template-columns: 1fr;
    }
    .docs-card-grid,
    .docs-flow {
        grid-template-columns: 1fr;
    }
    .docs-flow__step:not(:last-child)::after {
        top: auto;
        right: auto;
        bottom: -18px;
        left: 50%;
        transform: translateX(-50%) rotate(90deg);
    }
    .search {
        width: min(92vw, 620px);
    }
    .topbar {
        padding: 0 12px;
    }
    .topbar__right .pill {
        max-width: 118px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .main {
        padding: 22px;
    }
}

/* Print */
@media print {
    .topbar,
    .sidebar,
    .toc,
    .pager,
    .copyBtn {
        display: none !important;
    }
    .main {
        padding: 0;
    }
    pre {
        background: #fff;
        color: #000;
    }
    code {
        color: #000;
    }
}
.muted {
    color: var(--muted);
}
.list li {
    margin: 8px 0;
    line-height: 1.7;
}

.media--window {
    max-width: 450px; /* Half size */
    margin: 30px auto;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.media--window img {
    width: 75%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
}

.media--window figcaption {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
}

/* ========================= */
/* Installation Step Panel   */
/* ========================= */

.doc-steps {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
}

.doc-steps__title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 18px;
    color: #111827;
}

.doc-steps__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-steps__list li {
    margin-bottom: 10px;
}

.doc-steps__list a {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    color: #374151;
    font-weight: 500;
    transition: 0.2s ease;
}

.doc-steps__list a:hover {
    background: #f3f4f6;
    color: #111827;
}

.doc-steps__list span {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 26px;
    height: 26px;
    margin-right: 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 50%;
    background: #3b82f6;
    color: #fff;
}
.doc-heading {
    font-size: 26px;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 14px;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
}
.media {
    max-width: 720px;
    margin: 24px auto;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.media img,
.media video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.media figcaption,
.media__caption {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
}
.callout {
    border-left: 4px solid #3b82f6;
    background: #eff6ff;
    padding: 14px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-size: 14px;
}

.callout--note {
    border-left-color: #10b981;
    background: #ecfdf5;
}

.callout--warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.callout--tip {
    border-left-color: #6366f1;
    background: #eef2ff;
}
.card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 22px;
    margin: 20px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.card__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
}

/* =========================
   LearnX AI Visual Guide
   ========================= */
.lx-doc-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(109, 40, 217, 0.18);
    border-radius: 18px;
    padding: 28px;
    margin: 18px 0 28px;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.36), transparent 28%),
        linear-gradient(135deg, #111827, #4c1d95 52%, #0f766e);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
}
.lx-doc-hero h1,
.lx-doc-hero p {
    color: inherit;
}
.lx-doc-hero .lead {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.86);
}
.lx-doc-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.lx-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #312e81;
    background: #eef2ff;
    border: 1px solid rgba(99, 102, 241, 0.22);
}
.lx-doc-hero .lx-badge {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
}
.lx-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.lx-metric {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.lx-metric strong {
    display: block;
    font-size: 24px;
    line-height: 1.1;
}
.lx-metric span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 5px;
}
.lx-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.lx-card-link {
    display: block;
    min-height: 128px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.lx-card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(109, 40, 217, 0.32);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}
.lx-card-link strong {
    display: block;
    margin-bottom: 8px;
}
.lx-card-link span {
    color: var(--muted);
    font-size: 13px;
}
.lx-screenshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}
.lx-shot {
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
    box-shadow: var(--shadow);
}
.lx-shot img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}
.lx-shot figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}
.lx-flow {
    margin: 20px 0;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
    box-shadow: var(--shadow);
}
.lx-flow img {
    width: 100%;
    height: auto;
    display: block;
}
.lx-manifest {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 16px 0;
}
.lx-manifest th,
.lx-manifest td {
    border: 1px solid var(--border);
    padding: 10px;
    text-align: left;
    vertical-align: top;
}
.lx-manifest th {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.lx-timeline {
    counter-reset: lxStep;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}
.lx-timeline li {
    position: relative;
    margin: 0 0 12px;
    padding: 14px 14px 14px 48px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
}
.lx-timeline li::before {
    counter-increment: lxStep;
    content: counter(lxStep);
    position: absolute;
    left: 14px;
    top: 14px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    font-size: 12px;
    font-weight: 800;
}
.lx-route {
    display: inline-flex;
    margin: 3px 0;
    padding: 4px 8px;
    border-radius: 8px;
    color: #075985;
    background: #e0f2fe;
    font-family: var(--mono);
    font-size: 12px;
}
.lx-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.lx-role-grid,
.lx-workflow-grid,
.lx-module-grid,
.lx-flow-grid,
.lx-note-split,
.lx-faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 18px 0;
}
.lx-module-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.lx-role-card,
.lx-workflow-card,
.lx-module-card,
.lx-faq-card {
    display: block;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow);
}
.lx-role-card strong,
.lx-workflow-card strong,
.lx-module-card strong,
.lx-faq-card strong {
    display: block;
    margin-bottom: 7px;
}
.lx-role-card span,
.lx-workflow-card span,
.lx-module-card span,
.lx-faq-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}
.lx-module-card {
    min-height: 174px;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.lx-module-card:hover {
    transform: translateY(-2px);
    border-color: rgba(109, 40, 217, 0.32);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}
.lx-flow-grid .lx-flow {
    margin: 0;
}
.lx-flow figcaption {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}
.lx-manifest-wrap {
    max-width: 100%;
    overflow: hidden;
}
.lx-proof-card,
.lx-dev-note,
.lx-example {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}
.lx-proof-card strong,
.lx-dev-note strong,
.lx-example strong {
    display: block;
    margin-bottom: 6px;
}
.lx-proof-card span,
.lx-dev-note span,
.lx-example span {
    color: var(--muted);
    font-size: 13px;
}
.lx-dev-note {
    border-color: rgba(109, 40, 217, 0.22);
    background: #faf5ff;
}
.lx-example {
    border-color: rgba(14, 165, 233, 0.24);
    background: #f0f9ff;
}
.lx-anchor-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}
.lx-anchor-list a {
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 10px;
    color: var(--text);
    background: #fff;
    font-size: 12px;
    text-decoration: none;
}
.lx-checklist {
    columns: 2;
    gap: 24px;
}
.lx-checklist li {
    break-inside: avoid;
}
@media (max-width: 960px) {
    .lx-metric-strip,
    .lx-card-grid,
    .lx-screenshot-grid,
    .lx-proof-grid,
    .lx-role-grid,
    .lx-workflow-grid,
    .lx-module-grid,
    .lx-flow-grid,
    .lx-note-split,
    .lx-faq-grid {
        grid-template-columns: 1fr;
    }
    .lx-checklist {
        columns: 1;
    }
}
@media (prefers-reduced-motion: reduce) {
    .lx-card-link,
    .lx-module-card {
        transition: none;
    }
    .lx-card-link:hover,
    .lx-module-card:hover {
        transform: none;
    }
}

.content code, .content pre { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }

@media (max-width: 860px) {
    .docs-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        padding: 0 10px;
        border: 1px solid var(--border);
        border-radius: 9px;
        color: var(--text);
        background: #fff;
        font: inherit;
        font-size: 13px;
        font-weight: 700;
    }
    .docs-nav-backdrop {
        position: fixed;
        z-index: 80;
        inset: 0;
        border: 0;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: opacity .18s ease;
    }
    .sidebar {
        display: block;
        position: fixed;
        z-index: 90;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(88vw, 330px);
        height: 100vh;
        padding-top: calc(var(--topbar-h) + 14px);
        box-shadow: 18px 0 50px rgba(15, 23, 42, .18);
        transform: translateX(-105%);
        transition: transform .18s ease;
    }
    body.docs-nav-open { overflow: hidden; }
    body.docs-nav-open .sidebar { transform: translateX(0); }
    body.docs-nav-open .docs-nav-backdrop { opacity: 1; pointer-events: auto; }
    .docs-archive-banner { grid-template-columns: 1fr; }
    .docs-archive-banner a { grid-column: 1; grid-row: auto; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .docs-nav-backdrop { transition: none; }
}
