/* Page-level layout only — component appearance comes from ../dist/vallejo.css.
   Values are Vallejo tokens. Do not invent hex or px. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
  background: var(--surface-canvas);
}

.proto-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-hairline);
}

.proto-nav {
  display: flex;
  gap: var(--space-4);
}

.proto-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.proto-toc-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ===== vin.html — real-device intake, 20px side padding =====
   Fills the phone. Fake status / Safari / home chrome is hidden so it
   does not stack on the real browser. Continue stays in the layout so
   the keyboard can push it up. Type, control heights, and gutters stay. */

html:has(body.vin-screen) {
  height: var(--vin-viewport-height, 100dvh);
  overflow: hidden;
  background: var(--surface-canvas);
}

.vin-screen {
  --vin-safe-top: env(safe-area-inset-top, 0px);
  --vin-safe-bottom: env(safe-area-inset-bottom, 0px);
  --vin-frame-width: 100%;
  --vin-frame-height: var(--vin-viewport-height, 100dvh);
  /* Last content (offer: bottom of .vin-offer-next) to docked button = 80px.
     The dock is in the layout, so this gap does not include the button. */
  --vin-cta-gap: var(--space-20);
  --vin-cta-clearance: var(--vin-cta-gap);
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overscroll-behavior: contain;
  background: var(--surface-raised);
}

.vin-status-bar {
  display: none;
  align-items: flex-start;
  justify-content: space-between;
  height: 59px;
  padding-top: var(--space-4);
  padding-right: var(--space-10);
  padding-left: var(--space-12);
  background: var(--surface-raised);
}

.vin-status-time {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 22px;
  color: var(--text-primary);
}

.vin-status-icons {
  display: block;
}

.vin-safari {
  display: none;
  align-items: center;
  justify-content: center;
  height: 63px;
  padding: 0 var(--space-5);
  background: var(--surface-raised);
}

.vin-safari-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 39px;
  padding: 0 var(--space-3);
  background: var(--surface-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
}

.vin-safari-icon {
  flex: none;
  color: var(--text-tertiary);
}

.vin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: calc(var(--space-20) + var(--vin-safe-top));
  padding: var(--vin-safe-top) var(--space-5) 0;
  background: var(--surface-raised);
}

.vin-logo {
  display: flex;
  align-items: center;
  gap: var(--space-0-5);
  color: var(--gray-800);
  text-decoration: none;
}

.vin-logo .text-body-emphasis {
  font-weight: 700;
}

.vin-help {
  color: var(--text-primary);
}

.vin-screen[data-step="loan-hold"] .icon-btn-back,
.vin-screen[data-step="loan-hold"] .vin-help {
  visibility: hidden;
  pointer-events: none;
}

/* icon-btn fills SVGs solid; this glyph is stroke-only (question in a square). */
.vin-header .icon-btn svg {
  fill: none;
}

.vin-steps {
  --vin-section-2-tick: 21.4px;
  --vin-section-2-ticks: 0;
  --vin-section-3-tick: 13.37px;
  --vin-section-3-ticks: 0;
  --vin-section-4-tick: 13.37px;
  --vin-section-4-ticks: 0;
  display: flex;
  gap: var(--space-1);
  width: 100%;
  height: var(--space-1);
}

.vin-step {
  position: relative;
  flex: 1 0 0;
  overflow: hidden;
  height: var(--space-1);
  background: var(--border-hairline);
}

.vin-step-complete {
  background: var(--interactive-primary);
}

.vin-step-fill {
  display: block;
  height: 100%;
  background: var(--interactive-primary);
  transition: width var(--duration-slow) var(--ease-enter);
}

.vin-step-fill-2 {
  width: calc(var(--vin-section-2-tick) * var(--vin-section-2-ticks));
}

.vin-step-fill-3 {
  width: calc(var(--vin-section-3-tick) * var(--vin-section-3-ticks));
}

.vin-step-fill-4 {
  width: calc(var(--vin-section-4-tick) * var(--vin-section-4-ticks));
}

