/* /mercedes-body-shop, Dev/v2 — page layer of the polish pass (2026-11-15).
   Only DS tokens; no raw colours. Sections: services (repair index + photo that follows the row),
   insurance (claim + quote laid over a shop photo + value line), questions (Dev/v21: half a large phone, the chosen pair only), quote cites. */

/* ---- services: repair index ------------------------------------------------------------------ */
.pb-scope .mb-svc { position: relative; padding-block: var(--sp-section); }
.pb-scope .mb-svc__head {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--sp-6);
  align-items: end; margin-bottom: var(--sp-8);
}
.pb-scope .mb-svc__head h2 { grid-column: 1 / span 7; margin: 0; max-width: 16ch; }
.pb-scope .mb-svc__lead { grid-column: 8 / -1; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 42ch; }

.pb-scope .mb-svc__grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: var(--sp-8); align-items: start;
}
.pb-scope .mb-svc__list { grid-column: 1; grid-row: 1; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.pb-scope .mb-svc__row {
  position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: var(--sp-4);
  padding: var(--sp-6) 0; border-top: 1px solid var(--border-strong);
}
.pb-scope .mb-svc__row:last-child { border-bottom: 1px solid var(--border-strong); }
/* the active row's rule turns blue — drawn by transform, not by width */
.pb-scope .mb-svc__row::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left center; transition: transform var(--dur-slow) var(--ease);
}
.pb-scope .mb-svc__row.is-active::before { transform: scaleX(1); }
.pb-scope .mb-svc__n {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; color: var(--muted);
  padding-top: 8px; transition: color var(--dur) var(--ease);
}
.pb-scope .mb-svc__row.is-active .mb-svc__n { color: var(--accent); }
.pb-scope .mb-svc__t {
  margin: 0 0 var(--sp-2); font-family: var(--font-display); font-weight: var(--w-display);
  font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; letter-spacing: var(--tr-heading); color: var(--fg);
  transition: color var(--dur-slow) var(--ease);
}
.pb-scope .mb-svc__d { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 54ch; }
.pb-scope .mb-svc__d a:not(.btn), .pb-scope .mb-svc__more a:not(.btn) {
  color: var(--fg); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px;
}
/* with JS the rows that are not being read step back; the copy stays readable (muted ≈ 7.4:1) */
.pb-scope .mb-svc.is-live .mb-svc__row:not(.is-active) .mb-svc__t { color: var(--muted); }

.pb-scope .mb-svc__media { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 104px; }
.pb-scope .mb-svc__frame {
  position: relative; margin: 0; aspect-ratio: 4 / 5; max-height: calc(100vh - 140px); width: 100%;
  border-radius: var(--r); overflow: hidden; border: 1px solid var(--border); background: var(--surface);
}
.pb-scope .mb-svc__shot {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover;
  opacity: 0; transform: scale(1.04); transition: opacity .55s var(--ease), transform 1.2s var(--ease);
}
.pb-scope .mb-svc__shot.is-on { opacity: 1; transform: scale(1); }
.pb-scope .mb-svc__count {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4); padding: 6px 12px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg); font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em;
}
.pb-scope .mb-svc__more { grid-column: 1; grid-row: 2; margin: var(--sp-6) 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 60ch; }

@media (hover: hover) {
  .pb-scope .mb-svc__row { cursor: default; }
}
@media (max-width: 920px) {
  .pb-scope .mb-svc__head { grid-template-columns: 1fr; row-gap: var(--sp-4); margin-bottom: var(--sp-6); }
  .pb-scope .mb-svc__head h2, .pb-scope .mb-svc__lead { grid-column: 1; }
  .pb-scope .mb-svc__grid { grid-template-columns: 1fr; row-gap: var(--sp-6); }
  .pb-scope .mb-svc__media { grid-column: 1; grid-row: 1; position: relative; top: auto; }
  .pb-scope .mb-svc__frame { aspect-ratio: 16 / 10; max-height: none; }
  .pb-scope .mb-svc__count { display: none; }
  .pb-scope .mb-svc__list { grid-row: 2; }
  .pb-scope .mb-svc__more { grid-row: 3; margin-top: 0; }
  .pb-scope .mb-svc.is-live .mb-svc__row:not(.is-active) .mb-svc__t { color: var(--fg); }
  .pb-scope .mb-svc__row::before { display: none; }
}
@media (max-width: 560px) {
  .pb-scope .mb-svc__row { grid-template-columns: 40px minmax(0, 1fr); column-gap: var(--sp-3); padding: var(--sp-5) 0; }
}

