:root {
  --blue: #0e4194;
  --gray: #d8dfe1;
  --navy: #1e305e;
  --ink: #1d1d1b;
  --orange: #f29200;
  --surface: #fff;
  --tint: color-mix(in srgb, var(--gray) 34%, white);
  --selection: color-mix(in srgb, var(--blue) 9%, white);
  --muted: color-mix(in srgb, var(--navy) 74%, white);
  font: 16px/1.45 "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--tint);
}
* { box-sizing: border-box; }
body, figure { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { cursor: default; }
:where(button, a, input, select):focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
h2 { margin: 0 0 12px; font-size: 1.1rem; color: var(--navy); }
p { margin: 0 0 14px; }
small { color: var(--muted); }

.top {
  min-height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px clamp(12px, 3vw, 42px);
  border-bottom: 3px solid var(--orange);
  background: var(--navy);
  color: white;
}
.brand { color: inherit; text-decoration: none; display: flex; gap: 11px; align-items: center; }
.brand b { font-size: 1.35rem; letter-spacing: .045em; }
.mode { min-width: 0; margin-left: auto; color: var(--gray); font-size: .83rem; text-align: right; overflow-wrap: anywhere; }
.history { padding: 7px 12px; border: 1px solid var(--gray); border-radius: 3px; background: transparent; color: white; }
a.history { text-decoration: none; font-size: .83rem; }
#home-link { display: inline-flex; align-items: center; gap: 6px; }
[hidden] { display: none !important; }

.portal-page {
  width: min(1220px, calc(100% - clamp(16px, 4vw, 56px)));
  margin: clamp(12px, 3vw, 36px) auto;
  padding: clamp(16px, 3vw, 38px);
}
.portal-heading { margin-bottom: 24px; }
.portal-heading h1 { margin: 0 0 8px; color: var(--navy); line-height: 1.18; font-size: clamp(1.65rem, 3.3vw, 2.45rem); }
.portal-heading p { margin: 0; color: var(--muted); }
.portal-link { display: inline-block; margin-top: 12px; text-decoration: none; }
.entry-page { max-width: 620px; background: var(--surface); border: 1px solid var(--gray); border-radius: 4px; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.entry-actions a { text-decoration: none; }
.home-layout { display: grid; grid-template-columns: minmax(0, 2.6fr) minmax(230px, 1fr); gap: clamp(16px, 3vw, 34px); }
.home-layout:has(#home-management[hidden]) { grid-template-columns: minmax(0, 1fr); }
.model-choices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
  padding: 0; margin: 0; list-style: none;
}
.model-choices li { min-width: 0; }
.model-tile {
  display: flex; flex-direction: column; justify-content: end; width: 100%; height: 100%;
  min-height: 87px; padding: 0; border: 1px solid var(--gray); border-radius: 4px;
  overflow: hidden; color: var(--navy); background: var(--surface); text-align: left;
}
.model-tile img { display: block; width: 100%; aspect-ratio: 1.64; object-fit: cover; background: var(--tint); }
.model-tile-caption { display: grid; gap: 4px; padding: 10px 12px; }
button.model-tile { border-color: var(--blue); }
button.model-tile:hover:not(:disabled) { background: var(--selection); }
.model-tile.unavailable { background: var(--tint); }
.home-links { display: flex; flex-direction: column; gap: 9px; }
.home-links h2 { margin-bottom: 3px; }
.portal-shortcut {
  display: flex; flex-direction: column; gap: 4px; padding: 11px 12px;
  border: 1px solid var(--gray); border-radius: 4px; background: var(--surface);
  text-align: left; text-decoration: none; color: var(--navy);
}
.portal-shortcut:hover:not(:disabled) { border-color: var(--blue); background: var(--selection); }
.management-page { max-width: 800px; }
.management-details {
  display: grid; grid-template-columns: minmax(130px, max-content) minmax(0, 1fr); gap: 8px 18px; margin: 14px 0 0;
}
.management-details dt { font-weight: 650; color: var(--navy); }
.management-details dd { margin: 0; overflow-wrap: anywhere; }
.management-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.management-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.settings-section { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--gray); }
#number-sequence-status:empty { display: none; }
#number-sequence-value { max-width: 180px; margin-top: 14px; }
#number-sequence-value input[readonly] { background: var(--tint); color: var(--navy); }
.margin-transport { max-width: 180px; margin: 12px 0 20px; }
.margin-table { border-collapse: collapse; width: 100%; max-width: 580px; }
.margin-table th, .margin-table td { border-bottom: 1px solid var(--gray); padding: 8px 10px; text-align: left; }
.margin-table thead { color: var(--navy); background: var(--tint); }
.margin-table input { max-width: 110px; }
.address-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(22px, 4vw, 50px); }
.address-layout section { min-width: 0; }
.address-gallery { max-height: clamp(230px, 58vh, 620px); overflow-y: auto; padding: 4px; margin: 8px -4px 0; }
.address-results { list-style: none; display: grid; gap: 6px; padding: 0; margin: 0; }
.address-results button {
  display: grid; gap: 2px; width: 100%; padding: 9px 12px;
  border: 1px solid var(--gray); border-radius: 4px; background: var(--selection); color: var(--navy);
  text-align: left; overflow-wrap: anywhere;
}
.address-results button:hover { border-color: var(--blue); }
.address-results button[aria-current="true"] { border-color: var(--blue); background: var(--blue); color: white; }
.address-results button[aria-current="true"] small { color: white; }
#address-more { width: 100%; margin-top: 8px; }
#address-form, .address-empty { margin-top: 16px; }
.address-empty, .address-message { color: var(--muted); font-size: .9rem; }
.address-message { margin: 8px 0 0; }
.address-message:empty { margin: 0; }
.address-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.address-layout button:disabled { opacity: .55; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 780px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .address-layout { grid-template-columns: minmax(0, 1fr); }
  .address-gallery { max-height: min(36vh, 250px); }
}
@media (max-width: 520px) {
  .address-fields { grid-template-columns: 1fr; }
  .margin-table th, .margin-table td { padding: 6px; }
  .model-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .top { flex-wrap: wrap; }
}