.vin-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  padding: var(--space-5);
  /* Scroll until 80px remains between the last block and the docked button. */
  padding-bottom: var(--vin-cta-clearance);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.vin-screen[data-step="loan"]:not(.has-cta) .vin-main,
.vin-screen[data-step="title"] .vin-main,
.vin-screen[data-step="keys"] .vin-main,
.vin-screen[data-step="drive"] .vin-main,
.vin-screen[data-step="parts"] .vin-main,
.vin-screen[data-step="airbags"] .vin-main,
.vin-screen[data-step="flood-fire"] .vin-main {
  padding-bottom: calc(var(--vin-safe-bottom) + var(--space-5));
}

.vin-screen[data-step="damage"]:not(.has-cta) .vin-main,
.vin-screen[data-step="damage-parts"]:not(.has-cta) .vin-main {
  padding-bottom: calc(var(--vin-safe-bottom) + var(--space-5));
}

.vin-screen[data-step="photos"] .vin-main {
  padding-bottom: var(--vin-cta-gap);
}

.vin-screen[data-step="photos"] .vin-stage {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.vin-screen[data-step="offer"] .vin-stage {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

.vin-stage {
  position: relative;
  flex: 1 0 auto;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.vin-step-panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  width: 100%;
  background-color: var(--surface-raised);
  transition: transform var(--duration-slow) var(--ease-enter);
}

.vin-switcher + .vin-lookup {
  margin-top: calc(var(--space-4) - var(--space-6));
}

.vin-step-panel[hidden] {
  display: none;
}

.vin-step-panel.is-enter-up,
.vin-step-panel.is-enter-down {
  position: absolute;
  inset: 0;
  z-index: 1;
  min-height: 100%;
  background-color: var(--surface-raised);
}

.vin-step-panel.is-enter-up {
  transform: translateY(100%);
}

.vin-step-panel.is-enter-down {
  transform: translateY(-100%);
}

.vin-step-panel.is-enter-up.is-in,
.vin-step-panel.is-enter-down.is-in {
  transform: translateY(0);
}

.vin-step-panel.is-exit-up {
  transform: translateY(-100%);
}

.vin-step-panel.is-exit-down {
  transform: translateY(100%);
}

.vin-title {
  margin: 0;
  color: var(--text-primary);
}

.vin-question {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.vin-question-hint {
  margin: 0;
  color: var(--text-secondary);
}

.vin-title-help {
  position: relative;
  display: block;
  align-self: flex-start;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
}

.vin-title-help:hover,
.vin-title-help:active {
  background-color: transparent;
}

.vin-title-help::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 44px;
  transform: translateY(-50%);
}

.vin-miles-notice-wrap {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  pointer-events: none;
  transition:
    grid-template-rows var(--duration-moderate) var(--ease-enter),
    opacity var(--duration-moderate) var(--ease-enter),
    margin-top var(--duration-moderate) var(--ease-enter);
}

.vin-miles-notice-wrap.is-open {
  grid-template-rows: 1fr;
  margin-top: var(--space-4);
  opacity: 1;
  pointer-events: auto;
}

.vin-miles-notice-clip {
  min-height: 0;
  overflow: hidden;
}

.vin-miles-notice {
  align-items: flex-start;
  gap: var(--space-1-5);
  padding: var(--space-2);
  border-radius: var(--radius-lg);
  color: var(--blue-900);
}

.vin-miles-notice .alert-icon {
  width: var(--space-4);
  height: var(--space-4);
  color: var(--blue-900);
}

.vin-miles-notice .alert-text {
  font-weight: 600;
  letter-spacing: 0.07px;
}

.vin-choice-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.vin-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.vin-choice-grid .vin-choice {
  width: auto;
}

.vin-loan-yes {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.vin-loan-fields-wrap {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    grid-template-rows var(--duration-slow) var(--ease-enter),
    opacity var(--duration-slow) var(--ease-enter),
    margin-top var(--duration-slow) var(--ease-enter);
}

.vin-loan-fields-wrap > .vin-loan-fields {
  min-height: 0;
  overflow: hidden;
  transform: translateY(calc(var(--space-4) * -1));
  transition: transform var(--duration-slow) var(--ease-enter);
}

.vin-step-panel.is-loan-yes .vin-choice-list {
  gap: var(--space-4);
}

.vin-step-panel.is-loan-yes .vin-loan-fields-wrap {
  grid-template-rows: 1fr;
  margin-top: var(--space-5);
  opacity: 1;
  overflow: visible;
  pointer-events: auto;
}

.vin-step-panel.is-loan-yes .vin-loan-fields-wrap > .vin-loan-fields {
  overflow: visible;
  transform: none;
}

.vin-loan-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
}

.vin-loan-fields .field {
  position: relative;
}

.vin-loan-fields .field:has(.select[aria-expanded="true"]) {
  z-index: var(--layer-dropdown);
}

.vin-loan-yes:has(#loan-payoff[aria-expanded="true"]) {
  position: relative;
  z-index: var(--layer-dropdown);
}

.vin-stage:has(#loan-payoff[aria-expanded="true"]),
.vin-loan-fields-wrap:has(#loan-payoff[aria-expanded="true"]),
.vin-loan-fields-wrap:has(#loan-payoff[aria-expanded="true"]) > .vin-loan-fields {
  overflow: visible;
}

.vin-loan-fields .select-value[data-placeholder] {
  color: var(--text-tertiary);
}

.vin-loan-fields .select-chevron {
  fill: none;
  width: 20px;
  height: 20px;
}

.vin-loan-fields .select[aria-expanded="true"] .select-chevron {
  transform: rotate(180deg);
}

.vin-loan-fields .select-menu {
  overflow: visible;
  max-height: none;
}

.vin-loan-fields .select-option-check {
  fill: none;
}

.vin-step-panel[data-panel="offer"] {
  gap: var(--space-10);
}

.vin-offer-hero {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.vin-offer-card {
  display: flex;
  flex-direction: column;
  flex: none;
  gap: var(--space-4);
  width: 400px;
  height: 207px;
  padding: var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
}

.vin-offer-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.vin-offer-amount {
  margin: 0;
  color: var(--text-primary);
}

.vin-offer-meta {
  display: flex;
  align-items: baseline;
  width: 100%;
  margin: 0;
  color: var(--text-secondary);
}

.vin-offer-place {
  margin-left: auto;
  flex: none;
}

.vin-offer-id {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--space-12);
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  background: var(--surface-subtle);
}

.vin-offer-id-text {
  margin: 0;
}

.vin-offer-id-label {
  color: var(--text-primary);
}

.vin-offer-id-value {
  color: var(--text-secondary);
}

.vin-offer-copy {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--space-4);
  height: var(--space-4);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.vin-offer-copy::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--space-12);
  height: var(--space-12);
  transform: translate(-50%, -50%);
}

.vin-offer-copy svg {
  display: block;
  flex-shrink: 0;
  width: var(--space-4);
  height: var(--space-4);
  fill: none;
}

.vin-offer-copy .vin-offer-copied-icon {
  display: none;
}

.vin-offer-copy.is-copied {
  color: var(--success-accent);
}

.vin-offer-copy.is-copied .vin-offer-copy-icon {
  display: none;
}

.vin-offer-copy.is-copied .vin-offer-copied-icon {
  display: block;
}

.vin-offer-copy:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.vin-offer-copy-status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.vin-offer-why {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-link);
  text-align: left;
  cursor: pointer;
}

.vin-offer-why::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: var(--space-12);
  transform: translateY(-50%);
}

