/* ============================================================
   COMPARISON / BENCHMARK component
   Table-rich, AI-extractable. Lives under Tools.
   Uses Ainaptic tokens + reuses .prose/.faq/.takeaways from styles.css
   ============================================================ */

/* Answer-first verdict box (top of page) */
.verdict {
  margin: var(--s-5) 0 var(--s-6);
  padding: 22px;
  border: 2px solid var(--ink);
  background: var(--accent-soft);
}
.verdict-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.verdict-icon {
  width: 28px; height: 28px;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.verdict-title {
  font-family: var(--font-head);
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}
.verdict-lead {
  font-family: var(--font-head);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.4;
  color: var(--ink);
}
.verdict-lead strong { font-weight: 700; }

/* "Best for X" quick-pick grid */
.bestfor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  margin: var(--s-5) 0;
}
@media (min-width: 560px) { .bestfor-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .bestfor-grid { grid-template-columns: repeat(4, 1fr); } }
.bestfor-card {
  border: 1px solid var(--paper-3);
  background: var(--paper);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bestfor-card .bf-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.bestfor-card .bf-pick {
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--accent);
  line-height: 1.05;
}
.bestfor-card .bf-why {
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.45;
}
/* ─── The comparison table ───────────────────────────────── */
.cmp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ink);
  margin: var(--s-5) 0;
  scrollbar-width: thin;
}
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 14px;
}
.cmp-table caption {
  caption-side: top;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  padding: 12px 14px 0;
}
.cmp-table th, .cmp-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--paper-3);
}
/* sticky row-label column */
.cmp-table tbody th {
  position: sticky;
  left: 0;
  background: var(--paper-2);
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  font-size: 13px;
  min-width: 150px;
  z-index: 1;
}
/* column header row */
.cmp-table thead th {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  border-bottom: 0;
  vertical-align: middle;
}
.cmp-table thead th:first-child {
  background: var(--ink);
  position: sticky;
  left: 0;
  z-index: 2;
}
.cmp-col-head { display: flex; align-items: center; gap: 9px; }
.cmp-col-logo {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.cmp-col-sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 400;
  color: var(--paper-3);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 1px;
}
.cmp-table tbody tr:last-child th,
.cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table td.is-winner {
  background: var(--accent-soft);
  font-weight: 600;
  color: var(--ink);
}
.cmp-table td.is-winner::after {
  content: ' ★';
  color: var(--accent);
  font-size: 11px;
}
.cmp-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.cmp-yes { color: var(--accent); font-weight: 700; }
.cmp-no { color: var(--ink-4); }

.cmp-scroll-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: -8px 0 var(--s-5);
  display: none;
}
@media (max-width: 700px) { .cmp-scroll-hint { display: block; } }

/* 3-up pros/cons (overrides 2-col proscons for comparison pages) */
.cmp-takes {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  margin: var(--s-5) 0;
}
@media (min-width: 820px) { .cmp-takes { grid-template-columns: repeat(3, 1fr); } }
.cmp-take {
  border: 1px solid var(--paper-3);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cmp-take-head { display: flex; align-items: center; gap: 10px; }
.cmp-take-logo {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700; font-size: 14px;
}
.cmp-take-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.cmp-take h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 0 4px;
}
.cmp-take .pro h4 { color: var(--accent); }
.cmp-take ul { padding-left: 16px; list-style: disc; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }

/* ============================================================
   SINGLE TOOL — detail page (single-tool.html)
   ============================================================ */
.tool-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  padding: var(--s-5) 0 var(--s-6);
  border-bottom: 2px solid var(--ink);
  margin-bottom: var(--s-6);
}
@media (min-width: 900px) {
  .tool-hero { grid-template-columns: 1fr auto; align-items: start; gap: var(--s-7); }
}
.tool-hero-id { display: flex; gap: 18px; align-items: flex-start; }
.tool-hero-logo {
  width: 72px; height: 72px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 30px;
  flex-shrink: 0;
}
.tool-hero-eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tool-hero-name {
  font-family: var(--font-head);
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.tool-hero-tagline {
  font-family: var(--font-head);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 52ch;
  margin-bottom: 14px;
}
.tool-hero-tags { display: flex; gap: 7px; flex-wrap: wrap; }
.tool-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}
@media (min-width: 900px) { .tool-hero-actions { align-items: flex-end; min-width: 240px; } }
.tool-hero-rating { display: flex; flex-direction: column; gap: 3px; }
@media (min-width: 900px) { .tool-hero-rating { align-items: flex-end; } }
.thr-score {
  font-family: var(--font-head);
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.thr-stars { color: var(--accent); font-size: 15px; letter-spacing: 2px; }

/* Body layout: prose + sticky rail */
.tool-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-6);
  padding-bottom: var(--s-8);
}
@media (min-width: 980px) {
  .tool-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: var(--s-7); align-items: start; }
}
.tool-rail { display: flex; flex-direction: column; gap: var(--s-4); }
@media (min-width: 980px) { .tool-rail { position: sticky; top: 72px; } }
.tsb-head {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--paper-3);
}
.tool-spec-box, .tool-alt-box {
  border: 1px solid var(--paper-3);
  background: var(--paper);
  padding: 18px;
}
.tool-spec { display: flex; flex-direction: column; gap: 0; margin: 0; }
.tool-spec > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--paper-3);
}
.tool-spec > div:last-child { border-bottom: 0; }
.tool-spec dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}
.tool-spec dd { font-size: 13.5px; font-weight: 600; color: var(--ink); text-align: right; margin: 0; }
.tool-alt {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--paper-3);
  color: var(--ink);
}
.tool-alt:last-of-type { border-bottom: 0; }
.tool-alt:hover { color: var(--accent); }
.tool-alt span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.25; }
.tool-alt-logo {
  width: 34px; height: 34px;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
