/* Compare pages (compare.html, compare-*.html), on top of site.css. Additions only:
   hairline tables, monochrome marks, no cards and no accent colour. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.cmp-h2 {
  margin-bottom: var(--s3);
}

.cmp-note {
  margin: 0 0 var(--s4);
}

/* Wide tables scroll inside themselves on phones, never the page. */
.cmp-scroll {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.cmp-table {
  min-width: 640px;
  table-layout: fixed;
}

.cmp-table th[scope="row"] {
  width: 30%;
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 500;
}

.cmp-table thead th {
  color: var(--fg);
  font-size: 0.9375rem;
  font-weight: 600;
}

.cmp-table--hub {
  min-width: 860px;
}

.cmp-table--hub th[scope="row"] {
  width: 18%;
}

.cmp-table--hub th[scope="row"] a {
  text-decoration: underline;
  text-decoration-color: var(--line-3);
  text-underline-offset: 3px;
}

.cmp-table--hub th[scope="row"] a:hover {
  text-decoration-color: currentColor;
}

.cmp-table th small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

.cmp-group th {
  padding-top: var(--s5);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.cmp-cell {
  color: var(--fg-2);
}

.cmp-mark {
  display: block;
  width: 18px;
  height: 18px;
  margin-bottom: 6px;
}

.cmp-mark svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cmp-cell--yes .cmp-mark {
  color: var(--fg);
}

.cmp-cell--partial .cmp-mark,
.cmp-cell--no .cmp-mark,
.cmp-cell--unknown .cmp-mark {
  color: var(--muted);
}

.cmp-cell--partial .cmp-mark svg {
  stroke-width: 1.6;
}

.cmp-text {
  display: block;
  font-size: 0.875rem;
  line-height: 1.5;
}

.cmp-cell--no .cmp-text,
.cmp-cell--unknown .cmp-text {
  color: var(--muted);
}

.cmp-src {
  color: var(--muted);
  font-size: 0.8125rem;
  white-space: nowrap;
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

.cmp-src:hover {
  color: var(--fg);
  text-decoration-color: currentColor;
}

.cmp-list {
  margin: var(--s3) 0 0;
  padding: 0;
  list-style: none;
}

.cmp-list li {
  border-top: 1px solid var(--line);
}

.cmp-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.cmp-list a {
  display: block;
  padding: 14px 0;
  color: var(--fg);
  font-size: 1.0625rem;
}

.cmp-list a:hover {
  color: var(--muted);
}

/* Phones: each row stacks, the feature on top and its cells labelled side by side. */
@media (max-width: 640px) {
  .cmp-table,
  .cmp-table--hub {
    min-width: 0;
    table-layout: auto;
  }

  .cmp-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .cmp-table tbody,
  .cmp-table tr {
    display: block;
  }

  .cmp-table tbody tr:not(.cmp-group) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--s3);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .cmp-table th[scope="row"],
  .cmp-table--hub th[scope="row"] {
    grid-column: 1 / -1;
    width: auto;
    padding: 0 0 10px;
    border: 0;
  }

  .cmp-table td {
    padding: 0 0 8px;
    border: 0;
  }

  .cmp-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
  }

  .cmp-group th {
    display: block;
    padding: var(--s5) 0 10px;
  }
}