.vin-offer-why:hover {
  color: var(--text-link-hover);
}

.vin-offer-why:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.vin-offer-next {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xl);
  background: var(--surface-raised);
}

.vin-offer-next-title {
  margin: 0;
  color: var(--text-primary);
}

.vin-confetti {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--layer-toast);
}

.vin-confetti-piece {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--radius-sm);
  animation-name: vin-confetti-fall;
  animation-duration: var(--duration-pulse);
  animation-timing-function: var(--ease-exit);
  animation-fill-mode: forwards;
}

.vin-confetti-piece-rect {
  width: var(--space-2);
  height: var(--space-3);
}

.vin-confetti-piece-bar {
  width: var(--space-3);
  height: var(--space-1);
}

.vin-confetti-piece-sq {
  width: var(--space-2);
  height: var(--space-2);
}

@keyframes vin-confetti-fall {
  from {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  to {
    opacity: 0;
    transform: translate3d(var(--confetti-dx), var(--vin-frame-height), 0) rotate(var(--confetti-rot));
  }
}

.vin-step-panel[data-panel="damage"] {
  gap: var(--space-10);
}

.vin-damage-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  width: 100%;
}

.vin-damage-car {
  display: block;
  width: 100%;
  height: auto;
}

.vin-step-panel[data-panel="damage-parts"] {
  gap: var(--space-4);
}

