/* JexMac — help / knowledge base page */

.kb-page section {
    padding: 100px 0;
}

.kb-page section.kb-hero,
.kb-page section.kb-channels {
    padding: 0;
}

/* Hero — split layout: copy left, search dock right */
.kb-hero {
    position: relative;
    overflow: hidden;
}

.kb-hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
    padding-top: 148px;
    padding-bottom: 64px;
}

.kb-hero__glow {
    position: absolute;
    top: 30%;
    left: 28%;
    transform: translate(-50%, -50%);
    width: 720px;
    height: 480px;
    background: radial-gradient(ellipse, rgba(0, 240, 255, 0.1) 0%, rgba(138, 43, 226, 0.08) 45%, transparent 70%);
    filter: blur(70px);
    pointer-events: none;
}

.kb-hero-main {
    text-align: left;
}

.kb-crumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.kb-crumb a {
    color: rgba(0, 240, 255, 0.75);
    transition: color 0.25s;
}

.kb-crumb a:hover {
    color: var(--neon-blue);
}

.kb-crumb-current {
    color: rgba(255, 255, 255, 0.55);
}

.kb-hero-kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid rgba(0, 240, 255, 0.28);
    background: rgba(0, 240, 255, 0.06);
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--neon-blue);
}

.kb-hero h1 {
    font-family: var(--font-tech);
    font-size: clamp(2rem, 3.8vw, 3.2rem);
    font-weight: 800;
    line-height: 1.18;
    color: #fff;
    letter-spacing: 0.3px;
    margin-bottom: 18px;
    max-width: 16em;
}

.kb-hero-lead {
    max-width: 560px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.kb-hero-lead a {
    color: var(--neon-blue);
}

.kb-hero-lead a:hover {
    text-decoration: underline;
}

/* Search dock panel */
.kb-hero-dock {
    padding: 28px 26px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.22);
    background: linear-gradient(160deg, rgba(13, 19, 36, 0.92), rgba(5, 9, 20, 0.88));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kb-dock-label {
    margin-bottom: 14px;
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.9);
}

.kb-search-wrap {
    position: relative;
}

.kb-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 240, 255, 0.55);
    pointer-events: none;
}

.kb-search-input {
    width: 100%;
    padding: 15px 18px 15px 46px;
    border-radius: 10px;
    border: 1px solid rgba(0, 240, 255, 0.22);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.kb-search-input::placeholder {
    color: rgba(148, 163, 184, 0.65);
}

.kb-search-input:focus {
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

.kb-search-hint {
    margin-top: 10px;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: rgba(148, 163, 184, 0.75);
}

.kb-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.kb-hero-stats li {
    padding: 14px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.28);
    text-align: center;
}

.kb-hero-stats strong {
    display: block;
    margin-bottom: 4px;
    font-family: var(--font-tech);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--neon-blue);
    letter-spacing: 0.04em;
}

.kb-hero-stats span {
    font-size: 0.72rem;
    color: rgba(148, 163, 184, 0.85);
    line-height: 1.35;
}

/* Support channels */
.kb-channels .container {
    padding-bottom: 48px;
}

.kb-channel-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.kb-channel-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 24px;
    border-radius: 16px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    background: var(--bg-panel);
    backdrop-filter: blur(12px);
    transition: border-color 0.3s, transform 0.3s;
}

.kb-channel-card:hover {
    border-color: rgba(0, 240, 255, 0.35);
    transform: translateY(-3px);
}

.kb-channel-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.08);
    color: var(--neon-blue);
    margin-bottom: 4px;
}

.kb-channel-card h2 {
    font-family: var(--font-tech);
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: 0.5px;
}

.kb-channel-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
}

.kb-channel-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--neon-blue);
    transition: gap 0.25s;
}

.kb-channel-action:hover {
    gap: 10px;
}

/* Docs frame — stream layout + side rail */
.kb-body {
    padding-top: 48px;
    padding-bottom: 80px;
}

.kb-docs-frame {
    position: relative;
}

.kb-rail {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    background: rgba(5, 9, 20, 0.88);
    backdrop-filter: blur(12px);
}

.kb-rail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(148, 163, 184, 0.85);
    white-space: nowrap;
    transition: color 0.2s, background 0.2s;
}

.kb-rail-link:hover,
.kb-rail-link.is-active {
    color: #fff;
    background: rgba(0, 240, 255, 0.08);
}

.kb-rail-link.is-active .kb-rail-num {
    color: var(--neon-blue);
    border-color: rgba(0, 240, 255, 0.45);
}

