/* Editorial table layout. Every rule is opt-in through #articles .article-table.
 * The surrounding article, its opening, and other site tables remain unchanged.
 * Opaque surfaces support horizontal sticky columns without text showing through.
 */
#articles .article-table {
    --article-table-ink: oklch(29% .102 254);
    --article-table-text: oklch(36% .024 247);
    --article-table-muted: oklch(47% .024 243);
    --article-table-paper: oklch(99.5% .002 230);
    --article-table-header: oklch(97% .012 230);
    --article-table-line: oklch(89% .012 230);
    --article-table-focus: oklch(49% .085 193);
    position: relative;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 28px 0;
    scroll-margin-top: 96px;
}

#articles .article-table .article-table__hint {
    display: none;
    margin: 0 0 10px;
    padding: 0;
    color: var(--article-table-muted);
    font-family: Poppins, Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

#articles .article-table .article-table__scroll {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    border: 1px solid var(--article-table-line);
    border-radius: 8px;
    background: var(--article-table-paper);
    scrollbar-color: var(--article-table-muted) var(--article-table-header);
    -webkit-overflow-scrolling: touch;
}

#articles .article-table .article-table__scroll:focus-visible,
#articles .article-table a:focus-visible {
    outline: 3px solid var(--article-table-focus) !important;
    outline-offset: 3px;
}

#articles .article-table .article-table__table {
    position: static;
    box-sizing: border-box;
    width: 100% !important;
    min-width: var(--article-table-min-width, 680px);
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: var(--article-table-text);
    font-family: Poppins, Arial, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    text-align: left;
}

/* Generated wrappers supply a width based on their actual number of columns.
 * Existing Kanban wrappers retain their approved defaults and column ratios.
 * Summaries keep one readable column, without a horizontal-scroll prompt.
 */
#articles .article-table.article-table--cols-1 .article-table__table {
    min-width: 0;
    table-layout: auto;
}

#articles .article-table.article-table--cols-1 .article-table__hint {
    display: none;
}

#articles .article-table.article-table--cols-1 .article-table__table tr > :first-child {
    position: static;
    inset: auto;
}

#articles .article-table.article-table--cols-2 .article-table__table {
    min-width: 420px;
}

#articles .article-table.article-table--wide .article-table__hint {
    display: block;
}

/* Override legacy cell floats, full-width cells, backgrounds and vertical stickiness. */
#articles .article-table .article-table__table th,
#articles .article-table .article-table__table td {
    display: table-cell;
    position: static;
    inset: auto;
    z-index: auto;
    box-sizing: border-box;
    float: none;
    width: auto;
    max-width: none;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--article-table-line);
    background: var(--article-table-paper) !important;
    color: var(--article-table-text);
    font: inherit;
    text-align: left;
    vertical-align: top;
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
}

#articles .article-table .article-table__table thead th {
    background: var(--article-table-header) !important;
    color: var(--article-table-ink);
    font-weight: 600;
    line-height: 1.45;
    text-transform: none;
}

#articles .article-table .article-table__table tbody th[scope="row"] {
    color: var(--article-table-ink);
    font-weight: 600;
}

#articles .article-table .article-table__table th strong {
    font-weight: inherit !important;
}

#articles .article-table .article-table__table tbody tr:last-child > th,
#articles .article-table .article-table__table tbody tr:last-child > td {
    border-bottom: 0;
}

#articles .article-table .article-table__table p {
    margin: 0;
    font: inherit;
}

#articles .article-table .article-table__table p + p {
    margin-top: 8px;
}

#articles .article-table .article-table__table a {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#articles .article-table .article-table__caption {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* Column widths belong to each comparison's content, not to individual brands. */
#articles .article-table.article-table--metrics col:nth-child(1) { width: 20%; }
#articles .article-table.article-table--metrics col:nth-child(2) { width: 25%; }
#articles .article-table.article-table--metrics col:nth-child(3) { width: 20%; }
#articles .article-table.article-table--metrics col:nth-child(4) { width: 35%; }

#articles .article-table.article-table--methods col:nth-child(1) { width: 24%; }
#articles .article-table.article-table--methods col:nth-child(2) { width: 25.33%; }
#articles .article-table.article-table--methods col:nth-child(3) { width: 25.33%; }
#articles .article-table.article-table--methods col:nth-child(4) { width: 25.34%; }

#articles .article-table.article-table--tools .article-table__table { min-width: 800px; }
#articles .article-table.article-table--tools .article-table__table th,
#articles .article-table.article-table--tools .article-table__table td { padding-inline: 12px; }
#articles .article-table.article-table--tools col:nth-child(1) { width: 16%; }
#articles .article-table.article-table--tools col:nth-child(2) { width: 19%; }
#articles .article-table.article-table--tools col:nth-child(3) { width: 15%; }
#articles .article-table.article-table--tools col:nth-child(4) { width: 12%; }
#articles .article-table.article-table--tools col:nth-child(5) { width: 12%; }
#articles .article-table.article-table--tools col:nth-child(6) { width: 26%; }

/* Keep row context on wider screens. Narrow phones retain their full scroll area. */
@media (min-width: 480px) {
    #articles .article-table .article-table__table tr > :first-child {
        position: sticky;
        top: auto;
        bottom: auto;
        left: 0;
        right: auto;
        z-index: 1;
        background: var(--article-table-paper) !important;
    }

    #articles .article-table .article-table__table thead tr > :first-child {
        z-index: 2;
        background: var(--article-table-header) !important;
    }
}

@media (max-width: 991px) {
    #articles .article-table .article-table__hint {
        display: block;
    }
}

@media (max-width: 767px) {
    #articles .article-table .article-table__table {
        font-size: 14px;
    }
}

@media print {
    #articles .article-table .article-table__hint,
    #articles .article-table.article-table--wide .article-table__hint {
        display: none;
    }

    #articles .article-table .article-table__scroll {
        overflow: visible;
    }

    #articles .article-table .article-table__table,
    #articles .article-table.article-table--tools .article-table__table,
    #articles .article-table.article-table--cols-1 .article-table__table,
    #articles .article-table.article-table--cols-2 .article-table__table {
        min-width: 0;
    }

    #articles .article-table .article-table__table tr > :first-child {
        position: static;
        inset: auto;
        z-index: auto;
    }
}