.vin-step-panel[data-panel="damage-parts"] .vin-question {
  gap: var(--space-4);
}

.vin-step-panel[data-panel="issues"] {
  gap: var(--space-4);
}

.vin-issue-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
}

.vin-issue {
  width: 100%;
}

.vin-issue .select-option-label {
  white-space: normal;
}

.vin-damage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  width: 100%;
}

.vin-damage-chips:empty {
  display: none;
}

.vin-damage-map {
  position: relative;
  width: 62.5%;
  margin-inline: auto;
}

.vin-damage-areas {
  display: block;
  width: 100%;
  height: auto;
}

.vin-damage-spot {
  position: absolute;
  z-index: 1;
  left: calc(var(--spot-x) / 250 * 100%);
  top: calc(var(--spot-y) / 400 * 100%);
  width: calc(64 / 250 * 100%);
  aspect-ratio: 1;
  padding: 0;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.vin-damage-spot::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 37.5%;
  height: 37.5%;
  border: 1px solid var(--blue-600);
  border-radius: var(--radius-full);
  background: var(--surface-raised);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.vin-damage-spot[aria-pressed="true"]::after {
  background: var(--blue-600);
}

.vin-damage-spot:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.vin-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: var(--space-16);
  padding: var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-raised);
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
}

.vin-choice:hover {
  border-color: var(--gray-400);
}

.vin-choice[aria-checked="true"] {
  border-color: var(--blue-600);
  background-color: var(--blue-50);
}

.vin-choice-static {
  cursor: default;
  pointer-events: none;
}

.vin-choice[aria-checked="true"]:hover {
  border-color: var(--blue-600);
}

.vin-choice:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.vin-choice-label {
  color: var(--text-secondary);
}

.vin-choice-hint {
  margin: 0;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-tertiary);
}

.vin-photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  width: 100%;
}

.vin-photo-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: calc(var(--space-20) + var(--space-16));
  padding: 0;
  overflow: hidden;
  border: none;
  border-radius: var(--radius-md);
  background: var(--surface-raised);
  font-family: var(--font-sans);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.vin-photo-outline {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  color: var(--interactive-primary);
}

.vin-photo-outline rect {
  x: 0.5px;
  y: 0.5px;
  width: calc(100% - 1px);
  height: calc(100% - 1px);
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: var(--space-3) var(--space-3);
  rx: var(--radius-md);
  ry: var(--radius-md);
}

.vin-photo-slot:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.vin-photo-guide {
  display: block;
  width: auto;
  max-width: 80%;
  max-height: calc(var(--space-20) + var(--space-6));
  margin: auto;
  object-fit: contain;
}

.vin-photo-label {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: var(--space-1-5) var(--space-2);
  background: var(--interactive-selected-wash);
  color: var(--blue-900);
}

.vin-photo-retake {
  display: none;
  flex-shrink: 0;
  width: var(--space-5);
  height: var(--space-5);
}

.vin-photo-slot.is-captured .vin-photo-label {
  justify-content: space-between;
}

.vin-photo-slot.is-captured .vin-photo-retake {
  display: block;
}

