/* ============================================================
   Competitive blocks — DifferentiatorsHero, CompetitorTable, CostCalculator
============================================================ */

/* ---------- 1. Differentiators ---------- */
.diff-sec {
  background: linear-gradient(180deg, white 0%, var(--ink-100) 100%);
  border-top: 1px solid var(--ink-200);
}
.diff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.diff-card {
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  padding: 28px 26px 24px;
  display: flex; flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.diff-card:hover {
  transform: translateY(-3px);
  border-color: var(--plum-300);
  box-shadow: 0 18px 40px -22px color-mix(in oklch, var(--plum-900) 30%, transparent);
}
.diff-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 4px;
}
.diff-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600;
  color: var(--ink-400);
  letter-spacing: 0.06em;
}
.diff-hi {
  text-align: right;
  display: flex; flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.diff-hi strong {
  font-family: 'Inter Tight'; font-weight: 800;
  font-size: 22px; letter-spacing: -0.02em;
  color: var(--plum-700);
  line-height: 1;
}
.diff-hi span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-500);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.diff-h {
  font-family: 'Inter Tight'; font-weight: 700;
  font-size: 20px; letter-spacing: -0.01em;
  color: var(--ink-950);
  margin: 0;
  line-height: 1.25;
}
.diff-what {
  font-size: 14px; line-height: 1.55;
  color: var(--ink-700);
  margin: 0;
}
.diff-why {
  background: color-mix(in oklch, var(--plum-100) 50%, transparent);
  border-radius: 10px;
  padding: 14px 16px;
  border-left: 3px solid var(--plum-500);
}
.diff-why-tag {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px; font-weight: 600;
  color: var(--plum-700);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.diff-why p {
  margin: 0;
  font-size: 13px; line-height: 1.5;
  color: var(--ink-800);
}
.diff-who {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed var(--ink-200);
  display: flex; justify-content: space-between;
  font-size: 12px;
}
.diff-who span {
  color: var(--ink-500);
  font-family: 'JetBrains Mono', monospace;
}
.diff-who strong {
  color: var(--ink-800);
  font-weight: 600;
  font-family: 'Inter Tight';
  text-align: right;
}

/* ---------- 2. Competitor table ---------- */
.ct-sec {
  background: white;
  border-top: 1px solid var(--ink-200);
}
.ct-wrap {
  margin-top: 48px;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  overflow: hidden;
  background: white;
}
.ct-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.ct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 880px;
}
.ct-table th, .ct-table td {
  padding: 14px 12px;
  text-align: center;
  border-bottom: 1px solid var(--ink-200);
}
.ct-table thead th {
  background: var(--ink-100);
  border-bottom: 2px solid var(--ink-200);
  vertical-align: bottom;
  position: sticky; top: 0;
  z-index: 1;
}
.ct-h-inner { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.ct-h-inner strong {
  font-family: 'Inter Tight'; font-weight: 700;
  font-size: 13px;
  color: var(--ink-900);
}
.ct-h-inner span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--ink-500);
}
.ct-us-h {
  background: linear-gradient(180deg, var(--plum-100), color-mix(in oklch, var(--plum-200) 60%, white)) !important;
  border-bottom-color: var(--plum-400) !important;
}
.ct-us-h .ct-h-inner strong {
  color: var(--plum-800);
  font-weight: 800;
}
.ct-us-h .ct-h-inner span { color: var(--plum-600); }

.ct-feat-h {
  text-align: left !important;
  background: var(--ink-100);
}
.ct-feat {
  text-align: left !important;
  padding: 14px 16px !important;
  font-weight: 500;
  color: var(--ink-800);
  background: var(--ink-100);
  border-right: 1px solid var(--ink-200);
  min-width: 200px;
  max-width: 260px;
}
.ct-table tbody tr:hover td { background: color-mix(in oklch, var(--plum-100) 18%, white); }
.ct-table tbody tr:hover .ct-feat { background: color-mix(in oklch, var(--plum-100) 30%, var(--ink-100)); }

.ct-us {
  background: color-mix(in oklch, var(--plum-100) 30%, white);
}
.ct-table tbody tr:hover .ct-us { background: color-mix(in oklch, var(--plum-100) 50%, white); }

.ct-yes {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--ok) 18%, transparent);
  color: var(--ok);
  font-weight: 800;
  font-size: 13px;
}
.ct-no {
  display: inline-block;
  color: var(--ink-300);
  font-weight: 600;
}
.ct-mid {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: color-mix(in oklch, oklch(0.85 0.12 80) 35%, transparent);
  color: oklch(0.55 0.15 60);
  font-size: 12px;
}
.ct-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 500;
  display: inline-block;
  line-height: 1.3;
}
.ct-us .ct-text { color: var(--plum-800); font-weight: 700; }

.ct-foot {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  background: var(--ink-100);
  border-top: 1px solid var(--ink-200);
  flex-wrap: wrap; gap: 12px;
}
.ct-toggle {
  background: white;
  border: 1px solid var(--ink-300);
  border-radius: 999px;
  padding: 8px 18px;
  font-family: 'Inter Tight'; font-weight: 600;
  font-size: 13px;
  color: var(--plum-800);
  cursor: pointer;
  transition: all 200ms ease;
}
.ct-toggle:hover {
  background: var(--plum-100);
  border-color: var(--plum-400);
}
.ct-legend {
  display: flex; gap: 20px;
  font-size: 12px;
  color: var(--ink-600);
  flex-wrap: wrap;
}
.ct-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ct-legend .ct-yes, .ct-legend .ct-no, .ct-legend .ct-mid {
  width: 18px; height: 18px;
  font-size: 11px;
}