.layout {
  max-width: 1560px;
  margin: auto;
  padding: clamp(8px, 2vw, 28px);
  display: grid;
  grid-template-columns: clamp(146px, 15vw, 216px) minmax(0, 1fr);
  gap: clamp(8px, 1.5vw, 20px);
  align-items: start;
}
.steps, main { border: 1px solid var(--gray); background: var(--surface); border-radius: 4px; }
.steps { position: sticky; top: 10px; max-height: calc(100dvh - 20px); overflow: auto; }
.model { padding: 12px 14px; border-bottom: 1px solid var(--gray); background: var(--tint); }
.model strong, .model span { display: block; }
.model strong { color: var(--navy); font-size: 1.2rem; }
.model span { color: var(--muted); font-size: .76rem; }
.steps ol { list-style: none; margin: 0; padding: 5px; }
.steps button {
  display: grid;
  grid-template-columns: 1.45rem minmax(0, 1fr);
  text-align: left;
  gap: 5px;
  align-items: baseline;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--navy);
  padding: 8px 5px;
  width: 100%;
  line-height: 1.23;
  font-size: .84rem;
}
.steps button:disabled { color: var(--muted); }
.steps button:hover:not(:disabled) { background: var(--tint); }
.steps button[aria-current=step] { border-color: var(--orange); background: var(--selection); color: var(--blue); font-weight: 700; }
.steps button span { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }

