.vehicle-entry-shell {
  padding: 0;
  overflow: hidden;
}

.vehicle-entry-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.vehicle-entry-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 15px 20px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.vehicle-entry-tab:last-child { border-right: 0; }

.vehicle-entry-tab::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
}

.vehicle-entry-tab.active {
  background: #fff;
  color: var(--ink);
}

.vehicle-entry-tab.active::after { background: var(--orange); }

.vehicle-entry-tab:focus-visible {
  z-index: 1;
  outline: 3px solid rgba(241, 90, 36, .18);
  outline-offset: -3px;
}

.vehicle-entry-tab-icon {
  display: grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  color: #475467;
  font-size: 18px;
  font-weight: 800;
}

.vehicle-entry-tab.active .vehicle-entry-tab-icon {
  border-color: #fed7c3;
  background: var(--orange-pale);
  color: var(--orange-dark);
}

.vehicle-entry-tab strong,
.vehicle-entry-tab small { display: block; }
.vehicle-entry-tab strong { font-size: 15px; }
.vehicle-entry-tab small { margin-top: 2px; font-size: 12px; font-weight: 400; }

.vehicle-entry-panel { padding: 22px; }

.vehicle-entry-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.vehicle-entry-panel-head h3 { margin-bottom: 4px; font-size: 19px; }
.vehicle-entry-panel-head p { margin: 0; color: var(--muted); font-size: 13px; }

.vehicle-entry-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef4ff;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}

.vehicle-entry-assurance {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #abefc6;
  border-radius: 10px;
  background: #f6fef9;
  color: #05603a;
}

.vehicle-entry-assurance > span {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #d1fadf;
  font-weight: 900;
}

.vehicle-entry-assurance p { margin: 1px 0 0; font-size: 12px; }

@media (max-width: 720px) {
  .vehicle-entry-tabs { grid-template-columns: 1fr; }
  .vehicle-entry-tab { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--line); }
  .vehicle-entry-tab:last-child { border-bottom: 0; }
  .vehicle-entry-tab::after { top: 0; right: auto; bottom: 0; width: 3px; height: auto; }
  .vehicle-entry-panel { padding: 18px; }
  .vehicle-entry-panel-head { display: block; }
  .vehicle-entry-badge { display: inline-flex; margin-top: 10px; }
}

.variant-field {
  align-self: start;
}

.variant-status {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-weight: 400;
}

