/* WebGL layers preserve the existing image and text fallbacks. */
.webgl-stage { position: absolute; inset: 0; pointer-events: none; }
.webgl-stage canvas { display: block; width: 100%; height: 100%; }
.webgl-stage > canvas, .webgl-content > canvas { opacity: 0; }
.webgl-stage[data-webgl="ready"] > canvas, .webgl-content[data-webgl="ready"] > canvas { opacity: 1; }
.hero-art-stage:has(#hero-model[data-webgl="ready"]) {
  background: #0b1224 url("/assets/studio-hangar.jpg") center 54% / cover no-repeat;
}
.hero-art-stage:has(#hero-model[data-webgl="ready"]) .hero-picture { opacity: 0; }
.hero-art-stage .hero-picture { z-index: 2; }
.hero-art-stage .hero-picture img { filter: none; object-position: center; }
.hero-model-stage { z-index: 1; }
.hero-art-stage .studio-light { z-index: 3; }
.hero-model-stage { inset: 8% 0 0 28%; }
.hero-has-model { touch-action: pan-y; }
.hero-orbit {
  display: flex; align-items: center; gap: .3rem; z-index: 3; position: absolute;
  right: 1rem; bottom: 81px; color: #e1e9ff; background: #121c35db;
  border: 1px solid #8fa2eca0; font: 660 .7rem/1.4 var(--data-face);
}
.hero-orbit button {
  min-width: 44px; min-height: 44px; color: inherit; background: transparent;
  border: 0; font-size: 1rem; padding: 0;
}
.hero-orbit button:hover { background: #344778; }
.hero:has(#hero-model:not([data-webgl="ready"])) .hero-orbit { display: none; }
.hero-has-model .telemetry-fuel { bottom: 23%; }
@media (prefers-reduced-motion: no-preference) {
  .hero-art-stage .hero-picture { transition: opacity 280ms var(--ease); }
}
.explorer-has-model .cutaway-view { transform: none !important; background: radial-gradient(ellipse at 55% 70%,#213965,#0b142a 67%); }
.explorer-has-model:has(#explorer-model[data-webgl="ready"]) .explorer-poster,
.explorer-has-model:has(#explorer-model[data-webgl="ready"]) .component-light { opacity: 0; }
.cutaway:is([data-selected="fuel"],[data-selected="route"]) .component-light { opacity: 0; }
#explorer-model { z-index: 1; touch-action: pan-y; }
#explorer-model[data-webgl="ready"] { pointer-events: auto; }
.explorer-has-model .hotspot { z-index: 2; }
.explorer-has-model .hotspot[aria-pressed="true"],
.explorer-has-model .hotspot:focus-visible { z-index: 3; }
.explorer .hotspot::after {
  content: attr(data-pin-label); position: absolute; inset-inline-start: 50%; bottom: calc(100% - 3px);
  transform: translateX(-50%); display: none; padding: .24rem .52rem; border-radius: .35rem;
  background: #0d172af0; color: #e5efff; font-size: .7rem; font-weight: 650; white-space: nowrap; pointer-events: none;
}
.explorer .hotspot:is(:hover,:focus-visible,[aria-pressed="true"])::after { display: block; }
#explorer-poster { display: block; width: 100%; height: 100%; }
#explorer-poster img { filter: none; }
.explorer-orbit { margin-top: .6rem; }
.explorer-orbit button { border-radius: 999px; }
.explorer-options button,.product-options button,[aria-label="Automation workflows"] button {
  border-radius: 999px;
  border-color: transparent;
  background: #202b49;
  padding-inline: .82rem;
}
.explorer-options button:hover,.product-options button:hover,[aria-label="Automation workflows"] button:hover { background: #35466a; }
.explorer-options button[aria-pressed="true"],.product-options button[aria-pressed="true"],[aria-label="Automation workflows"] button[aria-pressed="true"] { background: #bdcaff; color: #111a35; }
.workflow-actions .button { border-radius: 999px; }
.workflow-webgl-stage { z-index: 1; }
.workflow-webgl-stage .webgl-content { position: absolute; inset: 0; display: none; }
.workflow[data-mode="route"] .webgl-city { display: block; }
.workflow[data-mode="fuel"] .webgl-fuel { display: block; }
.webgl-fuel { opacity: 0; background: url("/assets/studio-forecourt.jpg") center / cover no-repeat; }
.webgl-fuel[data-webgl="ready"] { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .webgl-fuel, #explorer-poster { transition: opacity 240ms var(--ease); }
}
.workflow:has(.webgl-city[data-webgl="ready"]) .route-drawing { opacity: 0; }
.route-map-labels { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.workflow[data-mode="route"]:has(.webgl-city[data-webgl="ready"]) .route-map-labels { display: block; }
.route-pin {
  position: absolute; left: var(--map-x); top: var(--map-y); transform: translate(-50%,-140%);
  display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .45rem; border-radius: 99px;
  background: #172641; color: #e1efff; font-size: clamp(.58rem,1.35vw,.76rem); font-weight: 650; white-space: nowrap;
}
.route-pin i { width: .36rem; height: .36rem; border-radius: 50%; background: #a3dbff; }
.workflow[data-stage="1"] #map-pickup,.workflow[data-stage="2"] #map-destination,.workflow[data-stage="3"] #map-destination { background: #c9ebff; color: #102745; }
.workflow[data-stage="1"] #map-pickup i,.workflow[data-stage="2"] #map-destination i,.workflow[data-stage="3"] #map-destination i { background: #1272a4; }
.workflow-record-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .25rem; gap: .35rem; color: #cedfff; font-size: .86rem; font-weight: 640; }
.workflow-toast {
  position: absolute; top: .78rem; left: .78rem; z-index: 2; display: flex; align-items: start; gap: .6rem;
  background: #101a2ded; border-radius: .8rem; color: #f5f7ff;
  box-shadow: 0 9px 26px #02061980; padding: .58rem .72rem; max-width: calc(100% - 1.56rem);
}
.workflow-toast img { flex: 0 0 auto; border-radius: 7px; }
.workflow-toast div { display: grid; gap: .12rem; }
.workflow-toast span,.invoice-fields span { color: #bdcefa; font-size: .66rem; font-weight: 600; line-height: 1.35; }
.workflow-toast span { font-size: .7rem; color: #c2d4f3; }
.workflow-toast strong { font-size: clamp(.75rem,1.55vw,1rem); line-height: 1.24; }
.workflow-toast small { font-size: .71rem; color: #c2d4f3; }
.invoice-fields {
  position: absolute; z-index: 2; top: 42%; left: 6%; background: #f2f6ff; color: #182745;
  border-radius: .7rem; display: grid; gap: .18rem; padding: .72rem .95rem;
  box-shadow: 0 11px 26px #03081c74;
}
.invoice-fields p { color: #395381; margin: 0; font-size: .72rem; font-weight: 680; }
.invoice-fields span { color: #405374; font-weight: 500; }
.invoice-fields strong { font-size: clamp(.69rem,1.25vw,.9rem); }
.invoice-fields strong:last-child { margin-top: .27rem; color: #294ca8; }
.cockpit-road-stage { inset: 35% 9% 19%; clip-path: polygon(48% 26%,52% 26%,94% 96%,5% 96%); z-index: -2; opacity: 0; }
.cockpit.is-driving .cockpit-road-stage[data-webgl="ready"] { opacity: 1; }
.cockpit:has(#cockpit-road[data-webgl="ready"]) .road-motion { display: none; }
.asset-credit { flex-basis: 100%; opacity:.93; font-size: .75rem; }
.asset-credit a:hover { color: #dfe8ff; }
.site-header::after {
  content: ""; position: absolute; inset: auto 0 -1px; height: 2px;
  background: linear-gradient(90deg,#4885fa,#9673ee); pointer-events: none;
  transform: scaleX(var(--page-progress,0)); transform-origin: left;
}
.plan-price { color:#294ca8; font-size:clamp(1.25rem,2.7vw,2rem); line-height:1.15; }
.plan-list { margin:0; padding-inline-start:1.15rem; color:#313e62; display:grid; gap:.25rem; }
.plans article { grid-template-rows: auto auto auto 1fr auto; }
.plans { gap: 1rem; padding: 0; background: transparent; }
.plans article { border-radius: 1rem; }
.plans article + article { background: #eef3ff; }
.plans article .button { border-radius: 999px; }
.plans article:has(#plan-trial:not([hidden])) { grid-template-rows: auto auto auto auto 1fr auto; }
.pricing-note { margin-top:1rem; color:var(--muted); font-size:.9rem; }
#plan-comparison details { margin-top: 1rem; padding: .3rem 0; border-bottom: 1px solid #c7d2eb; }
#plan-comparison summary { cursor: pointer; min-height: 44px; padding: .65rem 0; color: #293e76; font-weight: 720; }
#plan-comparison .comparison { table-layout: auto; }
#plan-comparison th[scope="row"] { text-align: left; font-weight: 550; }
#plan-comparison .plan-included { color: #294aa0; font-weight: 650; }
#plan-trial { color:#23469c; background:#e2eaff; border-radius:.65rem; font-size:.89rem; font-weight:690; padding:.62rem .75rem; }
@media (max-width: 700px) {
  .hero { display: grid; grid-template-columns: minmax(0,1fr); }
  .hero::before { display: none; }
  .hero::after { content: ""; grid-row: 4; min-height: 3.32rem; pointer-events: none; }
  .hero .hero-inner, .drive-story.is-cinematic .hero-inner { display: contents; }
  .hero-copy, .hero-telemetry, .hero-ribbon { margin-inline: max(1rem,4vw); }
  .hero-copy { grid-row: 1; padding-top: clamp(1.75rem,5.7vw,2.5rem); }
  .hero-copy > p:not(.kicker) { margin-block: .95rem 1rem; }
  .hero-art-stage, .drive-story.is-cinematic .hero-art-stage {
    grid-row: 2;
    position: relative;
    inset: auto;
    height: clamp(180px,57vw,265px);
    margin-top: .35rem;
    z-index: 0;
    transform: none;
    mask-image: linear-gradient(transparent,#000 14%,#000 86%,transparent);
  }
  .hero-art-stage .hero-picture img { inset: 0; height: 100%; object-fit: cover; mask-image: none; }
  .hero-model-stage { inset: -7% -2% -1%; }
  .hero-cabin { z-index: -1; }
  .cabin-copy { left: max(1rem,4vw); }
  .hero-telemetry, .drive-story.is-cinematic .hero-telemetry {
    grid-row: 3;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: stretch;
    margin-block: -.1rem .35rem;
    gap: .65rem;
  }
  .hero-telemetry .telemetry { bottom: auto; transform: translateY(calc(var(--telemetry-y,0px)*.24)); }
  .hero-telemetry .telemetry-cost { border-left-color: #b5c5ff; }
  .hero-orbit {
    grid-row: 4;
    justify-self: center;
    position: relative;
    inset: auto;
    border: 0;
    border-radius: 999px;
    margin-block: .22rem .35rem;
    padding-inline: .2rem;
  }
  .hero-orbit button { border-radius: 50%; }
  .hero-ribbon { grid-row: 5; align-self: end; }
  .cockpit-road-stage { inset: 38% 2% 28%; }
  .workflow-toast { left: .5rem; top: .5rem; }
  .invoice-fields { left: .45rem; top: 40%; padding: .55rem .5rem; }
  .workflow[data-mode="service"] .workflow-scene { min-height: 226px; }
  .invoice-overlay { right: .45rem; top: 28%; width: 51%; }
  .cutaway-view { aspect-ratio: 4 / 3; }
  .cutaway:not(:has(#explorer-model[data-webgl="ready"])) .hotspot { left: var(--mobile-x); top: var(--mobile-y); }
}
@media (max-width: 350px) {
  .hero-copy .actions { gap: .42rem; }
  .hero-copy .actions .button { padding-inline: .55rem; font-size: .79rem; }
  .site-header .nav-actions .button { padding-inline: .48rem; font-size: .74rem; white-space: nowrap; }
  .site-header .nav-actions .button span { display: none; }
}
.device-stage { overflow: visible; }
.studio-platform {
  inset: 4% 0 0;
  background: radial-gradient(ellipse at 50% 43%,#5769a247,transparent 62%);
  mask-image: none;
}
.device-stage .phone-frame {
  width: clamp(128px,16vw,230px);
  aspect-ratio: 393 / 852;
  border: 4px solid #191d28;
  border-radius: clamp(18px,2.1vw,30px);
  outline: 1px solid #69758b;
  background: #12151d;
  box-shadow: -4px 3px 0 #424a59, -7px 5px 0 #252b36, 0 23px 45px #040710a8;
  filter: none;
  backface-visibility: hidden;
}
.device-stage .phone-frame img { display: block; border-radius: inherit; object-fit: cover; }
.device-stage .phone-left { transform: translate3d(calc(-119% - var(--phone-spread,16px)),calc(-47% + var(--phone-fall,12px)),-65px) rotateY(23deg) rotateZ(-10deg); }
.device-stage .phone-right { transform: translate3d(calc(19% + var(--phone-spread,16px)),calc(-49% - var(--phone-fall,12px)),-65px) rotateY(-23deg) rotateZ(11deg); }
.device-stage .phone-center { transform: translate3d(-50%,calc(-51% - var(--phone-center-rise,0px)),35px) rotateY(var(--phone-rotation,-4deg)); }
.product-paging { display: none; }
.product-paging button { display: grid; place-items: center; color: inherit; min-width: 44px; min-height: 44px; border-radius: 50%; border: 0; background: #273354; }
.product-paging button:hover { background: #374971; }
.product-paging svg { width: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) and (min-width: 701px) {
  .device-stage .phone-frame { width: clamp(104px,15vw,155px); }
}
@media (max-width: 700px) {
  .device-stage { display: grid; place-items: center; min-height: 0; padding: .8rem 0 .65rem; touch-action: pan-y; }
  .device-stage .phone-frame { width: min(65vw,245px); position: relative; inset: auto; transform: rotateY(0); border-width: 4px; }
  .device-stage .phone-left, .device-stage .phone-right { display: none; }
  .product-paging { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: .35rem; }
  #product-screen-label { min-width: 7rem; text-align: center; font-weight: 650; }
  .product-copy .product-options { gap: .3rem .5rem; }
}
