/* Platform comparison matrix and layout upgrades (fiftyone.xyz/compare*) */

.inst-platform-capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
}

.inst-platform-capabilities > div {
  padding-block: 20px 24px;
  border-top: 1px solid var(--i-rule);
}

.inst-platform-capabilities h3 {
  margin-bottom: 8px;
  color: var(--i-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

.inst-platform-capabilities p {
  max-width: 56ch;
  color: var(--i-muted);
  font-size: 15px;
  line-height: 1.6;
}

.inst-platform-capabilities .inst-fine {
  margin-top: 10px;
}

/* Quick head-to-head comparison jump links */
.cmp-jump-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
  max-width: var(--i-wide);
}

.cmp-jump-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--i-rule);
  background: rgba(21, 28, 40, 0.72);
  color: var(--i-ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.cmp-jump-pill:hover,
.cmp-jump-pill:focus-visible {
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.16);
  text-decoration: none;
}

/* Framed executive comparison matrix */
.cmp-matrix-wrap {
  margin-top: 20px;
  border: 1px solid var(--i-rule);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(16, 22, 34, 0.96) 0%, rgba(10, 14, 23, 0.98) 100%);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
}

.cmp-matrix-wrap .inst-compare {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  margin: 0;
}

.cmp-matrix-wrap .inst-compare thead th {
  padding: 18px 16px;
  border-top: 0;
  border-bottom: 1px solid var(--i-rule);
  border-right: 1px solid var(--i-rule-soft);
  background: rgba(12, 17, 26, 0.96);
  color: var(--i-ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  opacity: 1;
  vertical-align: bottom;
}

.cmp-matrix-wrap .inst-compare thead th:last-child,
.cmp-matrix-wrap .inst-compare tbody td:last-child {
  border-right: 0;
}

.cmp-matrix-wrap .inst-compare thead th:first-child {
  color: var(--i-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: sticky;
  left: 0;
  z-index: 3;
  background: #0c111a;
  border-right: 1px solid var(--i-rule);
}

.cmp-matrix-wrap .inst-compare thead th.cmp-col-primary {
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  border-bottom-color: rgba(147, 197, 253, 0.45);
  border-right-color: rgba(147, 197, 253, 0.25);
}

.cmp-col-tag {
  display: block;
  margin-bottom: 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(219, 234, 254, 0.88);
}

.cmp-col-link {
  color: inherit;
  text-decoration: none;
}

.cmp-col-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cmp-matrix-wrap .inst-compare tbody th[scope='row'] {
  min-width: 170px;
  max-width: 210px;
  padding: 18px 16px;
  border-top: 1px solid var(--i-rule-soft);
  border-right: 1px solid var(--i-rule);
  background: #0c111a;
  color: var(--i-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  position: sticky;
  left: 0;
  z-index: 2;
}

.cmp-matrix-wrap .inst-compare tbody td {
  min-width: 210px;
  padding: 18px 16px;
  border-top: 1px solid var(--i-rule-soft);
  border-right: 1px solid var(--i-rule-soft);
  color: var(--i-muted);
  font-size: 13.5px;
  line-height: 1.55;
  vertical-align: top;
}

.cmp-matrix-wrap .inst-compare tbody tr:first-child th,
.cmp-matrix-wrap .inst-compare tbody tr:first-child td {
  border-top: 0;
}

.cmp-matrix-wrap .inst-compare tbody tr:hover td:not(.cmp-col-primary) {
  background: rgba(160, 186, 226, 0.03);
}

.cmp-matrix-wrap .inst-compare tbody td.cmp-col-primary {
  background: rgba(37, 99, 235, 0.11);
  border-right: 1px solid rgba(96, 165, 250, 0.24);
  color: #e6eefc;
}

.cmp-matrix-wrap .inst-compare tbody tr:hover td.cmp-col-primary {
  background: rgba(37, 99, 235, 0.15);
}

/* Head-to-head 2-column tables get wider breathing room */
.cmp-matrix-wrap.is-two-col .inst-compare tbody th[scope='row'] {
  width: 24%;
  min-width: 180px;
}

.cmp-matrix-wrap.is-two-col .inst-compare tbody td {
  width: 38%;
  min-width: 240px;
}

/* Verdict pills inside matrix cells */
.cmp-verdict {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.cmp-verdict::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
}

.cmp-verdict.is-yes {
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.45);
  color: #dbeafe;
}

.cmp-verdict.is-yes::before {
  background: #60a5fa;
}

.cmp-verdict.is-partial {
  background: rgba(160, 186, 226, 0.1);
  border: 1px solid rgba(160, 186, 226, 0.22);
  color: #cbd5e1;
}

.cmp-verdict.is-partial::before {
  background: #94a3b8;
}

.cmp-verdict.is-no {
  background: rgba(111, 122, 142, 0.1);
  border: 1px solid rgba(111, 122, 142, 0.22);
  color: #94a3b8;
}

.cmp-verdict.is-no::before {
  background: #64748b;
}

.cmp-cell-body {
  display: block;
}

.cmp-cell-sources {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--i-quiet);
}

.cmp-cell-sources a {
  color: var(--i-ice);
}

.cmp-scroll-hint {
  margin-top: 10px;
  color: var(--i-quiet);
  font-size: 12.5px;
}

@media (max-width: 760px) {
  .cmp-matrix-wrap .inst-compare thead th:first-child,
  .cmp-matrix-wrap .inst-compare tbody th[scope='row'] {
    position: static;
    min-width: 140px;
  }

  .cmp-matrix-wrap .inst-compare tbody td {
    min-width: 190px;
    padding: 14px 12px;
  }
}

@media (max-width: 620px) {
  .inst-platform-capabilities {
    grid-template-columns: minmax(0, 1fr);
  }
}