/* ---- insurance: claim, quote over a shop photo, value line ------------------------------------- */
.pb-scope .mb-ins { position: relative; padding-block: calc(var(--sp-section) * 1.15); }
.pb-scope .mb-ins__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--sp-8);
  grid-template-areas: "title scene" "claim scene" "value scene"; grid-template-rows: auto auto 1fr; align-items: start;
}
.pb-scope .mb-ins__title { grid-area: title; margin: 0 0 var(--sp-5); max-width: 14ch; }
.pb-scope .mb-ins__claim { grid-area: claim; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 40ch; }
.pb-scope .mb-ins__scene { grid-area: scene; position: relative; margin: 0; }
.pb-scope .mb-ins__photo {
  position: relative; aspect-ratio: 16 / 11; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border);
}
.pb-scope .mb-ins__photo img {
  position: absolute; inset: -6% 0; width: 100%; height: 112%; max-width: none; object-fit: cover; object-position: 50% 45%;
  transform: translateY(calc(var(--lh-shift, 0) * 1px));
}
.pb-scope .mb-ins__quote {
  position: relative; z-index: 1; margin: calc(-1 * clamp(72px, 9vw, 140px)) 0 0 calc(-1 * var(--sp-7));
  max-width: 600px; padding: var(--sp-7) var(--sp-7) var(--sp-6); border-radius: var(--r);
  background: var(--bg); border: 1px solid var(--border-strong); box-shadow: var(--shadow-card);
}
.pb-scope .mb-ins__quote p {
  margin: 0; font-family: var(--font-display); font-weight: var(--w-bold); font-size: clamp(20px, 1.85vw, 26px);
  line-height: 1.32; letter-spacing: -.01em; color: var(--fg); max-width: 34ch; text-indent: -.42em;
}
.pb-scope .mb-ins__quote cite {
  display: block; margin-top: var(--sp-5); font-style: normal; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: .06em; color: var(--muted);
}
.pb-scope .mb-ins__value { grid-area: value; margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--border-strong); }
.pb-scope .mb-ins__value p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 44ch; }
.pb-scope .mb-ins__curve { display: block; width: 100%; max-width: 260px; height: auto; margin-bottom: var(--sp-4); overflow: visible; }
.pb-scope .mb-ins__line { fill: none; stroke: var(--fg); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pb-scope .mb-ins__ghost { fill: none; stroke: var(--border-control); stroke-width: 1.5; stroke-dasharray: 3 6; }
.pb-scope .mb-ins__dot { fill: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  .pb-scope.lh-js .mb-ins__line { stroke-dasharray: 260; stroke-dashoffset: 0; transition: stroke-dashoffset 1.4s var(--ease); }
  .pb-scope.lh-js .mb-ins__value:not(.is-drawn) .mb-ins__line { stroke-dashoffset: 260; }
  .pb-scope.lh-js .mb-ins__dot { transition: opacity .4s var(--ease) .9s; }
  .pb-scope.lh-js .mb-ins__value:not(.is-drawn) .mb-ins__dot { opacity: 0; }
}
@media (max-width: 920px) {
  .pb-scope .mb-ins__grid { grid-template-columns: 1fr; grid-template-areas: "title" "claim" "scene" "value"; grid-template-rows: none; }
  .pb-scope .mb-ins__scene { margin-top: var(--sp-7); }
  .pb-scope .mb-ins__quote { margin: calc(-1 * var(--sp-8)) var(--sp-4) 0; padding: var(--sp-6) var(--sp-5) var(--sp-5); }
}
@media (max-width: 560px) {
  .pb-scope .mb-ins__quote { margin-inline: var(--sp-2); }
}

/* ---- questions (Dev/v21, owner 2026-11-20: variant A1 «conversation in a phone» of Services/Dev/Works/2026-11-19_mercedes-questions-variants;
   v21 — «левая часть сильно больше правой… пол телефона, чтобы видно было только 2 сообщения, но крупнее»: a large phone, only its
   upper part shows, it rises from the foot of the section and dissolves; on the glass — the header and the chosen pair only):
   the questions as a list of tabs (arrow keys) on the left; the answers as a live HTML chat over the glass of a realistic phone
   (product render assets/mb-phone.webp, 600×1206, screen switched off). Choosing a question «sends» it, Lion «types» and replies;
   only the chosen pair shows. ≤ 900 px: no device frame — the whole conversation as a feed and the real «Text or WhatsApp»
   compose link under it. Without JS: the conversation from the top. ---- */
.pb-scope .mb-chat { --mb-phone-w: 580px; padding-block: var(--sp-section); }
.pb-scope .mb-chat__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-rows: auto 1fr;
  column-gap: var(--sp-8); align-items: start;
}
.pb-scope .mb-chat__side { grid-column: 1; grid-row: 1; }
.pb-scope .mb-chat__side h2 { margin: 0 0 var(--sp-4); max-width: 14ch; }
.pb-scope .mb-chat__lead { margin: 0 0 var(--sp-6); max-width: 40ch; color: color-mix(in oklch, var(--fg) 62%, var(--muted)); font-size: 17px; line-height: 1.6; }
.pb-scope .mb-chat__stage { display: contents; }

