.vehicle-item.expanded { box-shadow: none; }
.vehicle-item.expanded .vehicle-row {
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, .9fr) 36px;
  min-height: 104px;
  background: #f9fbff;
}
.vehicle-item.expanded .vehicle-copy h2 { font-size: 20px; }
.vehicle-item.expanded .vehicle-copy { padding-right: 145px; }
.vehicle-item.expanded .vehicle-photo { width: 124px; height: 76px; }
.vehicle-item.expanded .save-button { padding: 7px 10px; border: 1px solid #bfd3ef; border-radius: 6px; color: var(--blue); background: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; }
.vehicle-item.expanded .auction-cell .detail-links { margin-top: 4px; font-size: 11px; }
.vehicle-item.expanded .resale-cell,
.vehicle-item.expanded .bid-cell,
.vehicle-item.expanded .profit-cell { display: none !important; }
.vehicle-item.expanded .auction-cell { border-right: 0; }
.vehicle-item.expanded .chevron { grid-column: 3; }
.vehicle-expanded {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  padding: 20px 32px 26px;
  background: #f9fbfd;
}
.vehicle-expanded .detail-left { padding: 0; border: 0; }
.repair-research-slot { grid-column: 1 / -1; }
.repair-research-slot:empty { display: none; }
.repair-research-panel h3 { margin: 0; font-size: 16px; }
.repair-research-panel .repair-result { margin-top: 10px; padding: 0; border: 0; background: transparent; }
.repair-research-panel .repair-items { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; }
.vehicle-expanded .vehicle-gallery { position: relative; }
.vehicle-expanded .gallery-stage { border-radius: 8px; }
.vehicle-expanded .gallery-preview { height: clamp(280px, 26vw, 405px); }
.vehicle-expanded .gallery-preview img { object-fit: cover; }
.vehicle-expanded .gallery-counter {
  position: absolute;
  bottom: 14px;
  left: 15px;
  padding: 6px 9px;
  border-radius: 5px;
  color: #fff;
  background: #14253bcc;
}
.listing-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 8px; margin-top: 12px; }
.listing-fact { min-width: 0; padding: 10px 12px; border-radius: 6px; background: #eef3f9; }
.listing-fact span, .listing-fact strong { display: block; }
.listing-fact span { color: #617697; font-size: 11px; }
.listing-fact strong { margin-top: 3px; font-size: 12px; text-transform: uppercase; overflow-wrap: anywhere; }
.listing-metadata { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.listing-identifiers { margin: 0; gap: 6px 16px; }
.copy-field { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.copy-value { padding: 2px 1px; border: 0; border-bottom: 1px dotted var(--blue); color: var(--blue); background: transparent; font-size: inherit; }
.copy-value::after { content: ' ⧉'; font-size: 13px; }
.copy-value:hover { color: #004bbf; border-bottom-style: solid; }
.copy-value:focus-visible { outline: 2px solid var(--blue); border-radius: 3px; }
.copy-status { color: var(--green); font-size: 11px; }
.copy-status:empty { display: none; }
.listing-metadata .detail-links { gap: 10px; }
.vehicle-expanded .detail-card { min-width: 0; padding: 18px; border: 1px solid #dce5f0; border-radius: 9px; background: #fff; }
.deal-heading, .price-evidence-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.deal-heading h3 { font-size: 21px; }
.deal-heading .detail-context { margin: 4px 0 0; }
.buy-now-badge { flex: 0 0 auto; padding: 7px 9px; border-radius: 6px; color: var(--blue); background: var(--blue-soft); font-weight: 700; }
.decision-metrics { display: grid; grid-template-columns: 1.1fr 1.1fr .9fr 1.3fr .9fr; gap: 6px; margin: 17px 0 16px; }
.decision-metric { min-width: 0; min-height: 105px; padding: 11px 9px; border-radius: 6px; background: #f1f5fa; }
.decision-metric > span, .decision-metric strong, .decision-metric small { display: block; }
.decision-metric > span { min-height: 27px; color: #435b82; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.decision-metric strong { margin-top: 7px; font-size: clamp(15px, 1.4vw, 21px); line-height: 1.1; white-space: nowrap; }
.decision-metric small { margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.max-bid-metric { background: #eaf4ff; }
.max-bid-metric strong { color: var(--blue); }
.profit-metric { background: #eaf8f2; }
.profit-metric strong { color: var(--green); }
.loss-metric { background: #fff0f2; }
.loss-metric strong { color: var(--red); }
.analysis-panels { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(205px, .9fr); gap: 12px; }
.deal-math, .repair-budget-panel { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 7px; }
.deal-math h4, .repair-budget-panel h4 { margin: 0 0 12px; font-size: 15px; }
.deal-math .cost-row { min-height: 29px; gap: 8px; }
.deal-math .cost-row span { min-width: 0; }
.deal-math .cost-row strong { flex: 0 0 auto; }
.deal-math .math-profit { margin-top: 8px; padding-top: 9px; border-top: 1px solid var(--line); font-weight: 700; }
.repair-budget-panel { background: #f2f7fd; }
.repair-budget-context { margin: -5px 0 11px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.repair-budget-panel .repair-budget-line { flex-wrap: nowrap; gap: 5px; padding: 8px 0; border-top: 1px solid var(--line); }
.repair-budget-panel .repair-row { display: grid; flex: 1 1 auto; gap: 3px; line-height: 1.2; }
.repair-budget-panel .money-input { width: 95px; }
.repair-budget-panel .money-input input { height: 29px; padding-left: 18px; border: 0; background: transparent; font-size: 17px; font-weight: 700; }
.repair-budget-panel .money-prefix { left: 3px; top: 6px; font-weight: 700; }
.repair-edit { flex: 0 0 auto; color: var(--blue); font-size: 12px; }
.repair-budget-panel .repair-research-button { width: 100%; margin-top: 3px; border-color: var(--blue); }
.repair-research-hint { margin: 3px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.repair-auto-note { margin: 7px 0 0; font-size: 10px; line-height: 1.35; }
.repair-research-panel .repair-subtotal { align-items: center; }
.repair-research-panel .repair-subtotal > strong:first-child { font-size: 12px; }
.repair-research-panel .repair-subtotal > strong:last-child { color: var(--ink); font-size: 20px; }
.repair-research-panel .repair-result .evidence-note { line-height: 1.35; }
.repair-research-panel .repair-item { padding: 9px 10px; }
.repair-price-basis { display: inline-block; margin-top: 4px; color: #537195; font-size: 10px; font-weight: 700; }
.repair-item-assessment { color: #415876; font-size: 11px; }
.repair-item-details { margin-top: 6px; color: #4d6280; font-size: 11px; }
.repair-item-details > summary { color: var(--blue); cursor: pointer; }
.repair-research-panel .repair-unknowns { font-size: 11px; }
.auction-history-panel { grid-column: 1 / -1; }
.auction-history-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auction-history-heading a { font-size: 11px; white-space: nowrap; }
.auction-history-order { color: #637895; font-size: 11px; }
.auction-history { display: grid; max-width: 920px; margin: 12px 0 0 5px; padding: 0; list-style: none; }
.auction-history li { position: relative; min-width: 0; padding: 0 0 8px 20px; border-left: 2px solid #ccdcf0; }
.auction-history li:last-child { padding-bottom: 0; border-left-color: transparent; }
.auction-history li::before { position: absolute; top: 14px; left: -6px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 1px #a9c3e7; content: ''; }
.auction-history-row { display: grid; grid-template-columns: 130px 100px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 43px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); background: #f7faff; font-size: 12px; text-decoration: none; }
a.auction-history-row:hover { border-color: #a9bfdd; background: #eff6ff; }
.history-attempt-date { font-weight: 650; }
.auction-history-row strong { white-space: nowrap; }
.history-attempt-status { color: #536b91; }
.auction-history-older { margin-top: 10px; color: var(--blue); font-size: 12px; }
.auction-history-older summary { cursor: pointer; }
.auction-history-note { margin: 11px 0 0; }
.deal-scenario-action { margin-top: 14px; }
.deal-scenario-action .scenario-toggle { width: 100%; margin: 0; padding: 11px; border-color: var(--blue); color: #fff; background: var(--blue); }
.deal-scenario-action .scenario-toggle:hover { background: #004fd3; }
.deal-evidence-notes, .resale-editor-disclosure { margin-top: 12px; color: var(--muted); font-size: 11px; }
.deal-evidence-notes summary, .resale-editor-disclosure summary, .more-vehicle-evidence summary { color: var(--blue); cursor: pointer; }
.bid-checklist { grid-column: 1; }
.bid-checklist .detail-context { margin: 0 0 12px; }
.bid-checklist-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.check-card { position: relative; min-height: 90px; padding: 13px 30px 13px 15px; border: 1px solid #f6dfb7; border-radius: 7px; color: #714b12; background: #fff7e9; text-align: left; }
.check-card strong, .check-card span:not(.check-arrow) { display: block; }
.check-card strong { margin-bottom: 6px; color: var(--ink); font-size: 13px; }
.check-card span:not(.check-arrow) { font-size: 11px; line-height: 1.4; }
.check-card:hover { border-color: #dcaa57; background: #fff1d8; }
.check-arrow { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); font-size: 23px; }
.price-evidence { grid-column: 2; }
.price-evidence-heading a { font-size: 11px; white-space: nowrap; }
.price-evidence-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); margin-top: 14px; border-radius: 6px; background: #f1f5fa; }
.price-evidence-facts .decision-metric { min-height: 72px; padding: 10px; border-radius: 0; }
.price-evidence-facts .decision-metric + .decision-metric { border-left: 1px solid var(--line); }
.price-evidence-facts .decision-metric > span { min-height: 0; font-weight: 500; text-transform: none; }
.price-evidence-facts .decision-metric strong { margin-top: 6px; font-size: 15px; white-space: normal; }
.cap-explanation { margin: 12px 0 0; padding: 9px 10px; border-radius: 5px; color: #365985; background: var(--blue-soft); font-size: 11px; line-height: 1.4; }
.price-evidence .resale-controls { padding-top: 7px; }
.price-evidence .resale-controls .evidence-note, .price-evidence .resale-source { margin: 4px 0; }
.more-vehicle-evidence { grid-column: 1 / -1; padding: 6px 2px 0; }
.more-vehicle-evidence > summary { font-weight: 650; }
.more-vehicle-evidence[open] { padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.more-vehicle-evidence .detail-section { margin-top: 12px; }

@media (max-width: 1180px) {
  .repair-research-panel .repair-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vehicle-item.expanded .vehicle-row { grid-template-columns: minmax(0, 1fr) minmax(185px, .5fr) 30px; padding-bottom: 0; }
  .vehicle-item.expanded .vehicle-identity { grid-column: 1; }
  .vehicle-item.expanded .auction-cell { grid-column: 2; border-top: 0; }
  .vehicle-item.expanded .auction-cell::before { display: none; }
  .vehicle-item.expanded .chevron { position: static; grid-column: 3; }
  .vehicle-expanded { grid-template-columns: 1fr; padding: 18px; }
  .vehicle-expanded .detail-left { border: 0; }
  .vehicle-expanded .deal-panel { padding: 18px; }
  .bid-checklist, .price-evidence { grid-column: 1; }
  .vehicle-expanded .gallery-preview { height: clamp(280px, 45vw, 440px); }
}

@media (max-width: 700px) {
  .repair-research-panel .repair-items { grid-template-columns: 1fr; }
  .auction-history-row { grid-template-columns: 1fr auto; }
  .history-attempt-status { grid-column: 1 / -1; }
  .vehicle-item.expanded .vehicle-row { grid-template-columns: minmax(0, 1fr) 30px; }
  .vehicle-item.expanded .vehicle-identity { grid-column: 1; }
  .vehicle-item.expanded .auction-cell { grid-column: 1; min-height: 52px; padding-left: 0; }
  .vehicle-item.expanded .chevron { grid-column: 2; grid-row: 1; }
  .vehicle-item.expanded .vehicle-copy { padding-right: 28px; }
  .vehicle-item.expanded .vehicle-actions { right: 24px; }
  .vehicle-expanded { gap: 14px; padding: 14px; }
  .decision-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .decision-metric { min-height: 85px; }
  .decision-metric strong { font-size: 18px; }
  .analysis-panels { grid-template-columns: 1fr; }
  .bid-checklist-cards { grid-template-columns: 1fr; }
  .price-evidence-facts { grid-template-columns: 1fr; }
  .price-evidence-facts .decision-metric + .decision-metric { border-left: 0; border-top: 1px solid var(--line); }
}