.vin-switcher {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  padding: var(--space-1);
  background: var(--surface-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
}

/* Clip the spring overshoot to the gray track without clipping focus rings. */
.vin-switcher-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* One white pill slides under the selected label. Width and translateX
   are set in vin.html so the highlight moves instead of jumping. */
.vin-switcher-indicator {
  position: absolute;
  top: var(--space-1);
  left: 0;
  height: calc(100% - (var(--space-1) * 2));
  background: var(--surface-raised);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-key-hover);
  pointer-events: none;
  z-index: 0;
  transition:
    transform var(--duration-slow) var(--ease-spring),
    width var(--duration-slow) var(--ease-spring);
}

.vin-switcher-indicator:not([style*="width"]) {
  display: none;
}

.vin-switcher-option {
  position: relative;
  z-index: 1;
  flex: 1 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--space-12);
  padding: var(--space-3) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--gray-500);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-enter);
}

.vin-switcher-option[aria-checked="true"] {
  color: var(--text-link);
}

.vin-switcher:not(.has-indicator) .vin-switcher-option[aria-checked="true"] {
  background: var(--surface-raised);
  box-shadow: var(--elevation-key-hover);
}

.vin-switcher-option:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.vin-plate-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Filling-in (Figma 1389:8356): 16px toggle → label, 6px → input, 8px → helper.
   Empty: 16px toggle → input, VIN and license plate. Only the field grows. */
.vin-lookup .field {
  position: relative;
  gap: 0;
}

.vin-input-wrap {
  position: relative;
  margin-top: 0;
  transition: margin-top var(--duration-fast) var(--ease-exit);
}

.vin-lookup .field:has(.vin-input-wrap:focus-within) .vin-input-wrap,
.vin-lookup .field:not(:has(.input:placeholder-shown)) .vin-input-wrap {
  margin-top: calc(var(--space-5) + var(--space-1-5));
  transition: margin-top var(--duration-moderate) var(--ease-enter);
}

.vin-input-wrap:has(.vin-scan) .input,
.vin-lookup .field:has(.input[aria-invalid="true"]) .input {
  padding-right: var(--space-10);
}

.vin-lookup .input::placeholder {
  color: transparent;
}

.vin-lookup .field-label {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  width: 100%;
  max-width: calc(100% - var(--space-10));
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-tertiary);
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  transform: translate(var(--space-4), calc((var(--space-12) - 1lh) / 2));
  transform-origin: left top;
  transition:
    transform var(--duration-fast) var(--ease-exit),
    color var(--duration-fast) var(--ease-exit),
    font-size var(--duration-fast) var(--ease-exit),
    font-weight var(--duration-fast) var(--ease-exit),
    line-height var(--duration-fast) var(--ease-exit),
    max-width var(--duration-fast) var(--ease-exit);
}

.vin-lookup .field:has(.vin-input-wrap:focus-within) .field-label,
.vin-lookup .field:not(:has(.input:placeholder-shown)) .field-label {
  max-width: 100%;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--text-primary);
  transform: none;
  transition:
    transform var(--duration-moderate) var(--ease-enter),
    color var(--duration-moderate) var(--ease-enter),
    font-size var(--duration-moderate) var(--ease-enter),
    font-weight var(--duration-moderate) var(--ease-enter),
    line-height var(--duration-moderate) var(--ease-enter),
    max-width var(--duration-moderate) var(--ease-enter);
}

@media (prefers-reduced-motion: reduce) {
  .vin-step-panel,
  .vin-step-fill,
  .vin-miles-notice-wrap,
  .vin-input-wrap,
  .vin-lookup .field:has(.vin-input-wrap:focus-within) .vin-input-wrap,
  .vin-lookup .field:not(:has(.input:placeholder-shown)) .vin-input-wrap,
  .vin-lookup .field-label,
  .vin-lookup .field:has(.vin-input-wrap:focus-within) .field-label,
  .vin-lookup .field:not(:has(.input:placeholder-shown)) .field-label,
  .vin-switcher-indicator,
  .vin-switcher-option,
  .vin-confetti-piece,
  .vin-loan-fields-wrap,
  .vin-loan-fields-wrap > .vin-loan-fields {
    transition: none;
    animation: none;
  }
}

/* Rest = border-control. Hover = gray-500. No focus ring or blue focus border. */
.vin-lookup .input {
  width: 100%;
  border-color: var(--border-control);
}

