/* Compare Page */

/* Hero */
.compare-hero {
  padding-top: calc(var(--nav-height) + var(--space-3xl));
  padding-bottom: var(--space-xl);
  text-align: center;
}

.compare-label {
  font-size: var(--text-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.compare-heading {
  font-size: var(--text-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

.compare-subheading {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 520px;
  margin-inline: auto;
}

/* ---- At-a-Glance Table ---- */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-inline: calc(-1 * var(--space-md));
  padding-inline: var(--space-md);
}

.compare-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: var(--text-small);
}

.compare-table th,
.compare-table td {
  padding: 0.75rem 1rem;
  text-align: center;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  font-weight: 600;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  padding-bottom: 1rem;
  white-space: nowrap;
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--text-secondary);
  width: 22%;
  position: sticky;
  left: 0;
  background: var(--bg);
  z-index: 2;
}

/* myAtlas column highlight */
.compare-table th.compare-col--atlas {
  color: var(--accent);
  border-top: 2px solid var(--accent);
  padding-top: calc(1rem - 2px);
}

.compare-table td.compare-col--atlas {
  background: var(--accent-dim);
}

/* Row labels */
.compare-table td:first-child {
  font-size: var(--text-small);
  color: var(--text);
}

/* Text values in cells */
.compare-table .compare-val {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.compare-table .compare-val--strong {
  color: var(--text);
  font-weight: 500;
}

/* ---- Support Indicators ---- */
.compare-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  vertical-align: middle;
  position: relative;
}

/* Full support */
.compare-indicator--yes {
  background: var(--accent);
}

/* No support */
.compare-indicator--no {
  background: transparent;
  border: 1.5px solid var(--border-strong);
}

/* Partial support */
.compare-indicator--partial {
  background: transparent;
  border: 1.5px solid var(--border-strong);
  overflow: hidden;
}

.compare-indicator--partial::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: var(--text-tertiary);
  border-radius: 50% 0 0 50%;
}

/* ---- Category Deep-Dives ---- */
.compare-category {
  padding-block: var(--space-section);
  position: relative;
}

.compare-category + .compare-category {
  border-top: 1px solid var(--border);
}

.compare-category__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.compare-category__heading {
  font-size: var(--text-h2);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
  line-height: 1.2;
}

.compare-category__body {
  font-size: var(--text-body);
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: var(--space-xl);
}

/* 2-column grid for category content */
.compare-category__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  align-items: start;
}

/* Feature cards within categories */
.compare-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: border-color var(--dur) var(--ease);
}

.compare-card:hover {
  border-color: var(--border-strong);
}

.compare-card--atlas {
  border-color: rgba(124, 58, 237, 0.3);
  background: rgba(124, 58, 237, 0.03);
}

.compare-card--atlas:hover {
  border-color: rgba(124, 58, 237, 0.5);
}

[data-theme="light"] .compare-card--atlas {
  background: rgba(124, 58, 237, 0.02);
}

.compare-card__name {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-sm);
}

.compare-card--atlas .compare-card__name {
  color: var(--accent);
}

.compare-card__title {
  font-size: var(--text-body-lg);
  font-weight: 500;
  margin-bottom: var(--space-xs);
  line-height: 1.3;
}

.compare-card__detail {
  font-size: var(--text-small);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Feature list within cards */
.compare-card__features {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.compare-card__features li {
  font-size: var(--text-small);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  line-height: 1.4;
}

.compare-card__features .compare-indicator {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ---- Competitor Mini-Grid ---- */
.compare-competitors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.compare-competitor {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
}

.compare-competitor__name {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin-bottom: 0.375rem;
}

.compare-competitor__detail {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Strategy Count Badges ---- */
.compare-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
}

.compare-badge--muted {
  background: var(--surface);
  color: var(--text-tertiary);
}

.compare-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-sm);
}

/* ---- Platform Icons Row ---- */
.compare-platforms {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.375rem;
}

.compare-platform {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--surface);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.compare-platform svg {
  width: 12px;
  height: 12px;
  opacity: 0.7;
}

/* ---- Price Highlight ---- */
.compare-price {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.compare-price__unit {
  font-size: var(--text-small);
  font-weight: 400;
  color: var(--text-secondary);
}

.compare-price__note {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: 0.125rem;
}

/* ---- CTA Section ---- */
.compare-cta {
  text-align: center;
  padding-block: var(--space-section);
  border-top: 1px solid var(--border);
}

.compare-cta__heading {
  font-size: var(--text-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.compare-cta__buttons {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .compare-category__grid--side {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  .compare-category__grid--wide {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .compare-competitors {
    grid-template-columns: 1fr;
  }

  .compare-table th:first-child,
  .compare-table td:first-child {
    min-width: 130px;
  }
}
