/* ============================================
   Table Slap — Sleek, minimal TOC styling
   By StartupsNoFilter
   ============================================ */

.table-slap {
    box-sizing: border-box;
    background: #f4f6fa;
    border: 1px solid #e1e6ef;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13.5px;
    line-height: 1.5;
    color: #0f172a;
}

.table-slap *,
.table-slap *::before,
.table-slap *::after {
    box-sizing: border-box;
}

.table-slap-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    margin: 0 0 14px 0;
    padding: 0 0 10px 0;
    border-bottom: 1px solid #e1e6ef;
}

/* Default: 2-column masonry */
.table-slap-columns {
    column-count: 2;
    column-gap: 32px;
    margin: 0;
    padding: 0;
}

/* When only 1-2 H2 blocks: use single column to avoid empty space */
.table-slap-columns.table-slap-cols-1 {
    column-count: 1;
}

.table-slap-col {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    display: inline-block;
    width: 100%;
    margin: 0 0 10px 0;
}

/* H2 — primary heading link */
.table-slap-h2 {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    margin: 0 0 3px 0;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.table-slap-h2:hover,
.table-slap-h2:focus {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.table-slap-h2:hover .table-slap-num,
.table-slap-h2:focus .table-slap-num {
    color: #2563eb;
}

/* H2 number prefix (01, 02, 03...) */
.table-slap-num {
    color: #94a3b8;
    font-weight: 500;
    margin-right: 6px;
    font-variant-numeric: tabular-nums;
    transition: color 0.15s ease;
}

/* Sublist (H3s under H2) */
.table-slap-sublist {
    list-style: none;
    margin: 0 0 0 4px;
    padding: 0;
}

.table-slap-sublist > li {
    position: relative;
    padding: 0 0 0 14px;
    margin: 0;
    list-style: none;
    line-height: 1.35;
}

.table-slap-sublist > li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 8px;
    width: 3px;
    height: 3px;
    background: #94a3b8;
    border-radius: 50%;
}

/* Link styling — no underlines except on hover */
.table-slap-link {
    display: inline-block;
    font-size: 13px;
    color: #475569;
    text-decoration: none;
    line-height: 1.35;
    transition: color 0.15s ease;
}

.table-slap-link:hover,
.table-slap-link:focus {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Nested list (H4s under H3) */
.table-slap-nested {
    list-style: none;
    margin: 0;
    padding: 0;
}

.table-slap-nested li {
    position: relative;
    padding: 0 0 0 14px;
    margin: 0;
    list-style: none;
    line-height: 1.35;
}

.table-slap-nested li::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 9px;
    width: 5px;
    height: 1px;
    background: #cbd5e1;
}

.table-slap-link-4 {
    font-size: 12.5px;
    color: #64748b;
}

/* Tablet */
@media (max-width: 900px) {
    .table-slap {
        padding: 16px 18px;
    }
    .table-slap-columns {
        column-gap: 24px;
    }
}

/* Mobile — single column */
@media (max-width: 600px) {
    .table-slap {
        padding: 16px 18px;
    }
    .table-slap-columns {
        column-count: 1;
        column-gap: 0;
    }
}