/* the questions */
.pb-scope .mb-chat__list { grid-column: 1; grid-row: 2; display: grid; border-top: 1px solid var(--border); }
.pb-scope .mb-chat__q {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: baseline; gap: var(--sp-3);
  width: 100%; margin: 0; padding: 13px var(--sp-3) 13px 0; border: 0; border-bottom: 1px solid var(--border);
  background: none; color: var(--muted); font: var(--w-medium) 16px/1.4 var(--font-body); text-align: left; cursor: pointer;
  transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), padding var(--dur-slow) var(--ease);
}
.pb-scope .mb-chat__n { font-size: 12px; letter-spacing: .08em; color: color-mix(in oklch, var(--muted) 70%, var(--bg)); transition: color var(--dur) var(--ease); }
.pb-scope .mb-chat__q:hover { color: var(--fg); }
.pb-scope .mb-chat__q.is-active { color: var(--fg); font-weight: var(--w-bold); padding-left: var(--sp-3); background: color-mix(in oklch, var(--accent) 9%, transparent); }
.pb-scope .mb-chat__q.is-active .mb-chat__n { color: var(--accent); }
.pb-scope .mb-chat__q:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the phone: the render's backdrop is a touch darker than the canvas — «lighten» keeps only the phone; where the backdrop is a
   touch lighter, the frame edges dissolve (sides 0–3 % / 97–100 %, the frame spans ~5–95 %; the floor reflection from 86 %) */
/* half a phone: the box takes the height of the left column (contain: size — the tall render does not stretch the rows), the
   phone inside is full size and is cut by the box; its lower part dissolves into the canvas */
.pb-scope .mb-phone {
  grid-column: 2; grid-row: 1 / span 2; justify-self: center; align-self: stretch; position: relative;
  width: var(--mb-phone-w); min-height: 600px; contain: size; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 62%, transparent 96%); mask-image: linear-gradient(#000 62%, transparent 96%);
}
.pb-scope .mb-phone__body { position: relative; }
.pb-scope .mb-phone__img {
  display: block; width: 100%; height: auto; mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent), linear-gradient(transparent, #000 2%, #000 86%, transparent);
  -webkit-mask-composite: source-in; mask-composite: intersect;
          mask-image: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent), linear-gradient(transparent, #000 2%, #000 86%, transparent);
}
/* the glass, in % of the render (assets/mb-phone.webp — crop 200,110,824,1536 of phone-empty-b, tight to the frame) */
.pb-scope .mb-phone__screen {
  position: absolute; left: 8.64%; right: 8.8%; top: 3.06%; bottom: 16.96%;
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 7.6% / 3.4%; background: color-mix(in oklch, var(--bg) 70%, var(--surface));
}

