.compare-page {
  padding-top: var(--header);
}

.compare-hero {
  position: relative;
  overflow: hidden;
  padding-block: 105px 82px;
  border-bottom: 1px solid var(--line);
}

.compare-hero::before {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(69, 248, 130, .13), transparent 34%),
    radial-gradient(circle at 18% 80%, rgba(167, 139, 250, .1), transparent 38%);
  content: "";
  pointer-events: none;
}

.compare-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  align-items: center;
  gap: 64px;
}

.compare-title {
  max-width: 820px;
  margin: 20px 0;
  font-size: clamp(52px, 6vw, 86px);
  line-height: .94;
  letter-spacing: -.055em;
}

.compare-title span {
  color: var(--green);
}

.compare-lede {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.compare-hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 27px;
}

.compare-hero-proof span {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.tier-preview {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  align-items: stretch;
  gap: 12px;
}

.tier-preview-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(13, 17, 23, .88);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .22);
}

.tier-preview-card--premium {
  transform: translateY(-16px);
  border-color: rgba(69, 248, 130, .3);
  background:
    radial-gradient(circle at 100% 0, rgba(69, 248, 130, .15), transparent 43%),
    rgba(13, 18, 22, .95);
}

.tier-preview-card > small {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.tier-preview-card h2 {
  margin: 17px 0 7px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.tier-preview-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.tier-preview-card ul {
  display: grid;
  gap: 12px;
  margin: 23px 0 0;
  padding: 0;
  list-style: none;
}

.tier-preview-card li {
  display: flex;
  gap: 9px;
  color: #c7cfd6;
  font-size: 12px;
}

.tier-preview-card li::before {
  color: var(--green);
  content: "✓";
}

.compare-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  margin-top: -1px;
  border: 1px solid var(--line);
  border-radius: 0 0 20px 20px;
  background: var(--line);
}

.compare-stat {
  min-height: 104px;
  padding: 23px;
  background: rgba(12, 16, 21, .98);
}

.compare-stat strong,
.compare-stat small {
  display: block;
}

.compare-stat strong {
  font-family: "Space Grotesk", sans-serif;
  font-size: 28px;
}

.compare-stat small {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.compare-content {
  padding-block: 70px 100px;
}

.compare-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}

.compare-heading h2 {
  margin: 10px 0 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(34px, 4vw, 50px);
  letter-spacing: -.04em;
}

.compare-heading p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  text-align: right;
}

.compare-notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 202, 99, .2);
  border-radius: 15px;
  background: rgba(255, 202, 99, .055);
  color: #d8cfba;
  font-size: 12px;
  line-height: 1.6;
}

.compare-notice b {
  color: var(--amber);
}

.game-switcher {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 32px 0 18px;
}

.game-switch {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  min-height: 72px;
  gap: 12px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.game-switch:hover {
  transform: translateY(-2px);
  border-color: rgba(69, 248, 130, .22);
}

.game-switch.is-active {
  border-color: rgba(69, 248, 130, .38);
  background: rgba(69, 248, 130, .07);
  color: var(--text);
}

.game-switch img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 10px;
}

.game-switch strong,
.game-switch small {
  display: block;
}

.game-switch strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-switch small {
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
  text-transform: uppercase;
}

.compare-panel[hidden] {
  display: none;
}

/* Comparison panels can be thousands of pixels tall, so a percentage-based
   reveal observer may never reach its threshold. Keep the active panel
   readable even if an older polish script has marked it for reveal. */
.compare-panel[data-ux-reveal] {
  opacity: 1 !important;
  filter: none !important;
  transform: none !important;
}

.feature-board {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(13, 17, 23, .86);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .2);
}

.feature-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: center;
  gap: 25px;
  padding: 28px 30px;
  border-bottom: 1px solid var(--line);
}

.feature-game {
  display: flex;
  align-items: center;
  gap: 17px;
}

.feature-game img {
  width: 90px;
  height: 58px;
  object-fit: cover;
  border-radius: 12px;
}

