/*
  The comparison pages (/vs and /vs/<app>), after site.css and sections.css: the hero with its breadcrumb, the side
  by side table (stacked into one card per row below 1024px, so nothing scrolls sideways on a phone), what each one
  costs with the break-even, who each one suits, the index's tiles and the sources in small type.
*/

/* ---------- the hero ---------- */
.vs-hero { padding: 40px 0 64px; }
@media (min-width: 960px) { .vs-hero { padding: 56px 0 88px; } }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 28px; padding: 0; list-style: none; font-size: 14px; color: var(--soft); }
.crumbs li + li::before { content: '/'; margin: 0 10px; color: color-mix(in srgb, var(--soft) 60%, transparent); }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.crumbs [aria-current] { color: var(--ink); }
.vs-hero h1 { max-width: 920px; margin-bottom: 22px; font-size: clamp(38px, 5.6vw, 64px); text-wrap: balance; }
.vs-summary { max-width: 780px; margin-bottom: 32px; color: var(--soft); font-size: 19px; }
@media (max-width: 520px) { .vs-summary { font-size: 17px; } .vs-hero .actions .btn { flex: 1 1 100%; } }

/* ---------- sections ---------- */
.vs-sec { padding: 88px 0; border-top: 1px solid var(--line); }
.vs-alt { background: var(--bg-2); }
.vs-head { max-width: 760px; margin-bottom: 36px; }
.vs-head h2 { margin-bottom: 14px; font-size: clamp(30px, 4vw, 44px); text-wrap: balance; }
.vs-head p:not(.eyebrow) { color: var(--soft); font-size: 17px; }
@media (max-width: 899px) { .vs-sec { padding: 64px 0; } .vs-head { margin-bottom: 28px; } }

/* a source's number after a fact: small, and a full-size target to tap */
.refs { position: relative; top: -0.4em; display: inline-flex; gap: 2px; line-height: 1; }
.ref { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: color-mix(in srgb, var(--sig) 16%, transparent); color: var(--accent); font-size: 11px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.ref:hover { background: var(--btn); color: var(--on-btn); }

/* ---------- side by side ---------- */
.cmp-box { border-radius: 18px; background: var(--bg); border: 1px solid var(--line); box-shadow: 0 24px 50px -36px var(--shadow); }
.cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 15px; line-height: 1.5; }
.cmp th, .cmp td { padding: 16px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: break-word; }
.cmp thead th { padding-top: 20px; padding-bottom: 14px; color: var(--ink); font-size: 18px; font-weight: 600; border-bottom: 2px solid var(--line); }
html.serif .cmp thead th { font-family: var(--serif); font-weight: 560; letter-spacing: -0.01em; }
.cmp thead th:first-child { width: 21%; }
.cmp-wide thead th:first-child { width: 13%; }
.cmp-wide thead th.cmp-us { width: 23%; }
.cmp thead th.cmp-us { color: var(--accent); }
.cmp tbody th[scope="row"] { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.4; }
.cmp td { color: var(--soft); }
.cmp .cmp-us { background: color-mix(in srgb, var(--sig) 11%, var(--bg)); }
.cmp td.cmp-us { color: var(--ink); }
.cmp .cmp-group th { padding: 22px 20px 8px; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; background: var(--bg); }
.cmp tbody:last-child tr:last-child > * { border-bottom: 0; }
.cmp thead th:first-child { border-top-left-radius: 18px; }
.cmp thead th:last-child { border-top-right-radius: 18px; }
.cmp tbody:last-child tr:last-child > :first-child { border-bottom-left-radius: 18px; }
.cmp tbody:last-child tr:last-child > :last-child { border-bottom-right-radius: 18px; }
.cmp code { font: 500 0.9em/1 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink); }
.cmp-wide { font-size: 14px; }
.cmp-wide th, .cmp-wide td { padding: 14px 14px; }
.cmp-wide thead th { font-size: 16px; }
.cmp-wide tbody th[scope="row"] { font-size: 14px; }