main { padding: clamp(10px, 1.8vw, 24px); min-width: 0; }
.step-heading {
  display: flex;
  align-items: baseline;
  gap: 11px;
  border-bottom: 1px solid var(--gray);
  padding: 0 0 12px;
  margin: 0 0 16px;
  color: var(--navy);
}
.step-number { margin: 0; white-space: nowrap; font-size: .87rem; font-weight: 650; color: var(--blue); }
h1 { margin: 0; line-height: 1.18; font-size: clamp(1.1rem, 2vw, 1.65rem); font-weight: 700; }
h1:focus { outline: none; }
.step-split, .build-layout, .rear-layout, .rail-layout, .lighting-layout { display: grid; gap: 14px; align-items: start; }
.step-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.build-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); align-items: stretch; }
.psx-build-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psx-build-layout > .group { align-content: start; }
.rear-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); align-items: stretch; }
.psx-rear-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lighting-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.rail-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.intro-layout { align-items: center; }
.basis-copy, .step-preview, .group { background: var(--tint); border: 1px solid var(--gray); border-radius: 4px; padding: clamp(10px, 1.45vw, 19px); min-width: 0; }
.basis-copy p { margin-bottom: 13px; }
.basis-copy dl { margin: 0; }
.basis-copy dl div + div { margin-top: 9px; }
.basis-copy dt { color: var(--navy); font-weight: 700; }
.basis-copy dd { margin: 0; }
.hero img { display: block; width: 100%; height: auto; border-radius: 4px; }
.step-preview img { display: block; width: 100%; max-height: 360px; object-fit: contain; }
.step-preview p { margin: 10px 0 0; }
.quote-gallery ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0; margin: 0; list-style: none; }
.quote-gallery li { min-width: 0; border: 1px solid var(--gray); border-radius: 4px; overflow: hidden; background: white; }
.quote-gallery img, .gallery-placeholder { width: 100%; aspect-ratio: 4 / 3; background: var(--tint); }
.quote-gallery img { padding: 5px; object-fit: contain; }
.gallery-placeholder { display: grid; place-items: center; padding: 8px; text-align: center; color: var(--muted); font-size: .78rem; }
.quote-gallery figcaption { display: grid; gap: 3px; padding: 8px; font-size: .84rem; overflow-wrap: anywhere; }
.quote-gallery figcaption strong { color: var(--navy); }
.finish-details { display: grid; gap: 12px; min-width: 0; }
.finish-details .group { margin-bottom: 0; }
.finish-layout #quote-gallery-items { max-height: min(72vh, 780px); overflow-y: auto; padding: 3px; margin: -3px; }
.finish-layout #quote-gallery-items:focus-visible { outline: 2px solid var(--orange); outline-offset: -1px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 152px), 1fr)); gap: 11px; margin-bottom: 12px; }
.field { display: grid; gap: 5px; align-items: center; min-width: 0; font-size: .88rem; font-weight: 600; }
.field input, .field select, .offer-company-choice input { min-width: 0; width: 100%; padding: 6px 8px; border: 1px solid var(--gray); border-radius: 3px; background: white; color: var(--ink); }
.field input:disabled, .field select:disabled { background: var(--tint); color: var(--muted); }
.vehicle-fields { display: grid; gap: 10px; }
.vehicle-fields .field { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }
.finish-details .vehicle-fields > .field, .offer-company {
  display: grid; grid-template-columns: minmax(0, 125px) minmax(0, 1fr); gap: 8px; align-items: start;
}
.offer-company > label, .finish-details .vehicle-fields > .field > span { padding-top: 7px; }
.offer-company-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px; font-size: .88rem; }
.offer-company-choice small { overflow-wrap: anywhere; }
.finish-details input[readonly] { background: var(--tint); color: var(--navy); }
#offer-message { margin: 8px 0 0; font-size: .88rem; overflow-wrap: anywhere; }
#offer-message:empty { display: none; }
.dimension-row { display: grid; grid-template-columns: minmax(0, .78fr) repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; margin-bottom: 9px; font-size: .88rem; }
.dimension-row:last-child { margin-bottom: 0; }
.dimension-row strong, .dimension-row > output { padding-top: 7px; }
.dimension-row > output { padding: 7px 4px; background: var(--gray); text-align: center; }
.dimension-row .field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.dimension-row small { display: block; margin-top: 2px; font-size: .72rem; }
.dimension-head { color: var(--navy); font-weight: 700; font-size: .78rem; }
.dimension-sketch svg { display: block; width: 100%; height: auto; }
.sketch-outer { color: var(--blue); }
.sketch-inner { color: var(--muted); }
.dimension-sketch figcaption { margin-top: 8px; }
.sketch-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 4px; font-size: .8rem; color: var(--muted); }
.sketch-legend span { display: inline-flex; gap: 6px; align-items: center; }
.sketch-legend span::before { content: ""; width: 20px; border-top: 2px solid var(--blue); }
.sketch-legend span + span::before { border-top: 1px dashed var(--muted); }

