/* Shared styles for the comparison pages. Tokens, base, header, buttons,
   sections, cards, FAQ and footer are copied from ../index.html so the pages
   look the same; keep them in step when the main page's design changes. */
:root {
  --bg: #f8f8f7;
  --bg-alt: #f1f1ef;
  --surface: #ffffff;
  --ink: #161616;
  --ink-2: #3d3d3d;
  --muted: #616161;
  --line: #e5e5e2;
  --line-strong: #cfcfcb;
  --accent: #161616;
  --accent-hover: #333333;
  --accent-ink: #ffffff;
  --accent-soft: #ececea;
  --accent-text: #555555;
  --spark: #b4520a;
  --shadow: 0 1px 2px rgb(20 20 20 / .05), 0 14px 34px -14px rgb(20 20 20 / .18);
  --radius: 18px;
  --sans: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0f10;
    --bg-alt: #161617;
    --surface: #1c1c1e;
    --ink: #f2f2f2;
    --ink-2: #c8c8c8;
    --muted: #9a9a9a;
    --line: #2a2a2c;
    --line-strong: #3a3a3d;
    --accent: #f2f2f2;
    --accent-hover: #ffffff;
    --accent-ink: #111111;
    --accent-soft: #262628;
    --accent-text: #b5b5b5;
    --spark: #f2b467;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -16px rgb(0 0 0 / .7);
  }
}
:root[data-theme="dark"] {
  --bg: #0f0f10; --bg-alt: #161617; --surface: #1c1c1e; --ink: #f2f2f2; --ink-2: #c8c8c8;
  --muted: #9a9a9a; --line: #2a2a2c; --line-strong: #3a3a3d; --accent: #f2f2f2; --accent-hover: #ffffff;
  --accent-ink: #111111; --accent-soft: #262628; --accent-text: #b5b5b5; --spark: #f2b467;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 16px 40px -16px rgb(0 0 0 / .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.12; text-wrap: balance; }
code, kbd, pre { font-family: var(--mono); }
code { font-size: .84em; background: var(--bg-alt); border: 1px solid var(--line); padding: .1em .38em; border-radius: 6px; overflow-wrap: anywhere; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 520px) { .wrap { padding: 0 16px; } }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--ink); }
.brand img { width: 26px; height: 26px; border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav .gh { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
@media (max-width: 760px) { .nav a:not(.gh) { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 22px; border-radius: 12px;
  font: 600 16px/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; transition: transform .15s, background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--accent); color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .cta .btn { flex: 1 1 100%; } }

/* ---------- sections ---------- */
section { padding: 72px 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.kicker { font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-text); margin-bottom: 14px; }
.h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; max-width: 20em; }
.intro { color: var(--ink-2); font-size: 18px; max-width: 40em; margin: 16px 0 0; }
.section-head { margin-bottom: 32px; }
.more { margin: 24px 0 0; font-size: 15.5px; color: var(--muted); }
@media (max-width: 700px) { section { padding: 56px 0; } .section-head { margin-bottom: 26px; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; min-width: 0; }
@media (max-width: 520px) { .card { padding: 20px; } }

/* ---------- comparison hero ---------- */
.chero { padding: 48px 0 56px; background: radial-gradient(70% 60% at 85% 10%, var(--accent-soft), transparent 70%); }
.crumbs { font: 500 13.5px/1.4 var(--mono); color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.chero h1 { font-size: clamp(38px, 5.6vw, 62px); letter-spacing: -0.035em; line-height: 1.04; max-width: 15em; }
.chero h1 .vs { color: var(--accent-text); font-weight: 600; }
.lead { font-size: clamp(18px, 1.7vw, 20px); color: var(--ink-2); margin: 20px 0 28px; max-width: 38em; line-height: 1.55; }
.fine { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); max-width: 46em; }

/* ---------- quick verdict ---------- */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } }
.duo h3 { font-size: 19px; margin-bottom: 4px; }
.summary { font-size: 18px; color: var(--ink-2); max-width: 44em; margin: 0 0 28px; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--ink-2); font-size: 16px; }
.ticks svg { width: 18px; height: 18px; color: var(--accent-text); margin-top: 4px; }

