.majority-page { max-width: 76rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 3rem); }
.majority-page h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
.majority-page h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin-block: 2.5rem 1rem; }
.majority-sort { margin-block: 0 1rem; }
.majority-sort button { min-height: 44px; padding: .5rem 1rem; margin-inline-end: .5rem; border: 1px solid #526653; background: #f8f5eb; color: #26392e; font: inherit; cursor: pointer; }
.majority-sort button[aria-pressed="true"] { background: #304639; color: #fff; }
.majority-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}
.majority-table th,
.majority-table td {
  padding: .65rem .75rem;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid #cbd1c4;
  overflow-wrap: anywhere;
}
.majority-table th { background: #e8ece2; }
.majority-table td a { text-decoration: underline; text-underline-offset: .15em; }
.majority-label { display: none; }

.majority-table th:nth-last-child(5) { width: 19%; }
.majority-table th:nth-last-child(4) { width: 29%; }
.majority-table th:nth-last-child(3) { width: 13%; }
.majority-table th:nth-last-child(2) { width: 8rem; }
.majority-table:has(#majority-ranked) th:first-child { width: 4.5rem; }
.majority-table:has(#majority-ranked) th:nth-child(3) { width: 10rem; }
.majority-table:has(#majority-ranked) :is(th, td):first-child,
.majority-table:has(#majority-ranked) td:nth-child(3),
.majority-table td:nth-last-child(2) {
  white-space: nowrap;
  overflow-wrap: normal;
}
.majority-table [data-rank] { font-variant-numeric: tabular-nums; }
.majority-table td:nth-last-child(5),
.majority-table:has(#majority-ranked) td:nth-child(3) { font-weight: 650; }

@media (max-width: 56rem) {
  .majority-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .majority-table :is(tbody, tr) { display: block; }
  .majority-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: .45rem .75rem;
    padding: .85rem .25rem;
    border-block-start: 1px solid #a0ae9e;
  }
  .majority-table #majority-ranked tr {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    align-items: start;
  }
  .majority-table td { display: block; border: 0; padding: 0; }
  .majority-table td:nth-last-child(4),
  .majority-table td:nth-last-child(3),
  .majority-table td:last-child { grid-column: 1 / -1; }
  .majority-table td:nth-last-child(2) { grid-column: 1 / -1; }
  .majority-table #majority-ranked td:nth-child(3) { grid-column: auto; }
  .majority-label { display: block; font-size: .8em; font-weight: 600; }
  .majority-table td:nth-last-child(2) .majority-label { display: inline; margin-inline-end: .5rem; }
}
