/* /compare landing page. Reuses tokens from /site/shared.css. */

:root {
  --lpc-card-bg: #ffffff;
  /* green-700 / gray-500: both clear WCAG AA on white and on the SMD-column tint. */
  --lpc-yes: #15803d;
  --lpc-no: #6b7280;
  --lpc-smd-col-bg: rgba(79, 70, 229, 0.04);
  --lpc-table-row-alt: rgba(15, 23, 42, 0.02);
  --lpc-disclaimer-bg: rgba(15, 23, 42, 0.03);
}

html.dark {
  --lpc-card-bg: #1f2937;
  --lpc-yes: #34d399;
  /* gray-400 in dark: 5.78:1 on the dark card bg. */
  --lpc-no: #9ca3af;
  --lpc-smd-col-bg: rgba(129, 140, 248, 0.07);
  --lpc-table-row-alt: rgba(255, 255, 255, 0.02);
  --lpc-disclaimer-bg: rgba(255, 255, 255, 0.03);
}

body { min-height: 100dvh; display: flex; flex-direction: column; }
.lpc-main { flex: 1; }

.lpc-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
  box-sizing: border-box;
}
@media (max-width: 520px) {
  .lpc-container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* ── Generic section ── */
.lpc-section { padding: 2.5rem 0 2rem; }
.lpc-section h1 {
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 auto 0.875rem;
  max-width: 48rem;
  text-align: center;
  text-wrap: balance;
}
.lpc-section-intro {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0 auto 1.5rem;
  max-width: 44rem;
  line-height: 1.55;
  text-align: center;
  text-wrap: balance;
}
.lpc-section-intro a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
}
.lpc-section-intro a:hover { border-bottom-color: var(--primary); }
@media (min-width: 640px) {
  .lpc-section { padding: 3.5rem 0 2.5rem; }
  .lpc-section h1 { font-size: 2.25rem; }
}

/* ── CTA row (under the table) ── */
.lpc-cta-row {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}
.lpc-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  background: var(--btn-bg);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}
.lpc-cta:hover { background: var(--btn-bg-hover); }
.lpc-cta:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.lpc-trust-line {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Comparison table ── */
.lpc-table-wrap {
  background: var(--lpc-card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.lpc-table {
  width: 100%;
  min-width: 44rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.lpc-table th,
.lpc-table td {
  padding: 0.75rem 0.875rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.45;
}
.lpc-table thead th {
  font-weight: 600;
  color: var(--text);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg);
  vertical-align: middle;
}
.lpc-table thead th a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-muted);
  /* Pad/negative-margin trick to expand tap target without changing layout. */
  display: inline-block;
  padding: 0.5rem 0;
  margin: -0.5rem 0;
}
.lpc-table thead th a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.lpc-table tbody th {
  font-weight: 500;
  color: var(--text);
  white-space: normal;
  width: 14rem;
}
.lpc-table tbody td {
  color: var(--text-secondary);
  font-size: 0.875rem;
}
.lpc-table tbody td strong { color: var(--text); }
.lpc-table tbody tr:last-child th,
.lpc-table tbody tr:last-child td { border-bottom: none; }
.lpc-table tbody tr:nth-child(even) th,
.lpc-table tbody tr:nth-child(even) td:not(.lpc-smd-col) {
  background: var(--lpc-table-row-alt);
}

.lpc-yes { color: var(--lpc-yes); }
.lpc-no { color: var(--lpc-no); }
.lpc-sometimes { color: var(--text-secondary); }
.lpc-smd-col { background: var(--lpc-smd-col-bg); color: var(--text); }
.lpc-table tbody tr:nth-child(even) .lpc-smd-col { background: var(--lpc-smd-col-bg); }

/* Scroll hint shown only on viewports narrower than the table's min-width. */
.lpc-table-scroll-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: right;
  margin: 0.5rem 0.25rem 0;
}
@media (min-width: 720px) {
  .lpc-table-scroll-hint { display: none; }
}


/* ── Head-to-head links ── */
.lpc-h2h {
  padding-top: 1.25rem;
  padding-bottom: 0.5rem;
}
@media (min-width: 640px) {
  .lpc-h2h { padding-top: 1.75rem; }
}
.lpc-h2h h2 {
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 auto 0.625rem;
  max-width: 44rem;
  text-align: center;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .lpc-h2h h2 { font-size: 1.5rem; }
}
.lpc-h2h-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 560px) {
  .lpc-h2h-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .lpc-h2h-grid { grid-template-columns: repeat(3, 1fr); }
}
.lpc-h2h-grid a {
  display: block;
  height: 100%;
  box-sizing: border-box;
  background: var(--lpc-card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.125rem;
  text-decoration: none;
  transition: border-color 0.15s;
}
.lpc-h2h-grid a:hover { border-color: var(--primary); }
.lpc-h2h-grid a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.lpc-h2h-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.lpc-h2h-name::after {
  content: " \2192";
  color: var(--text-muted);
}
.lpc-h2h-grid a:hover .lpc-h2h-name::after { color: var(--primary); }
.lpc-h2h-desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Disclaimer ── */
.lpc-disclaimer {
  padding: 1.5rem 1rem 3rem;
}
.lpc-disclaimer p {
  background: var(--lpc-disclaimer-bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.875rem 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  text-align: center;
  margin: 0;
}
.lpc-disclaimer strong { color: var(--text-secondary); }
