/* ============================================================================
   Knowledge base layout — two column: contents rail + article
   Inherits every colour from styles.css :root. Scoped under .kb so nothing
   here can leak into the marketing pages.
   ============================================================================ */

.kb {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 24px 96px;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

/* ---- contents rail ---- */

.kb-rail {
    position: sticky;
    top: 104px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    padding-right: 8px;
}

.kb-rail-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 14px;
}

.kb-group {
    margin-bottom: 26px;
}

.kb-group-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.kb-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid var(--border);
}

.kb-links a {
    display: block;
    padding: 7px 0 7px 14px;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.12s ease, border-color 0.12s ease;
}

.kb-links a:hover {
    color: var(--text-primary);
    border-left-color: var(--border);
}

.kb-links a.is-current {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}

/* ---- article column ---- */

.kb-main {
    min-width: 0;
    max-width: 720px;
}

.kb-eyebrow {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 12px;
}

.kb-main h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 4.5vw, 2.6rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: var(--text-primary);
    text-wrap: balance;
}

.kb-lede {
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
    text-wrap: pretty;
}

.kb-main h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    letter-spacing: -0.01em;
    margin: 44px 0 14px;
    color: var(--text-primary);
    scroll-margin-top: 110px;
    text-wrap: balance;
}

.kb-main p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin: 0 0 18px;
    text-wrap: pretty;
}

.kb-main strong { color: var(--text-primary); font-weight: 600; }

.kb-main a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 245, 212, 0.3);
}
.kb-main a:hover { border-bottom-color: var(--accent); }

/* Callout for the statements that carry weight */
.kb-note {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 2px solid var(--accent);
    border-radius: 0 10px 10px 0;
    padding: 18px 22px;
    margin: 0 0 26px;
}
.kb-note p { margin: 0; }
.kb-note p + p { margin-top: 12px; }

/* ---- mobile: rail collapses above the content ---- */

@media (max-width: 900px) {
    .kb {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 96px;
    }
    .kb-rail {
        position: static;
        max-height: none;
        overflow: visible;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 16px 18px;
    }
    .kb-rail[hidden] { display: none; }
    .kb-rail-toggle {
        display: block;
        width: 100%;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--text-primary);
        font: inherit;
        font-weight: 600;
        text-align: left;
        padding: 14px 18px;
        margin-bottom: 12px;
        cursor: pointer;
    }
    .kb-group:last-child { margin-bottom: 0; }
}

@media (min-width: 901px) {
    .kb-rail-toggle { display: none; }
    .kb-rail[hidden] { display: block; }
}
