/* Comparison pages (/compare, /compare/<name>), built by scripts/build-compare-pages.mjs.
   Plain facts in tables and lists: written to be read, checked and quoted. */

.compare-page { padding-top: clamp(7rem, 14vw, 10rem); }

.compare-crumbs {
    margin-bottom: 1.25rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(156, 163, 175, 0.9);
}
.compare-crumbs a { color: #05c7bb; }
.compare-crumbs a:hover { color: #fff; }

.compare-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    letter-spacing: -0.03em;
    line-height: 1.06;
    margin-bottom: 1.5rem;
}
.compare-answer {
    max-width: 46rem;
    font-size: 1.1875rem;
    line-height: 1.7;
    color: rgba(229, 231, 235, 0.92);
}
.compare-asof {
    margin-top: 1.25rem;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(156, 163, 175, 0.9);
}
.compare-asof a { color: #05c7bb; }

/* A wide table scrolls inside its own frame, never the page. */
.compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
    line-height: 1.6;
}
.compare-table th,
.compare-table td {
    padding: 0.9rem 1rem 0.9rem 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.compare-table thead th {
    padding-top: 0;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.16);
}
.compare-table tbody th {
    width: 22%;
    min-width: 9rem;
    font-weight: 600;
    color: #fff;
}
.compare-table td { color: rgba(209, 213, 219, 0.9); min-width: 12rem; }
.compare-table sup { margin-left: 0.15rem; font-size: 0.7em; }
.compare-table sup a { color: #05c7bb; }

.compare-matrix td,
.compare-matrix thead th { min-width: 8.5rem; }
.compare-matrix thead th a { color: #fff; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(5, 199, 187, 0.6); }

.compare-split {
    display: grid;
    gap: 2.5rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.compare-split h3 { margin-bottom: 1rem; font-size: 1.25rem; font-weight: 700; color: #fff; }
.compare-list { margin: 0; padding: 0; list-style: none; }
.compare-list li {
    padding: 0.85rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    line-height: 1.65;
    color: rgba(209, 213, 219, 0.9);
}

.compare-fit {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}
.compare-fit > div {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    line-height: 1.65;
    color: rgba(209, 213, 219, 0.9);
}
.compare-fit h3 { margin-bottom: 0.6rem; font-size: 1.0625rem; font-weight: 700; color: #fff; }

.compare-cards {
    display: grid;
    gap: 1.25rem;
    /* auto-fill: a group with one comparison keeps a card's width. */
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    margin: 0 0 3rem;
    padding: 0;
    list-style: none;
}
.compare-cards a {
    display: block;
    height: 100%;
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(209, 213, 219, 0.9);
    line-height: 1.6;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.compare-cards a:hover,
.compare-cards a:focus-visible { border-color: rgba(5, 199, 187, 0.5); background: rgba(255, 255, 255, 0.03); }
.compare-cards strong { display: block; margin-bottom: 0.4rem; font-size: 1.0625rem; color: #fff; }
.compare-cards span { display: block; margin-top: 0.75rem; font-size: 0.875rem; color: #05c7bb; }
.compare-group { margin-bottom: 1rem; font-size: 1.25rem; font-weight: 700; color: #fff; }

.compare-sources {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(209, 213, 219, 0.8);
}
.compare-sources li { padding: 0.25rem 0; }
.compare-sources a,
.compare-note a,
.compare-more a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(5, 199, 187, 0.6);
    overflow-wrap: anywhere;
}
.compare-note {
    margin-top: 1.5rem;
    max-width: 46rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(156, 163, 175, 0.95);
}
.compare-more { line-height: 1.9; color: rgba(209, 213, 219, 0.85); }

/* The companies that offer a compared category, each with its own sources. */
.compare-providers {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}
.compare-providers > li {
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    line-height: 1.65;
    color: rgba(209, 213, 219, 0.9);
}
.compare-providers h3 { margin-bottom: 0.6rem; font-size: 1.125rem; font-weight: 700; color: #fff; }
.compare-providers ul { margin: 1rem 0 0; padding-left: 1.1rem; list-style: disc; }
.compare-providers ul li { padding: 0.2rem 0; }
.compare-providers sup { margin-left: 0.15rem; font-size: 0.7em; }
.compare-providers sup a { color: #05c7bb; }

/* Phones: each row stacks (topic, then both answers, each labelled) so neither
   side hides off-screen. The overview matrix keeps its sideways scroll. */
@media (max-width: 640px) {
    .compare-table:not(.compare-matrix) thead { display: none; }
    .compare-table:not(.compare-matrix) tr,
    .compare-table:not(.compare-matrix) th,
    .compare-table:not(.compare-matrix) td { display: block; width: 100%; min-width: 0; }
    .compare-table:not(.compare-matrix) tr { padding: 0.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
    .compare-table:not(.compare-matrix) th,
    .compare-table:not(.compare-matrix) td { padding: 0.25rem 0; border-bottom: 0; }
    .compare-table:not(.compare-matrix) td::before {
        content: attr(data-col);
        display: block;
        font-family: 'JetBrains Mono', ui-monospace, monospace;
        font-size: 11px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #05c7bb;
    }
}