.kb-rail-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: var(--font-tech);
    font-size: 0.68rem;
    color: rgba(148, 163, 184, 0.9);
}

.kb-rail-mobile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: fixed;
    top: 50%;
    right: max(16px, calc((100vw - min(100vw, var(--max-width))) / 2 + 24px));
    transform: translateY(-50%);
    z-index: 40;
    min-width: 108px;
    padding: 12px 10px;
    border-radius: 14px;
    border: 1px solid rgba(0, 240, 255, 0.16);
    background: rgba(5, 9, 20, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.kb-rail-mobile .kb-rail-link {
    display: block;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 240, 255, 0.12);
    background: rgba(0, 0, 0, 0.24);
    font-size: 0.76rem;
    line-height: 1.35;
    white-space: nowrap;
    text-align: left;
    font-family: var(--font-tech);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(148, 163, 184, 0.88);
    transition: color 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.kb-rail-mobile .kb-rail-link:hover {
    color: #fff;
    border-color: rgba(0, 240, 255, 0.32);
    background: rgba(0, 240, 255, 0.06);
}

.kb-rail-mobile .kb-rail-link.is-active {
    color: #fff;
    border-color: rgba(0, 240, 255, 0.55);
    background: rgba(0, 240, 255, 0.12);
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.12);
}

.kb-rail-mobile .kb-rail-num {
    display: none;
}

.kb-stream {
    max-width: 960px;
    min-width: 0;
}

.kb-pane {
    margin-bottom: 56px;
    padding-bottom: 56px;
    scroll-margin-top: calc(var(--header-height) + 24px);
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}

.kb-pane:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.kb-pane-head {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 20px;
    align-items: start;
    margin-bottom: 28px;
}

.kb-pane-num {
    font-family: var(--font-tech);
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    font-weight: 900;
    line-height: 1;
    color: rgba(0, 240, 255, 0.18);
    letter-spacing: -0.02em;
    user-select: none;
}

.kb-pane-tag {
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--neon-blue);
}

.kb-pane-title h2 {
    font-family: var(--font-tech);
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    color: #fff;
    letter-spacing: 0.4px;
    margin-bottom: 10px;
    line-height: 1.25;
}

.kb-pane-intro {
    max-width: 620px;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.kb-pane-body {
    min-width: 0;
    max-width: 100%;
}

.kb-pane-body > * + * {
    margin-top: 24px;
}

/* Access tiles — 3-col icon cards */
.kb-tile-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.kb-tile {
    padding: 22px 18px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(13, 19, 36, 0.55);
    transition: border-color 0.25s, transform 0.25s;
}

.kb-tile:hover {
    border-color: rgba(0, 240, 255, 0.28);
    transform: translateY(-2px);
}

.kb-tile-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 10px;
    background: rgba(0, 240, 255, 0.08);
    color: var(--neon-blue);
}

.kb-tile-code {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-code);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: rgba(0, 240, 255, 0.75);
}

.kb-tile h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.kb-tile p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Onboard — horizontal flow track */
.kb-flow-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}

.kb-flow-track::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.05), rgba(0, 240, 255, 0.35), rgba(0, 240, 255, 0.05));
    pointer-events: none;
}

.kb-flow-node {
    position: relative;
    padding: 0 12px;
    text-align: center;
}

.kb-flow-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    border-radius: 50%;
    border: 2px solid rgba(0, 240, 255, 0.4);
    background: var(--bg-dark);
    font-family: var(--font-tech);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--neon-blue);
}

.kb-flow-node h3 {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 8px;
}

.kb-flow-node p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.65;
}

.kb-flow-node a {
    color: var(--neon-blue);
}

/* Spec — horizontal scroll rail */
.kb-spec-rail {
    display: flex;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 240, 255, 0.25) transparent;
    padding-bottom: 4px;
}

.kb-spec-chip {
    flex: 0 0 auto;
    min-width: 132px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(0, 0, 0, 0.3);
}

.kb-spec-key {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(148, 163, 184, 0.75);
    margin-bottom: 4px;
}

.kb-spec-val {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

/* FAQ — two-column grid */
.kb-qa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-items: start;
}

.kb-qa-grid.kb-accordion {
    display: grid;
}

.kb-accordion-item.is-open:has(.kb-price-table),
.kb-accordion-item.is-open:has(.kb-node-picks),
.kb-accordion-item.is-open:has(ol),
.kb-accordion-item.is-open:has(ul) {
    grid-column: 1 / -1;
}

.kb-accordion-item {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(13, 19, 36, 0.45);
    overflow: hidden;
    transition: border-color 0.25s;
}