/* ---------- 3. Cost calculator ---------- */
.cc-sec {
  background: var(--ink-100);
  border-top: 1px solid var(--ink-200);
}
.cc-card {
  margin-top: 48px;
  background: white;
  border: 1px solid var(--ink-200);
  border-radius: 22px;
  overflow: hidden;
}
.cc-tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--ink-200);
}
.cc-tier-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 12px;
  background: var(--ink-50);
  border: none;
  border-right: 1px solid var(--ink-200);
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.cc-tier-tab:last-child { border-right: none; }
.cc-tier-tab strong { font-size: 14px; color: var(--ink-700); }
.cc-tier-tab span { font-size: 11px; color: var(--ink-500); }
.cc-tier-tab:hover { background: var(--ink-100); }
.cc-tier-tab.active {
  background: white;
  border-bottom: 2px solid var(--plum-600);
}
.cc-tier-tab.active strong { color: var(--plum-700); }
.cc-tier-tab.active span { color: var(--plum-500); }
@media (max-width: 600px) {
  .cc-tier-tabs { grid-template-columns: 1fr; }
  .cc-tier-tab { border-right: none; border-bottom: 1px solid var(--ink-200); }
  .cc-tier-tab:last-child { border-bottom: none; }
}
.cc-inputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 32px 32px 28px;
  background: linear-gradient(180deg, var(--plum-100), color-mix(in oklch, var(--plum-100) 30%, white));
  border-bottom: 1px solid var(--ink-200);
}
.cc-input { display: flex; flex-direction: column; gap: 10px; }
.cc-input label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px;
  color: var(--ink-700);
  font-weight: 500;
}
.cc-input label strong {
  font-family: 'Inter Tight'; font-weight: 800;
  color: var(--plum-800);
  font-size: 18px;
  letter-spacing: -0.01em;
}

.cc-table { padding: 8px 0; }
.cc-row {
  display: grid;
  grid-template-columns: 1.4fr 1.6fr 140px;
  gap: 20px;
  padding: 16px 32px;
  align-items: center;
  border-bottom: 1px solid var(--ink-100);
  font-size: 13px;
  transition: background 200ms ease;
}
.cc-row:hover { background: var(--ink-100); }
.cc-row.cc-h {
  background: white;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--ink-200);
  padding-top: 12px; padding-bottom: 12px;
}
.cc-row.cc-h:hover { background: white; }
.cc-row.us {
  background: color-mix(in oklch, var(--plum-100) 35%, white);
  position: relative;
}
.cc-row.us:hover { background: color-mix(in oklch, var(--plum-100) 50%, white); }
.cc-row.us.featured {
  background: linear-gradient(90deg,
    color-mix(in oklch, var(--plum-100) 60%, white),
    color-mix(in oklch, var(--plum-100) 30%, white));
  border-left: 3px solid var(--plum-500);
  padding-left: 29px;
}
.cc-rank {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--ink-500);
}
.cc-row.us .cc-rank { color: var(--plum-700); font-weight: 700; }
.cc-name { display: flex; flex-direction: column; gap: 2px; }
.cc-name strong {
  font-family: 'Inter Tight'; font-weight: 700;
  font-size: 14px;
  color: var(--ink-900);
}
.cc-row.us .cc-name strong { color: var(--plum-900); }
.cc-name em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-500);
}
.cc-detail {
  font-size: 12px;
  color: var(--ink-600);
  line-height: 1.4;
}
.cc-total {
  font-family: 'Inter Tight'; font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.cc-row.us .cc-total {
  color: var(--plum-800);
}

.cc-summary {
  padding: 24px 32px 28px;
  background: var(--ink-100);
  border-top: 1px solid var(--ink-200);
  display: flex; flex-direction: column; gap: 14px;
}
.cc-summary-card {
  display: flex; align-items: baseline; gap: 14px;
  padding: 18px 22px;
  border-radius: 14px;
  flex-wrap: wrap;
}
.cc-summary-card.win {
  background: linear-gradient(135deg,
    color-mix(in oklch, var(--ok) 20%, white),
    color-mix(in oklch, var(--lime) 25%, white));
  border: 1px solid color-mix(in oklch, var(--ok) 35%, transparent);
}
.cc-summary-card.neutral {
  background: white;
  border: 1px solid var(--ink-200);
}
.cc-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px; font-weight: 600;
  color: var(--ok);
  text-transform: uppercase; letter-spacing: 0.08em;
}
.cc-summary-card.neutral .cc-tag { color: var(--plum-700); }
.cc-summary-card strong {
  font-family: 'Inter Tight'; font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink-900);
}
.cc-summary-card span:last-child {
  color: var(--ink-700);
  font-size: 13px;
  margin-left: auto;
}
.cc-fineprint {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.5;
  margin: 0;
  max-width: 78ch;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .diff-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-inputs { grid-template-columns: 1fr; gap: 18px; padding: 24px; }
  .cc-row { grid-template-columns: 1fr 100px; gap: 12px; padding: 14px 18px; }
  .cc-row.cc-h { grid-template-columns: 1fr 100px; }
  .cc-detail { display: none; }
  .cc-summary-card span:last-child { margin-left: 0; flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .diff-grid { grid-template-columns: 1fr; }
  .ct-table { font-size: 12px; min-width: 720px; }
  .ct-table th, .ct-table td { padding: 10px 8px; }
  .ct-feat { min-width: 160px; padding: 10px 12px !important; }
  .cc-total { font-size: 16px; }
  .cc-summary-card strong { font-size: 22px; }
}
