:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --panel: #fffaf2;
  --panel-strong: #ffffff;
  --ink: #172026;
  --muted: #697178;
  --line: #d9d1c4;
  --accent: #b22234;
  --accent-dark: #7f1d2a;
  --ok: #1f7a4d;
  --warn: #a15c00;
  --disabled: #a5a099;
  --shadow: 0 18px 48px rgba(41, 35, 28, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
select,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1680px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.topbar,
.vehicle-bar,
.workspace {
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.9);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 8px 8px 0 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  font-weight: 750;
}

button:hover {
  background: var(--accent-dark);
}

.ghost-button {
  background: transparent;
  color: var(--accent-dark);
}

.ghost-button:hover {
  background: #f6e5e7;
}

.vehicle-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
  padding: 16px 24px;
  border-top: 0;
}

.vehicle-context-item,
label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-context-item strong {
  color: var(--ink);
  font-size: 20px;
  text-transform: none;
}

select,
input,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 700;
}

textarea {
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
}

.vehicle-price {
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.vehicle-price strong {
  color: var(--ink);
  font-size: 24px;
}

.alert-region {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.alert {
  border: 1px solid #e2bf82;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff6de;
  color: #563600;
  font-weight: 650;
}

.workspace {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 340px;
  min-height: 760px;
  border-radius: 0 0 8px 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.step-rail {
  border-right: 1px solid var(--line);
  background: #efe8dc;
  padding: 14px;
}

.step-link {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  width: 100%;
  min-height: 46px;
  margin-bottom: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.step-link:hover,
.step-link.active {
  border-color: var(--line);
  background: var(--panel);
}

.step-link.active {
  color: var(--accent-dark);
}

.step-index {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ddd2c2;
  font-size: 12px;
}

.choice-panel {
  min-width: 0;
  padding: 24px;
}

.step-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.step-meta {
  color: var(--muted);
  font-weight: 700;
}

.section-block {
  margin-bottom: 22px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-title span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 10px;
}

.choice-card {
  min-height: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--panel-strong);
  text-align: left;
  color: var(--ink);
}

.choice-card:hover {
  border-color: #b8a995;
  background: #fffdf8;
}

.choice-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.choice-card.disabled {
  color: var(--disabled);
  cursor: not-allowed;
  background: #f1eee8;
}

.choice-card.auto {
  border-color: var(--ok);
  background: #eff8f2;
}

.context-choice-card {
  min-height: 132px;
}

.choice-card .topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.rpo {
  font-weight: 850;
}

.price {
  color: var(--accent-dark);
  font-weight: 850;
  white-space: nowrap;
}

.choice-name {
  margin: 0 0 7px;
  font-weight: 750;
}

.choice-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.disabled-reason,
.auto-reason {
  margin-top: 8px;
  color: var(--warn);
  font-size: 12px;
  font-weight: 750;
}

.auto-reason {
  color: var(--ok);
}

.summary-panel {
  border-left: 1px solid var(--line);
  background: #f8f3ea;
  padding: 16px;
}

.summary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 14px;
  background: var(--panel);
}

.customer-card {
  display: grid;
  gap: 12px;
}

.customer-field-grid {
  display: grid;
  gap: 10px;
}

.customer-field-grid label {
  text-transform: none;
}

.total-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
}

.total-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.total-list dt {
  color: var(--muted);
  font-weight: 700;
}

.total-list dd {
  margin: 0;
  font-weight: 850;
}

.summary-list {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.summary-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.standard-card {
  max-height: 360px;
  overflow: auto;
}

.standard-equipment-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.standard-group {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-strong);
}

.standard-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.standard-group summary span {
  color: var(--muted);
}

.standard-group .summary-list {
  margin: 0;
  padding: 0 10px 10px;
}

.empty {
  color: var(--muted);
  font-style: italic;
}

@media (max-width: 1120px) {
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .summary-panel {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1680px);
    padding-top: 10px;
  }

  .topbar,
  .vehicle-bar,
  .workspace {
    display: grid;
    grid-template-columns: 1fr;
  }

  .vehicle-price {
    justify-items: start;
  }

  .step-rail,
  .summary-panel {
    border: 0;
  }

  .choice-panel {
    order: 1;
  }

  .step-rail {
    order: 2;
  }

  .summary-panel {
    order: 3;
  }

  .choice-panel {
    padding: 16px;
  }

  .toolbar {
    justify-content: start;
  }
}
