/* ---------- Compare mode ---------- */

.cmp-vs { font-size: 12px; color: var(--color-text-tertiary); }

.compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: start;
  margin-bottom: 20px;
}

.compare-table-wrap { overflow-x: auto; }

#compare-table { font-size: 13px; }
#compare-table thead th {
  position: static;
  cursor: default;
  text-align: right;
  white-space: nowrap;
}
#compare-table thead th .provider-mark,
#compare-table thead th .dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 6px;
  vertical-align: -2px;
  border-radius: var(--radius-full);
  overflow: hidden;
}
#compare-table thead th .provider-mark img {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 21%;
  object-fit: contain;
}
#compare-table thead th .provider-mark.ink-dark img { filter: brightness(0.08); }
#compare-table thead th .provider-mark.is-badge img { padding: 0; }
#compare-table td:first-child {
  text-align: left;
  color: var(--color-text-secondary);
  white-space: nowrap;
}
#compare-table td.is-best { font-weight: 600; color: var(--color-text-primary); }

.cmp-delta {
  margin-left: 7px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.cmp-delta.is-up { color: var(--color-success); }
.cmp-delta.is-down { color: var(--color-danger); }

.h2h-pair { margin-top: 18px; }
.h2h-pair h4 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
}
.h2h-vs { color: var(--color-text-tertiary); font-weight: 400; font-size: 12px; }
.h2h-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--color-text-tertiary);
}

.h2h-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
  font-size: 13px;
}
.h2h-label { flex: none; width: 140px; color: var(--color-text-secondary); }
.h2h-bar {
  flex: 1 1 auto;
  display: flex;
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-surface-sunken);
}
.h2h-win { background: var(--color-success); }
.h2h-tie { background: var(--color-border); }
.h2h-loss { background: var(--color-danger); }
.h2h-counts {
  flex: none;
  min-width: 110px;
  text-align: right;
  font-size: 12px;
  color: var(--color-text-secondary);
  font-variant-numeric: tabular-nums;
}
.h2h-link {
  flex: none;
  padding: 0;
  font-size: 12px;
  color: var(--color-primary-bright);
  background: none;
  border: none;
  cursor: pointer;
}
.h2h-link:hover { text-decoration: underline; }

/* ---------- Duel viewer ---------- */

#compare-duel { margin-top: 18px; }

/* Two answers abreast; the question above them spans the panel. */
.duel-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .compare-grid { grid-template-columns: 1fr; }
  .h2h-label { width: 105px; }
  .h2h-counts { min-width: 84px; }
  .duel-cols { grid-template-columns: 1fr; }
}
