/* Dashboard v2 — authoritative Vehicle Snapshot section.
   One geometry contract owns the vehicle card + 3x2 KPI grid. */

/* =========================
   Section geometry
   ========================= */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid{
  box-sizing:border-box!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  grid-auto-rows:auto!important;
  align-items:start!important;
  gap:12px!important;
}

html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-vehicle-card,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-metrics-grid{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:224px!important;
  min-height:224px!important;
  max-height:224px!important;
  align-self:start!important;
  margin:0!important;
}

/* =========================
   Vehicle identity card
   ========================= */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card{
  display:grid!important;
  grid-template-columns:minmax(205px,34%) minmax(0,66%)!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef)))!important;
  border-radius:11px!important;
  background:var(--mt-surface,var(--d15-surface,var(--v10-surface,#fff)))!important;
  box-shadow:none!important;
}

/* Left image / manufacturer pane fills its grid column exactly. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-image-wrap,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-fallback{
  position:relative!important;
  box-sizing:border-box!important;
  display:block!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  height:224px!important;
  min-height:224px!important;
  max-height:224px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:0!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-fallback{
  background:linear-gradient(145deg,#071e3d 0%,#0a355c 58%,#0c5273 100%)!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-fallback::before,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-fallback::after{content:none!important;display:none!important}

/* Real / representative model photo. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-photo{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  object-fit:cover!important;
  object-position:center!important;
}

/* Actual manufacturer logo or text-only manufacturer identity. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo-shell,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-identity-shell{
  position:absolute!important;
  inset:0!important;
  box-sizing:border-box!important;
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:24px 24px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:9px!important;
  overflow:hidden!important;
  text-align:left!important;
  background:linear-gradient(145deg,#071e3d 0%,#0a355c 58%,#0c5273 100%)!important;
  color:#fff!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo-shell::after,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-identity-shell::after{
  content:""!important;
  position:absolute!important;
  right:-52px!important;
  bottom:-72px!important;
  width:190px!important;
  height:190px!important;
  border-radius:50%!important;
  border:1px solid rgba(255,255,255,.11)!important;
  box-shadow:0 0 0 38px rgba(255,255,255,.025),0 0 0 76px rgba(255,255,255,.016)!important;
  pointer-events:none!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-brand-kicker{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:none!important;
  color:rgba(255,255,255,.70)!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:.16em!important;
  text-transform:uppercase!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-monogram,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-emblem{display:none!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo{
  position:relative!important;
  z-index:2!important;
  display:block!important;
  width:min(74%,190px)!important;
  max-width:190px!important;
  max-height:68px!important;
  margin:2px 0!important;
  padding:0!important;
  object-fit:contain!important;
  object-position:left center!important;
  filter:brightness(0) invert(1) drop-shadow(0 7px 16px rgba(0,0,0,.16))!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo-copy,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-identity-copy{
  position:relative!important;
  z-index:2!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:4px!important;
  margin:0!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo-copy strong,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-identity-copy strong{
  margin:0!important;
  color:#fff!important;
  font-size:19px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:.035em!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-logo-copy small,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-manufacturer-identity-copy small{
  margin:0!important;
  color:rgba(255,255,255,.68)!important;
  font-size:7.5px!important;
  line-height:1.2!important;
  font-weight:650!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-logo-source{
  position:absolute!important;
  z-index:3!important;
  left:24px!important;
  bottom:13px!important;
  max-width:72%!important;
  color:rgba(255,255,255,.58)!important;
  font-size:6.5px!important;
  line-height:1.1!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Photo attribution. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-meta{
  position:absolute!important;
  z-index:4!important;
  left:8px!important;
  right:8px!important;
  bottom:8px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:7px!important;
  padding:5px 7px!important;
  border-radius:7px!important;
  background:rgba(8,25,46,.80)!important;
  backdrop-filter:blur(8px)!important;
  color:#fff!important;
  font-size:7px!important;
  line-height:1.2!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-credit{
  max-width:48%!important;
  color:#d9e8ff!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Right identity pane. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-make-mark{display:none!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-copy{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:224px!important;
  min-height:224px!important;
  max-height:224px!important;
  margin:0!important;
  padding:18px 22px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:center!important;
  gap:11px!important;
  overflow:hidden!important;
  background:var(--mt-surface,var(--d15-surface,var(--v10-surface,#fff)))!important;
  border-left:1px solid var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef)))!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-name{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  grid-template-areas:"title plate" "meta plate"!important;
  column-gap:14px!important;
  row-gap:4px!important;
  align-items:center!important;
  text-align:left!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-name h2{
  grid-area:title!important;
  min-width:0!important;
  margin:0!important;
  color:var(--mt-text,var(--d15-text,var(--v10-text,#0a1d37)))!important;
  font-size:18px!important;
  line-height:1.08!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-reg{
  grid-area:plate!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:max-content!important;
  min-width:102px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0 12px!important;
  border:1px solid #dfa900!important;
  border-radius:7px!important;
  background:linear-gradient(180deg,#ffcb0b,#f2b900)!important;
  color:#071a36!important;
  box-shadow:0 4px 9px rgba(188,139,0,.11)!important;
  font-size:11.5px!important;
  line-height:1!important;
  font-weight:950!important;
  letter-spacing:.09em!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-meta{
  grid-area:meta!important;
  min-width:0!important;
  margin:0!important;
  color:var(--mt-muted,var(--d15-muted,var(--v10-muted,#60738a)))!important;
  font-size:8.5px!important;
  line-height:1.25!important;
  font-weight:600!important;
  text-align:left!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* Registration is already visible as the yellow plate. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  margin:0!important;
  padding-top:11px!important;
  border-top:1px solid var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef)))!important;
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid>div:first-child{display:none!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid>div{
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:52px!important;
  margin:0!important;
  padding:8px 9px!important;
  border:1px solid color-mix(in srgb,var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef))) 90%,transparent)!important;
  border-radius:8px!important;
  background:var(--mt-surface-2,var(--d15-surface-2,var(--v10-surface-2,#f7fafc)))!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:4px!important;
  text-align:left!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid small{
  margin:0!important;
  color:var(--mt-muted,var(--d15-muted,var(--v10-muted,#60738a)))!important;
  font-size:6.8px!important;
  line-height:1!important;
  font-weight:800!important;
  letter-spacing:.055em!important;
  text-transform:uppercase!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid strong{
  min-width:0!important;
  margin:0!important;
  color:var(--mt-text,var(--d15-text,var(--v10-text,#0a1d37)))!important;
  font-size:10px!important;
  line-height:1.15!important;
  font-weight:850!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

/* =========================
   KPI grid — exactly two compact rows
   ========================= */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metrics-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,108px)!important;
  align-content:start!important;
  align-items:stretch!important;
  gap:8px!important;
  overflow:hidden!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-card{
  box-sizing:border-box!important;
  min-width:0!important;
  width:100%!important;
  height:108px!important;
  min-height:108px!important;
  max-height:108px!important;
  margin:0!important;
  padding:9px 11px!important;
  border:1px solid var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef)))!important;
  border-radius:10px!important;
  background:var(--mt-surface,var(--d15-surface,var(--v10-surface,#fff)))!important;
  box-shadow:none!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  overflow:hidden!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-title{
  min-width:0!important;
  min-height:16px!important;
  margin:0!important;
  font-size:8.5px!important;
  line-height:1.1!important;
  font-weight:800!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-title i,
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-title svg{
  flex:0 0 auto!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-value{
  margin:0!important;
  font-size:17px!important;
  line-height:1.05!important;
  font-weight:900!important;
  word-break:normal!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-card>small{
  margin:0!important;
  font-size:7.5px!important;
  line-height:1.2!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-score-ring{
  width:62px!important;
  height:62px!important;
  min-width:62px!important;
  min-height:62px!important;
  margin:0 auto!important;
  border-width:7px!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-score-ring strong{font-size:19px!important;line-height:1!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-score-ring span{font-size:7px!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-risk-gauge{
  min-height:52px!important;
  margin:0!important;
}
/* v10 already renders the evidence text inside the risk readout; suppress the duplicate footer. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-risk>small{display:none!important}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-card>.status{
  margin:0!important;
  font-size:17px!important;
  line-height:1.05!important;
}

/* Loading state. */
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-image-state{
  position:absolute!important;
  inset:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  display:grid!important;
  place-items:center!important;
  align-content:center!important;
  gap:7px!important;
  padding:20px!important;
  text-align:center!important;
  color:#d5e3f1!important;
  background:linear-gradient(145deg,#071e3d,#0a355c)!important;
}
html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-spinner{
  width:24px!important;
  height:24px!important;
  border:3px solid rgba(255,255,255,.22)!important;
  border-top-color:#fff!important;
  border-radius:50%!important;
  animation:v2ImageSpin .8s linear infinite!important;
}
@keyframes v2ImageSpin{to{transform:rotate(360deg)}}

/* Dark theme — factual panes follow the theme; manufacturer pane stays branded. */
html[data-theme="dark"] body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-copy,
html[data-mw-theme="dark"] body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-copy,
html[data-theme="dark"] body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-card,
html[data-mw-theme="dark"] body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-metric-card{
  background:var(--mt-surface,#0c223d)!important;
  color:var(--mt-text,#f5f8fd)!important;
  border-color:var(--mt-line,#31506f)!important;
}

/* Tablet: keep the two section columns while there is enough width. */
@media(max-width:1180px){
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid{grid-template-columns:minmax(0,.95fr) minmax(0,1.05fr)!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card{grid-template-columns:minmax(175px,32%) minmax(0,68%)!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-copy{padding:16px!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-name h2{font-size:16px!important}
}

/* Mobile / narrow tablet: stack the vehicle card above KPI grid. */
@media(max-width:860px){
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid{grid-template-columns:1fr!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-vehicle-card{height:auto!important;min-height:0!important;max-height:none!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card{grid-template-columns:1fr!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-image-wrap,
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-image-fallback{height:170px!important;min-height:170px!important;max-height:170px!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-copy{height:auto!important;min-height:0!important;max-height:none!important;border-left:0!important;border-top:1px solid var(--mt-line,var(--d15-line,var(--v10-line,#d8e3ef)))!important;padding:16px!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-metrics-grid{height:auto!important;min-height:0!important;max-height:none!important;grid-template-rows:repeat(2,108px)!important}
}

@media(max-width:620px){
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-name{grid-template-columns:1fr!important;grid-template-areas:"title" "plate" "meta"!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .mw-proto-vehicle-reg{margin-top:4px!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:repeat(3,108px)!important;height:auto!important}
}

@media(max-width:420px){
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid .v2-vehicle-card .v2-vehicle-detail-grid{grid-template-columns:1fr!important}
  html body.v2-body #results.results:not(.hidden) .v2-snapshot-grid>.v2-metrics-grid{grid-template-columns:1fr!important;grid-template-rows:repeat(6,108px)!important}
}

@media(prefers-reduced-motion:reduce){html body.v2-body #results.results:not(.hidden) .v2-image-spinner{animation:none!important}}
