/* research/static/research/css/landing/compat.css */
/* "Runs on ___. Reports to no one." — under _licence. A boundary diagram: everything sits
   inside the visitor's own account; freyAI is outside the wall with no line in. The platform
   name cycles (landing.js initCompat) and the chips pick one. Names are type, not logos. */
.lp-compat {
  display: grid;
  grid-template-columns: minmax(0, 520px) minmax(0, 780px);
  justify-content: center;
  align-items: center;
  column-gap: var(--space-16);
  padding: var(--space-20) var(--lp-gutter);
  border-top: 2px solid var(--lp-rule);
}

.lp-compat__kicker {
  margin-bottom: var(--space-6);
  color: var(--lp-sky);
}

.lp-compat__title {
  font-size: clamp(56px, 5.4vw, 80px);
}

/* Every platform name sits in the same grid cell, so the line is always as wide as the
   longest one and swapping names never reflows the heading. */
.lp-compat__name {
  display: inline-grid;
  color: var(--lp-sky);
}

.lp-compat__name-item {
  grid-area: 1 / 1;
  white-space: nowrap;
  visibility: hidden;
}

.lp-compat__name-item.is-active {
  visibility: visible;
}

.lp-compat__accent {
  color: var(--lp-on-ink-soft);
}

.lp-compat__lede {
  max-width: 40ch;
  margin-top: var(--space-8);
  font-size: var(--lp-text-lede);
  line-height: var(--leading-snug);
  color: var(--lp-on-ink);
}

.lp-compat__picker {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-10);
}

.lp-compat__chip {
  min-height: 44px;
  padding: 0 var(--space-4);
  border: 2px solid var(--slate-600);
  background: transparent;
  color: var(--lp-on-ink);
  font-family: var(--font-mono);
  font-size: var(--lp-text-label);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--duration-base) var(--ease-standard), border-color var(--duration-base) var(--ease-standard), color var(--duration-base) var(--ease-standard);
}

.lp-compat__chip.is-active {
  border-color: var(--lp-sky);
  background: var(--lp-sky);
  color: var(--lp-ink);
}

@media (hover: hover) {
  .lp-compat__chip:not(.is-active):hover {
    border-color: var(--lp-sky);
    color: var(--lp-sky);
  }
}

/* Diagram: [ your account ] — ✕ — [ freyAI ] */
.lp-compat__diagram {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 220px;
  align-items: center;
  margin: 0;
}

.lp-compat__boundary {
  padding: var(--space-6);
  border: 2px dashed var(--lp-sky);
}

.lp-compat__boundary-label {
  display: flex;
  white-space: nowrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  color: var(--lp-sky);
}

.lp-compat__boundary-label .material-icons {
  font-size: var(--text-xl);
}

.lp-compat__parts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.lp-compat__part {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--space-3);
  padding: var(--space-4);
  background: var(--slate-800);
  border: 1px solid var(--slate-700);
}

.lp-compat__part .material-icons {
  grid-row: span 2;
  color: var(--lp-sky);
  font-size: var(--text-3xl);
}

.lp-compat__part b {
  font-size: var(--lp-text-body);
}

.lp-compat__part span:last-child {
  font-size: var(--lp-text-small);
  color: var(--lp-on-ink-soft);
}

.lp-compat__facts {
  margin-top: var(--space-5);
  color: var(--lp-on-ink-soft);
}

.lp-compat__wall {
  position: relative;
  height: 2px;
  margin: 0 var(--space-2);
  background: repeating-linear-gradient(90deg, var(--slate-600) 0 8px, transparent 8px 14px);
}

.lp-compat__cut {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--color-danger);
  border-radius: var(--radius-full);
  background: var(--lp-ink);
  color: var(--color-danger);
  font-weight: var(--font-bold);
  transform: translate(-50%, -50%);
}

.lp-compat__outside {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 2px solid var(--slate-600);
  color: var(--lp-on-ink-soft);
}

.lp-compat__logo {
  opacity: 0.7;
}

.lp-compat__outside .lp-mono {
  line-height: var(--leading-relaxed);
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .lp-compat {
    grid-template-columns: minmax(0, 1fr);
    row-gap: var(--space-12);
  }
}

@media (max-width: 760px) {
  .lp-compat {
    padding: var(--space-14) var(--lp-gutter);
  }

  .lp-compat__diagram {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
  }

  .lp-compat__boundary,
  .lp-compat__outside {
    justify-self: stretch;
  }

  .lp-compat__parts {
    grid-template-columns: minmax(0, 1fr);
  }

  .lp-compat__wall {
    width: 2px;
    height: 56px;
    margin: var(--space-2) 0;
    background: repeating-linear-gradient(180deg, var(--slate-600) 0 8px, transparent 8px 14px);
  }

  .lp-compat__outside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}
