.product {
  padding-block: clamp(4rem, 7.5vw, 7rem);
  color: var(--ink);
  background: var(--paper);
}
.device-lab {
  display: grid;
  grid-template-columns: minmax(0, 1.43fr) minmax(0, 1fr);
  grid-template-areas: "visual heading" "visual picks" "visual actions" "visual media";
  grid-template-rows: auto auto auto 1fr;
  column-gap: clamp(1.7rem, 5vw, 5.2rem);
}
.product-heading {
  grid-area: heading;
  align-self: end;
}
.product-heading .section-title {
  margin-block: 0.8rem 1rem;
}
.product-lede {
  max-width: 39ch;
  color: var(--muted);
  font-size: clamp(1rem, 1.3vw, 1.13rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.device-figure {
  grid-area: visual;
  margin: 0;
  min-width: 0;
  align-self: start;
}
.device-legend {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.45rem 1rem;
  padding: 0.64rem 0.12rem 0;
  color: var(--muted);
  font-size: 0.79rem;
  line-height: 1.35;
}
.device-legend i {
  font: italic 500 clamp(0.95rem, 1.4vw, 1.1rem) / 1.3 var(--serif);
  color: var(--ink);
}
.device-selectors {
  grid-area: picks;
  margin: 1.15rem 0 0.45rem;
  min-width: 0;
}
.platform-picker {
  display: flex;
  gap: 1rem;
}
.platform-picker button {
  min-height: 44px;
  padding: 0.25rem 0.15rem;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: 600 1rem var(--sans);
}
.platform-picker button[aria-pressed="true"] {
  border-color: var(--red);
  color: var(--ink);
}
.device-picker {
  flex-wrap: wrap;
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  gap: 0.12rem;
  margin: 0.5rem 0 0;
  padding: 0.23rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: var(--subtle-surface, #ede6d9);
}
.device-picker button,
.device-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.44rem;
  border: 0;
  min-height: 44px;
  padding: 0.45rem clamp(0.52rem, 1.1vw, 1rem);
  border-radius: 0.7rem;
  font: 650 0.93rem/1.2 var(--sans);
  white-space: nowrap;
  color: var(--ink);
  background: transparent;
}
.device-picker button .icon {
  width: 1.17rem;
  height: 1.17rem;
  stroke-width: 1.6;
}
.device-picker button[aria-pressed="true"] {
  color: var(--paper);
  background: var(--ink);
}
.device-actions {
  grid-area: actions;
}
.device-buttons {
  margin-left: -0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.device-action {
  color: var(--red);
  padding-inline: 0.5rem;
}
.device-action .icon {
  height: 1.12rem;
  width: 1.12rem;
}
.device-media {
  grid-area: media;
  align-self: start;
  padding-top: 0.6rem;
}
.product-film {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  font-size: 0.95rem;
  font-weight: 650;
}
.product-film > [aria-hidden] {
  display: grid;
  width: 1.9rem;
  height: 1.9rem;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--red);
}
.product-film .icon {
  width: 0.84rem;
  height: 0.84rem;
}
.device-shots {
  width: fit-content;
  max-width: 100%;
  margin-top: 0.2rem;
}
.device-shots summary {
  cursor: pointer;
  padding: 0.43rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.device-shots div {
  display: flex;
  gap: 0.12rem 1.1rem;
  flex-wrap: wrap;
}
.device-shots a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--red);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
@media (hover: hover) {
  .device-picker button:not([aria-pressed="true"]):hover {
    background: var(--line);
  }
  .device-action:hover {
    background: var(--subtle-surface);
  }
  .product-film:hover,
  .device-shots summary:hover {
    color: var(--red);
  }
}
@media (max-width: 780px) {
  .device-lab {
    grid-template-columns: 1fr;
    grid-template-areas: "heading" "picks" "visual" "actions" "media";
    grid-template-rows: auto;
  }
  .product-heading .section-title br {
    display: none;
  }
  .product-heading .section-title {
    margin-block: 0.65rem 0.8rem;
  }
  .device-selectors {
    margin: 0.6rem 0 0.85rem;
  }
  .device-actions {
    margin-top: 0.55rem;
  }
  .device-media {
    padding-top: 0.65rem;
  }
}
@media (max-width: 374px) {
  .device-picker button {
    padding-inline: 0.48rem;
    gap: 0.32rem;
    font-size: 0.85rem;
  }
  .device-picker button .icon {
    width: 1.05rem;
  }
  .device-legend {
    font-size: 0.72rem;
  }
}
.product-dialog {
  width: min(52rem, calc(100vw - 1.75rem));
  max-width: 100%;
  max-height: min(92vh, 60rem);
  max-height: min(92dvh, 60rem);
  margin: auto;
  padding: 0;
  background-color: #201f1b;
  color: #fff9ef;
  border: 1px solid #716c60;
  border-radius: 0.6rem;
}
.product-dialog:not([open]) {
  display: none;
}
.product-dialog::backdrop {
  background: #131211d9;
}
.product-dialog-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid #615a4b;
}
.product-dialog-head h3 {
  flex: 1;
  margin: 0;
  font: 600 1rem/1.2 var(--sans, sans-serif);
}
.product-dialog-head button {
  display: inline-grid;
  place-items: center;
  min-height: 44px;
  margin: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
}
.product-dialog-head button:focus-visible,
.product-dialog-image:focus-visible {
  outline: 2px solid #ffbd82;
  outline-offset: -3px;
}
.product-dialog-detail {
  padding-inline: 0.5rem;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}
.product-dialog-detail,
.product-dialog-close {
  font: 600 0.85rem/1.2 var(--sans, sans-serif);
}
.product-dialog-close {
  min-width: 44px;
}
.product-dialog-image {
  max-height: min(calc(92vh - 4.25rem), 55.75rem);
  max-height: min(calc(92dvh - 4.25rem), 55.75rem);
  padding: 0.65rem;
  overflow: auto;
  overscroll-behavior: contain;
}
.product-dialog-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(calc(92vh - 5.55rem), 54.45rem);
  max-height: min(calc(92dvh - 5.55rem), 54.45rem);
  margin-inline: auto;
}
.product-dialog[data-detail="true"] .product-dialog-image img {
  width: 770px;
  max-width: none;
  max-height: none;
}
.product-dialog[data-spread="true"][data-detail="true"] .product-dialog-image img {
  width: auto;
}
@media (prefers-reduced-motion: reduce) {
  .product *,
  .product *::before,
  .product *::after {
    transition: none !important;
    animation: none !important;
  }
}
