.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Elevated cross-car transfer section */
.transfer-section {
  padding-block: clamp(56px, 7vw, 100px);
  border-top: 1px solid var(--line-subtle);
  scroll-margin-top: 84px;
}
.transfer-arrow {
  color: var(--rp-primary);
  font-weight: 700;
  margin-inline: 4px;
}

.showcase {
  padding-block: clamp(56px, 7vw, 100px) 0;
  border-top: 1px solid var(--line-subtle);
  scroll-margin-top: 84px;
}
.collection-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: clamp(26px, 3vw, 44px);
}
.collection-heading > div {
  flex: 1 1 0;
  min-width: 0;
}
.collection-heading h2, .transfer h3, .study h3, .study-dialog h2 { margin: 0; }
.collection-heading h2 {
  font-size: clamp(2.35rem, 4.3vw, 4.2rem);
  font-weight: 720;
  letter-spacing: -.035em;
  line-height: 1.03;
}
.collection-heading p:not(.eyebrow) {
  max-width: 40ch;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.54;
  text-align: right;
  text-wrap: balance;
}
.transfer-section figure, .showcase figure, .study-dialog figure { margin: 0; }
.study-kind {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.transfer-section .study-kind {
  font-size: .72rem;
  letter-spacing: .07em;
}

/* The Wall multi-car transfer feature */
.transfer {
  display: grid;
  grid-template-columns: minmax(0, 1.98fr) minmax(300px, 1fr);
  grid-template-areas: "stage story";
  border: 1px solid var(--line-subtle);
  border-radius: 4px;
  overflow: hidden;
  background: var(--rp-surface);
}
.transfer-story {
  grid-area: story;
  display: flex;
  flex-flow: column;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(18px, 2vw, 30px);
  border-inline-start: 1px solid var(--line-subtle);
}
.transfer h3 {
  margin-top: 8px;
  font-size: clamp(1.95rem, 2.8vw, 3rem);
  line-height: 1.03;
  letter-spacing: -.035em;
}
.transfer-route {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #141413;
  color: var(--ink);
  font-size: .8rem;
  font-weight: 630;
  line-height: 1.3;
}
.transfer-intro {
  margin: 10px 0 0;
  max-width: 40ch;
  color: var(--muted);
  line-height: 1.48;
  font-size: .9rem;
}
.transfer-points {
  list-style: none;
  margin: 11px 0 15px;
  padding: 0;
  display: grid;
  gap: 5px;
}
.transfer-points li {
  position: relative;
  padding-inline-start: 15px;
  color: #e1dfda;
  font-size: .82rem;
  line-height: 1.35;
}
.transfer-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .56em;
  width: 7px;
  height: 2px;
  background: var(--rp-primary);
  transform: skewX(-24deg);
}
.transfer-stage {
  display: grid;
  grid-area: stage;
  align-self: stretch;
  min-height: 100%;
  aspect-ratio: 16 / 9;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  background: #171817;
}
.transfer-art, .transfer-paints { grid-area: 1 / 1; min-height: 0; width: 100%; height: 100%; }
.transfer-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }

.view-choice { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 3px; border: 1px solid var(--rp-control-line); border-radius: 3px; }
.view-choice label { position: relative; cursor: pointer; margin: 0; }
.view-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  opacity: 0;
}
.view-choice label span {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  margin: 0;
  padding: 0 14px;
  border-radius: 2px;
  color: var(--ink);
  font-size: .86rem;
  font-weight: 650;
  transition: background .18s ease, color .18s ease;
}
.view-choice input:checked + span { background: var(--rp-primary); color: var(--rp-on-primary); }
.view-choice input:focus-visible + span {
  outline: 2px solid var(--rp-focus);
  outline-offset: -3px;
}

.transfer-paints {
  display: none;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2px;
  background: #252522;
  overflow: hidden;
}
.transfer:has(#wall-paint-mode:checked) .transfer-art { display: none; }
.transfer:has(#wall-paint-mode:checked) .transfer-paints { display: grid; }

.comparison-car {
  position: relative;
  min-height: 0;
  background: linear-gradient(180deg, #d7d6da 0%, #f5f7fb 36%, #eef0f6 76%, #e5e5ec 100%);
}
.car-window {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0 10px;
}
.car-window img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}
.comparison-car figcaption {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 2px;
  color: #1f1f1d;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(17, 17, 16, .08);
  font-size: .78rem;
  font-weight: 680;
}

/* 3-card study grid */
.study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 0;
}
.study-grid .study {
  min-width: 0;
  border-bottom: 1px solid var(--line-subtle);
}
.study-link { display: block; text-decoration: none; }
.study-media {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  background: #171716;
}
.study-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform .55s cubic-bezier(.22, 1, .36, 1);
}
.study-media-editor .study-art { object-fit: contain; }
.study-link:hover .study-art { transform: scale(1.03); }