/* below 1024px: each row becomes a card, the product's name over each cell */
@media (max-width: 1023px) {
    .cmp-box { border: 0; background: none; box-shadow: none; }
    .cmp, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
    .cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .cmp tbody tr:not(.cmp-group) { margin-bottom: 12px; padding: 18px; border-radius: 16px; background: var(--bg); border: 1px solid var(--line); }
    .cmp tbody th[scope="row"], .cmp-wide tbody th[scope="row"] { padding: 0 0 12px; border: 0; font-size: 17px; }
    .cmp td, .cmp-wide td { padding: 12px 14px; border: 0; border-radius: 12px; font-size: 15px; }
    .cmp td + td { margin-top: 8px; }
    .cmp td:not(.cmp-us) { background: color-mix(in srgb, var(--bg-2) 60%, var(--bg)); }
    .cmp td::before { content: attr(data-label); display: block; margin-bottom: 4px; color: var(--ink); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
    .cmp td.cmp-us::before { color: var(--accent); }
    .cmp .cmp-group th { padding: 22px 0 10px; background: none; }
    .cmp tbody:first-of-type .cmp-group th { padding-top: 0; }
    .cmp tbody:last-child tr:last-child > * { border-radius: 12px; }
}
@media (max-width: 420px) {
    .cmp tbody tr:not(.cmp-group) { padding: 14px; }
    .cmp td, .cmp-wide td { padding: 10px 12px; }
}

/* ---------- what each one costs ---------- */
.vs-plans-grid { display: grid; gap: 20px; }
@media (min-width: 860px) { .vs-plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1100px) { .vs-plans-many { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vs-card { padding: 26px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); }
.vs-card-us { border: 2px solid var(--btn); box-shadow: 0 24px 50px -32px var(--shadow); }
html.dark .vs-card-us { border-color: var(--accent); }
.vs-card h3 { margin-bottom: 14px; font-size: 22px; }
html.serif .vs-card h3, html.serif .vs-even h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.015em; }
.vs-card p { color: var(--soft); }
.vs-plans { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.vs-plans li { position: relative; padding-left: 18px; color: var(--soft); font-size: 15px; }
.vs-plans li::before { content: ''; position: absolute; left: 2px; top: 0.7em; width: 6px; height: 6px; border-radius: 50%; background: var(--sig); }
.vs-plans b { color: var(--ink); font-weight: 600; }
.vs-card .vs-card-refs { margin-top: 16px; font-size: 13px; }
.vs-card-us .vs-model { margin-bottom: 16px; color: var(--accent); font: 600 24px/1.25 var(--serif); letter-spacing: -0.01em; }
html:not(.serif) .vs-card-us .vs-model { font-family: var(--sans); }
.vs-model a { color: inherit; text-underline-offset: 4px; }
.vs-card-us .checks li { color: var(--ink); font-size: 15px; }

.vs-even { margin-top: 28px; padding: 28px; border-radius: 18px; background: var(--bg-2); border: 1px solid var(--line); }
.vs-even[hidden], .vs-card [hidden] { display: none; }
.vs-even h3 { margin-bottom: 12px; font-size: 24px; }
.vs-even-lead { max-width: 760px; margin-bottom: 20px; color: var(--ink); font-size: 19px; line-height: 1.5; }
.vs-even-lead b { color: var(--accent); font-weight: 650; white-space: nowrap; }
.vs-even-table { width: 100%; max-width: 640px; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.vs-even-table th, .vs-even-table td { padding: 9px 12px 9px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.vs-even-table thead th { color: var(--soft); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.vs-even-table tbody th { color: var(--ink); font-weight: 500; }
.vs-even-table td { white-space: nowrap; color: var(--soft); }
.vs-even-table td:last-child { color: var(--accent); font-weight: 600; }
.vs-even-table th:nth-child(n+2), .vs-even-table td { text-align: right; }
.vs-even-table th:last-child, .vs-even-table td:last-child { padding-right: 0; }
.vs-even-app th { padding-top: 18px; color: var(--ink); font-size: 15px; font-weight: 600; }
.vs-even-note { max-width: 760px; margin-top: 14px; color: var(--soft); font-size: 15px; }
@media (max-width: 520px) {
    .vs-even { padding: 22px 18px; }
    .vs-even-lead { font-size: 17px; }
    .vs-even-table { font-size: 14px; }
    .vs-even-table thead th { font-size: 11px; letter-spacing: 0.04em; }
    .vs-even-table th, .vs-even-table td { padding-right: 8px; }
}

/* ---------- who each one suits ---------- */
.vs-suits { display: grid; gap: 20px; }
@media (min-width: 860px) { .vs-suits { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
@media (min-width: 1100px) { .vs-suits-many { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vs-suits .vs-card p { font-size: 16px; }
.vs-suits .vs-card-us p { color: var(--ink); }

/* ---------- the index: one tile per comparison ---------- */
.vs-tiles { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .vs-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.vs-tile { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 26px; border-radius: 18px; background: var(--bg); border: 1px solid var(--line); color: inherit; text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s; }
.vs-tile:hover { border-color: var(--btn); box-shadow: 0 24px 50px -32px var(--shadow); }
html.dark .vs-tile:hover { border-color: var(--accent); }
.vs-tile h3 { font-size: 22px; }
html.serif .vs-tile h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.015em; }
.vs-tile p { color: var(--soft); font-size: 15px; }
.vs-tile .vs-tile-price { color: var(--ink); font-size: 14px; font-weight: 500; }
.vs-tile-go { margin-top: auto; padding-top: 6px; color: var(--accent); font-weight: 600; }
.vs-tile-go::after { content: ' \2192'; }
.vs-index-cost { display: grid; gap: 8px 64px; align-items: start; }
@media (min-width: 960px) { .vs-index-cost { grid-template-columns: minmax(0, 1fr) minmax(0, 440px); } }
.vs-index-cost .vs-card-refs a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* ---------- sources, in small type ---------- */
.vs-sources { padding: 44px 0 52px; color: var(--soft); font-size: 13px; line-height: 1.55; }
.vs-sources h2 { margin-bottom: 8px; color: var(--ink); font: 600 13px/1.4 var(--sans); letter-spacing: 0.08em; text-transform: uppercase; }
html.serif .vs-sources h2 { font-family: var(--sans); font-weight: 600; letter-spacing: 0.08em; }
.vs-sources > .wrap > p { max-width: 760px; }
.vs-sources ol { margin: 16px 0 0; padding-left: 26px; }
@media (min-width: 900px) { .vs-sources ol { columns: 2; column-gap: 48px; } }
.vs-sources li { margin-bottom: 4px; break-inside: avoid; overflow-wrap: anywhere; }
.vs-sources li:target { color: var(--ink); }
.vs-sources a { color: var(--soft); text-underline-offset: 2px; }
.vs-sources a:hover { color: var(--ink); }