.variant-status strong { font-size: 13px; }
.variant-status span { font-size: 12px; font-weight: 700; }
.variant-status small { grid-column: 1 / -1; line-height: 1.45; }
.variant-status.confirmed { background: #ecfdf3; color: #027a48; }
.variant-status.review { background: #fffaeb; color: #93370d; }
.variant-status.unknown { background: #f2f4f7; color: #475467; }

.variant-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 10px;
}

.variant-heading h4 { margin: 0; }
.variant-heading span { font-size: 13px; color: #c94415; }
.variant-choice.suggested { border-color: #f15a24; box-shadow: 0 0 0 2px rgba(241, 90, 36, .1); }
.identity-evidence { margin: 13px 0; color: #475467; font-size: 13px; }
.resolver-evidence {
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid #d6e4ff;
  border-radius: 10px;
  background: #f8fbff;
  color: #344054;
}
.resolver-evidence h4 { margin: 0 0 7px; }
.resolver-evidence ul { margin: 0; padding-left: 20px; }
.resolver-evidence li { margin: 3px 0; line-height: 1.45; }
.resolver-evidence p { margin: 8px 0 0; }
.resolver-evidence small { display: block; margin-top: 6px; color: #667085; }
.identity-pending.status-confirmed { background: #ecfdf3; color: #027a48; }
.identity-pending.status-probable,
.identity-pending.status-inferred { background: #fffaeb; color: #93370d; }
.identity-pending.status-unknown { background: #f2f4f7; color: #475467; }

/* Step 3 information hierarchy: document facts first, decision before supporting evidence. */
.identity-panel {
  display: grid;
  gap: 16px;
}

.identity-panel .identity-head {
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid #e4e7ec;
}

.identity-panel .identity-head h3 {
  margin: 4px 0 8px;
  font-size: clamp(20px, 2.4vw, 27px);
}

.identity-section {
  position: relative;
  padding: 16px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
}

.identity-section::before {
  content: '';
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #d0d5dd;
}

.identity-section-heading {
  margin-bottom: 12px;
}

.identity-section-heading h4,
.identity-section-heading p {
  margin: 3px 0 0;
}

.identity-section-heading p {
  max-width: 780px;
  color: #667085;
  font-size: 12px;
}

.identity-section-kicker {
  display: block;
  color: #c94415;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.identity-primary-section {
  padding: 0;
  overflow: hidden;
  background: #fbfcfe;
}

.identity-primary-section::before { background: #5b8def; }

.identity-primary-section > .identity-section-heading {
  margin: 0;
  padding: 15px 16px 12px;
}

.identity-primary-facts.identity-columns {
  gap: 0;
  margin: 0;
  border-top: 1px solid #e4e7ec;
}

.identity-fact-group {
  min-width: 0;
  padding: 14px 16px;
  background: #fff;
}

.identity-fact-group.secondary {
  border-left: 1px solid #e4e7ec;
  background: #f8fbff;
}

.identity-fact-group h4 {
  margin: 0 0 8px;
  color: #344054;
  font-size: 13px;
}

.identity-fact-group p {
  display: grid;
  grid-template-columns: minmax(112px, .7fr) minmax(0, 1.3fr);
  gap: 10px;
  margin: 0;
  padding: 6px 0;
  border-top: 1px solid #eef2f6;
  font-size: 12px;
}

.identity-fact-group p:first-of-type { border-top: 0; }
.identity-fact-group p > strong { color: #475467; }
.identity-fact-group p > span { min-width: 0; color: #172033; overflow-wrap: anywhere; }
.identity-fact-group p small { margin-top: 2px; font-size: 10px; line-height: 1.35; }

.identity-decision-section {
  border-color: #fed7c3;
  background: linear-gradient(135deg, #fff7f2 0%, #fff 70%);
  box-shadow: 0 8px 20px rgba(241, 90, 36, .06);
}

.identity-decision-section::before { background: #f15a24; }

.identity-decision-section .variant-heading {
  align-items: flex-start;
  margin: 3px 0 0;
}

.identity-decision-section .variant-heading span {
  max-width: 620px;
  text-align: right;
}

.identity-decision-section .variant-candidates {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.identity-decision-section .variant-choice {
  position: relative;
  min-height: 0;
  padding: 14px;
  background: #fff;
  border-color: #d0d5dd;
  transition: opacity .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease;
}

.identity-decision-section .variant-choice > strong {
  padding-right: 96px;
  font-size: 14px;
  line-height: 1.35;
}
.identity-decision-section .variant-choice.is-selected {
  border-color: #12b76a;
  background: #ecfdf3;
  box-shadow: 0 0 0 2px rgba(18, 183, 106, .16), 0 8px 18px rgba(2, 122, 72, .08);
  opacity: 1;
}
.identity-decision-section .variant-choice.is-unselected {
  border-color: #d0d5dd;
  background: #f8fafc;
  opacity: .64;
}
.identity-decision-section .variant-choice.is-unselected:hover,
.identity-decision-section .variant-choice.is-unselected:focus-visible {
  border-color: #98a2b3;
  background: #fff;
  opacity: 1;
  transform: translateY(-1px);
}
.identity-decision-section .variant-choice:focus-visible {
  outline: 3px solid rgba(18, 183, 106, .2);
  outline-offset: 2px;
}
.identity-decision-section .variant-choice-state {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  width: auto;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}
.identity-decision-section .variant-choice-state.selected { background: #d1fadf; color: #027a48; }
.identity-decision-section .variant-choice-state.recommended { background: #fff1e9; color: #c94415; }
.identity-decision-section .variant-choice-score {
  color: #c94415;
  font-size: 12px;
  font-weight: 800;
}
.identity-decision-section .variant-choice.is-selected .variant-choice-score { color: #027a48; }
.identity-decision-section .candidate-evidence-counts {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(152, 162, 179, .24);
}
.identity-decision-section .candidate-evidence-details { margin-bottom: 0; padding-left: 18px; }

.identity-supporting-section {
  border-style: dashed;
  background: #f8fafc;
}

.identity-supporting-section::before { background: #98a2b3; }

.identity-supporting-grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 10px;
}

.identity-supporting-section .resolver-evidence,
.identity-supporting-section .identity-research {
  margin: 0;
  background: #fff;
}

.identity-supporting-section .identity-research,
.identity-supporting-section .identity-evidence,
.identity-supporting-section .identity-uncertain {
  margin-top: 10px;
}

.variant-universe.identity-secondary-section {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.identity-confirmation-shell {
  overflow: hidden;
  padding: 0;
  border-color: #cfd7e3;
  box-shadow: 0 8px 24px rgba(18, 30, 52, .06);
}

.identity-confirmation-heading {
  padding: 17px 20px 15px;
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.identity-confirmation-heading h3,
.identity-confirmation-heading p { margin: 4px 0 0; }
.identity-confirmation-heading p { max-width: 800px; color: #667085; font-size: 12px; }

.vehicle-confirmation-form {
  gap: 0;
  padding: 0 20px 18px;
}

.vehicle-form-group {
  min-width: 0;
  margin: 0;
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid #e4e7ec;
}

.vehicle-form-group legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 13px;
  padding: 0;
  gap: 16px;
}

.vehicle-form-group legend span { color: #172033; font-size: 14px; font-weight: 800; }
.vehicle-form-group legend small { max-width: 620px; color: #667085; font-size: 11px; font-weight: 400; text-align: right; }

.vehicle-form-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 17px;
}

.vehicle-form-group[data-group-index="1"] {
  margin: 0 -20px;
  padding: 18px 20px;
  background: #fffaf7;
}

.vehicle-form-footer {
  display: grid;
  gap: 14px;
  padding-top: 18px;
}

.vehicle-form-footer .actions { margin-top: 0; }

.variant-universe.identity-secondary-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.variant-universe.identity-secondary-section > summary::-webkit-details-marker { display: none; }
.variant-universe.identity-secondary-section > summary span { display: grid; gap: 3px; }
.variant-universe.identity-secondary-section > summary b { color: #c94415; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.variant-universe.identity-secondary-section > summary strong { color: #172033; font-size: 14px; }
.variant-universe.identity-secondary-section > summary small { color: #667085; font-size: 11px; text-align: right; }
.variant-universe.identity-secondary-section > summary::after { content: '+'; color: #c94415; font-size: 20px; font-weight: 500; }
.variant-universe.identity-secondary-section[open] > summary::after { content: '−'; }
.variant-universe-body { padding: 0 16px 16px; border-top: 1px solid #e4e7ec; }
.variant-universe-help { margin: 12px 0; color: #667085; font-size: 12px; }

@media (max-width: 760px) {
  .identity-fact-group.secondary { border-top: 1px solid #e4e7ec; border-left: 0; }
  .identity-supporting-grid { grid-template-columns: 1fr; }
  .identity-decision-section .variant-heading,
  .variant-universe.identity-secondary-section > summary { align-items: flex-start; flex-direction: column; }
  .identity-decision-section .variant-heading span,
  .variant-universe.identity-secondary-section > summary small { text-align: left; }
  .identity-fact-group p { grid-template-columns: 1fr; gap: 2px; }
  .identity-decision-section .variant-choice > strong { padding-right: 0; padding-top: 26px; }
  .vehicle-form-group legend { align-items: flex-start; flex-direction: column; gap: 3px; }
  .vehicle-form-group legend small { text-align: left; }
  .vehicle-form-group-grid { grid-template-columns: 1fr; }
}
