/*
 * Copyright (c) 2024-2026 Luca Vitiello. All rights reserved.
 * SPDX-License-Identifier: LicenseRef-Proprietary
 */

/* Compare pages (October 2026). Loaded after main.css and product.css;
   uses the shared tokens only. */

/* ── Side-by-side matrix ──────────────────────────────────────────────── */
.compare-scroll {
  overflow-x: auto;
  border: 1px solid var(--border-2);
  border-radius: var(--r);
}

.compare-matrix {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.875rem;
  line-height: 1.6;
}

.compare-matrix.cols-7 { min-width: 1180px; }
.compare-matrix .fn { font-size: 0.7rem; margin-left: 0.2rem; vertical-align: super; }
.compare-matrix thead th:first-child,
.compare-matrix tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface-1);
  border-right: 1px solid var(--border-2);
}

.compare-matrix th,
.compare-matrix td {
  padding: 0.85rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border-1);
}

.compare-matrix thead th {
  font-family: var(--f-mon);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-3);
  background: var(--surface-1);
  border-bottom-color: var(--border-2);
}

.compare-matrix tbody th {
  width: 12rem;
  min-width: 12rem;
  font-weight: 600;
  color: var(--text-1);
}

.compare-matrix tbody tr:nth-child(even) { background: var(--row-alt); }
.compare-matrix tbody tr:last-child th,
.compare-matrix tbody tr:last-child td { border-bottom: 0; }

.compare-matrix td { color: var(--text-2); }
.compare-matrix td a { color: var(--blue-hi); }
.compare-matrix td a:hover { text-decoration: underline; }
.compare-matrix code {
  font-family: var(--f-mon);
  font-size: 0.82em;
  color: var(--text-1);
}

.compare-matrix td.yes { color: var(--text-1); }
.compare-matrix td.yes::before {
  content: "\2713\00a0";
  color: var(--blue-hi);
  font-weight: 700;
}

.compare-matrix td.nd { color: var(--text-3); }
.compare-matrix td.nd::before { content: "\2014\00a0"; }

.compare-matrix td.fact { color: var(--text-2); }

.compare-note {
  margin-top: 1rem;
  font-size: 0.82rem;
  color: var(--text-3);
  max-width: 78ch;
}

/* ── Stack comparison: two cards ──────────────────────────────────────── */
.stack-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--border-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r);
  overflow: hidden;
}

.stack-compare > div {
  background: var(--bg);
  padding: 2rem 2.25rem;
}

.stack-compare h3 {
  font-family: var(--f-dis);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 0.75rem;
}

.stack-compare p,
.stack-compare li {
  font-size: 0.925rem;
  color: var(--text-2);
  line-height: 1.7;
}

.stack-compare ul { padding-left: 1.1rem; margin: 0.5rem 0 0.75rem; }
.stack-compare a { color: var(--blue-hi); }
.stack-compare a:hover { text-decoration: underline; }
.stack-compare code { font-family: var(--f-mon); font-size: 0.85em; color: var(--text-1); }

.stack-closing {
  margin-top: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-2);
}

/* ── Prose blocks on compare pages ────────────────────────────────────── */
.compare-prose { max-width: 78ch; }
.compare-prose p,
.compare-prose li {
  font-size: 0.975rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.compare-prose ul { padding-left: 1.2rem; margin-bottom: 1rem; }
.compare-prose h3 {
  font-family: var(--f-dis);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-1);
  margin: 1.75rem 0 0.6rem;
}
.compare-prose a,
.built-for-note a { color: var(--blue-hi); }
.compare-prose a:hover,
.built-for-note a:hover { text-decoration: underline; }
.compare-prose code { font-family: var(--f-mon); font-size: 0.85em; color: var(--text-1); }

.built-for-note {
  margin-top: 1.5rem;
  max-width: 78ch;
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.7;
}

.compare-section-tight { padding: 4.5rem 0; }

/* ── Sources ──────────────────────────────────────────────────────────── */
.sources {
  font-size: 0.8rem;
  color: var(--text-3);
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.sources p { margin-bottom: 0.75rem; max-width: 78ch; }
.sources ul, .sources ol { padding-left: 1.4rem; }
.sources li { margin-bottom: 0.2rem; }
.sources a { color: var(--text-2); text-decoration: underline; text-decoration-color: var(--border-3); }
.sources a:hover { color: var(--blue-hi); }

@media (max-width: 720px) {
  .stack-compare { grid-template-columns: 1fr; }
  .stack-compare > div { padding: 1.5rem 1.25rem; }
  .compare-section-tight { padding: 3rem 0; }
}
.src-product { color: var(--text-3); font-family: var(--f-mon); font-size: .72rem; margin-right: .25rem; }