.kb-accordion-item.is-open {
    border-color: rgba(0, 240, 255, 0.25);
}

.kb-accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 22px;
    border: none;
    background: transparent;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s;
}

.kb-accordion-trigger:hover {
    color: var(--neon-blue);
}

.kb-accordion-trigger svg {
    flex-shrink: 0;
    transition: transform 0.3s;
    color: var(--text-muted);
}

.kb-accordion-item.is-open .kb-accordion-trigger svg {
    transform: rotate(180deg);
    color: var(--neon-blue);
}

.kb-accordion-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.kb-accordion-body {
    padding: 0 22px 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.75;
}

.kb-accordion-body a {
    color: var(--neon-blue);
}

.kb-accordion-body a:hover {
    text-decoration: underline;
}

.kb-accordion-body strong {
    color: var(--text-main);
}

.kb-accordion-body ul,
.kb-accordion-body ol {
    margin: 10px 0 10px 20px;
}

.kb-accordion-body li {
    margin-bottom: 6px;
}

.kb-node-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.kb-node-pick {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.kb-node-pick strong {
    display: block;
    margin-bottom: 4px;
    font-size: 0.88rem;
}

.kb-node-pick span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.kb-code {
    display: inline-block;
    margin: 8px 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 240, 255, 0.15);
    font-family: var(--font-code);
    font-size: 0.82rem;
    color: var(--neon-blue);
    word-break: break-all;
}

.kb-price-table {
    width: 100%;
    margin: 12px 0;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.kb-price-table th,
.kb-price-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.kb-price-table th.num,
.kb-price-table td.num {
    text-align: right;
    font-family: var(--font-code);
}

.kb-price-table thead th {
    color: rgba(148, 163, 184, 0.85);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kb-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 240, 255, 0.12);
    font-size: 0.72rem;
    color: var(--neon-blue);
    vertical-align: middle;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* CTA */
.kb-cta {
    padding-bottom: 120px;
}

.kb-cta-panel {
    text-align: center;
    padding: 56px 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    background: linear-gradient(145deg, rgba(13, 19, 36, 0.85), rgba(5, 9, 20, 0.95));
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.06);
}

.kb-cta-panel h2 {
    font-family: var(--font-tech);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: #fff;
    margin-bottom: 14px;
}

.kb-cta-panel p {
    max-width: 520px;
    margin: 0 auto 28px;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.kb-cta-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
}

.kb-cta-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    max-width: 100%;
    line-height: 1.35;
}

.kb-page .btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.kb-page .btn-secondary:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

/* Reveal */
.kb-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.kb-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1280px) {
    .kb-stream {
        max-width: none;
    }
}

@media (max-width: 960px) {
    .kb-rail-mobile {
        right: max(12px, calc((100vw - min(100vw, var(--max-width))) / 2 + 12px));
        min-width: 0;
        width: 52px;
        padding: 8px 4px;
        border-radius: 12px;
        border-right: 1px solid rgba(0, 240, 255, 0.16);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    }

    .kb-rail-mobile .kb-rail-link {
        padding: 7px 3px;
        font-size: 0.62rem;
        line-height: 1.25;
        text-align: center;
        white-space: normal;
        word-break: break-all;
    }

    .kb-pane {
        scroll-margin-top: calc(var(--header-height) + 16px);
    }

    .kb-hero-split {
        grid-template-columns: 1fr;
        padding-top: 132px;
        padding-bottom: 48px;
    }

    .kb-hero h1 {
        max-width: none;
    }

    .kb-channel-grid {
        grid-template-columns: 1fr;
    }

    .kb-tile-row {
        grid-template-columns: 1fr;
    }

    .kb-flow-track {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .kb-flow-track::before {
        display: none;
    }

    .kb-flow-node {
        text-align: left;
        padding: 0;
    }

    .kb-qa-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .kb-rail-mobile {
        width: 48px;
        padding: 6px 3px;
    }

    .kb-rail-mobile .kb-rail-link {
        padding: 6px 2px;
        font-size: 0.58rem;
    }

    .kb-stream {
        padding-right: 52px;
    }

    .kb-hero-split {
        padding-top: 120px;
    }

    .kb-hero-dock {
        padding: 22px 18px;
    }

    .kb-hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .kb-pane-head {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kb-pane-num {
        font-size: 2rem;
    }

    .kb-accordion-trigger {
        font-size: 0.88rem;
        padding: 16px 18px;
    }

    .kb-cta-panel {
        padding: 40px 24px;
    }

    .kb-cta-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .kb-cta-actions .btn {
        width: 100%;
    }
}
