/* Round 111: the comparison page (rackoon.fit/compare/). Colors come from ../styles.css's tokens. */

.cmp {
  padding-block: 32px 56px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.cmp h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.cmp h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.cmp-head .lead {
  margin-top: 8px;
}
.asof,
.hint,
.key,
.tm {
  color: var(--muted);
  font-size: 0.9rem;
}
.asof {
  margin-top: 8px;
}
.cmp ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 1.2em;
  max-width: 70ch;
}
.cmp-diff {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.cmp-diff ul {
  margin: 0;
  /* Round 140: the text uses the card's whole width. */
  max-width: none;
}

/* The table scrolls sideways inside its own box on phones, with the feature column pinned. */
.table-box {
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--card);
}
.table-box:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.cmp-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  min-width: 860px;
  font-size: 0.9rem;
  line-height: 1.35;
}
.cmp-table th,
.cmp-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.cmp-table tbody tr:last-child > * {
  border-bottom: 0;
}
.cmp-table thead th {
  font-weight: 800;
  font-size: 0.95rem;
  /* Round 115: in amber (her call; the size stays). */
  color: var(--accent);
  white-space: nowrap;
}
.cmp-table tbody th {
  font-weight: 700;
  width: 150px;
}
.cmp-table tr > :first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card);
  border-right: 1px solid var(--border);
}
.cmp-table .us {
  background: var(--accent-soft);
}
.cmp-table thead .us {
  color: var(--accent);
}

/* Each answer is a word, with a mark in front, so it never relies on color alone. */
.yes,
.part,
.no,
.unk {
  display: inline-block;
  font-weight: 700;
  margin-right: 4px;
}
.yes::before {
  content: '✓ ';
  color: var(--accent);
}
.part::before {
  content: '◐ ';
  color: var(--accent);
}
.no::before {
  content: '— ';
}
.unk {
  color: var(--muted);
  font-weight: 600;
}
.unk::before {
  content: '? ';
}
.key {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.key .unk {
  font-weight: 600;
}
.price {
  white-space: nowrap;
}
.hint {
  margin-bottom: 8px;
}
@media (min-width: 900px) {
  .phone-only {
    display: none;
  }
}
.cmp-src ul {
  font-size: 0.95rem;
}
.cmp-src p {
  max-width: 70ch;
}
.tm {
  margin-top: 12px;
}

/* Round 112: cells her review wants on one line, a little more room for Strong, and "Also in Rackoon"
   without the 70ch limit. */
.cmp-table .nw {
  white-space: nowrap;
}
.cmp-table thead th:nth-child(4) {
  min-width: 130px;
}
.cmp-also ul {
  max-width: none;
}
/* Round 140: Join the waitlist under "See all the features →". */
.cmp-also .cmp-wait {
  margin-top: 14px;
}
.cmp-also .cmp-wait .soon-card-btn {
  margin-top: 0;
}
.survey-link {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}
/* The one-line cells need about 150 px for each of the six other apps: on big screens the table reaches
   past the page's usual column (centered, the text stays in line with the top bar), and the feature and
   Rackoon columns keep their room. Narrower windows scroll the table in its box, as on phones. */
@media (min-width: 1100px) {
  .table-box {
    width: min(1360px, calc(100vw - 48px));
    position: relative;
    left: 50%;
    transform: translateX(-50%);
  }
}
.cmp-table thead th:nth-child(1) {
  min-width: 140px;
}
.cmp-table thead th:nth-child(2) {
  min-width: 170px;
}

/* Round 115: on phones, each feature is a section of small cards (compare.js builds them from the table):
   Rackoon on its own centered row, the other six three to a row. From 700 px the table shows instead. */
.cmp-cards {
  display: none;
}
@media (max-width: 699.98px) {
  .has-cards .table-box,
  .has-cards .hint {
    display: none;
  }
  .has-cards .cmp-cards {
    display: flex;
    flex-direction: column;
  }
  /* Her call: Side by side a size bigger than the feature titles under it, and a rule before the first. */
  .has-cards #table-title {
    font-size: 1.75rem;
  }
}
.cmp-feat {
  padding-block: 16px;
  border-top: 1px solid var(--border);
}
.cmp-feat:first-child {
  margin-top: 6px;
}
.cmp .cmp-feat h3 {
  font-size: 1.35rem; /* the same size as Side by side (her call) */
  font-weight: 800;
  margin: 0 0 10px;
  text-align: center;
  text-wrap: balance;
}
.cmp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.cmp-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px 9px 10px;
  font-size: 0.85rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  min-width: 0;
}
.cmp-card.us {
  grid-column: 1 / -1;
  text-align: center; /* full row, text centered (her call) */
  background: var(--accent-soft);
  border-color: var(--accent);
}
.cmp-app {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  margin: 0 0 6px;
  font-weight: 800;
  font-size: 1rem; /* about 2 pt bigger than the card text, in amber (her call) */
  color: var(--accent);
}
.cmp-card.us .cmp-app {
  font-size: 1.1rem;
}
.cmp-face {
  flex: none;
  width: 28px;
  height: auto;
}
.cmp-say .yes,
.cmp-say .part,
.cmp-say .no,
.cmp-say .unk {
  display: block;
  margin: 0 0 2px;
}
/* Round 115: the raccoon face next to Rackoon's name in the table's header too (her ask). */
.us-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
/* Round 115: "See all the features →" in amber (her call). */
.cmp-also .nav-link {
  color: var(--accent);
}

/* Round 118 (her note): a little bigger text in the table on computers; phones keep the cards.
   Round 119: the size between that and the old one (her call). The Rackoon column is just wide
   enough for "Help us pick a fair price →" on one line (width: 1% shrinks it to that link). */
@media (min-width: 1100px) {
  .cmp-table {
    font-size: 0.95rem;
  }
  .cmp-table thead th {
    font-size: 1rem;
  }
  .cmp-table .us {
    width: 1%;
  }
  .cmp-table thead th:nth-child(2) {
    min-width: 0;
  }
  .survey-link {
    white-space: nowrap;
  }
}
