/* Comparison-only layout. Keep shared navigation, footer and tokens intact. */
.comparison-page .comparison-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(var(--measure) / 2)), 1fr));
  gap: var(--s6) var(--s7);
}
.comparison-page .comparison-features > * { min-width: 0; }
.comparison-page .comparison-table {
  display: table;
  table-layout: fixed;
  width: 100%;
  overflow: visible;
}
.comparison-table.tier-table :is(th, td) {
  width: auto;
  text-align: left;
  vertical-align: top;
  padding: var(--s4);
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: auto;
}
.comparison-table.tier-table thead th:first-child { width: 30%; }
.comparison-table.tier-table tbody th {
  background: transparent;
  color: var(--ink);
  font-weight: var(--weight-medium);
}
.comparison-table.tier-table tbody tr:nth-child(even) th { background: var(--paper-raised); }
.comparison-label { display: none; }

/* Standard tablet breakpoint: switch before three columns become cramped. */
@media (width < 48rem) {
  .comparison-page .comparison-table,
  .comparison-table tbody { display: block; }
  .comparison-table thead {
    position: absolute;
    width: var(--s1);
    height: var(--s1);
    overflow: hidden;
    clip-path: inset(50%);
  }
  .comparison-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: var(--s5);
    border: thin solid var(--hairline);
    border-radius: var(--r-control);
    overflow: hidden;
  }
  .comparison-table.tier-table tbody :is(th, td) {
    display: block;
    min-width: 0;
    border-bottom: none;
  }
  .comparison-table.tier-table tbody th,
  .comparison-table.tier-table tbody tr:nth-child(even) th {
    grid-column: 1 / -1;
    background: var(--paper-sunk);
    border-bottom: thin solid var(--hairline);
  }
  .comparison-table.tier-table tbody td:last-child { border-left: thin solid var(--hairline); }
  .comparison-table .comparison-label {
    display: block;
    margin-bottom: var(--s3);
    font-size: var(--type-small);
    font-weight: var(--weight-medium);
    color: var(--ink);
  }
}
