/* ─────────────────────────────────────────────────────────────
   competitors.css — comparison-page components for /competitors/*
   Built ENTIRELY on the landing design tokens (tokens.css) so the
   pages theme identically to the homepage. Load order per page:
     tokens.css  →  base.css  →  competitors.css
   Only the pieces the homepage doesn't already have live here:
   comparison hero, TL;DR block, comparison matrix, shortfall cards,
   With-X/With-Proxi contrast, "who should use which", sources row,
   and the per-page signature visuals.
   ───────────────────────────────────────────────────────────── */

/* ── Comparison hero (copy left, signature visual right) ─────── */
.cmp-hero { padding-block: clamp(56px, 9vw, 116px) clamp(40px, 6vw, 72px); }
.cmp-hero__inner {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
/* Let grid tracks shrink below their content (default min-width:auto would
   let the signature visual force the row wider than the viewport, clipping
   the H1 + nav under the section's overflow-x:clip on narrow screens). */
.cmp-hero__inner { min-width: 0; }
.cmp-hero__inner > * { min-width: 0; }
.cmp-hero__visual .sig { max-width: 100%; }
.cmp-hero__h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.5rem); line-height: 1.03;
  letter-spacing: var(--tracking-display); margin: 14px 0 0;
}
.cmp-hero__h1 .muted { color: var(--ink-3); }
.cmp-hero__sub {
  margin: 20px 0 0; font-size: 17.5px; line-height: 1.6;
  color: var(--ink-2); max-width: 44ch;
}
.cmp-hero .cta-row { margin-top: 28px; }

/* small "A vs B" chip used in the hero eyebrow row */
.vs-chip {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--raised); border: 1px solid var(--hairline-2);
  box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  letter-spacing: .01em;
}
.vs-chip b { color: var(--ink); font-weight: 700; }
.vs-chip .vs-x { color: var(--ink-4); font-weight: 500; }
.vs-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ── TL;DR "Short answer" block (GEO front-load) ────────────── */
.tldr {
  position: relative; margin-top: 8px;
  background: var(--raised); border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-lg); padding: 24px 26px;
  box-shadow: var(--shadow-card);
}
.tldr__label {
  font-family: var(--font-display); font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em; color: var(--accent);
  margin-bottom: 8px;
}
.tldr__body { font-size: 17px; line-height: 1.62; color: var(--ink); }
.tldr__body b { font-weight: 600; }

/* ── Comparison matrix ─────────────────────────────────────── */
.cmp-table-wrap {
  overflow-x: auto; border: 1px solid var(--hairline);
  border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  background: var(--raised); -webkit-overflow-scrolling: touch;
}
.cmp-table { width: 100%; min-width: 660px; border-collapse: collapse; }
.cmp-table th, .cmp-table td {
  text-align: left; vertical-align: top; padding: 15px 20px;
  border-bottom: 1px solid var(--hairline); font-size: 14.5px; line-height: 1.5;
}
.cmp-table tr:last-child th, .cmp-table tr:last-child td { border-bottom: 0; }
.cmp-table thead th {
  position: sticky; top: 0; background: var(--raised);
  font-family: var(--font-display); font-size: 15px; font-weight: 600;
  letter-spacing: var(--tracking-h2); color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-top: 18px; padding-bottom: 18px;
}
.cmp-table .cmp-dim { color: var(--ink-3); font-weight: 600; width: 24%; white-space: nowrap; }
@media (max-width: 720px) { .cmp-table .cmp-dim { white-space: normal; } }
.cmp-table td.cmp-dim { font-family: var(--font-display); }
.cmp-table .cmp-comp { color: var(--ink-2); }
/* Proxi column — highlighted olive tint end-to-end */
.cmp-table .cmp-proxi { background: var(--accent-soft); color: var(--ink); font-weight: 500; }
/* The olive fill would otherwise swallow the light --hairline row divider;
   give the Proxi cells an olive-tinted line so every row reads straight across. */
.cmp-table tbody td.cmp-proxi { border-bottom-color: rgba(79, 98, 32, 0.22); }
.cmp-table thead .cmp-proxi { color: var(--accent-2); }
.cmp-table .cmp-proxi__head {
  display: inline-flex; align-items: center; gap: 8px;
}
.cmp-table .cmp-proxi__head img { width: 18px; height: 18px; border-radius: 5px; }
.cmp-check { color: var(--accent); font-weight: 700; }
.cmp-no { color: var(--ink-4); }

