/* The comparison article (/compare/). Builds on home.css: same tokens, type and components. */

.article-head { padding-top: 72px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 20px; }
.article-head h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.05; font-weight: 600; letter-spacing: -0.04em; text-wrap: balance; }
.byline { font-size: .875rem; color: var(--muted); }

/* The short answer, first thing on the page. */
.answer { margin-top: 12px; padding: 24px; border-radius: 12px; border: 2px solid var(--accent); background: var(--surface); display: flex; flex-direction: column; gap: 14px; }
.answer-title { font-size: 1.25rem; line-height: 1.3; letter-spacing: -0.02em; }
.answer-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; font-size: 1rem; line-height: 1.55; }

/* Long-form text. */
.prose { display: flex; flex-direction: column; gap: 16px; }
.prose h2 { margin-bottom: 8px; }
.prose h3 { margin-top: 24px; }
.prose p, .prose li { font-size: 1.0625rem; line-height: 1.65; text-wrap: pretty; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: 3px; }
.quote { padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--accent-bg); border-radius: 0 8px 8px 0; }
.h2-sm { font-size: clamp(1.5rem, 3vw, 2rem); }
.sources { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; }
.sources li { font-size: .9375rem; }

.prose sup .fn, sup .fn { text-decoration: none; padding: 0 2px; font-size: .875rem; color: var(--accent-ink); font-weight: 600; }

.speed-compare { flex: none; margin: 8px 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); gap: 16px; }

/* Platform filter above the table. */
.filter { display: flex; flex-wrap: wrap; gap: 4px; padding: 3px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); align-self: flex-start; }
.filter button { min-height: 40px; padding: 6px 14px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; }
.filter button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.band:not(.band-surface) .filter { background: var(--surface); }
.band:not(.band-surface) .filter button[aria-pressed="true"] { background: var(--bg); }

/* One-by-one comparisons, collapsed by default (FAQ style from home.css). */
.vs { margin-top: 8px; }
.vs summary h3 { margin: 0; font-size: 1.125rem; }
.vs details > p { padding: 0 0 16px; font-size: 1.0625rem; line-height: 1.65; color: var(--ink); }
.vs details > p.quote { padding: 14px 18px; margin-bottom: 20px; }

/* Comparison table. Becomes cards on narrow screens. */
.table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: .9375rem; line-height: 1.4; }
.compare th, .compare td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare thead th { font-size: .8125rem; font-weight: 600; color: var(--muted); background: var(--bg); }
.compare thead button { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.compare thead button::after { content: "↕"; opacity: .5; }
.compare th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; }
.compare th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; }
.compare tbody th { font-weight: 600; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tr.is-us { background: var(--accent-bg); }
.compare tr.is-us th { color: var(--accent-ink); }
.compare tr[hidden] { display: none; }

@media (max-width: 760px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare th, .compare td { padding: 4px 0; border: 0; }
  .compare tbody th { font-size: 1.0625rem; padding-bottom: 8px; }
  .compare td { display: flex; gap: 12px; }
  .compare td::before { content: attr(data-label); flex: 0 0 9.5em; color: var(--muted); font-size: .8125rem; padding-top: 1px; }
}
@media (max-width: 420px) {
  .compare td { flex-direction: column; gap: 0; }
  .compare td::before { flex-basis: auto; }
}

@media (max-width: 600px) {
  .article-head { padding-top: 48px; padding-bottom: 56px; }
  .answer { padding: 18px; }
}
.speed-compare .speed-label { flex-wrap: wrap; }
.speed-compare .mono { white-space: normal; }
.answer-cta { align-self: flex-start; width: auto; margin-top: 4px; }

/* App icons in the table and speed bars. */
.app { display: inline-flex; align-items: center; gap: 10px; }
.app-icon { flex: none; width: 24px; height: 24px; object-fit: contain; }
.app picture { display: contents; }
.app-icon-term { color: var(--ink); }
.speed-compare .app { gap: 8px; }
.speed-compare .app-icon { width: 20px; height: 20px; }
