/* "Two sides. One system." (#models): Gateway Commander and the onboard unit picker.
   Built in the same card language as How it works (#system): a card on --card, a stage
   heading, a darker picture panel with the product name inside, then plain rows.
   Section spacing, .section-heading, .section-eyebrow and .button come from the site. */

.models__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: stretch; }
.models__card { display: flex; flex-direction: column; min-width: 0; padding: 1.5rem; border-radius: 14px; background: var(--card); }
.models__stage { margin: 0 0 1rem; font: 500 1.25rem/1.5rem Montserrat, var(--font-body); color: var(--foreground); }

/* Picture panel, like the How it works product panels */
.models__panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; height: 16rem; margin: 0;
  padding: 1rem 1.5rem; border-radius: 10px; background: var(--background); overflow: hidden; }
.models__panel img { display: block; flex: 1 1 auto; min-height: 0; width: auto; height: auto; max-width: 72%; max-height: 100%; object-fit: contain; }
.models__panel figcaption { flex: 0 0 auto; font: 500 .875rem/1.25rem var(--font-body); color: var(--foreground); text-align: center; }
.models__unit-img, .models__panel [data-model-name] { transition: opacity .18s ease; }
.models__panel.is-swapping .models__unit-img, .models__panel.is-swapping [data-model-name] { opacity: 0; }

.models__text { margin: 1rem 0 0; font-size: .875rem; line-height: 1.25rem; color: var(--muted-foreground); }

/* Plain rows with even spacing, no dividers (as in How it works) */
.models__rows { list-style: none; margin: 1rem 0 0; padding: 0; }
.models__rows li, .models__rows > div { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 2.25rem;
  font-size: .875rem; line-height: 1.25rem; color: var(--foreground); }
.models__specs dt { color: var(--muted-foreground); }
.models__specs dd { margin: 0; text-align: right; }
/* room for four rows, so the page doesn't move when the Antenna (two rows) is picked */
.models__specs { min-height: 9rem; }

/* Unit picker */
.models__chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.models__chip { display: inline-flex; align-items: center; height: 2rem; padding: 0 .625rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--control-surface); color: var(--muted-foreground); font: 500 .8125rem/1.25rem var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s; }
.models__chip:hover { background: var(--control-surface-hover); color: var(--foreground); }
.models__chip[aria-pressed="true"] { border-color: color-mix(in oklch, var(--ring) 55%, var(--border)); background: color-mix(in oklch, var(--primary) 18%, var(--control-surface)); color: var(--foreground); }
.models__chip:focus-visible { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); }

/* Compare: a full-width card under the two cards */
.models__compare { margin-top: 1.5rem; border-radius: 14px; background: var(--card); }
.models__compare summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-radius: 14px;
  list-style: none; cursor: pointer; font: 500 .875rem/1.25rem var(--font-body); color: var(--foreground); }
.models__compare summary::-webkit-details-marker { display: none; }
.models__compare summary .icon { width: 1rem; height: 1rem; color: var(--muted-foreground); transition: transform .2s ease; }
.models__compare summary:hover .icon { color: var(--foreground); }
.models__compare[open] summary .icon { transform: rotate(45deg); }
.models__compare summary:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 50%, transparent); }
.models__table-wrap { overflow-x: auto; padding: 0 1.5rem 1.25rem; }
.models__table { width: 100%; min-width: 36rem; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: .875rem; line-height: 1.25rem; }
.models__table col:first-child { width: 22%; }
.models__table th, .models__table td { padding: .625rem .75rem; text-align: left; vertical-align: top; border-top: 1px solid var(--border); }
.models__table thead th { border-top: 0; padding-top: .25rem; font-weight: 500; color: var(--foreground); }
.models__table tbody th { font-weight: 400; color: var(--muted-foreground); }
.models__table td { color: var(--foreground); }
.models__table tr > :first-child { padding-left: 0; }

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

/* One way forward, centred like "Take a seat" in the section above */
.models__cta { display: flex; justify-content: center; margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) { .models__unit-img, .models__panel [data-model-name], .models__chip, .models__compare summary .icon { transition: none; } }

/* Tablet and phone: one card per row */
@media (max-width: 56rem) {
  .models__grid { grid-template-columns: minmax(0, 1fr); }
  .models__panel { height: 14rem; }
}

/* Phone: the unit chips swipe sideways instead of wrapping */
@media (max-width: 40rem) {
  .models__card { padding: 1.25rem; }
  .models__panel { height: 12.5rem; }
  .models__chips { flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin-inline: -1.25rem; padding: 0 1.25rem; scroll-padding-inline: 1.25rem; }
  .models__chips::-webkit-scrollbar { display: none; }
  .models__chip { flex: 0 0 auto; scroll-snap-align: start; }
  .models__cta .button { width: 100%; }
  /* the comparison swipes sideways; the row labels stay put */
  .models__table-wrap { padding: 0 0 1rem; scrollbar-width: none; }
  .models__table-wrap::-webkit-scrollbar { display: none; }
  .models__compare summary { padding: 1rem 1.25rem; }
  .models__table { min-width: 32rem; }
  .models__table col:first-child { width: 8.75rem; }
  .models__table tr > :first-child { position: sticky; left: 0; z-index: 1; padding-left: 1.25rem; background: var(--card); }
  .models__table tr > :last-child { padding-right: 1.25rem; }
}

/* Match the preview's heading and spacing within the live homepage. */
.home #main > #models { padding-block: 6rem; }
.home #models > .wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--page-inset); }
.home #models .section-heading { display: block; margin-bottom: 1.5rem; }
.home #models .section-heading h2 { font: 500 1.5rem/2rem var(--font-heading); letter-spacing: 0; }
.home #models .section-heading > p {
  max-width: 65ch;
  margin: 1rem 0 0;
  font: 400 1rem/1.5rem var(--font-body);
  letter-spacing: 0;
  color: var(--muted-foreground);
}
.home #models .section-heading > .section-eyebrow {
  margin: 0 0 .5rem;
  font-size: .75rem;
  line-height: 1rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
}
@media (width >= 48rem) {
  .home #models .section-heading h2 { font-size: 2rem; line-height: 2.5rem; }
}
@media (width < 56rem) {
  .home #main > #models { padding-block: 4rem; }
  .home #models .section-heading { margin-top: .25rem; margin-bottom: 1.25rem; }
}
@media (max-height: 46rem) {
  .home #models .section-heading > p:not(.section-eyebrow) { margin-top: .375rem; }
}
