.vehicle-preview {
  --vehicle-card: #fff;
  --vehicle-text: #1d1d1f;
  --vehicle-muted: rgb(29 29 31 / .65);
  --vehicle-border: rgb(15 23 41 / .1);
  --vehicle-control-border: rgb(0 0 0 / .07);
  --vehicle-track: rgb(29 29 31 / .11);
  --vehicle-selected: #fff;
  --vehicle-secondary: rgb(29 29 31 / .08);
  --vehicle-badge: color-mix(in srgb, #1d1d1f 8%, var(--vehicle-card));
  --vehicle-action: #007aff;
  --vehicle-action-border: #409cff;
  --vehicle-accent: #007aff;
  --vehicle-shadow: rgb(0 0 0 / .05);
  color: var(--vehicle-text);
  font: 500 28px/40px var(--font);
}

[data-theme=dark] .vehicle-preview {
  --vehicle-card: #222225;
  --vehicle-text: #fff;
  --vehicle-muted: rgb(255 255 255 / .6);
  --vehicle-border: rgb(255 255 255 / .09);
  --vehicle-control-border: rgb(255 255 255 / .09);
  --vehicle-track: rgb(255 255 255 / .05);
  --vehicle-selected: rgb(255 255 255 / .14);
  --vehicle-secondary: rgb(255 255 255 / .16);
  --vehicle-badge: color-mix(in srgb, #fff 10%, var(--vehicle-card));
  --vehicle-action: #0c6fd2;
  --vehicle-action-border: #0a84ff;
  --vehicle-accent: #0a84ff;
  --vehicle-shadow: rgb(0 0 0 / .16);
}

:root:not([data-color=on]) .vehicle-preview {
  --vehicle-action: var(--vehicle-text);
  --vehicle-action-border: var(--vehicle-text);
  --vehicle-accent: var(--vehicle-text);
}

:root:not([data-color=on]) .vehicle-colour { filter: grayscale(1); }

.vehicle-surface {
  border-radius: 20px;
  background: var(--vehicle-card);
  /* HeroUI v3 surface shadow: a near-invisible hairline plus two tight layers, and one soft lift for the gallery */
  box-shadow: inset 0 0 0 1px var(--vehicle-border), 0 2px 4px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .05);
}
[data-theme=dark] .vehicle-surface { box-shadow: inset 0 0 0 1px var(--vehicle-border), inset 0 1px 0 rgb(255 255 255 / .05), 0 1px 2px rgb(0 0 0 / .18); }

.vehicle-preview button:focus-visible {
  outline: 3px solid var(--vehicle-accent);
  outline-offset: 2px;
}

.vehicle-art, .vehicle-art img { display: block; flex: none; }
.vehicle-art img { width: auto; height: auto; }
.vehicle-art .vehicle-dark,
[data-theme=dark] .vehicle-art .vehicle-light { display: none; }
[data-theme=dark] .vehicle-art .vehicle-dark { display: block; }

.vehicle-heading { display: grid; gap: 4px; }
.vehicle-heading h2 { font: inherit; font-size: 32px; line-height: 44px; }
.vehicle-heading p, .vehicle-offset > p {
  color: var(--vehicle-muted);
  font-size: 24px;
  line-height: 32px;
}

.vehicle-parking { display: grid; width: 640px; padding: 32px; }
.vehicle-parking .vehicle-heading h2 { font-size: 28px; line-height: 40px; }
.vehicle-offset { display: grid; gap: 8px; margin-top: 32px; }
.vehicle-segment {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: center;
  gap: 4px;
  height: 64px;
  padding: 4px;
  border-radius: 16px;
  background: var(--vehicle-track);
  font-size: 24px;
  line-height: 32px;
}
.vehicle-segment .veh-ind {
  position: absolute;
  top: 0;
  left: 0;
  height: 56px;
  border-radius: 12px;
  background: var(--vehicle-selected);
  box-shadow: 0 2px 4px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 0 1px rgb(0 0 0 / .06);
  pointer-events: none;
  z-index: 0;
  transform-origin: 0 0;
}
[data-theme=dark] .vehicle-segment .veh-ind { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.vehicle-segment > *:not(.veh-ind) {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  height: 56px;
  border-radius: 12px;
  color: var(--vehicle-muted);
  white-space: nowrap;
  transition: color .24s ease, transform .4s cubic-bezier(.22, 1.12, .36, 1);
}
.vehicle-segment > button:active {
  transform: scale(.96);
  transition-duration: .10s;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}
.vehicle-segment:not(:has(.veh-ind)) > :is(.is-selected,[aria-pressed=true]) {
  background: var(--vehicle-selected);
  box-shadow: 0 2px 4px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 0 1px rgb(0 0 0 / .06);
  color: var(--vehicle-text);
}
.vehicle-segment:has(.veh-ind) > :is(.is-selected,[aria-pressed=true]) {
  background: transparent;
  box-shadow: none;
  color: var(--vehicle-text);
}
[data-theme=dark] .vehicle-segment:not(:has(.veh-ind)) > :is(.is-selected,[aria-pressed=true]) { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.vehicle-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.vehicle-actions span {
  display: grid;
  place-items: center;
  height: 68px;
  border-radius: 16px;
  background: var(--vehicle-secondary);
  cursor: pointer;
  transition: transform .42s cubic-bezier(.22, 1.12, .36, 1), filter .22s ease;
}
.vehicle-actions span:active {
  transform: scale(.965);
  transition-duration: .10s;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}
.vehicle-actions .vehicle-primary {
  background: var(--vehicle-action);
  box-shadow: inset 0 0 0 2px var(--vehicle-action-border);
  color: #fff;
}
:root:not([data-color=on]) .vehicle-actions .vehicle-primary { color: var(--vehicle-card); }

.vehicle-modes { display: grid; grid-template-columns: repeat(2, 378px); gap: 16px; }
.vehicle-mode {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 16px 20px;
  color: inherit;
  text-align: left;
  box-shadow: 0 2px 4px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .05);
  transition: transform .42s cubic-bezier(.22, 1.12, .36, 1), color .28s cubic-bezier(.22, 1, .36, 1), box-shadow .34s cubic-bezier(.22, 1, .36, 1);
}
[data-theme=dark] .vehicle-mode {
  box-shadow: 0 1px 2px rgb(0 0 0 / .18);
}
.vehicle-mode::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 1px var(--vehicle-border);
  transition: box-shadow .34s cubic-bezier(.22, 1, .36, 1);
}
[data-theme=dark] .vehicle-mode::after {
  box-shadow: inset 0 0 0 1px var(--vehicle-border), inset 0 1px 0 rgb(255 255 255 / .05);
}
button.vehicle-mode:active {
  transform: scale(.975);
  transition-duration: .10s;
  transition-timing-function: cubic-bezier(.2, 0, 0, 1);
}
.vehicle-mode-top {
  display: grid;
  grid-template-columns: 1fr max-content;
  align-items: center;
  gap: 16px;
}
.vehicle-mode-label { display: flex; align-items: center; gap: 4px; }
.vehicle-mode-state { color: var(--vehicle-text); font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: .02em; transition: color .28s cubic-bezier(.22, 1, .36, 1); }
.vehicle-mode .vehicle-art, .vehicle-mode-label .vehicle-art { opacity: 1; }
.sheet2 .vehicle-mode .vehicle-art img {
  filter: brightness(1) invert(0) drop-shadow(0 0 0 rgba(255, 255, 255, 0));
  transition: filter .28s cubic-bezier(.22, 1, .36, 1);
}
.vehicle-mode[aria-pressed=true] {
  background: var(--vehicle-action);
  color: #fff;
  box-shadow: 0 4px 14px rgb(0 122 255 / .18);
}
.vehicle-mode[aria-pressed=true]::after {
  box-shadow: inset 0 0 0 2px var(--vehicle-action-border);
}
.vehicle-mode[aria-pressed=true] .vehicle-mode-state { color: #fff; }
.vehicle-mode[aria-pressed=true] .vehicle-art img { filter: brightness(0) invert(1) drop-shadow(0 0 0 rgba(255, 255, 255, .9)); }
:root:not([data-color=on]) .vehicle-mode[aria-pressed=true] {
  color: var(--vehicle-card);
  box-shadow: 0 1px 2px var(--vehicle-shadow);
}
:root:not([data-color=on]) .vehicle-mode[aria-pressed=true]::after {
  box-shadow: inset 0 0 0 2px var(--vehicle-action-border);
}
:root:not([data-color=on]) .vehicle-mode[aria-pressed=true] .vehicle-mode-state { color: var(--vehicle-card); }
:root:not([data-color=on])[data-theme=dark] .vehicle-mode[aria-pressed=true] .vehicle-art img { filter: brightness(0) invert(0) drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }

/* 016 Energy use */
.eu { display: flex; flex-direction: column; width: 772px; height: 430px; padding: 32px; --eu-line: var(--vehicle-accent); }
.eu-head { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.eu-title { font: inherit; font-size: 28px; line-height: 40px; }
.eu-tabs { width: 344px; height: 64px; padding: 4px; border-radius: 16px; }
.eu-tabs > *:not(.veh-ind) { height: 56px; }
.eu-tabs:not(:has(.veh-ind)) > .is-selected { box-shadow: 0 2px 4px rgb(0 0 0 / .04), 0 1px 2px rgb(0 0 0 / .06), 0 0 1px rgb(0 0 0 / .06); }
[data-theme=dark] .eu-tabs:not(:has(.veh-ind)) > .is-selected { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.eu-kpi { display: flex; align-items: baseline; gap: 12px; height: 56px; margin-top: 20px; }
.eu-value { font-size: 48px; line-height: 56px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.eu-unit { color: var(--vehicle-muted); font-size: 24px; line-height: 32px; }
.eu-delta { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--vehicle-muted); font-size: 24px; line-height: 32px; }
.eu-delta svg { flex: none; align-self: center; }
.eu-chart { position: relative; height: 190px; margin-top: 32px; color: var(--eu-line); }
.eu-plot { position: absolute; left: 44px; top: 0; display: block; }
.eu-grid line { stroke: var(--vehicle-border); stroke-width: 1; }
.eu-avg { stroke: var(--vehicle-muted); stroke-width: 2; stroke-dasharray: 6 6; opacity: .7; }
.eu-line { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.eu-halo { fill: currentColor; opacity: .14; }
.eu-dot { fill: var(--vehicle-card); stroke: currentColor; stroke-width: 3; }
.eu-y { position: absolute; left: 0; width: 32px; text-align: right; color: var(--vehicle-muted); font-size: 24px; line-height: 32px; font-variant-numeric: tabular-nums; }
.eu-avg-tag { position: absolute; right: 0; color: var(--vehicle-muted); font-size: 24px; line-height: 32px; }
.eu-x { position: absolute; top: 158px; color: var(--vehicle-muted); font-size: 24px; line-height: 32px; white-space: nowrap; }
.eu-x-mid { left: calc(44px + 332px); transform: translateX(-50%); }
.eu-x-end { right: 0; }

.vehicle-comfort { display: grid; gap: 32px; width: 772px; padding: 32px; }
.vehicle-comfort-tabs {
  display: grid;
  grid-template-columns: repeat(4, 171px);
  gap: 8px;
  height: 76px;
  text-align: center;
  color: var(--vehicle-muted);
}
.vehicle-comfort-tabs span { position: relative; padding-top: 16px; }
.vehicle-comfort-tabs :first-child { color: var(--vehicle-text); }
.vehicle-comfort-tabs :first-child::after {
  content: '';
  position: absolute;
  left: 36px;
  bottom: 6px;
  width: 99px;
  height: 4px;
  border-radius: 2px;
  background: var(--vehicle-accent);
}
.vehicle-comfort-body { display: grid; }
.vehicle-comfort-body h2 {
  margin-left: 32px;
  color: var(--vehicle-muted);
  font-size: 24px;
  line-height: 32px;
}
.vehicle-comfort-rows { display: grid; gap: 8px; }
.vehicle-comfort-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) 60px;
  align-items: center;
  gap: 20px;
  padding: 16px 32px;
}
.vehicle-comfort-copy { display: grid; gap: 4px; }
.vehicle-comfort-copy small { color: var(--vehicle-muted); font-size: 24px; line-height: 32px; }
.vehicle-switch { display: block; position: relative; width: 60px; height: 32px; border-radius: 16px; }
.vehicle-switch:is([aria-checked=false],[data-active=false]) .vehicle-on,
.vehicle-switch:is([aria-checked=true],[data-active=true]) .vehicle-off { display: none; }

.ecard .hero3.vehicle-stage .cstage { --lift: 0px; transform: translate(-50%, -50%); }

/* detail only: the last 10 km are drawn once, left to right, then the reading at Now settles with one soft pulse */
.sheet2 .cs.a .eu-live .eu-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: eu-draw 1.4s cubic-bezier(.45, 0, .2, 1) .35s forwards; }
.sheet2 .cs.a .eu-live .eu-area { opacity: 0; animation: eu-fade .8s ease 1.2s forwards; }
.sheet2 .cs.a .eu-live .eu-dot { opacity: 0; animation: eu-fade .3s ease 1.7s forwards; }
.sheet2 .cs.a .eu-live .eu-halo { opacity: 0; transform-box: fill-box; transform-origin: center; animation: eu-ping 1.1s cubic-bezier(.2, .7, .2, 1) 1.75s forwards; }
@keyframes eu-draw { to { stroke-dashoffset: 0; } }
@keyframes eu-fade { to { opacity: 1; } }
@keyframes eu-ping { 0% { opacity: .35; transform: scale(.5); } 100% { opacity: .14; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .eu-live * { animation: none !important; opacity: inherit; stroke-dashoffset: 0 !important; } }