/* ---------- tables ---------- */
.tbl-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.tbl-wrap:focus-visible { outline-offset: 2px; }
table.cmp { width: 100%; border-collapse: collapse; min-width: 660px; font-size: 15.5px; line-height: 1.5; }
table.cmp.wide { min-width: 980px; font-size: 15px; }
.cmp th, .cmp td { padding: 14px 18px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.cmp thead th {
  border-top: 0; background: var(--bg-alt);
  font: 600 12.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.cmp tbody th { font-weight: 600; color: var(--ink); width: 21%; }
.cmp td { color: var(--ink-2); }
.cmp .us { background: color-mix(in srgb, var(--accent-soft) 60%, transparent); }
.cmp thead .us { color: var(--ink); }
.cmp.wide tbody th { width: auto; min-width: 150px; }
.cmp.wide tbody th a { color: var(--ink); }
.cmp.wide th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
.cmp.wide thead th:first-child { background: var(--bg-alt); }
.cmp.wide tr.us th:first-child { background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.scroll-hint { display: none; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) { .scroll-hint { display: block; } }
.table-note { margin: 14px 0 0; font-size: 14.5px; color: var(--muted); max-width: 52em; }

/* ---------- long-form sections ---------- */
.prose { max-width: 46em; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .45em; }
.prose h3 { font-size: 20px; margin: 28px 0 10px; }
.prose h3:first-child { margin-top: 0; }
.prose strong { color: var(--ink); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }
.cols .card h3 { font-size: 18px; margin-bottom: 10px; }
.cols .card p, .cols .card li { color: var(--ink-2); font-size: 16px; }
.cols .card p:last-child, .cols .card ul:last-child { margin-bottom: 0; }
.cols .card ul { padding-left: 1.15em; margin: 0 0 1em; }
.cols .card li { margin-bottom: .4em; }

/* hub cards */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
a.card.link { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
a.card.link:hover { border-color: var(--line-strong); transform: translateY(-1px); }
a.card.link h3 { font-size: 19px; margin-bottom: 8px; color: var(--ink); }
a.card.link p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
a.card.link .go { display: inline-block; margin-top: 12px; font: 500 13px/1 var(--mono); color: var(--accent-text); }

/* ---------- faq ---------- */
.faq { max-width: 800px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-size: 18px; font-weight: 600; letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 10px; height: 10px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 0 20px; color: var(--ink-2); max-width: 44em; }
.faq .a p:last-child { margin-bottom: 0; }

/* ---------- closing CTA, other pages, sources ---------- */
.band { text-align: center; padding: 40px 26px; }
.band h2 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; margin-bottom: 10px; }
.band p { color: var(--ink-2); margin: 0 auto 24px; max-width: 34em; }
.band .cta { justify-content: center; }
.others { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.others a {
  display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2); text-decoration: none; font-size: 15px;
}
.others a:hover { border-color: var(--accent); color: var(--ink); }
.sources { font-size: 14.5px; color: var(--muted); }
.sources h2 { font-size: 20px; margin-bottom: 12px; color: var(--ink); }
.sources ol { margin: 0; padding-left: 1.4em; display: grid; gap: 6px; }
.sources a { overflow-wrap: anywhere; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
footer .links { display: flex; gap: 20px; flex-wrap: wrap; }
footer .links a { text-decoration: none; color: var(--ink-2); }
footer .links a:hover { color: var(--ink); }
footer p { max-width: 44em; margin: 10px 0 0; }
@media (max-width: 700px) { footer .wrap { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Two-column comparison tables stack into one card per row on phones, so both
   apps stay visible without sideways scrolling. The wide hub table scrolls. */
@media (max-width: 640px) {
  table.cmp:not(.wide) { min-width: 0; }
  table.cmp:not(.wide) thead { display: none; }
  table.cmp:not(.wide), table.cmp:not(.wide) tbody, table.cmp:not(.wide) tr,
  table.cmp:not(.wide) th, table.cmp:not(.wide) td { display: block; width: auto; }
  table.cmp:not(.wide) tr { padding: 14px 16px 16px; border-top: 1px solid var(--line); }
  table.cmp:not(.wide) tr:first-child { border-top: 0; }
  table.cmp:not(.wide) th, table.cmp:not(.wide) td { border: 0; padding: 0; }
  table.cmp:not(.wide) th { font-size: 16px; margin-bottom: 8px; }
  table.cmp:not(.wide) td { padding: 8px 10px; border-radius: 10px; }
  table.cmp:not(.wide) td + td { margin-top: 6px; }
  table.cmp:not(.wide) td::before {
    content: attr(data-label); display: block; margin-bottom: 2px;
    font: 600 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  }
}