/* ── Shortfall cards ("where X falls short") ───────────────── */
.cmp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shortfall {
  background: var(--raised); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 24px 24px 20px;
  box-shadow: var(--shadow-card); display: flex; flex-direction: column;
}
.shortfall__ic {
  width: 34px; height: 34px; border-radius: var(--r-md);
  display: grid; place-items: center; margin-bottom: 14px;
  background: var(--accent-soft); color: var(--accent-2); font-size: 17px;
}
.shortfall__t { font-family: var(--font-display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.shortfall__d { margin-top: 8px; font-size: 14.5px; line-height: 1.58; color: var(--ink-2); }
.shortfall__q {
  margin-top: 12px; padding-left: 12px; border-left: 2px solid var(--hairline-2);
  font-size: 13.5px; line-height: 1.5; color: var(--ink-3); font-style: italic;
}
.shortfall__src { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--ink-4); }
.shortfall__src a { color: var(--ink-3); border-bottom: 1px solid var(--hairline-2); }
.shortfall__src a:hover { color: var(--accent); }

/* ── With X / With Proxi contrast pairs ────────────────────── */
.vs-block { display: grid; gap: 16px; }
.vs-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs-side { border-radius: var(--r-lg); padding: 22px 24px; border: 1px solid var(--hairline); }
.vs-side--old { background: var(--raised-2); }
.vs-side--new { background: var(--accent-soft); border-color: #d3dcb6; }
.vs-side__label {
  font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .09em; margin-bottom: 8px; display: inline-flex; gap: 7px; align-items: center;
}
.vs-side--old .vs-side__label { color: var(--ink-3); }
.vs-side--new .vs-side__label { color: var(--accent-2); }
.vs-side__t { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.vs-side__d { margin-top: 7px; font-size: 14.5px; line-height: 1.55; color: var(--ink-2); }

/* ── "Who should use which" pair ───────────────────────────── */
.who-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.who-card { border-radius: var(--r-lg); padding: 26px 26px; border: 1px solid var(--hairline); background: var(--raised); box-shadow: var(--shadow-sm); }
.who-card--proxi { background: var(--inverse-bg); border-color: var(--inverse-bg); color: var(--inverse-ink); }
.who-card__label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; margin-bottom: 12px; }
.who-card--comp .who-card__label { color: var(--ink-3); }
.who-card--proxi .who-card__label { color: #cdd6ab; }
.who-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.who-card li { position: relative; padding-left: 24px; font-size: 15px; line-height: 1.5; }
.who-card--comp li { color: var(--ink-2); }
.who-card--proxi li { color: var(--inverse-ink-2); }
.who-card li::before {
  content: "\2192"; position: absolute; left: 0; top: 0; font-weight: 700;
}
.who-card--comp li::before { color: var(--ink-4); }
.who-card--proxi li::before { color: var(--live); }
.who-card--proxi li b { color: var(--inverse-ink); font-weight: 600; }

/* ── Sources footnote row ──────────────────────────────────── */
.cmp-sources { font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.cmp-sources b { color: var(--ink-2); font-weight: 600; }
.cmp-sources a { color: var(--ink-3); border-bottom: 1px solid var(--hairline-2); }
.cmp-sources a:hover { color: var(--accent); }

/* ── Signature visuals (per page, CSS only) ────────────────── */
.sig {
  background: linear-gradient(160deg, var(--panel-grad-1), var(--panel-grad-2));
  border: 1px solid var(--hairline-2); border-radius: var(--r-xl);
  padding: 22px; box-shadow: var(--shadow-hero);
}
.sig__card {
  background: var(--raised); border: 1px solid var(--hairline);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.sig__cap { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin-bottom: 12px; }
.sig__cap--accent { color: var(--accent-2); }
.sig-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 14px; color: var(--ink); }
.sig-row + .sig-row { border-top: 1px solid var(--hairline); }
.sig-ic { width: 22px; height: 22px; border-radius: 6px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--raised-2); }
.sig-ic img { width: 22px; height: 22px; object-fit: cover; }
.sig-ic i { font-size: 14px; color: var(--ink-3); }
.sig-arrow { display: grid; place-items: center; color: var(--accent); font-size: 20px; margin: 12px 0; }
.sig-note { margin-top: 12px; font-size: 12.5px; color: var(--ink-3); }
.sig-tag { display: inline-block; padding: 3px 9px; border-radius: var(--r-pill); font-size: 11px; font-weight: 600; }
.sig-tag--old { background: var(--raised-2); color: var(--ink-3); }
.sig-tag--new { background: var(--accent-soft); color: var(--accent-2); }

/* Planhat "admin-tax" bars */
.sig-bars { display: flex; flex-direction: column; gap: 18px; }
.sig-bar__top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-size: 13.5px; }
.sig-bar__name { font-weight: 600; color: var(--ink); }
.sig-bar__val { font-size: 12.5px; color: var(--ink-3); }
.sig-bar__track { height: 12px; border-radius: var(--r-pill); background: var(--raised-2); overflow: hidden; }
.sig-bar__fill { height: 100%; border-radius: var(--r-pill); }
.sig-bar__fill--old { width: 100%; background: linear-gradient(90deg, #c9b678, #8a6b1f); }
.sig-bar__fill--new { width: 8%; min-width: 14px; background: var(--accent); }

/* section head that isn't centered gets a little more room */
.cmp-section .section__head { margin-bottom: 40px; }
.cmp-section .section__head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 940px) {
  /* Stack as plain blocks, not a 1-col grid: a grid `1fr` track floors at its
     content's min-width, which let the signature visual push the row wider than
     the viewport and clip the H1. Block layout wraps cleanly at any width. */
  .cmp-hero__inner { display: block; }
  .cmp-hero__visual { margin-top: 36px; }
  .cmp-cards { grid-template-columns: minmax(0, 1fr); }
  .vs-row { grid-template-columns: minmax(0, 1fr); }
  .who-pair { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .tldr { padding: 20px; }
  .tldr__body { font-size: 15.5px; }
  .cmp-hero__sub { max-width: none; }
}
