/* One comparison component: the full table on the hub and the short "How it differs" block on line and product pages.
   A real <table> with roles kept, because the rows are laid out with grid. Same power scale on every row, 0 to 700 HP. */

.cmp { display: block; width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.cmp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.cmp tbody { display: block; }
.cmp th { font-weight: inherit; text-align: left; }

/* Phone: photo left, name and price, the scale, then pump and setback with their labels */
.cmp-row { position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: 'thumb name price' 'thumb power power' 'thumb pump set'; gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule); transition: background-color .15s; }
tbody .cmp-row:hover { background: var(--cream); }
.cmp-thumb { grid-area: thumb; display: block; width: 56px; height: 56px; background: var(--cream); isolation: isolate; overflow: hidden; }
.cmp-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cmp-name { grid-area: name; display: block; min-width: 0; }
.cmp-name a { font-family: 'Funnel Display', sans-serif; font-weight: 600; font-size: 17px; line-height: 22px; letter-spacing: -0.01em; }
.cmp-name a::after { content: ''; position: absolute; inset: 0; }
.cmp-name a:focus-visible { outline: 0; }
.cmp-name a:focus-visible::after { outline: 2px solid var(--red); outline-offset: -2px; }
tbody .cmp-row:hover .cmp-name a { color: var(--red); }
.cmp-price { grid-area: price; display: block; font-family: 'Funnel Display', sans-serif; font-weight: 700; font-size: 16px; line-height: 22px; letter-spacing: -0.02em; white-space: nowrap; text-align: right; }
.cmp-power { grid-area: power; display: block; min-width: 0; }
.cmp-bar { position: relative; display: block; height: 10px; background-color: var(--cream); background-image: repeating-linear-gradient(90deg, var(--rule) 0 1px, transparent 1px calc(100% / 7)); border-right: 1px solid var(--rule); }
.cmp-bar i { position: absolute; top: 0; bottom: 0; background: var(--red); transform-origin: left center; transition: transform 1.2s cubic-bezier(.16,1,.3,1); }
.js .reveal:not(.in-view) .cmp-bar i { transform: scaleX(0); }
.cmp-hp { display: block; margin-top: 6px; }
.cmp-pump, .cmp-set { display: block; font-size: 13px; line-height: 18px; color: var(--ink); }
.cmp-pump { grid-area: pump; }
.cmp-set { grid-area: set; text-align: right; }
.cmp-l { display: block; color: var(--ink-soft); font-size: 9px; line-height: 14px; }
.cmp-dash { color: var(--ink-soft); }
.cmp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cmp-note { margin-top: 12px; }
.cmp-lede { margin-bottom: 14px; }

@media (min-width: 1024px) {
  .cmp thead { position: static; display: block; width: auto; height: auto; overflow: visible; clip-path: none; }
  .cmp-row { grid-template-columns: 56px minmax(0, 2.2fr) minmax(0, 3.6fr) minmax(0, 1.3fr) minmax(0, 1fr) 118px; grid-template-areas: none; gap: 0 24px; align-items: center; padding: 10px 0; }
  .cmp-headrow { padding: 10px 0; color: var(--ink-soft); }
  .cmp-thumb, .cmp-name, .cmp-price, .cmp-power, .cmp-pump, .cmp-set { grid-area: auto; }
  .cmp-headrow .cmp-thumb { height: 0; background: none; }
  .cmp-name a { font-size: 19px; line-height: 24px; }
  .cmp-price { font-size: 18px; }
  .cmp-bar { height: 14px; }
  .cmp-pump, .cmp-set { font-size: 14px; line-height: 20px; }
  .cmp-set { text-align: left; }
  .cmp-l { display: none; }
  .cmp-scale { display: flex; justify-content: space-between; }
  .cmp-scale > span[aria-hidden] { flex: 0 0 0; width: 0; white-space: nowrap; }
  .cmp-scale > span[aria-hidden]:last-child { display: flex; justify-content: flex-end; }
  .cmp-r { text-align: right !important; }
}