/* the chat on the glass */
.pb-scope .mb-chat__bar {
  display: flex; align-items: center; gap: var(--sp-3); padding: 36px 18px 13px;
  border-bottom: 1px solid var(--border); background: color-mix(in oklch, var(--surface) 80%, transparent);
  font-weight: var(--w-bold); font-size: 16px; color: var(--fg);
}
.pb-scope .mb-phone__ava { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border-strong); }
.pb-scope .mb-phone__ava img { display: block; width: 17px; height: auto; }
.pb-scope .mb-chat__thread {
  flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-start;
  gap: 14px; padding: 22px 16px 12px;
}
.pb-scope .mb-chat__pair { display: grid; gap: 10px; }
.pb-scope .mb-chat__ask, .pb-scope .mb-chat__ans { margin: 0; padding: 12px 16px; font-size: 17px; line-height: 1.45; }
.pb-scope .mb-chat__ask {
  justify-self: end; max-width: 86%; background: var(--accent); color: var(--fg); font-weight: var(--w-medium);
  border-radius: 21px 21px 6px 21px;
}
.pb-scope .mb-chat__reply { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: end; gap: 8px; justify-self: start; max-width: 92%; }
.pb-scope .mb-chat__ava {
  box-sizing: border-box; width: 32px; height: 32px; padding: 7px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border-strong);
}
.pb-scope .mb-chat__ans {
  background: var(--surface-hover); color: color-mix(in oklch, var(--fg) 86%, var(--muted)); border: 1px solid var(--border);
  border-radius: 21px 21px 21px 6px;
}
.pb-scope .mb-chat__typing { display: none; }
.pb-scope .mb-chat__dots {
  display: inline-flex; gap: 6px; padding: 16px 18px; border-radius: 21px 21px 21px 6px;
  background: var(--surface-hover); border: 1px solid var(--border);
}
.pb-scope .mb-chat__dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pb-scope .mb-phone__compose {
  display: flex; align-items: center; gap: 7px; margin: 6px 9px 12px; padding: 0 5px 0 11px; height: 36px;
  border: 1px solid var(--border-strong); border-radius: var(--r-pill); color: var(--muted); font-size: 12.5px; text-decoration: none;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.pb-scope .mb-phone__compose span { flex: 1; }
.pb-scope .mb-phone__compose:hover { color: var(--fg); border-color: var(--accent-line); text-decoration: none; }
.pb-scope .mb-phone__compose:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pb-scope .mb-wa { width: 15px; height: 15px; flex: none; fill: #25D366; } /* WhatsApp keeps its own green, as in the hero */
.pb-scope .mb-phone__send { width: 26px; height: 26px; padding: 5px; box-sizing: border-box; border-radius: 50%; background: var(--accent); color: var(--fg); }

/* with JS on a wide screen: the chosen question is «sent», the reply «types» in */
@media (min-width: 901px) {
  /* two messages only: the chosen question and its answer; the compose bar sits in the hidden lower half — off */
  .pb-scope .mb-chat.is-live .mb-chat__pair:not(.is-active) { display: none; }
  .pb-scope .mb-phone__compose { display: none; }
  .pb-scope .mb-chat.is-live .mb-chat__typing.is-on { display: grid; grid-template-columns: 32px auto; gap: 8px; align-items: end; align-self: flex-start; }
  .pb-scope .mb-chat.is-live .mb-chat__pair.is-active.is-asking .mb-chat__reply { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .pb-scope .mb-chat__dots i { animation: mb-blink 1s var(--ease) infinite; }
  .pb-scope .mb-chat__dots i:nth-child(2) { animation-delay: .15s; }
  .pb-scope .mb-chat__dots i:nth-child(3) { animation-delay: .3s; }
  .pb-scope .mb-chat.is-live .mb-chat__pair.is-active .mb-chat__ask { animation: mb-in .35s var(--ease) both; }
  .pb-scope .mb-chat.is-live .mb-chat__pair.is-active:not(.is-asking) .mb-chat__reply { animation: mb-in .4s var(--ease) both; }
}
@keyframes mb-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes mb-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* phone and tablet: no list and no device frame — the screen becomes a plain window with the whole conversation */
@media (max-width: 900px) {
  .pb-scope .mb-chat__grid { grid-template-columns: minmax(0, 1fr); row-gap: var(--sp-6); }
  .pb-scope .mb-chat__side { grid-row: auto; }
  .pb-scope .mb-chat__lead { margin-bottom: 0; }
  .pb-scope .mb-chat__stage { display: block; }
  .pb-scope .mb-chat__list { display: none; }
  .pb-scope .mb-phone { width: auto; min-height: 0; contain: none; overflow: visible; -webkit-mask-image: none; mask-image: none; }
  .pb-scope .mb-phone__img { display: none; }
  .pb-scope .mb-phone__screen { position: static; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface); }
  .pb-scope .mb-chat__bar { padding: var(--sp-4); font-size: 15px; }
  .pb-scope .mb-chat__thread { overflow: visible; gap: var(--sp-6); padding: var(--sp-5) var(--sp-4); }
  .pb-scope .mb-chat__ask, .pb-scope .mb-chat__ans { font-size: 16px; padding: 12px 15px; }
  .pb-scope .mb-chat__ask { max-width: 88%; }
  .pb-scope .mb-chat__reply { grid-template-columns: 30px minmax(0, 1fr); gap: var(--sp-2); }
  .pb-scope .mb-chat__ava { width: 30px; height: 30px; padding: 6px; }
  .pb-scope .mb-phone__compose { height: 48px; margin: var(--sp-2) var(--sp-4) var(--sp-4); font-size: 15px; }
}

/* ---- quote attributions are shown as written («— Google review»), not in capitals ----------- */
.pb-scope .lh-reviews .lh-q cite.mono { text-transform: none; letter-spacing: .06em; font-size: 12px; }

@media (prefers-reduced-motion: reduce) {
  .pb-scope .mb-svc__shot, .pb-scope .mb-svc__row::before, .pb-scope .mb-svc__t, .pb-scope .mb-svc__n { transition: none; }
  .pb-scope .mb-svc__shot { transform: none; }
  .pb-scope .mb-ins__photo img { transform: none; }
}
