/* Wiki Contents / Table of Contents — clamp sizes как new_design */

.contents-section {
    margin: clamp(8px, 0.8vw, 16px) 0;
}

/* Legacy: header (replaced by wiki-collapsible) ── */
.contents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 0.55vw, 14px) clamp(12px, 1vw, 18px);
    background: linear-gradient(135deg, #5b6dd3, #6c63ff);
    cursor: pointer;
    user-select: none;
    transition: border-radius 0.2s ease 0s;
}

.contents-header h2 {
    margin: 0;
    padding: 0;
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
}

.contents-header h2::before {
    display: none;
}

.contents-toggle {
    display: flex;
    align-items: center;
    gap: clamp(4px, 0.35vw, 6px);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(11px, 0.75vw, 14px);
    font-weight: 500;
    cursor: pointer;
    padding: clamp(4px, 0.2vw, 8px) clamp(8px, 0.5vw, 12px);
    border-radius: clamp(4px, 0.3vw, 6px);
    transition: background 0.2s;
    font-family: inherit;
}

.contents-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.contents-toggle [data-lucide],
.contents-toggle .lucide-icon {
    width: clamp(14px, 0.85vw, 18px);
    height: clamp(14px, 0.85vw, 18px);
}

.contents-toggle [data-lucide] svg,
.contents-toggle .lucide-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.contents-table-wrap {
    max-height: 80vh;
    overflow-y: auto;
}

/* ── Table: 7% / 93% ── */
.contents-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.contents-table.is-hidden {
    display: none;
}

.contents-table tbody {
    background: #ffffff;
}

.contents-table tr {
    transition: background 0.15s ease;
}

.contents-table tr:hover {
    background: #f8f9fb;
}

.contents-table td {
    padding: clamp(4px, 0.32vw, 6px) clamp(8px, 0.75vw, 12px);
    border-top: 1px solid #e8eaef;
    border-right: 1px solid #e8eaef;
    font-size: clamp(14px, 1vw, 17px);
    vertical-align: middle;
}

.contents-table td:last-child {
    border-right: none;
}

.contents-table td:first-child {
    width: 7%;
    text-align: center;
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 700;
    color: #4f6ef7;
}

.contents-table td:last-child {
    width: 93%;
    text-align: left;
}

.contents-table tr.toc-h3 td:first-child {
    color: #a0a8b8;
    font-weight: 600;
}

.contents-item-btn {
    display: inline-block;
    width: 100%;
    text-align: left;
    padding: clamp(2px, 0.2vw, 4px) 0;
    font-size: clamp(14px, 1vw, 17px);
    font-weight: 400;
    color: #111318;
    background: transparent;
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}

.contents-item-btn:hover {
    color: #4f6ef7;
    background: transparent;
}

.contents-table tr.toc-h3 .contents-item-btn {
    font-size: clamp(14px, 1vw, 17px);
    color: #667085;
}

.contents-table tr.toc-h3 .contents-item-btn:hover {
    color: #4f6ef7;
}

