    .site-main { width: min(1440px, calc(100% - 1.5rem)); }

    /* Tighter margin on small phones so content-dense panels breathe */
    @media (max-width: 480px) {
        .site-main { width: calc(100% - 0.75rem); }
    }

    /* ── Layout: sidebar + content ── */
    .docs-layout {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
        padding-bottom: 2.3rem;
        align-items: start;
        min-width: 0; /* Critical for grid children not to overflow */
    }
    @media (max-width: 900px) {
        .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    }

    /* ── Sidebar ── */
    .docs-sidebar {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 6rem);
        overflow-y: auto;
        padding: 0.8rem 0;
        scrollbar-width: thin;
        scrollbar-color: rgba(26,26,26,0.3) transparent;
    }
    .docs-sidebar::-webkit-scrollbar { width: 3px; }
    .docs-sidebar::-webkit-scrollbar-thumb { background: rgba(26,26,26,0.3); border-radius: 2px; }

    @media (max-width: 900px) {
        .docs-sidebar {
            position: static;
            max-height: none;
            padding: 0;
            border-bottom: 1px solid var(--line);
            margin-bottom: 0.5rem;
        }
        .docs-sidebar-links {
            display: grid;
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 0.15rem 0.5rem;
            padding: 0.5rem 0.25rem 0.75rem;
        }
        .docs-sidebar.is-collapsed .docs-sidebar-links { display: none; }
        .docs-sidebar-title {
            grid-column: 1 / -1;
            padding: 0 0.25rem 0.06rem;
            margin-bottom: 0.3rem;
            font-size: clamp(1.05rem, 3.6vw, 1.28rem);
            line-height: 1.1;
        }
        .docs-nav-group {
            grid-column: 1 / -1;
        }
        .docs-sidebar-toggle {
            display: flex;
            align-items: center;
            justify-content: space-between;
            width: 100%;
            min-height: 44px;
            padding: 0.6rem 0.75rem;
            background: var(--surface);
            border: 1px solid var(--line);
            border-radius: 4px;
            color: var(--text-main);
            font-size: 0.8rem;
            font-weight: 600;
            font-family: inherit;
            cursor: pointer;
        }
        .docs-sidebar-toggle:hover { border-color: rgba(var(--accent-rgb), 0.3); }
        .docs-sidebar-toggle::after {
            content: '\25BC';
            font-size: 0.55rem;
            color: var(--text-soft);
            transition: transform 0.2s;
        }
        .docs-sidebar.is-collapsed .docs-sidebar-toggle::after { transform: rotate(-90deg); }
    }
    @media (min-width: 901px) {
        .docs-sidebar-toggle { display: none; }
    }

    .docs-sidebar-title {
        display: inline-block;
        width: fit-content;
        max-width: 100%;
        margin: 0 0 0.72rem;
        padding: 0 0.35rem 0.06rem 0.45rem;
        font-family: 'Space Grotesk', system-ui, sans-serif;
        font-size: clamp(1.06rem, 0.96rem + 0.38vw, 1.3rem);
        font-weight: 700;
        letter-spacing: -0.03em;
        color: var(--text-main);
        line-height: 1.08;
        border-bottom: 1px solid var(--line-strong);
        box-sizing: border-box;
    }

    .docs-nav-group { margin-bottom: 0.7rem; }
    .docs-nav-link {
        display: block;
        padding: 0.25rem 0.5rem 0.25rem 0.7rem;
        font-size: 0.72rem;
        color: var(--text-soft);
        text-decoration: none;
        border-left: 2px solid transparent;
        transition: color 0.12s, border-color 0.12s, background 0.12s;
        line-height: 1.4;
    }

    @media (min-width: 901px) and (hover: hover) and (pointer: fine) {
        .docs-nav-group {
            padding: 0.2rem 0;
        }
        .docs-sidebar-links .docs-nav-link {
            position: relative;
            transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
        }
        .docs-nav-link-inner {
            display: inline-block;
            position: relative;
            padding-bottom: 2px;
            transform: scale(1);
            transform-origin: left center;
            transition: transform 0.28s cubic-bezier(0.22, 1, 0.32, 1);
        }
        .docs-nav-link-inner::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            height: 1px;
            background: #000;
            transform: scaleX(0);
            transform-origin: left center;
            transition: transform 0.28s cubic-bezier(0.22, 1, 0.32, 1);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='0'] .docs-nav-link-inner {
            transform: scale(1.05);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='0'] .docs-nav-link-inner::after {
            transform: scaleX(1);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='1'] .docs-nav-link-inner {
            transform: scale(1.028);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='1'] .docs-nav-link-inner::after {
            transform: scaleX(0.7);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='2'] .docs-nav-link-inner {
            transform: scale(1.014);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='2'] .docs-nav-link-inner::after {
            transform: scaleX(0.45);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='3'] .docs-nav-link-inner {
            transform: scale(1.006);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='3'] .docs-nav-link-inner::after {
            transform: scaleX(0.25);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='4'] .docs-nav-link-inner::after {
            transform: scaleX(0.1);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near='5'] .docs-nav-link-inner::after {
            transform: scaleX(0);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .docs-nav-link-inner,
        .docs-nav-link-inner::after {
            transition-duration: 0.01ms;
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near] .docs-nav-link-inner {
            transform: scale(1);
        }
        .docs-sidebar-links .docs-nav-link[data-dg-near] .docs-nav-link-inner::after {
            transform: scaleX(0);
        }
    }
    .docs-nav-link.is-active {
        color: var(--text-main);
        border-left-color: transparent;
        font-weight: 600;
        background: rgba(var(--accent-rgb), 0.06);
    }
    @media (max-width: 900px) {
        .docs-nav-link {
            border-left: none;
            padding: 0.2rem 0.4rem;
            border-radius: 3px;
            font-size: 0.68rem;
        }
        .docs-nav-link.is-active { background: rgba(var(--accent-rgb), 0.1); }
        .docs-nav-group { margin-bottom: 0; }
    }

    .docs-nav-pill {
        font-size: 0.55rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 0.1rem 0.35rem;
        border-radius: 999px;
        background: var(--accent-dim);
        color: var(--accent-strong);
        margin-left: 0.3rem;
        vertical-align: middle;
    }

    /* ── Content ── */
    .docs-content {
        display: grid;
        gap: 2.3rem;
        min-width: 0;
    }

    .docs-panel {
        border-top: 1px solid var(--line);
        padding-top: 1.7rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    .docs-panel--framed {
        border: 1px solid var(--line);
        border-radius: 4px;
        padding: 1.4rem 1.3rem 1.5rem;
        background: var(--surface);
        margin-top: 1.2rem;
        max-width: 100%;
        box-sizing: border-box;
    }
    .docs-panel--framed > h3 {
        margin-top: 1.4rem;
        padding-top: 0.9rem;
        border-top: 1px solid var(--line);
    }
    .docs-panel--framed > h3:first-of-type {
        margin-top: 0.3rem;
        padding-top: 0;
        border-top: none;
    }

    .docs-code-block {
        margin: 0.5rem 0 0.9rem;
        padding: 0.9rem 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        background: #0d1117;
        color: #c8d1e0;
        border: 1px solid var(--line);
        border-radius: 4px;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.76rem;
        line-height: 1.62;
        white-space: pre;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        display: block;
        box-sizing: border-box;
        -webkit-overflow-scrolling: touch;
    }
    .docs-code-block code {
        display: block;
        width: max-content;
        min-width: 100%;
    }

    /* Syntax Highlighting */
    .docs-code-block .json-key { color: #89ddff; font-weight: 500; }
    .docs-code-block .json-string { color: #c3e88d; }
    .docs-code-block .json-number { color: #f78c6c; }
    .docs-code-block .json-boolean { color: #ff9cac; }
    .docs-code-block .json-null { color: #ff9cac; }
    .docs-code-block .json-bracket { color: #82aaff; }
    .docs-code-block .json-punct { color: #676e95; }

    /* JS / Python highlighting tokens */
    .docs-code-block .hl-keyword { color: #c792ea; font-weight: 500; }
    .docs-code-block .hl-string { color: #c3e88d; }
    .docs-code-block .hl-comment { color: #546e7a; font-style: italic; }
    .docs-code-block .hl-builtin { color: #ffcb6b; }
    .docs-code-block .hl-function { color: #82aaff; }
    .docs-code-block .hl-punct { color: #676e95; }

    .docs-hero {
        padding-top: clamp(2rem, 5vw, 4rem);
        border-top: none;
        position: relative;
        overflow: hidden;
    }

    .docs-kicker {
        margin: 0;
        font-family: 'IBM Plex Mono', monospace;
        text-transform: uppercase;
        letter-spacing: 0.16em;
        font-size: 0.68rem;
        color: var(--accent-strong);
        font-weight: 700;
    }

    .docs-title {
        margin: 0.6rem 0 0.6rem;
        font-family: 'Space Grotesk', system-ui, sans-serif;
        font-weight: 700;
        font-size: clamp(1.8rem, 4vw, 2.8rem);
        line-height: 1.1;
        letter-spacing: -0.02em;
        max-width: 22ch;
    }

    .docs-copy {
        margin: 0;
        color: var(--text-soft);
        font-size: 0.92rem;
        line-height: 1.7;
        max-width: 56ch;
    }

    .docs-section-kicker {
        margin: 0 0 0.3rem;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.16em;
        color: var(--accent-strong);
    }

    .docs-section-title {
        margin: 0 0 0.35rem;
        font-size: clamp(1.25rem, 3vw, 1.58rem);
        letter-spacing: -0.01em;
        color: var(--text-main);
    }

    #github-app > h2.docs-section-title:nth-of-type(2) {
        margin-top: 2.5rem;
    }

    .docs-merge-callout {
        margin-top: 1.75rem;
    }

    .docs-merge-faq .faq-question {
        padding-top: 1rem;
        padding-bottom: 1rem;
        font-size: 0.9rem;
    }

    .docs-merge-faq-summary {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem 0.65rem;
        flex: 1;
        min-width: 0;
    }

    .docs-merge-faq-pill {
        margin-left: 0;
        flex-shrink: 0;
        font-size: 0.68rem;
        padding: 0.2rem 0.55rem;
        letter-spacing: 0.07em;
    }

    .docs-merge-faq-title {
        flex: 1 1 12rem;
        min-width: 0;
        line-height: 1.35;
    }

    .docs-merge-faq .faq-answer .docs-section-sub {
        margin-top: 0;
    }
    .docs-merge-faq .faq-answer .docs-ol {
        margin-top: 0.35rem;
    }
    .docs-merge-faq .faq-answer .docs-body:last-child {
        margin-bottom: 0;
    }

    .docs-section-sub {
        margin: 0 0 1rem;
        color: var(--text-soft);
        font-size: 0.85rem;
        line-height: 1.55;
    }

    /* ── Flow steps ── */
    .docs-flow {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 1.2rem 0.5rem;
        flex-wrap: wrap;
    }
    .docs-flow-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.45rem;
        min-width: 5rem;
    }
    .docs-flow-icon {
        width: 2.5rem;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: 50%;
        color: var(--text-main);
        background: var(--surface);
        transition: border-color 0.15s ease, color 0.15s ease;
    }
    .docs-flow-item:hover .docs-flow-icon {
        border-color: var(--accent);
        color: var(--accent);
    }
    .docs-flow-label {
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--text-soft);
        text-align: center;
    }
    .docs-flow-arrow {
        color: var(--line-strong);
        font-size: 1rem;
        margin: 0 0.2rem;
    }
    @media (max-width: 520px) {
        .docs-flow { gap: 0.3rem; padding: 0.8rem 0; }
        .docs-flow-icon { width: 2rem; height: 2rem; }
        .docs-flow-icon svg { width: 16px; height: 16px; }
        .docs-flow-label { font-size: 0.65rem; }
        .docs-flow-arrow { font-size: 0.8rem; }
        .docs-flow-item { min-width: 3.5rem; }
    }

    /* ── Links & code ── */
    .docs-link {
        color: var(--accent-strong);
        text-decoration: none;
        border-bottom: 1px solid rgba(var(--accent-rgb), 0.3);
    }
    .docs-link:hover { color: var(--accent); }

    .docs-inline-code {
        font-family: 'IBM Plex Mono', monospace;
        background: var(--bg-alt);
        border: 1px solid var(--line);
        padding: 0.1rem 0.35rem;
        color: var(--accent-strong);
        font-size: 0.76rem;
        border-radius: 3px;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .docs-cli-lines {
        margin: 0.35rem 0 0.3rem;
        padding: 0;
        border: none;
        background: transparent;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.76rem;
        line-height: 1.65;
        color: var(--text-soft);
        white-space: pre;
        overflow-x: auto;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ── Code blocks ── */
    .docs-code-wrap { border: 1px solid var(--line-strong); background: #0d1117; border-radius: 3px; overflow: hidden; max-width: 100%; box-sizing: border-box; }
    .docs-code-wrap--spaced { margin-top: 0.8rem; }
    .docs-body--spaced { margin-top: 0.8rem; }
    .docs-ol {
        margin: 0.5rem 0 1rem;
        padding-left: 1.2rem;
        line-height: 1.8;
        font-size: 0.82rem;
        color: var(--text-soft);
    }
    .docs-ol li { margin-bottom: 0.2rem; }
    .docs-code-head {
        padding: 0.5rem 0.78rem;
        background: #0a1322;
        color: #9db0c8;
        border-bottom: 1px solid rgba(157, 176, 200, 0.25);
        font-size: 0.72rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.55rem;
    }
    .docs-code-file { display: inline-flex; align-items: center; font-family: 'IBM Plex Mono', monospace; }
    .docs-copy-btn {
        border: 1px solid rgba(157, 176, 200, 0.48);
        background: rgba(157, 176, 200, 0.1);
        color: #e4edf9;
        padding: 0.3rem 0.6rem;
        font-size: 0.69rem;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        display: inline-flex;
        align-items: center;
        gap: 0.32rem;
        cursor: pointer;
        border-radius: 3px;
        transition: background 0.15s ease, border-color 0.15s ease;
    }
    .docs-copy-btn:hover { background: rgba(157, 176, 200, 0.2); border-color: rgba(157, 176, 200, 0.7); }
    .docs-copy-btn.is-copied { background: var(--accent); border-color: rgba(var(--accent-rgb), 0.34); color: #ffffff; }
    .docs-copy-btn svg { width: 0.76rem; height: 0.76rem; }
    .docs-code-wrap pre {
        margin: 0;
        padding: 0.9rem;
        overflow-x: auto;
        color: #c8d1e0;
        font-size: 0.76rem;
        line-height: 1.62;
        font-family: 'IBM Plex Mono', monospace;
    }

    /* ── Tables ── */
    .docs-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; max-width: 100%; box-sizing: border-box; }
    .docs-table { width: 100%; border-collapse: collapse; }
    .docs-table th {
        text-align: left;
        padding: 0.7rem 0.8rem;
        font-size: 0.69rem;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--accent-strong);
        border-bottom: 1px solid var(--line);
        background: var(--bg-alt);
    }
    .docs-table td {
        border-bottom: 1px solid var(--line);
        padding: 0.7rem 0.8rem;
        color: var(--text-main);
        font-size: 0.8rem;
        line-height: 1.55;
        vertical-align: top;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .docs-table tr:last-child td { border-bottom: none; }

    /* ── Lists ── */
    .docs-list {
        list-style: none;
        margin: 0;
        padding: 0;
        color: var(--text-soft);
        font-size: 0.82rem;
        line-height: 1.65;
        display: grid;
        gap: 0.34rem;
    }
    .docs-list li { position: relative; padding-left: 1rem; }
    .docs-list li::before {
        content: '';
        position: absolute;
        left: 0.15rem;
        top: 0.55em;
        width: 0.34rem;
        height: 0.34rem;
        border-radius: 1px;
        background: var(--accent);
    }

    .docs-h3 {
        font-size: 0.88rem;
        font-weight: 700;
        color: var(--text-main);
        margin: 1rem 0 0.4rem;
    }
    .docs-body {
        font-size: 0.82rem;
        color: var(--text-soft);
        line-height: 1.65;
        margin: 0.3rem 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    .docs-body code {
        font-size: 0.78rem;
        padding: 0.1rem 0.3rem;
        background: var(--bg-alt);
        border: 1px solid var(--line-strong);
        color: var(--text-main);
    }
    .docs-cta-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        padding: 0.55rem 1.1rem;
        border-radius: 4px;
        background: var(--text-main);
        color: var(--bg);
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-decoration: none;
        border: 1px solid var(--text-main);
        transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
        max-width: 100%;
        box-sizing: border-box;
    }
    .docs-cta-btn:hover { opacity: 0.85; }
    .docs-cta-btn:active { opacity: 0.9; }
    .docs-cta-btn:focus-visible { outline: 2px solid var(--text-main); outline-offset: 2px; }

    .docs-cta-btn--accent {
        margin-top: 1rem;
        background: var(--accent);
        color: #fff;
        border-color: var(--accent);
    }
    .docs-cta-btn--accent:hover {
        opacity: 1;
        background: var(--accent-strong);
        border-color: var(--accent-strong);
    }
    .docs-cta-btn--accent:focus-visible {
        outline: 2px solid var(--accent-strong);
        outline-offset: 2px;
    }

    /* ── GitHub App features grid ── */
    .ghapp-features {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.5rem;
        max-width: 100%;
    }
    @media (max-width: 700px) { .ghapp-features { grid-template-columns: 1fr; } }
    .ghapp-feature {
        display: flex;
        align-items: flex-start;
        gap: 0.55rem;
        padding: 0.6rem 0.7rem;
        border: 1px solid var(--line);
        background: var(--surface);
        transition: border-color 0.15s;
    }
    .ghapp-feature:hover { border-color: rgba(var(--accent-rgb), 0.3); }
    .ghapp-feature-icon {
        width: 1.3rem;
        height: 1.3rem;
        flex-shrink: 0;
        color: var(--accent);
        margin-top: 0.1rem;
    }
    .ghapp-feature-icon svg { width: 100%; height: 100%; }
    .ghapp-feature strong {
        display: block;
        font-size: 0.78rem;
        color: var(--text-main);
        margin-bottom: 0.1rem;
    }
    .ghapp-feature span {
        font-size: 0.72rem;
        color: var(--text-soft);
        line-height: 1.5;
    }

    /* ── GitHub App pricing cards ── */
    .ghapp-pricing {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        margin-top: 0.5rem;
        max-width: 100%;
    }
    @media (max-width: 500px) { .ghapp-pricing { grid-template-columns: 1fr; } }
    .ghapp-price-card {
        padding: 0.7rem 0.85rem;
        border: 1px solid var(--line);
        background: var(--surface);
        display: flex;
        flex-direction: column;
        gap: 0.15rem;
    }
    .ghapp-price-label {
        font-size: 0.62rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-soft);
    }
    .ghapp-price-value {
        font-size: 1rem;
        font-weight: 800;
        color: var(--accent);
        letter-spacing: -0.02em;
    }
    .ghapp-price-detail {
        font-size: 0.72rem;
        color: var(--text-soft);
    }

    .docs-note {
        margin-top: 0.78rem;
        border-top: 1px solid var(--line);
        padding-top: 0.72rem;
        color: var(--text-soft);
        font-size: 0.82rem;
        line-height: 1.58;
    }
    .docs-note strong { color: var(--accent-strong); }

    /* ── Score bar ── */
    .docs-score-bar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        border: 1px solid var(--line);
        border-radius: 3px;
        overflow: hidden;
        margin-bottom: 1rem;
    }
    .docs-score-seg {
        padding: 0.7rem 0.65rem;
        border-right: 1px solid var(--line);
        text-align: center;
    }
    .docs-score-seg:last-child { border-right: none; }
    .docs-score-range {
        display: block;
        font-family: 'IBM Plex Mono', monospace;
        font-size: clamp(1.1rem, 2.5vw, 1.5rem);
        font-weight: 700;
        line-height: 1.1;
        margin-bottom: 0.25rem;
    }
    .docs-score-label {
        display: block;
        font-size: 0.68rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 0.15rem;
    }
    .docs-score-desc { display: block; font-size: 0.7rem; color: var(--text-soft); line-height: 1.4; }
    .docs-score-seg--clean .docs-score-range, .docs-score-seg--clean .docs-score-label { color: var(--accent-strong); }
    .docs-score-seg--note .docs-score-range, .docs-score-seg--note .docs-score-label { color: var(--text-soft); }
    .docs-score-seg--warn .docs-score-range, .docs-score-seg--warn .docs-score-label { color: var(--text-main); }
    .docs-score-seg--block .docs-score-range, .docs-score-seg--block .docs-score-label { color: #f85149; }

    /* ── Example output ── */
    .docs-example-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
    .docs-example-card { border: 1px solid var(--line); overflow: hidden; max-width: 100%; box-sizing: border-box; }
    .docs-example-bar {
        padding: 0.55rem 0.7rem;
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-size: 0.72rem;
        font-weight: 700;
        border-bottom: 1px solid var(--line);
    }
    .docs-example-bar--pass { color: #065f46; background: rgba(6, 95, 70, 0.05); }
    .docs-example-bar--warn { color: #9a3412; background: rgba(154, 52, 18, 0.05); }
    .docs-example-dot {
        width: 13px; height: 13px; border-radius: 50%;
        display: inline-flex; align-items: center; justify-content: center;
        font-size: 0.5rem; font-weight: 900; color: #fff; flex-shrink: 0;
    }
    .docs-example-dot--pass { background: #059669; }
    .docs-example-dot--warn { background: #ea580c; }
    .docs-example-dot--muted { background: var(--line-strong); }
    .docs-example-body { padding: 0.65rem 0.7rem; display: grid; gap: 0.35rem; }
    .docs-example-line {
        display: flex; align-items: center; gap: 0.35rem;
        font-size: 0.72rem; color: var(--text-soft);
    }
    .docs-example-line .docs-example-dot { width: 10px; height: 10px; font-size: 0.42rem; }
    .docs-example-pkg { font-weight: 600; color: var(--text-main); }
    .docs-example-score {
        margin-left: auto;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.66rem; font-weight: 600; white-space: nowrap;
    }
    .docs-example-score--green { color: #059669; }
    .docs-example-score--orange { color: #ea580c; }
    .docs-example-score--muted { color: var(--text-muted); }
    .docs-example-finding {
        padding: 0.5rem 0.7rem; border-top: 1px solid var(--line);
        background: var(--surface); font-size: 0.72rem; color: var(--text-soft); line-height: 1.5;
    }
    .docs-example-finding strong { color: #9a3412; }
    .docs-example-rec {
        padding: 0.45rem 0.7rem; border-top: 1px solid var(--line);
        font-size: 0.7rem; color: var(--text-soft); line-height: 1.45;
        background: rgba(var(--accent-rgb), 0.04);
    }

    /* ── Validation banner ── */
    .docs-validation-banner {
        display: flex;
        align-items: center;
        gap: 1.2rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        border: 1px solid var(--line);
        background: var(--bg-card, var(--surface));
        border-radius: 4px;
    }
    .docs-validation-stat {
        text-align: center;
        flex: 1;
    }
    .docs-validation-stat .val {
        font-family: 'IBM Plex Mono', monospace;
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--accent, #6ee7b7);
        line-height: 1;
    }
    .docs-validation-stat .lbl {
        display: block;
        font-size: 0.62rem;
        color: var(--text-soft);
        margin-top: 0.2rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }
    .docs-validation-note {
        font-size: 0.62rem;
        color: var(--text-soft);
        line-height: 1.4;
        max-width: 22rem;
        border-left: 1px solid var(--line);
        padding-left: 1rem;
    }

    /* ── Detector grid ── */
    .docs-detector-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        border: 1px solid var(--line);
    }
    .docs-detector {
        padding: 0.65rem 0.7rem;
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        position: relative;
    }
    .docs-detector:nth-child(3n) { border-right: none; }
    .docs-detector:nth-last-child(-n+3) { border-bottom: none; }
    .docs-detector h3 {
        margin: 0 0 0.15rem;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.76rem; font-weight: 600; color: var(--text-main);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .docs-detector p { margin: 0; font-size: 0.72rem; color: var(--text-soft); line-height: 1.45; }
    .det-badge {
        font-size: 0.56rem;
        font-weight: 500;
        padding: 0.1rem 0.35rem;
        border-radius: 3px;
        font-family: 'IBM Plex Mono', monospace;
        white-space: nowrap;
        letter-spacing: 0.02em;
    }
    .det-badge.green  { background: rgba(var(--accent-rgb), 0.1); color: var(--accent-strong); }
    .det-badge.blue   { background: rgba(37,99,235,0.1); color: #1e40af; }
    .det-badge.amber  { background: rgba(180,120,30,0.12); color: #92400e; }

    /* FAQ accordion styles live in partials/faq_css.html; docs FAQ
       markup now uses the shared .faq-item / .faq-question / .faq-answer
       classes driven by static/js/faq-accordion.js. */

    .docs-workflow-row .docs-code-wrap { margin: 0; display: flex; flex-direction: column; }
    .docs-workflow-row .docs-code-wrap pre { flex: 1; }

    /* ── Responsive ── */
    @media (max-width: 900px) {
        .docs-detector-grid { grid-template-columns: repeat(2, 1fr); }
        .docs-detector:nth-child(3n) { border-right: 1px solid var(--line); }
        .docs-detector:nth-child(2n) { border-right: none; }
        .docs-detector:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
        .docs-detector:nth-last-child(-n+2) { border-bottom: none; }
    }

    @media (max-width: 760px) {
        .docs-content { gap: 1.5rem; }
        .docs-panel { padding-top: 1.1rem; }
        .docs-hero { padding-top: 1.2rem; }
        .docs-section-sub { margin-bottom: 0.65rem; }
        .docs-section-title { font-size: clamp(1.1rem, 3vw, 1.58rem); }
        .docs-code-wrap pre { font-size: 0.7rem; padding: 0.65rem; }
        .docs-code-head { flex-wrap: wrap; }
        .docs-score-bar { grid-template-columns: repeat(2, 1fr); }
        .docs-score-seg { padding: 0.5rem; }
        .docs-score-seg:nth-child(2) { border-right: none; }
        .docs-score-seg:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); }
        .docs-score-seg:nth-last-child(-n+2) { border-bottom: none; }
        .docs-validation-banner { flex-wrap: wrap; gap: 0.6rem; padding: 0.6rem 0.8rem; }
        .docs-validation-note { border-left: none; padding-left: 0; border-top: 1px solid var(--line); padding-top: 0.5rem; max-width: none; }
        .docs-detector { padding: 0.5rem; }
        .docs-detector h3 { font-size: 0.72rem; }
        .docs-detector p { font-size: 0.68rem; }
        .det-badge { font-size: 0.52rem; }
        .docs-workflow-row { grid-template-columns: 1fr; }
        .docs-panel:nth-of-type(even) { padding-left: 0.5rem; padding-right: 0.5rem; }
    }

    @media (max-width: 640px) {
        .docs-layout,
        .docs-content,
        .docs-panel,
        .docs-panel--framed {
            min-width: 0;
            max-width: 100%;
        }
        .docs-panel--framed {
            overflow-x: clip;
        }
        .docs-code-block {
            margin-left: 0;
            margin-right: 0;
            width: 100%;
            max-width: 100%;
        }
        .docs-table thead { display: none; }
        .docs-table tr { display: block; border-bottom: 1px solid var(--line); padding: 0.6rem 0; width: 100%; box-sizing: border-box; }
        .docs-table tr:last-child { border-bottom: none; }
        .docs-table td { display: block; padding: 0.25rem 0.8rem; border-bottom: none; font-size: 0.78rem; width: 100%; box-sizing: border-box; }
        .docs-table td::before {
            content: attr(data-label);
            display: block; font-size: 0.65rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: 0.1em;
            color: var(--accent-strong); margin-bottom: 0.1rem;
        }
        /* Detector grid → 1 column on phones */
        .docs-detector-grid { grid-template-columns: 1fr; }
        .docs-detector, .docs-detector:nth-child(2n), .docs-detector:nth-child(3n) { border-right: none; }
        .docs-detector { border-bottom: 1px solid var(--line); }
        .docs-detector:last-child { border-bottom: none; }
    }

    /* Score bar → 1 column on very small screens */
    @media (max-width: 480px) {
        .docs-content { gap: 1.2rem; }
        .docs-panel { padding-top: 0.9rem; }
        .docs-hero { padding-top: 0.8rem; }
        .docs-section-kicker { font-size: 0.62rem; }
        .docs-section-sub { font-size: 0.78rem; }
        .docs-copy { font-size: 0.84rem; }
        .docs-title { font-size: clamp(1.4rem, 7vw, 1.85rem); max-width: none; }
        .docs-panel--framed { padding: 1rem 0.8rem 1.1rem; }
        .docs-score-bar { grid-template-columns: 1fr; }
        .docs-score-seg { border-right: none; border-bottom: 1px solid var(--line); }
        .docs-score-seg:last-child { border-bottom: none; }
        .docs-score-seg:nth-child(2) { border-right: none; }
        .ghapp-feature { padding: 0.45rem 0.5rem; }
        /* Sidebar link grid: single column at tightest widths */
        .docs-sidebar-links { grid-template-columns: 1fr; }
        .docs-panel:nth-of-type(even) { padding-left: 0.25rem; padding-right: 0.25rem; }
    }

    /* Validation banner → 2×2 grid + note below on small screens */
    @media (max-width: 520px) {
        .docs-validation-banner {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
            padding: 0.6rem;
        }
        .docs-validation-note {
            grid-column: 1 / -1;
            border-left: none;
            padding-left: 0;
            border-top: 1px solid var(--line);
            padding-top: 0.5rem;
            max-width: none;
        }
    }

    /* Inline code word-break on mobile */
    @media (max-width: 640px) {
        .docs-inline-code,
        .docs-cli-lines { word-break: break-all; }
        .docs-code-wrap pre { font-size: 0.68rem; padding: 0.55rem; -webkit-overflow-scrolling: touch; }
        .ghapp-feature { padding: 0.5rem; gap: 0.4rem; }
        .ghapp-feature strong { font-size: 0.74rem; }
        .ghapp-feature span { font-size: 0.68rem; }
    }

    /* ── Terminal widget ── */
    .docs-terminal {
        margin-top: 2rem;
        border: 1px solid #333;
        border-radius: 10px;
        overflow: hidden;
        background: #0d0d0d;
        box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.03);
    }
    .docs-term-bar {
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 11px 14px;
        background: #1a1a1a;
        border-bottom: 1px solid #2a2a2a;
        user-select: none;
    }
    .term-dot { width: 11px; height: 11px; border-radius: 50%; }
    .docs-term-prompt {
        color: #22c55e;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.82rem;
        font-weight: 700;
    }
    .docs-term-title {
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.72rem;
        color: #888;
    }
    .docs-term-body {
        padding: 0.85rem 1rem;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.73rem;
        line-height: 1.5;
        color: #ccc;
        position: relative;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: grid;
    }
    .term-phase {
        grid-area: 1 / 1;
        transition: opacity 0.35s ease;
    }
    .term-phase.is-hidden {
        opacity: 0;
        pointer-events: none;
    }

    .term-line {
        white-space: pre;
        overflow: hidden;
        text-overflow: ellipsis;
        opacity: 0;
        transform: translateY(3px);
        transition: opacity 0.22s ease, transform 0.22s ease;
    }
    .term-line.is-vis { opacity: 1; transform: translateY(0); }

    .term-box {
        border: 1px solid #444;
        border-radius: 8px;
        padding: 0.55rem 0.9rem;
        margin-bottom: 0.4rem;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #333 transparent;
        opacity: 0;
        transform: translateY(5px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    .term-box.is-vis { opacity: 1; transform: translateY(0); }
    .term-box::-webkit-scrollbar { height: 3px; }
    .term-box::-webkit-scrollbar-thumb { background: #333; border-radius: 2px; }

    .tc-g { color: #22c55e; }
    .tc-r { color: #f85149; }
    .tc-y { color: #eab308; }
    .tc-d { color: #555; }
    .tc-w { color: #fff; font-weight: 700; }

    .term-summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
    .term-braille { color: #fff; font-size: 0.65rem; line-height: 1.05; white-space: pre; opacity: 0.65; flex-shrink: 0; }
    .term-score-val { font-size: 1.3rem; font-weight: 700; }

    .term-pkg-row { display: flex; white-space: pre; }
    .term-pkg-score { margin-left: auto; padding-left: 1rem; }

    .term-status-bar {
        padding-top: 0.45rem;
        margin-top: 0.3rem;
        color: #555;
        font-size: 0.66rem;
        white-space: pre;
        border-top: 1px solid #333;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .term-status-bar.is-vis { opacity: 1; }

    .term-cursor { background: rgba(34, 197, 94, 0.08); }

    /* ── Hero background ── */
    .docs-hero::after {
        content: '';
        position: absolute;
        inset: 0;
        pointer-events: none;
        background-image: radial-gradient(circle, rgba(26,26,26,0.04) 1px, transparent 1px);
        background-size: 24px 24px;
    }

    /* ── Section panel depth ── */
    .docs-panel:nth-of-type(even) { border-radius: 3px; padding-left: 1rem; padding-right: 1rem; }

    /* ── Score bar enhancement ── */
    .docs-score-seg { transition: background 0.15s ease, transform 0.15s ease; }
    .docs-score-seg:hover { background: rgba(var(--accent-rgb), 0.04); }
    .docs-score-seg--clean { background: rgba(var(--accent-rgb), 0.03); }
    .docs-score-seg--block { background: rgba(248, 81, 73, 0.03); }

    .docs-validation-stat .val { font-size: 1.5rem; }

    /* ── Feature cards depth ── */
    .ghapp-feature {
        transition: border-color 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
    }
    .ghapp-feature:hover {
        border-color: rgba(var(--accent-rgb), 0.3);
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(26,26,26,0.08);
    }
    .ghapp-feature:hover .ghapp-feature-icon { color: var(--accent-strong); }
    .ghapp-feature-icon { transition: color 0.15s ease; }

    /* ── Pricing cards polish ── */
    .ghapp-price-card { transition: border-color 0.15s ease, transform 0.2s ease; }
    .ghapp-price-card:hover { border-color: rgba(var(--accent-rgb), 0.3); transform: translateY(-1px); }


    .docs-detector { transition: background 0.15s ease; }
    .docs-detector:hover { background: rgba(var(--accent-rgb), 0.03); }


    /* ── Notes accent ── */
    .docs-note {
        padding-left: 0;
    }



    /* ── Scroll reveal (removed — panels render immediately) ── */

    @media (max-width: 760px) {
        .docs-terminal { margin-top: 1.2rem; }
        .docs-term-body { font-size: 0.62rem; padding: 0.6rem 0.7rem; }
        .term-braille { display: none; }
        .docs-panel:nth-of-type(even) { padding-left: 0; padding-right: 0; }
    }

    @media (max-width: 480px) {
        .docs-terminal { margin-top: 0.8rem; border-radius: 8px; }
        .docs-term-body { font-size: 0.58rem; padding: 0.5rem 0.6rem; }
        .docs-term-bar { padding: 8px 10px; gap: 5px; }
        .term-dot { width: 9px; height: 9px; }
        .term-box { padding: 0.4rem 0.6rem; border-radius: 6px; }
        .term-score-val { font-size: 1.1rem; }
    }

    @media (prefers-reduced-motion: reduce) {
        .term-line, .term-box, .term-status-bar { transition: none !important; }
        .term-line, .term-box { opacity: 1 !important; transform: none !important; }
    }

    /* CLI Reference — heading + prose + code block, no card chrome.
       Mirrors GitHub CLI / Stripe CLI / Vercel CLI: monospace name
       and whitespace carry the visual identity. No boxes. */
    .cli-group-title {
        margin: 2rem 0 0.3rem;
        padding-bottom: 0.4rem;
        border-bottom: 1px solid var(--line);
        font-size: 1.0rem;
        font-weight: 600;
        color: var(--text-main);
        letter-spacing: 0.01em;
    }
    .cli-group-intro {
        margin: 0.45rem 0 1rem;
        color: var(--text-soft);
        font-size: 0.9rem;
        max-width: 60ch;
    }
    .cli-cmd {
        margin: 0;
        padding: 1.4rem 0 1.6rem;
        border-bottom: 1px solid var(--line);
    }
    .cli-cmd:last-child {
        border-bottom: none;
    }
    .cli-cmd-name {
        margin: 0 0 0.35rem;
        font-size: 0.98rem;
        font-weight: 600;
        color: var(--text-main);
    }
    .cli-cmd-name code {
        background: transparent;
        padding: 0;
        font-family: 'IBM Plex Mono', monospace;
        font-size: inherit;
        font-weight: 600;
        color: var(--text-main);
    }
    .cli-cmd-purpose {
        margin: 0 0 0.5rem;
        color: var(--text-main);
        font-size: 0.92rem;
        max-width: 64ch;
    }
    .cli-cmd-example {
        margin: 0.4rem 0;
        padding: 0.7rem 0.9rem;
        background: #0d1117;
        color: #c8d1e0;
        border-radius: 3px;
        overflow-x: auto;
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.82rem;
        line-height: 1.6;
    }
    .cli-cmd-flags {
        margin: 0.4rem 0 0;
        font-size: 0.85rem;
        color: var(--text-soft);
        max-width: 70ch;
    }
    .cli-cmd-flags code {
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.82rem;
        color: var(--text-soft);
        background: transparent;
        padding: 0;
    }
    .cli-flag-list {
        margin: 0.4rem 0 1.5rem;
        padding: 0;
        list-style: none;
    }
    .cli-flag-list li {
        margin: 0.7rem 0;
    }
    .cli-flag-list li > code {
        font-family: 'IBM Plex Mono', monospace;
        font-size: 0.85rem;
        color: var(--text-main);
        background: transparent;
        padding: 0;
        font-weight: 500;
    }
    .cli-flag-list .cli-flag-purpose {
        display: block;
        margin: 0.2rem 0 0;
        color: var(--text-soft);
        font-size: 0.88rem;
        max-width: 64ch;
    }