.feature-game h3,
.feature-game p {
  margin: 0;
}

.feature-game h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
}

.feature-game p {
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 12px;
}

.feature-search {
  display: flex;
  align-items: center;
  min-height: 48px;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}

.feature-search::before {
  color: var(--green);
  content: "⌕";
  font-size: 20px;
}

.feature-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.premium-only-note {
  margin: 17px 30px 0;
  padding: 13px 15px;
  border: 1px solid rgba(167, 139, 250, .22);
  border-radius: 12px;
  background: rgba(167, 139, 250, .065);
  color: #d6ccf5;
  font-size: 12px;
}

.premium-only-note strong {
  color: #c6b4ff;
}

.feature-table-wrap {
  overflow-x: auto;
}

.feature-matrix {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.feature-matrix th,
.feature-matrix td {
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.feature-matrix th {
  background: rgba(255, 255, 255, .035);
  color: #c7d0da;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.feature-matrix th:not(:first-child),
.feature-matrix td:not(:first-child) {
  width: 17%;
  text-align: center;
}

.feature-matrix .category-row td {
  padding-block: 13px;
  background: rgba(69, 248, 130, .045);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.feature-row td:first-child {
  color: #d8dee4;
  font-size: 12px;
}

.feature-row:hover td {
  background: rgba(255, 255, 255, .018);
}

.feature-state {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
}

.feature-state.is-yes {
  border: 1px solid rgba(69, 248, 130, .25);
  background: rgba(69, 248, 130, .08);
  color: var(--green);
}

.feature-state.is-no {
  border: 1px solid rgba(255, 107, 145, .18);
  background: rgba(255, 107, 145, .055);
  color: #ff789a;
}

.feature-empty {
  padding: 35px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.compare-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-top: 30px;
  padding: 31px;
  border: 1px solid rgba(69, 248, 130, .19);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 0, rgba(69, 248, 130, .12), transparent 38%),
    rgba(16, 21, 28, .8);
}

.compare-cta h3,
.compare-cta p {
  margin: 0;
}

.compare-cta h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 25px;
}

.compare-cta p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .compare-hero-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 40px;
  }

  .game-switcher {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .tier-preview {
    max-width: 560px;
  }

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

  .compare-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .compare-heading p {
    text-align: left;
  }

  .feature-board-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .compare-hero {
    padding-block: 62px 52px;
  }

  .compare-title {
    font-size: 48px;
  }

  .compare-lede {
    font-size: 13px;
  }

  .tier-preview {
    grid-template-columns: 1fr;
  }

  .tier-preview-card {
    min-height: auto;
  }

  .tier-preview-card--premium {
    transform: none;
  }

  .compare-stat {
    min-height: 88px;
    padding: 18px;
  }

  .game-switcher {
    display: flex;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-snap-type: x mandatory;
  }

  .game-switch {
    min-width: 205px;
    scroll-snap-align: start;
  }

  .feature-board-head {
    padding: 21px;
  }

  .feature-game img {
    width: 75px;
    height: 50px;
  }

  .feature-game h3 {
    font-size: 20px;
  }

  .premium-only-note {
    margin-inline: 18px;
  }

  .feature-matrix,
  .feature-matrix tbody,
  .feature-matrix tr,
  .feature-matrix td {
    display: block;
    width: 100%;
  }

  .feature-matrix thead {
    display: none;
  }

  .feature-matrix tbody {
    border-bottom: 1px solid var(--line);
  }

  .feature-matrix .category-row td {
    padding: 13px 18px;
  }

  .feature-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
  }

  .feature-row td {
    padding: 9px 0;
    border: 0;
  }

  .feature-row td:first-child {
    grid-column: 1 / -1;
    padding-bottom: 12px;
    font-size: 12px;
  }

  .feature-row td:not(:first-child) {
    display: flex;
    width: 100% !important;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .feature-row td:not(:first-child)::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .compare-cta {
    align-items: flex-start;
    flex-direction: column;
    padding: 24px;
  }
}
