/* Table — comparison table with an optional highlighted column.
 *
 * Structure:
 *   .section--table
 *   └─ .section--table__inner.container        (flex column)
 *      ├─ .section--table__header               (optional; heading + sub)
 *      ├─ .section--table__scroll               (overflow-x wrapper for narrow screens)
 *      │  └─ table.section--table__table
 *      │     ├─ thead: .__corner (empty) + .__col-head [.is-highlighted]
 *      │     │          └─ .__col-title / .__col-sub
 *      │     └─ tbody: .__row-label + .__cell [.is-highlighted]
 *      └─ .section--table__note                 (optional footnote)
 *
 * Columns are separated by a horizontal border-spacing gap, so row rules break
 * between columns. The highlighted column is a white raised card: rounded top
 * on its header cell, rounded bottom on its last body cell.
 */

.section--table__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* ─── Header ─── */
.section--table__header {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.section--table__heading {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--color-accent);
}
.section--table__sub {
    margin: 0;
    font-size: 1rem;
    line-height: 1.55;
    color: var(--color-muted);
    max-width: 60ch;
}

/* ─── Table ─── */
.section--table__scroll {
    overflow-x: auto;
}
.section--table__table {
    width: 100%;
    min-width: 640px;
    border-collapse: separate;
    border-spacing: var(--space-3) 0;
    color: var(--color-fg);
}

.section--table__corner { width: 34%; }

.section--table__col-head {
    padding: var(--space-5) var(--space-4) var(--space-4);
    text-align: center;
    vertical-align: bottom;
    font-weight: 600;
}
.section--table__col-title {
    display: block;
    font-size: 1.125rem;
    line-height: 1.3;
    color: var(--color-fg);
}
.section--table__col-sub {
    display: block;
    margin-top: var(--space-1);
    font-size: 0.875rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--color-muted);
}

.section--table__row-label,
.section--table__cell {
    padding: var(--space-4);
    border-top: 1px solid var(--color-line);
    line-height: 1.4;
    vertical-align: middle;
}
.section--table__row-label {
    text-align: left;
    font-weight: 600;
    padding-inline: var(--space-5);
}
.section--table__cell {
    text-align: center;
    font-weight: 600;
}
.section--table__table tbody tr:last-child .section--table__row-label,
.section--table__table tbody tr:last-child .section--table__cell {
    /* Closing rule under the last row, same as the rules between rows. */
    border-bottom: 1px solid var(--color-line);
}

/* ─── Highlighted column ─── */
.section--table__col-head.is-highlighted,
.section--table__cell.is-highlighted {
    background: var(--color-surface);
}
.section--table__col-head.is-highlighted {
    border-radius: 20px 20px 0 0;
}
.section--table__table tbody tr:last-child .section--table__cell.is-highlighted {
    border-radius: 0 0 20px 20px;
}

.section--table__note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--color-muted);
}

/* ─── Responsive ─── */
@media (max-width: 720px) {
    .section--table__inner { gap: var(--space-4); }
    .section--table__col-head,
    .section--table__row-label,
    .section--table__cell { padding: var(--space-3); }
    .section--table__row-label { padding-inline: var(--space-3); min-width: 9rem; }
}