.vin-lookup .input:hover:not(:disabled):not([aria-invalid="true"]) {
  border-color: var(--gray-500);
}

.vin-lookup .input:focus,
.vin-lookup .input:focus-visible {
  outline: none;
  box-shadow: none;
  border-color: var(--border-control);
}

.vin-lookup .input:focus:hover,
.vin-lookup .input:focus-visible:hover {
  border-color: var(--gray-500);
}

.vin-lookup .input[aria-invalid="true"],
.vin-lookup .input[aria-invalid="true"]:hover,
.vin-lookup .input[aria-invalid="true"]:focus,
.vin-lookup .input[aria-invalid="true"]:focus-visible {
  border-color: var(--error-accent);
}

.vin-lookup .input[aria-describedby$="-ok"],
.vin-lookup .input[aria-describedby$="-ok"]:hover,
.vin-lookup .input[aria-describedby$="-ok"]:focus,
.vin-lookup .input[aria-describedby$="-ok"]:focus-visible {
  border-color: var(--success-accent);
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .field-label,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  transform: none;
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .vin-input-wrap,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .vin-input-wrap {
  margin-top: 0;
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .vin-scan,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .vin-scan {
  display: none;
}

.vin-error-icon,
.vin-success-icon {
  display: none;
  position: absolute;
  top: 50%;
  right: var(--space-4);
  z-index: 2;
  width: var(--space-5);
  height: var(--space-5);
  transform: translateY(-50%);
  pointer-events: none;
}

.vin-error-icon {
  color: var(--error-accent);
}

.vin-success-icon {
  color: var(--success-accent);
}

.vin-error-icon circle {
  fill: currentColor;
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .vin-error-icon,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .vin-success-icon {
  display: block;
}

.vin-lookup .field-error,
.vin-lookup .field-success {
  display: none;
  margin: var(--space-1-5) 0 0;
}

.vin-lookup .field-error {
  color: var(--error-700);
}

.vin-lookup .field-success {
  color: var(--success-dark);
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .field-error,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .field-success {
  display: block;
}

.vin-lookup .field:has(.input[aria-invalid="true"]) .vin-what,
.vin-lookup .field:has(.input[aria-describedby$="-ok"]) .vin-what {
  display: none;
}

.vin-scan {
  position: absolute;
  top: 50%;
  right: var(--space-4);
  z-index: 2;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

.vin-scan svg {
  fill: none;
}

.vin-scan:hover,
.vin-scan:active {
  background: transparent;
  color: var(--text-secondary);
}

.vin-what {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: max-content;
  margin: var(--space-2) 0 0;
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
  border-radius: var(--radius-md);
  color: var(--text-link);
}

.vin-what-link {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--text-link);
  text-decoration: none;
  cursor: pointer;
}

.vin-what-link:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}

.vin-what-link:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

.vin-dock {
  /* In-flow bottom CTA. The keyboard resizes the view, so this stays
     visible above the keys. Do not mock a keyboard. Loan hides Continue
     until Yes. */
  flex: none;
  width: 100%;
  z-index: var(--layer-sticky);
  background: var(--surface-raised);
}

.vin-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + var(--vin-safe-bottom));
  background: var(--surface-raised);
  border-top: 1px solid var(--border-hairline);
}

.vin-footer-photos {
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  padding-bottom: calc(var(--space-4) + var(--vin-safe-bottom));
}

.vin-footer-photos .btn {
  flex: 1 1 0;
  width: auto;
}

.vin-photos-later[hidden] {
  display: none;
}

.vin-footer-photos.is-complete .vin-photos-upload {
  flex: 1 1 100%;
}

.vin-footer[hidden],
.vin-screen[data-step="loan"]:not(.has-cta) .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="title"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="keys"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="drive"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="parts"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="photos"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="airbags"] .vin-footer:not(.vin-footer-photos),
.vin-screen[data-step="flood-fire"] .vin-footer:not(.vin-footer-photos) {
  display: none;
}

.vin-continue {
  width: 100%;
}

/* Figma Button 1.2 disabled on this frame: gray-150 fill, gray-600 label.
   dist/vallejo.css disabled uses sunken / text-disabled instead. */
