/* Competitor comparison matrix — sticky e航无忧 column, color-coded cells.
   Loaded after styles-cg.css to layer on existing tokens. */

.cg-theme .compare-section {
  padding: 96px 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f4f9ff 100%);
}

.cg-theme .compare-section .section-heading {
  max-width: 760px;
  margin: 0 auto 40px;
  text-align: center;
}

.cg-theme .compare-section .section-heading h2 {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.18;
  color: var(--ink);
  margin: 10px 0 12px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.cg-theme .compare-section .section-heading p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
}

.cg-theme .compare-table-wrap {
  width: min(1100px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

.cg-theme .compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.cg-theme .compare-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 22px 20px;
  background: #f7faff;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-align: left;
  border-bottom: 2px solid var(--line);
  vertical-align: middle;
}

.cg-theme .compare-table thead th.compare-col-us {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  text-align: center;
  position: relative;
}

.cg-theme .compare-table thead th.compare-col-feature {
  width: 32%;
}

.cg-theme .compare-badge {
  display: inline-block;
  padding: 2px 10px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  vertical-align: middle;
}

.cg-theme .compare-table tbody td {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  line-height: 1.5;
  vertical-align: middle;
}

.cg-theme .compare-table tbody td:first-child {
  font-weight: 600;
  color: var(--ink);
  background: #fbfdff;
}

.cg-theme .compare-table tbody tr:last-child td {
  border-bottom: none;
}

.cg-theme .compare-table tbody tr:hover td {
  background: rgba(28, 115, 255, 0.04);
}

.cg-theme .compare-table tbody tr:hover td.compare-cell-us {
  background: rgba(28, 115, 255, 0.1);
}

/* The e航无忧 column gets a soft tint and an accent left/right border */
.cg-theme .compare-table .compare-cell-us {
  background: rgba(28, 115, 255, 0.06);
  text-align: center;
  font-weight: 600;
  color: var(--blue-dark);
  border-left: 1px solid rgba(28, 115, 255, 0.18);
  border-right: 1px solid rgba(28, 115, 255, 0.18);
}

.cg-theme .compare-table td[data-compare="yes"] {
  color: var(--green);
}

.cg-theme .compare-table td[data-compare="partial"] {
  color: var(--amber);
}

.cg-theme .compare-table td[data-compare="no"] {
  color: var(--rose);
}

/* Prepend a small status glyph using ::before */
.cg-theme .compare-table td[data-compare]::before {
  display: inline-block;
  margin-right: 6px;
  font-size: 13px;
  font-weight: 700;
  width: 16px;
  text-align: center;
}

.cg-theme .compare-table td[data-compare="yes"]::before {
  content: "✓";
}

.cg-theme .compare-table td[data-compare="partial"]::before {
  content: "◐";
}

.cg-theme .compare-table td[data-compare="no"]::before {
  content: "✕";
}

.cg-theme .compare-table .compare-cell-us[data-compare]::before {
  color: var(--blue);
}

.cg-theme .compare-footnote {
  width: min(1100px, 100%);
  margin: 18px auto 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.65;
}

.cg-theme .compare-footnote a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.cg-theme .compare-footnote a:hover {
  text-decoration: underline;
}

/* ── Dark theme ── */
.cg-theme.dark .compare-section {
  background: linear-gradient(180deg, #0a1426 0%, #0c1730 100%);
}

.cg-theme.dark .compare-section .section-heading h2 {
  color: #f1f6ff;
}

.cg-theme.dark .compare-section .section-heading p {
  color: #9bb3d6;
}

.cg-theme.dark .compare-table-wrap {
  background: rgba(19, 30, 56, 0.78);
  border-color: rgba(120, 150, 200, 0.22);
}

.cg-theme.dark .compare-table thead th {
  background: rgba(15, 26, 50, 0.95);
  color: #f1f6ff;
  border-bottom-color: rgba(120, 150, 200, 0.22);
}

.cg-theme.dark .compare-table tbody td {
  color: #d7e8ff;
  border-bottom-color: rgba(120, 150, 200, 0.18);
}

.cg-theme.dark .compare-table tbody td:first-child {
  background: rgba(15, 26, 50, 0.55);
  color: #f1f6ff;
}

.cg-theme.dark .compare-table tbody tr:hover td {
  background: rgba(28, 115, 255, 0.08);
}

.cg-theme.dark .compare-table tbody tr:hover td.compare-cell-us {
  background: rgba(28, 115, 255, 0.16);
}

.cg-theme.dark .compare-cell-us {
  background: rgba(28, 115, 255, 0.1);
  color: #9cc4ff;
  border-left-color: rgba(28, 115, 255, 0.28);
  border-right-color: rgba(28, 115, 255, 0.28);
}

.cg-theme.dark .compare-footnote {
  color: #9bb3d6;
}

.cg-theme.dark .compare-footnote a {
  color: #6ea2ff;
}

/* ── Responsive ── */
@media (max-width: 880px) {
  .cg-theme .compare-section {
    padding: 72px 16px;
  }

  .cg-theme .compare-table thead th,
  .cg-theme .compare-table tbody td {
    padding: 14px 14px;
    font-size: 13px;
  }

  .cg-theme .compare-table thead th.compare-col-feature {
    width: 40%;
  }
}

@media (max-width: 560px) {
  .cg-theme .compare-table {
    min-width: 580px;
  }

  .cg-theme .compare-section .section-heading h2 {
    font-size: 24px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cg-theme .compare-table tbody tr {
    transition: none;
  }
}