.card-inspect-cue {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid rgba(246, 245, 241, .2);
  background: rgba(17, 17, 16, .78);
  backdrop-filter: blur(8px);
  color: var(--ink);
  font-size: .74rem;
  font-weight: 620;
  opacity: .92;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.study-link:hover .card-inspect-cue {
  background: var(--rp-primary);
  border-color: var(--rp-primary);
  transform: translateY(-2px);
}

.study-caption { padding-block: 16px 18px; }
.study h3 {
  margin: 5px 0 6px;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -.025em;
}
.study-model { margin: 0; color: var(--muted); font-size: .96rem; }

.study-next, .study-close {
  flex: none;
  color: var(--ink);
  font-size: .88rem;
  text-decoration: underline;
  text-decoration-color: #87796d;
  text-underline-offset: 5px;
}
.study-next:hover, .study-close:hover {
  color: var(--ink);
  text-decoration-color: var(--rp-primary);
  text-decoration-thickness: 2px;
}

/* Study inspection modal */
.study-dialog {
  width: min(1060px, calc(100% - 40px));
  max-height: 90vh;
  max-height: 90dvh;
  padding: clamp(18px, 3vw, 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.study-dialog-header, .study-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.study-dialog h2 {
  margin-top: 5px;
  font-size: clamp(1.9rem, 3.8vw, 3.1rem);
  letter-spacing: -.03em;
  line-height: 1.02;
}
.study-close, .study-next { min-height: 44px; padding-inline: 4px; border: 0; background: transparent; }

.study-plates {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
  margin-top: 22px;
}
.study-plates figure { display: flex; flex-direction: column; min-width: 0; }
.study-editor-only .study-plates { grid-template-columns: minmax(0, 1fr); }

.dialog-art, .dialog-paint {
  display: grid;
  flex: 1;
  place-items: center;
  min-width: 0;
  border-radius: 3px;
  overflow: hidden;
}
.dialog-art { background: #111; }

/* Zero-seam studio background per render aspect ratio */
.dialog-paint {
  background: linear-gradient(180deg, #dad9dd 0%, #f6f8fc 42%, #edeff6 78%, #e5e4eb 100%);
}
.dialog-paint[data-kind="car"] img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 88%, transparent 100%);
}
.dialog-paint[data-kind="front"] img {
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 92%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 10%, #000 92%, transparent 100%);
}
.dialog-paint[data-kind="helmet"] {
  background: linear-gradient(180deg, #c8c8c8 0%, #cccacb 30%, #ffffff 50%, #e9ecf4 75%, #e3e0e6 100%);
}
.dialog-paint[data-kind="helmet"] img {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.study-plates img { display: block; width: 100%; height: auto; max-height: 44vh; object-fit: contain; }
.study-plates figcaption { padding-top: 9px; font-size: .82rem; color: var(--muted); }
.paint-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.paint-angle { padding: 2px; }
.paint-angle label span { padding: 0 11px; min-height: 36px; }
.study-dialog-footer { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; }
.study-dialog-footer p { max-width: 60ch; margin: 0; font-size: .96rem; }
html:has(.study-dialog[open]) { overflow: hidden; }

@media (max-width: 1080px) {
  .transfer { grid-template-columns: 1fr; grid-template-areas: "story" "stage"; }
  .transfer-story { padding: 22px; border-inline-start: 0; border-bottom: 1px solid var(--line-subtle); }
  .transfer-intro { max-width: 52ch; }
  .transfer-stage { width: 100%; aspect-ratio: 16 / 9; }
  .transfer:has(#wall-paint-mode:checked) .transfer-stage { aspect-ratio: 1.38; }
  .comparison-car figcaption { top: 6px; left: 6px; padding: 2px 6px; }
}
@media (max-width: 900px) {
  .collection-heading { display: block; }
  .collection-heading p:not(.eyebrow) { margin-top: 12px; text-align: left; max-width: 52ch; }
}
@media (max-width: 740px) {
  .study-grid { grid-template-columns: 1fr; gap: 28px; margin-top: 26px; }
  .study-caption { padding-block: 14px 16px; }
}
@media (max-width: 680px) {
  .study-dialog { width: calc(100% - 20px); padding: 16px; }
  .study-plates { grid-template-columns: 1fr; gap: 15px; margin-top: 18px; }
  .dialog-art img { max-height: 36vh; }
  .dialog-paint img { max-height: 26vh; }
  .study-dialog-footer { align-items: start; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .car-window img, .study-art, .card-inspect-cue { transition: none; }
  .study-link:hover .study-art { transform: none; }
}