.vin-continue[aria-disabled="true"] {
  background-color: var(--gray-150);
  background-image: none;
  color: var(--gray-600);
  border-color: transparent;
  box-shadow: none;
}

.vin-home {
  display: none;
}

/* Guided camera — Figma 1307:14456. Live video replaces the screenshot. */
.vin-camera {
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: var(--surface-deep);
}

.vin-screen.is-camera .vin-header,
.vin-screen.is-camera .vin-steps,
.vin-screen.is-camera .vin-main,
.vin-screen.is-camera .vin-dock,
.vin-screen.is-camera .vin-footer-photos {
  display: none;
}

.vin-screen.is-camera .vin-camera {
  display: flex;
}

.vin-camera-stage {
  position: absolute;
  inset: 0;
}

.vin-camera-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--surface-deep);
}

.vin-camera-video[hidden] {
  display: none;
}

.vin-camera-error {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: var(--space-8) var(--space-5);
  color: var(--text-inverse);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 24px;
  text-align: center;
}

.vin-camera-error[hidden] {
  display: none;
}

.vin-camera-stencil {
  position: absolute;
  left: 50%;
  top: 58%;
  z-index: 1;
  display: block;
  width: 408px;
  height: 201px;
  max-width: calc(100% - var(--space-8));
  pointer-events: none;
  transform: translate(-50%, -50%);
  color: var(--error-accent);
  transition: color var(--duration-slow) var(--ease-enter);
}

.vin-camera[data-align="off"] .vin-camera-stencil {
  color: var(--error-accent);
}

.vin-camera[data-align="wait"] .vin-camera-stencil {
  color: var(--warning-200);
}

.vin-camera[data-align="lock"] .vin-camera-stencil {
  color: var(--success-accent);
}

.vin-camera-stencil svg {
  display: block;
  width: 408px;
  height: 201px;
  max-width: 100%;
  max-height: 201px;
}

.vin-camera-chrome {
  position: relative;
  z-index: 2;
  background: var(--surface-raised);
}

.vin-camera-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: calc(var(--space-5) + var(--vin-safe-top)) var(--space-4) 0;
}

.vin-camera-chip {
  position: absolute;
  top: calc(100% + var(--space-4));
  left: 50%;
  z-index: 2;
  isolation: isolate;
  width: max-content;
  max-width: calc(100% - var(--space-8));
  margin: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-inverse);
  text-align: center;
  transform: translateX(-50%);
}

.vin-camera-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--gray-800);
  opacity: 0.45;
}

.vin-photo-slot.is-captured .vin-photo-guide {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  object-fit: cover;
}

.vin-photo-slot.is-captured .vin-photo-outline {
  color: var(--border-hairline);
}

.vin-camera-header .icon-btn svg {
  fill: none;
}

.vin-camera-title {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  color: var(--text-primary);
}

.vin-camera-still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vin-camera-still[hidden] {
  display: none;
}

.vin-camera.is-review .vin-camera-video {
  visibility: hidden;
}

.vin-camera-review {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--layer-modal);
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--vin-safe-bottom));
  background: var(--surface-header-deep);
}

.vin-camera-review[hidden] {
  display: none;
}

.vin-camera-review .btn {
  flex: 1 1 0;
  width: auto;
}

.vin-camera-retake {
  color: var(--interactive-primary);
  background-color: var(--surface-raised);
  border-color: var(--border-focus);
  box-shadow: none;
}

.vin-camera-retake:hover {
  color: var(--interactive-primary-hover);
  background-color: var(--surface-raised);
  border-color: var(--interactive-primary-hover);
}

.vin-camera-retake:focus-visible {
  outline-color: var(--border-focus-on-dark);
}

.vin-camera-steps {
  position: relative;
  z-index: 2;
  display: flex;
  gap: var(--space-1);
  width: 100%;
  height: auto;
  padding-top: var(--space-8);
  background: var(--surface-raised);
}

.vin-camera-steps .vin-step-fill {
  width: 0;
}

.vin-camera-steps .vin-step.is-current .vin-step-fill {
  width: 50%;
}

