/* ══════════════════════════════════════════════════════════════
   Algorithm / Proof Type Single Page — blockspot.io
   Scoped under .bs-ap-* prefix.
   Reuses .bs-bc-* classes from bs-blockchain-page.css for shared
   components (pills, stats, related cards, growth chart, nav).
   ══════════════════════════════════════════════════════════════ */

/* ── Header Section ── */
.bs-ap-header {
    margin: 0 0 28px;
}

.bs-ap-h1-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 8px;
}

.bs-ap-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    flex-shrink: 0;
    color: #3b82f6;
}

.bs-ap-header-icon svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.bs-ap-header-icon--placeholder {
    font-size: 16px;
    font-weight: 700;
    color: #6b6966;
    background: #f1f5f9;
}

.bs-ap-h1 {
    font-size: 26px;
    font-weight: 600;
    color: #111318;
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.bs-ap-subtitle {
    font-size: 15px;
    color: #6b6966;
    line-height: 1.6;
    max-width: 640px;
    margin: 0 0 20px;
}

/* ── Collapsible Description (inside .bs-bc-block card) ── */
.bs-ap-desc-wrap {
    margin-top: 14px;
    position: relative;
}

.bs-ap-desc-wrap--collapsed {
    max-height: 100px;
    overflow: hidden;
}

.bs-ap-desc-content {
    font-size: 14px;
    line-height: 1.75;
    color: #4b5563;
}

.bs-ap-desc-content p {
    margin: 0 0 10px;
}

.bs-ap-desc-content p:last-child {
    margin-bottom: 0;
}

.bs-ap-desc-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to bottom, rgba(248,250,252,0), #f8fafc);
    pointer-events: none;
}

.bs-ap-desc-wrap:not(.bs-ap-desc-wrap--collapsed) .bs-ap-desc-fade {
    display: none;
}

a.bs-ap-desc-toggle {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #3b82f6;
    text-decoration: none;
    cursor: pointer;
}

a.bs-ap-desc-toggle:hover {
    text-decoration: underline;
}

/* ── Related Icon (SVG inside card) ── */
.bs-ap-related-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-shrink: 0;
    color: #64748b;
}

.bs-ap-related-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* ── Cards Layout (2-column grid, matches blockchain page) ── */
.bs-ap-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 0 0 28px;
}

/* Single child in grid takes full width */
.bs-ap-cards > :only-child {
    grid-column: 1 / -1;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .bs-ap-header-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .bs-ap-header-icon svg {
        width: 18px;
        height: 18px;
    }

    .bs-ap-h1-row {
        gap: 10px;
    }

    .bs-ap-h1 {
        font-size: 22px;
    }

    .bs-ap-subtitle {
        font-size: 14px;
    }

    .bs-ap-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .bs-ap-related-icon {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }

    .bs-ap-related-icon svg {
        width: 16px;
        height: 16px;
    }
}