.group { margin: 0 0 12px; }
.group legend { padding: 0 4px; color: var(--navy); font-weight: 700; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 156px), 1fr)); gap: 8px; }
.choices[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choices[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { min-width: 0; height: 100%; display: flex; flex-direction: column; border: 1px solid var(--gray); border-radius: 4px; background: white; cursor: pointer; overflow: hidden; }
.choice:has(input:checked) { border-color: var(--blue); background: var(--selection); box-shadow: inset 0 0 0 1px var(--blue); }
.choice:has(input:disabled) { background: var(--tint); box-shadow: none; border-color: var(--gray); color: var(--muted); cursor: default; }
.choice:has(input:disabled) img { opacity: .72; }
.choice:has(input:focus-visible) { outline: 3px solid var(--orange); outline-offset: 2px; }
.choice img { display: block; width: 100%; height: clamp(80px, 11vw, 156px); object-fit: contain; background: white; padding: 5px; }
.choice .choice-caption { display: flex; gap: 7px; align-items: flex-start; padding: 9px; line-height: 1.3; font-size: .86rem; }
.choice-price { font-size: .86rem; font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }
.choice > .choice-price { margin-top: auto; padding: 0 9px 8px; }
.toggle > .choice-price { margin-left: auto; text-align: right; flex: none; max-width: 42%; }
.build-layout .group { display: grid; }
.build-layout .group, .rear-layout .group, .lighting-layout .group { padding: 10px; }
.build-layout .choice img, .rear-layout .choice img { height: clamp(100px, 14vw, 210px); background: transparent; }
.build-layout .choice:has(input:checked:disabled) { border-color: var(--blue); background: var(--selection); color: var(--ink); }
.build-layout .choice:has(input:checked:disabled) img { opacity: 1; }
.rear-layout .rear-closure { flex-direction: row; align-items: center; gap: 12px; height: auto; margin-top: 10px; padding: 8px; }
.rear-layout .rear-closure img { flex: none; width: clamp(85px, 13vw, 158px); height: clamp(105px, 13vw, 170px); }
.rear-closure-details { min-width: 0; }
.rear-closure .choice-caption { padding: 0; }
.rear-closure-details .choice-price { display: block; margin: 8px 0 0 21px; }
.lighting-layout .group { margin-bottom: 0; }
.lighting-layout .choices[data-count="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lighting-layout .choice img { height: clamp(100px, 13vw, 175px); background: transparent; }
.lighting-layout .choice-caption > span { min-width: 0; overflow-wrap: anywhere; }
.lighting-layout .toggle { margin: 10px 0 0; }
.lighting-layout .toggle:has(input:checked) { border-color: var(--blue); background: var(--selection); }
.color-swatch {
  width: min(105px, calc(100% - 20px)); aspect-ratio: 1; align-self: center; margin-top: 10px;
  border: 1px solid var(--gray); border-radius: 3px; background: var(--swatch-color);
}
.wall-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.wall-heading h2, .wall-heading p { margin: 0; }
.wall-heading p { color: var(--muted); font-size: .88rem; }
.wall-heading output { margin-left: 5px; color: var(--blue); font-weight: 700; }
.wall-choices .choices[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.wall-choices .choice img, .wall-placeholder { height: auto; aspect-ratio: 4 / 5; background: transparent; padding: 8px; }
.wall-placeholder { display: grid; place-items: center; text-align: center; color: var(--muted); font-size: .84rem; }
.choice input, .toggle input, .inline-choice input { accent-color: var(--blue); margin: 2px 0 0; flex: none; }
.toggle, .inline-choice { display: flex; gap: 8px; align-items: flex-start; font-size: .89rem; }
.toggle { padding: 8px; border: 1px solid var(--gray); border-radius: 3px; background: white; margin: 6px 0; }
.toggle:has(input:disabled), .inline-choice:has(input:disabled) { color: var(--muted); }
.inline-choices { display: flex; flex-wrap: wrap; gap: 9px 22px; }
.door-option:has(.toggle input:checked) { border-color: var(--blue); }
.door-option .toggle { margin: 0; padding: 0; border: 0; background: transparent; color: var(--navy); font-weight: 700; }
.door-spec { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 7px 0 0; color: var(--muted); font-size: .88rem; }
.door-settings { display: grid; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray); }
.door-settings .field, .door-placement {
  display: grid; grid-template-columns: minmax(0, 135px) minmax(0, 1fr); align-items: center; gap: 6px 10px;
  font-size: .88rem; font-weight: 600;
}
.door-placement .inline-choices { gap: 5px 14px; font-weight: 400; }
.door-preview img { max-height: 420px; }
.rail-layer { background: white; border: 1px solid var(--gray); padding: 7px; }
.rail-layer .toggle { margin: 0 0 7px; border: 0; padding: 2px; }
.accessories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.accessory { display: flex; flex-direction: column; }
.accessory .field { padding: 7px 4px 0; }

.summary { margin-top: 18px; padding: 11px 0 0; border-top: 1px solid var(--gray); }
#totals { display: flex; gap: 7px 16px; align-items: center; flex-wrap: wrap; }
.price-row { display: flex; justify-content: space-between; gap: 7px; margin: 7px 0; font-size: .87rem; }
.price-row span { color: var(--muted); }
.price-row strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
#totals > .price-row { margin: 0; }
#totals > .price-row strong { color: var(--navy); }
#totals > .net { padding-left: 8px; border-left: 3px solid var(--orange); }
#totals details { width: 100%; font-size: .82rem; }
.summary details .price-row { max-width: 260px; }
.summary summary { cursor: pointer; color: var(--blue); }
#main[data-current-step="11"] > .summary { display: none; }
.offer-pricing .subtotal { padding-top: 7px; border-top: 1px solid var(--gray); font-weight: 700; }
.offer-discount { margin: 12px 0; }
#quote-net .net { padding: 8px; border-left: 3px solid var(--orange); background: var(--surface); font-weight: 700; }
#quote-net .net strong { color: var(--navy); }
.offer-pricing details { margin-top: 8px; font-size: .88rem; }
.offer-pricing summary { cursor: pointer; color: var(--blue); }
.quote-downloads { display: flex; flex-wrap: wrap; gap: 7px; }
.concept-search { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; }
.concept-search .field { flex: 1 1 230px; }
.transport-panel { margin-bottom: 0; }
.transport-layout { gap: clamp(16px, 3vw, 36px); }
.transport-fields { display: grid; gap: 12px; min-width: 0; }
.transport-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.transport-actions button:disabled { opacity: .55; }
.transport-note { margin: 7px 0 10px; color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.transport-fields [data-path="voertuig.aantalTekst"] { max-width: 160px; }
#transport-summary { color: var(--muted); font-size: .88rem; }
.transport-rates { padding: 4px 10px; background: var(--surface); border: 1px solid var(--gray); border-radius: 4px; }
.transport-rates .net { padding-top: 7px; border-top: 1px solid var(--gray); }
.transport-rates strong { color: var(--navy); }
#transport-relations-dialog { width: min(700px, calc(100% - 28px)); }
.transport-search { margin-top: 15px; }
#transport-relations-results button { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
#transport-relations-results strong, #transport-relations-results small { display: block; }
.transport-take { color: var(--blue); font-size: .82rem; font-weight: 650; }
#transport-relations-more { width: 100%; margin-top: 8px; }
.send-offer-details { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 12px; }
.send-offer-details dt { font-weight: 650; }
.send-offer-details dd { margin: 0; overflow-wrap: anywhere; }
#send-offer-status:empty { display: none; }
#send-offer-check-label[hidden] { display: none; }

.actions { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.actions .primary { margin-left: auto; }
.primary, .secondary, .quiet { padding: 7px 12px; border: 1px solid transparent; border-radius: 3px; font-weight: 650; }
.primary, .actions .secondary { background: var(--blue); color: white; }
.primary:hover:not(:disabled), .actions .secondary:hover:not(:disabled) { background: var(--navy); }
.actions button:disabled { opacity: .52; }
.secondary { border-color: var(--gray); background: white; color: var(--navy); }
.quiet { background: transparent; color: var(--blue); }
#status:not(:empty), #errors:not(:empty) { font-size: .9rem; margin: 10px 0 0; }
.bad { color: var(--ink); border-left: 3px solid var(--orange); padding-left: 8px; }
.good { color: var(--blue); }
#errors ul { margin: 0; padding-left: 24px; }
dialog { color: inherit; border: 1px solid var(--gray); border-radius: 4px; padding: 18px; width: min(620px, calc(100% - 28px)); }
dialog::backdrop { background: color-mix(in srgb, var(--navy) 62%, transparent); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-heading h2 { margin: 0; }
.history-heading, .history-nav, .history-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.history-heading { justify-content: space-between; }
.history-heading h1 { margin: 0; }
.history-nav a { text-decoration: none; }
.history-toolbar > .field:first-child { flex: 1 1 300px; }
.history-toolbar select { min-height: 39px; }
.history-hint { margin: 12px 0 10px; color: var(--muted); font-size: .88rem; }
.history-scroll { overflow: auto; border: 1px solid var(--gray); border-radius: 4px; }
.history-table { border-collapse: collapse; width: 100%; min-width: 790px; font-size: .88rem; }
.history-table th { padding: 9px 10px; text-align: left; background: var(--navy); color: white; white-space: nowrap; }
.history-table th:has(button) { padding: 0; }
.history-table th button {
  width: 100%; padding: 9px 10px; border: 0; background: transparent; color: inherit; text-align: inherit; font-weight: 650;
}
.history-table th button:hover { background: var(--blue); }
.history-table th button:focus-visible { outline-offset: -3px; }
.history-table th button span:not(:empty) { margin-left: 5px; }
.history-table td { padding: 10px; vertical-align: top; overflow-wrap: anywhere; }
.history-table tbody tr + tr { border-top: 1px solid var(--gray); }
.history-table tbody tr:nth-child(even) { background: var(--tint); }
.history-table .history-amount { text-align: right; white-space: nowrap; }
.history-table td:first-child { white-space: nowrap; }
.history-table td small { display: block; margin-top: 4px; }
.history-table td:last-child { width: 150px; }
.history-table td:last-child :is(button, a) { display: block; width: 100%; text-align: center; }
.history-table td:last-child a { text-decoration: none; }
.history-table td:last-child :is(button, a) + :is(button, a) { margin-top: 5px; }
.history-table button:disabled, #history-more:disabled, #history-refresh:disabled { opacity: .58; }
#history-status:not(:empty) { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
#history-more { margin-top: 10px; }

@media (max-width: 1040px) {
  .step-split { gap: 10px; }
}
@media (max-width: 940px) {
  .wall-choices .choices[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lighting-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 790px) {
  .step-split, .rear-layout { grid-template-columns: minmax(0, 1fr); }
  .finish-layout #quote-gallery-items { max-height: none; overflow: visible; }
  .build-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .build-layout > :last-child { grid-column: 1 / -1; }
  .intro-layout .hero { width: min(100%, 520px); }
  .rail-layout, .accessories { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 550px) {
  .layout { grid-template-columns: minmax(89px, 29vw) minmax(0, 1fr); }
  .model { padding: 8px 5px; }
  .model span, .brand span { display: none; }
  .steps ol { padding: 2px; }
  .steps button { padding: 8px 2px; grid-template-columns: 2ch minmax(0, 1fr); font-size: .7rem; gap: 3px; overflow-wrap: anywhere; }
  .steps button span { text-align: left; }
  .step-heading { gap: 5px; flex-wrap: wrap; }
  .top { gap: 9px; }
  .history { font-size: .75rem; padding: 5px 7px; }
  .build-layout, .rail-layout, .choices[data-count="4"], .choices[data-count="2"], .accessories, .quote-gallery ul { grid-template-columns: minmax(0, 1fr); }
  .wall-choices .choices[data-count="4"], .lighting-layout .choices[data-count="3"] { grid-template-columns: minmax(0, 1fr); }
  .vehicle-fields .field { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .finish-details .vehicle-fields > .field, .offer-company { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .offer-company > label, .finish-details .vehicle-fields > .field > span { padding-top: 0; }
  .door-settings .field, .door-placement { grid-template-columns: minmax(0, 1fr); }
  .dimension-head { font-size: .66rem; }
  .actions button { font-size: .8rem; padding: 7px; }
}

#costs-rows > section { margin-bottom: 32px; min-width: 0; }
.cost-table-scroll { max-width: 100%; overflow-x: auto; }
.cost-table { width: 100%; border-collapse: collapse; }
.cost-table th, .cost-table td { padding: 12px; border-bottom: 1px solid #dce3e9; text-align: left; vertical-align: middle; }
.cost-table thead th { background: #f1f5f8; white-space: nowrap; }
.cost-table tbody th { min-width: 230px; font-weight: 500; }
.cost-cell-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.cost-cell-label { display: block; }
.cost-cell-form input { width: 120px; text-align: right; }
.cost-cell-form button { white-space: nowrap; }
.cost-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
