/* Section wrapper */
.comp-table-section { margin: 2.5rem 0; }
.comp-table-section > h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  font-weight: 700; color: var(--ink);
  margin-bottom: 1rem; line-height: 1.3;
}

/* Table container — horizontal scroll on small viewports */
.comp-table-wrap {
  overflow-x: auto; border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; margin: 0;
}
.comp-table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

/* Header row */
.comp-table-wrap thead { background: var(--ink); color: white; }
.comp-table-wrap thead th {
  padding: 0.75rem 1rem; text-align: left; font-weight: 600;
  font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase;
  white-space: nowrap;
}

/* Body rows */
.comp-table-wrap tbody tr:nth-child(even) { background: var(--surface-alt); }
.comp-table-wrap tbody td {
  padding: 0.75rem 1rem; border-bottom: 1px solid var(--border);
  color: var(--ink-light); vertical-align: top;
}
.comp-table-wrap tbody td:first-child { font-weight: 600; color: var(--ink); min-width: 140px; }

/* Sticky first column on mobile */
@media (max-width: 700px) {
  .comp-table-wrap tbody td:first-child,
  .comp-table-wrap thead th:first-child {
    position: sticky; left: 0; background: var(--surface);
    z-index: 1; box-shadow: 2px 0 6px rgba(0,0,0,0.05);
  }
  .comp-table-wrap thead th:first-child { background: var(--ink); }
  .comp-table-wrap tbody tr:nth-child(even) td:first-child { background: var(--surface-alt); }
}

/* Top-pick row highlight */
.comp-table-wrap tbody tr.row-top-pick > td:first-child {
  border-left: 3px solid var(--signal);
}
.comp-table-wrap tbody tr.row-top-pick { background: var(--signal-soft); }

/* Rank / type badge inside first column */
.tool-badge {
  display: inline-block; font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.2rem 0.5rem; border-radius: 4px;
  margin-right: 0.4rem; vertical-align: middle; white-space: nowrap;
}
.tool-badge-pick  { background: rgba(16,185,129,0.12); color: #059669; }
.tool-badge-rank2 { background: rgba(107,114,128,0.10); color: #4b5563; }
.tool-badge-rank3 { background: rgba(146,64,14,0.10);  color: #92400e; }

/* Value badges — reuse site pattern already present in coding-agents.html */
.badge-yes {
  display: inline-block; padding: 0.2rem 0.55rem;
  background: var(--signal-soft); color: #059669;
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}
.badge-no {
  display: inline-block; padding: 0.2rem 0.55rem;
  background: rgba(239,68,68,0.08); color: #dc2626;
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}
.badge-partial {
  display: inline-block; padding: 0.2rem 0.55rem;
  background: rgba(245,158,11,0.10); color: #d97706;
  border-radius: 20px; font-size: 0.78rem; font-weight: 600;
}

/* Footer footnote row */
.comp-table-wrap tfoot td {
  font-size: 0.75rem; color: var(--ink-muted); font-style: italic;
  padding: 0.75rem 1rem; border-top: 1px solid var(--border); border-bottom: none;
  background: var(--surface-alt);
}