.vin-camera-steps .vin-step.vin-step-complete .vin-step-fill {
  width: 100%;
}

.vin-help-scrim {
  position: absolute;
  inset: 0;
  z-index: var(--layer-scrim);
  display: flex;
  align-items: flex-end;
  background: var(--surface-scrim);
  opacity: 0;
  transition: opacity var(--duration-moderate) var(--ease-enter);
}

.vin-help-scrim[hidden] {
  display: none;
}

.vin-help-scrim.is-open {
  opacity: 1;
}

.vin-help-scrim.is-closing {
  opacity: 0;
  transition-duration: var(--duration-slow);
  transition-timing-function: var(--ease-exit);
}

.vin-screen.is-vin-help > :not(.vin-help-scrim) {
  pointer-events: none;
}

.vin-help-sheet {
  display: flex;
  flex-direction: column;
  flex: none;
  width: 100%;
  height: 50%;
  max-height: 50%;
  overflow: hidden;
  background: var(--surface-raised);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--elevation-modal);
  transform: translateY(100%);
}

.vin-help-scrim.is-open .vin-help-sheet {
  animation: vin-help-sheet-in var(--duration-deliberate) var(--ease-enter) both;
}

.vin-help-scrim.is-closing .vin-help-sheet {
  animation: vin-help-sheet-out var(--duration-slow) var(--ease-exit) both;
}

@keyframes vin-help-sheet-in {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes vin-help-sheet-out {
  from { transform: translateY(0); }
  to { transform: translateY(100%); }
}

.vin-help-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  gap: var(--space-2);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border-hairline);
}

.vin-help-header-spacer,
.vin-help-close {
  flex: none;
  width: 32px;
  height: 32px;
}

.vin-help-close svg {
  fill: none;
}

.vin-help-title {
  flex: 1 1 auto;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  text-align: center;
  color: var(--text-primary);
}

.vin-help-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--space-6);
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + var(--vin-safe-bottom));
}

.vin-help-body[hidden] {
  display: none;
}

#none-help-body {
  flex: none;
  padding-bottom: var(--space-4);
}

.vin-help-sheet:has(#none-help-body:not([hidden])),
.vin-help-sheet:has(#offer-help-body:not([hidden])) {
  height: auto;
  max-height: 50%;
}

#offer-help-body {
  flex: none;
  gap: var(--space-4);
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--vin-safe-bottom));
}

#offer-help-body .vin-help-define {
  gap: var(--space-1);
}

.vin-help-sheet:has(.vin-help-actions:not([hidden])) .vin-help-body {
  padding-bottom: var(--space-5);
}

.vin-help-actions {
  display: flex;
  flex: none;
  gap: var(--space-4);
  padding: var(--space-4);
  padding-bottom: calc(var(--space-4) + var(--vin-safe-bottom));
  background: var(--surface-raised);
  border-top: 1px solid var(--border-hairline);
}

.vin-help-actions[hidden] {
  display: none;
}

.vin-help-actions .btn {
  flex: 1 1 0;
  width: auto;
}

.vin-help-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.vin-help-define {
  gap: var(--space-2);
}

.vin-help-heading {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-primary);
}

.vin-help-intro,
.vin-help-copy {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 22px;
}

.vin-help-intro {
  color: var(--text-primary);
}

.vin-help-copy {
  color: var(--text-secondary);
}

.vin-help-copy strong {
  font-weight: 700;
}

.vin-help-figure {
  margin: 0;
  width: 327px;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.vin-help-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.vin-help-figure-title {
  width: 100%;
}

#severity-help-body {
  gap: var(--space-4);
}

.vin-help-photos {
  display: flex;
  gap: var(--space-3);
}

.vin-help-photo {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--surface-raised);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
}

.vin-help-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vin-help-plate {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: var(--text-link);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.vin-help-plate:hover {
  color: var(--text-link-hover);
  text-decoration: underline;
}

.vin-help-plate:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  .vin-help-scrim,
  .vin-help-sheet {
    transition: none;
    animation: none;
  }

  .vin-help-sheet {
    transform: none;
  }
}

