/* Revana vs <API> pages and /compare (scripts/build-revana-vs-pages.mjs). Loaded only there, after site.css and
   blog.css. Revana's price is the green "cheaper" figure; the other API's is muted and struck through. */
.vs { --vs-green: var(--ok); --vs-green-soft: color-mix(in srgb, var(--ok) 13%, transparent); --vs-green-line: color-mix(in srgb, var(--ok) 34%, transparent); padding-bottom: 80px; }
.vs .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* hero */
.vs-hero { position: relative; padding: 44px 0 30px; }
.vs-hero::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(60% 90% at 0% 0%, color-mix(in srgb, var(--ok) 9%, transparent), transparent 70%),
              linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px,
              linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask: linear-gradient(#000 30%, transparent); mask: linear-gradient(#000 30%, transparent);
}
.vs-hero .crumbs { margin-bottom: 26px; }
.vs-title { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.vs-hero h1 { font-size: clamp(34px, 6vw, 56px); letter-spacing: -0.04em; }
.vs-logos { display: inline-flex; align-items: center; gap: 8px; }
.vs-logos img { width: 40px; height: 40px; object-fit: contain; padding: 5px; background: #fff; border: 1px solid var(--border); }
.vs-logos img:first-child { background: var(--surface); }
.vs-logos i { font: 500 11px var(--mono); color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-style: normal; }
.vs-lede { max-width: 62ch; margin-top: 18px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.vs-lede strong { color: var(--vs-green); font-weight: 600; }
.vs-hero .hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.vs-meta { margin-top: 18px; font: 500 12px var(--mono); color: var(--faint); letter-spacing: .02em; }

/* summary strip */
.vs-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--border); background: var(--surface); }
.vs-stat { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.vs-stat + .vs-stat { border-left: 1px solid var(--border); }
.vs-stat b { font: 600 28px/1.1 var(--font); letter-spacing: -0.03em; color: var(--text); font-variant-numeric: tabular-nums; }
.vs-stat:first-child { background: var(--vs-green-soft); box-shadow: inset 0 2px 0 var(--vs-green); }
.vs-stat:first-child b, .vs-stat:nth-child(2) b { color: var(--vs-green); }
.vs-stat span { font-size: 13px; line-height: 1.45; color: var(--muted); }
.vs-stat time { font-size: 22px; }

/* sections */
.vs-section { margin-top: 56px; scroll-margin-top: 84px; }
.vs-section > h2 { font-size: 24px; letter-spacing: -0.025em; margin-bottom: 18px; }
.vs-prose { max-width: 72ch; margin-top: 44px; }
.vs-prose > h2:first-child { margin-top: 0; }
.vs-table-note { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.vs-note { font-size: 14.5px; color: var(--muted); border-left: 2px solid var(--border-strong); padding-left: 14px; }

/* pills and bars */
.vs-pill {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; white-space: nowrap;
  font: 600 12.5px/1 var(--mono); color: var(--vs-green); background: var(--vs-green-soft); border: 1px solid var(--vs-green-line);
}
.vs-bar { display: block; height: 4px; background: color-mix(in srgb, var(--muted) 22%, transparent); }
.vs-bar i { display: block; height: 100%; background: var(--vs-green); }

/* featured wins */
.vs-feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vs-feat { position: relative; display: flex; flex-direction: column; gap: 18px; padding: 20px; background: var(--surface); border: 1px solid var(--border); transition: border-color .15s; }
.vs-feat:hover { border-color: var(--vs-green-line); }
.vs-feat-head { display: flex; align-items: flex-start; gap: 12px; }
.vs-feat-head > div { flex: 1; min-width: 0; }
.vs-feat-head .maker-logo { width: 32px; height: 32px; }
.vs-feat h3 { font-size: 17px; letter-spacing: -0.02em; }
.vs-feat h3 a::after { content: ""; position: absolute; inset: 0; }
.vs-feat-head span:not(.vs-pill):not(.maker-logo) { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.vs-feat-prices { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.vs-feat-prices span { display: block; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 6px; }
.vs-feat-ours b { font-size: 34px; line-height: 1; font-weight: 600; letter-spacing: -0.03em; color: var(--vs-green); }
.vs-feat-ours small { margin-left: 6px; font-size: 12px; color: var(--muted); }
.vs-feat-theirs { text-align: right; }
.vs-feat-theirs s { font-size: 18px; color: var(--muted); text-decoration-color: color-mix(in srgb, var(--bad) 70%, transparent); text-decoration-thickness: 1.5px; }

/* the price tables: a row group per model */
.vs-table-wrap { border: 1px solid var(--border); background: var(--surface); }
.vs-table { width: 100%; border-collapse: collapse; font-size: 14.5px; table-layout: fixed; }
.vs-table thead th:nth-child(1) { width: 30%; } .vs-table thead th:nth-child(2) { width: 24%; }
.vs-table thead th:nth-child(3) { width: 14%; } .vs-table thead th:nth-child(5) { width: 64px; }
.vs-table thead th {
  padding: 11px 18px; text-align: left; white-space: nowrap; background: var(--bg-2); border-bottom: 1px solid var(--border);
  font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint);
}
.vs-table thead th:nth-child(2) { color: var(--vs-green); }
.vs-table tbody + tbody .vs-model th { border-top: 1px solid var(--border-strong); }
.vs-model th { padding: 16px 18px 8px; text-align: left; font-weight: 500; }
.vs-model-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vs-model-head .maker-logo { width: 26px; height: 26px; }
.vs-model-head a { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.vs-model-head a:hover { color: var(--accent-strong); }
.vs-maker { font-size: 13px; color: var(--faint); }
.vs-most { margin-left: auto; font: 500 12px var(--mono); color: var(--vs-green); }
.vs-group tr:not(.vs-model) > * { padding: 9px 18px; border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); vertical-align: middle; }
.vs-group tr:not(.vs-model):hover > * { background: var(--surface-2); }
.vs-group tr:last-child > * { padding-bottom: 14px; }
.vs-setting { text-align: left; font-weight: 400; color: var(--text-2); }
.vs-ours { white-space: nowrap; background: color-mix(in srgb, var(--ok) 6%, transparent); }
.vs-price { font-size: 15px; font-weight: 600; color: var(--vs-green); }
.vs-cheaper { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--vs-green); opacity: .85; }
.vs-theirs s { color: var(--muted); font-size: 14px; text-decoration-color: color-mix(in srgb, var(--bad) 65%, transparent); }
.vs-save .vs-pill { margin-right: 12px; }
.vs-save .vs-bar { display: inline-block; vertical-align: middle; width: calc(100% - 80px); max-width: 160px; }
.vs-src { text-align: right; }
.vs-src a { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--faint); border: 1px solid transparent; transition: color .15s, border-color .15s; }
.vs-src a:hover { color: var(--text); border-color: var(--border-strong); }
.vs-src a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* /compare cards */
.vs-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.vs-card {
  display: flex; flex-direction: column; gap: 18px; padding: 22px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, transform .15s;
}
.vs-card:hover { border-color: var(--vs-green-line); transform: translateY(-2px); }
.vs-card-head { display: flex; align-items: center; gap: 14px; }
.vs-card-head .vs-logos img { width: 34px; height: 34px; }
.vs-card-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.vs-card-big { font-size: 15px; color: var(--muted); }
.vs-card-big b { display: block; font-size: 48px; line-height: 1; letter-spacing: -0.04em; color: var(--vs-green); margin-bottom: 4px; }
.vs-card-stats { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.vs-card-models { display: flex; flex-wrap: wrap; gap: 6px; }
.vs-card-go { margin-top: auto; font-size: 14px; font-weight: 500; color: var(--accent-strong); }
.vs-card:hover .vs-card-go span { display: inline-block; transform: translateX(3px); transition: transform .15s; }

@media (max-width: 960px) {
  .vs-feats, .vs-cards { grid-template-columns: 1fr; }
  .vs-stats { grid-template-columns: repeat(2, 1fr); }
  .vs-stat:nth-child(3) { border-left: 0; }
  .vs-stat:nth-child(n+3) { border-top: 1px solid var(--border); }
}

/* phones: each setting becomes a small card instead of a table that scrolls sideways */
@media (max-width: 640px) {
  .vs-hero { padding-top: 28px; }
  .vs-lede { font-size: 16.5px; }
  .vs-stat { padding: 16px; }
  .vs-stat b { font-size: 22px; }
  .vs-stat time { font-size: 17px; }
  .vs-feat-ours b { font-size: 30px; }
  .vs-table-wrap { border: 0; background: none; }
  .vs-table, .vs-table tbody, .vs-table tr, .vs-table th, .vs-table td { display: block; }
  .vs-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .vs-group { border: 1px solid var(--border); background: var(--surface); margin-bottom: 12px; }
  .vs-table tbody + tbody .vs-model th { border-top: 0; }
  .vs-model th { padding: 14px 14px 10px; }
  .vs-most { margin-left: 0; flex-basis: 100%; }
  .vs-group tr:not(.vs-model) {
    display: grid; grid-template-columns: 1fr 1fr auto; grid-template-areas: "set set src" "ours theirs save";
    align-items: end; gap: 4px 12px; padding: 12px 14px; border-top: 1px solid var(--border);
  }
  .vs-group tr:not(.vs-model) > * { padding: 0; border: 0; background: none !important; }
  .vs-group tr:last-child > * { padding-bottom: 0; }
  .vs-setting { grid-area: set; font-weight: 500; color: var(--text); }
  .vs-ours { grid-area: ours; } .vs-theirs { grid-area: theirs; } .vs-save { grid-area: save; width: auto; text-align: right; }
  .vs-src { grid-area: src; width: auto; align-self: start; margin: -6px -6px 0 0; }
  .vs-ours::before, .vs-theirs::before { content: attr(data-label); display: block; margin-bottom: 3px; font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
  .vs-cheaper { display: none; }
  .vs-price { font-size: 17px; }
  .vs-save .vs-pill { margin: 0; }
  .vs-save .vs-bar { display: none; }
}
