:root {
  color-scheme: dark;
  --bg: #101413;
  --surface: #171c1a;
  --surface-strong: #1d2421;
  --surface-hover: #222a27;
  --line: #303936;
  --line-soft: #252d2a;
  --text: #f2f5f3;
  --muted: #aab4b0;
  --quiet: #77847f;
  --mint: #63e6be;
  --mint-soft: #15352c;
  --cyan: #67d7e8;
  --rank-width: 44px;
  --provider-width: 168px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

button,
select,
summary {
  font: inherit;
}

button,
a,
select,
summary,
.table-frame {
  outline-offset: 3px;
}

:focus-visible {
  outline: 2px solid var(--cyan);
}

.page-header,
main,
footer {
  width: min(calc(100% - 32px), 1480px);
  margin-inline: auto;
}

.page-header {
  padding: 14px 0 16px;
}

.header-topline,
.section-heading,
.filter-actions,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--mint);
  border-radius: 50%;
  color: var(--mint);
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.snapshot,
.visit-count {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.visit-count::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--mint);
}

.intro {
  display: grid;
  grid-template-columns: minmax(480px, 0.9fr) minmax(420px, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: end;
  padding-top: 14px;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(34px, 3vw, 44px);
  line-height: 1.02;
  font-weight: 770;
}

.lede {
  max-width: 760px;
  margin-bottom: 3px;
  color: #c7cfcc;
  font-size: clamp(16px, 1.45vw, 20px);
}

.lede strong {
  color: var(--text);
}

main {
  border-top: 1px solid var(--line);
}

.comparison {
  position: relative;
  padding: 14px 0 50px;
}

.method,
.notes {
  padding: 52px 0 64px;
  border-top: 1px solid var(--line);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(26px, 2.4vw, 36px);
  line-height: 1.1;
}

.section-kicker {
  margin: 0 0 10px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.actions {
  position: absolute;
  top: 14px;
  right: 0;
  display: flex;
  gap: 8px;
}

.button,
.text-button {
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 750;
}

.button-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.button-primary {
  background: var(--mint);
  color: #0a211a;
}

.button:hover,
.text-button:hover {
  filter: brightness(1.08);
}

.controls {
  display: grid;
  grid-template-columns: minmax(280px, 460px);
  margin: 0 0 8px;
}

.model-picker {
  display: none;
}

.filter-panel {
  position: relative;
}

.filter-panel summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel summary::after {
  content: "+";
  color: var(--mint);
  font-size: 20px;
  line-height: 1;
}

.filter-panel[open] summary::after {
  content: "−";
}

.filter-panel summary strong {
  margin-left: auto;
  color: var(--mint);
  font-weight: 750;
}

.filter-content {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  width: min(680px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgb(0 0 0 / 38%);
}

.filter-actions {
  margin-bottom: 14px;
}

.filter-actions p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.text-button {
  flex: none;
  padding: 0;
  background: transparent;
  color: var(--mint);
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.provider-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.provider-option {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 9px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: #cbd3d0;
  cursor: pointer;
  font-size: 14px;
}

.provider-option:has(input:checked) {
  border-color: #3c826c;
  background: var(--mint-soft);
  color: var(--text);
}

.provider-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--mint);
}

.price-format {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
}

.table-frame {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  scrollbar-color: #46514d var(--surface);
}

table {
  width: 100%;
  min-width: 1240px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

th,
td {
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
  text-align: left;
}

th:last-child,
td:last-child {
  border-right: 0;
}

thead th {
  height: 60px;
  padding: 0;
  background: var(--surface-strong);
  vertical-align: middle;
}

.rank-column {
  width: var(--rank-width);
  min-width: var(--rank-width);
  max-width: var(--rank-width);
  padding: 9px 7px;
  color: var(--quiet);
  text-align: center;
}

.provider-column {
  width: var(--provider-width);
  min-width: var(--provider-width);
  max-width: var(--provider-width);
  padding: 9px 13px;
}

thead .rank-column,
thead .provider-column {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.model-column {
  width: 171px;
  min-width: 155px;
}

.sort-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 60px;
  align-items: center;
  padding: 8px 32px 8px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.sort-button:hover,
.sort-button[aria-pressed="true"] {
  background: var(--surface-hover);
}

.model-name {
  font-size: 14px;
  font-weight: 760;
  line-height: 1.2;
}

.sort-arrow {
  position: absolute;
  top: 50%;
  right: 11px;
  color: var(--quiet);
  font-size: 15px;
  transform: translateY(-50%);
}

.sort-button[aria-pressed="true"] .sort-arrow {
  color: var(--mint);
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #1b211f;
}

tbody tr.benchmark td {
  background: #122326;
}

tbody tr.benchmark:hover td {
  background: #172d31;
}

tbody td {
  height: 52px;
  padding: 8px 12px;
  vertical-align: middle;
}

.provider-name {
  display: block;
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
  text-decoration-color: #65716c;
}

.price-cell {
  font-size: 14px;
}

.price-values {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 6px;
  align-items: baseline;
}

.price-values span:first-child {
  text-align: right;
}

.price-values .slash {
  color: var(--quiet);
}

.price-values span:last-child {
  text-align: left;
}

.missing {
  color: #66716d;
  text-align: center;
}

.empty-state,
.noscript {
  margin: 0;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.method {
  display: grid;
  grid-template-columns: minmax(230px, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(36px, 7vw, 110px);
}

.method-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 34px;
  color: #bec7c3;
  font-size: 15px;
}

.method-copy p {
  margin-bottom: 0;
}

.method-copy strong {
  color: var(--text);
}

.model-ids {
  grid-column: 2;
  border-top: 1px solid var(--line-soft);
  padding-top: 16px;
}

.model-ids summary {
  color: var(--mint);
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
}

.model-ids ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.model-ids code {
  font-size: 13px;
}

.notes-heading {
  margin-bottom: 24px;
}

.back-link {
  color: var(--mint);
  font-size: 14px;
  font-weight: 750;
}

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

.note-row {
  display: grid;
  grid-template-columns: var(--rank-width) var(--provider-width) minmax(0, 1fr);
  scroll-margin-top: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.note-number,
.note-provider,
.note-text {
  padding: 16px 13px;
}

.note-number {
  color: var(--quiet);
  text-align: center;
}

.note-provider {
  color: var(--text);
  font-size: 15px;
  font-weight: 760;
}

.note-provider a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.note-text {
  max-width: 1000px;
  color: #bac4c0;
  font-size: 14px;
}

footer {
  padding: 24px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 13px;
}

footer p {
  margin-bottom: 0;
}

footer a {
  flex: none;
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 100;
  right: 18px;
  bottom: 18px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid #3f6659;
  border-radius: 6px;
  background: #193229;
  color: #e3fff6;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden,
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1000px) and (min-width: 701px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .lede {
    max-width: 850px;
  }

  table {
    min-width: 1180px;
  }
}

@media (max-width: 700px) {
  :root {
    --rank-width: 38px;
    --provider-width: 136px;
  }

  .page-header,
  main,
  footer {
    width: calc(100% - 20px);
  }

  .page-header {
    padding: 10px 0 12px;
  }

  .header-topline {
    gap: 8px;
  }

  .wordmark {
    gap: 8px;
    font-size: 12px;
  }

  .wordmark-mark {
    width: 26px;
    height: 26px;
  }

  .header-meta {
    gap: 4px;
    font-size: 12px;
  }

  .snapshot,
  .visit-count {
    padding: 2px 4px;
    border: 0;
  }

  .visit-count::before {
    width: 5px;
    height: 5px;
    margin-right: 5px;
  }

  .intro {
    display: block;
    padding-top: 10px;
  }

  h1 {
    font-size: 27px;
    line-height: 1.05;
  }

  .lede {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.42;
  }

  .comparison {
    padding: 12px 0 42px;
  }

  .comparison-heading {
    display: none;
  }

  .controls {
    grid-template-columns: minmax(0, 1.7fr) minmax(116px, 0.8fr);
    gap: 7px;
    margin: 0 0 7px;
  }

  .model-picker {
    display: block;
    min-width: 0;
  }

  .model-picker > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .model-picker select {
    width: 100%;
    height: 44px;
    padding: 0 32px 0 11px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .filter-panel summary {
    min-height: 44px;
    padding-inline: 10px;
    font-size: 14px;
  }

  .filter-panel summary > span {
    display: none;
  }

  .filter-panel summary strong {
    margin-left: 0;
  }

  .filter-content {
    right: 0;
    left: auto;
    width: calc(100vw - 20px);
  }

  .filter-actions {
    align-items: flex-start;
  }

  .filter-actions p {
    max-width: 210px;
  }

  .provider-options {
    grid-template-columns: 1fr 1fr;
  }

  .provider-option {
    min-width: 0;
    font-size: 13px;
  }

  .price-format {
    margin-bottom: 7px;
    font-size: 13px;
  }

  .table-frame {
    overflow: visible;
  }

  table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .model-column:not(.mobile-active),
  .price-cell:not(.mobile-active) {
    display: none;
  }

  .rank-column {
    width: var(--rank-width);
    min-width: var(--rank-width);
    max-width: var(--rank-width);
  }

  .provider-column {
    width: var(--provider-width);
    min-width: var(--provider-width);
    max-width: var(--provider-width);
    padding-inline: 10px;
  }

  .model-column.mobile-active {
    width: auto;
    min-width: 0;
  }

  thead th,
  .sort-button {
    height: 54px;
  }

  .sort-button {
    padding: 7px 28px 7px 10px;
  }

  .model-name,
  .provider-name,
  thead .provider-column {
    font-size: 14px;
  }

  tbody td {
    height: 52px;
    padding: 7px 9px;
  }

  .price-cell {
    font-size: 15px;
  }

  .price-values {
    gap: 5px;
  }

  .actions {
    position: static;
    justify-content: flex-end;
    margin-top: 10px;
  }

  .button {
    min-height: 38px;
    padding-inline: 11px;
    font-size: 13px;
  }

  .method,
  .notes {
    padding: 42px 0 50px;
  }

  .method {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .method-copy {
    grid-template-columns: 1fr;
    gap: 18px;
    font-size: 15px;
  }

  .model-ids {
    grid-column: 1;
  }

  .model-ids ul {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-end;
  }

  .note-row {
    grid-template-columns: 38px 1fr;
  }

  .note-number,
  .note-provider,
  .note-text {
    padding: 13px 10px;
  }

  .note-text {
    grid-column: 2;
    padding-top: 0;
    font-size: 14px;
  }

  footer {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .toast {
    transition: none;
  }
}
