.smart-order {
  display: grid;
  container-type: inline-size;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line, #e2ded4);
  border-radius: 9px;
  background: var(--white, #fffdf8);
  color: var(--ink, #142b3e);
  font-size: .875rem;
}

.smart-order h2 {
  margin: 0;
  color: var(--navy, #102b49);
  font: 400 clamp(1.85rem, 4vw, 2.2rem)/1 var(--serif, Georgia, serif);
}

.smart-quote-jump { margin-top: .75rem; }
#product-order-simulator { min-width: 0; }
#product-order-simulator h2 { scroll-margin-top: 6rem; }
.smart-card-result {
  padding: .65rem .8rem;
  border-radius: 6px;
  background: var(--cream, #f3ecdf);
  color: var(--navy, #102b49);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.smart-order-step {
  display: grid;
  gap: .625rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.smart-order-step legend {
  padding: 0;
  margin-bottom: .35rem;
  color: var(--navy, #102b49);
  font-weight: 750;
}

.smart-order-choices,
.smart-order-card-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}

.smart-order-card-controls {
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
}

@container (max-width: 25rem) {
  .smart-order-card-controls { grid-template-columns: minmax(0, 1fr); }
}

.smart-order-choices label {
  display: flex;
  align-items: flex-start;
  gap: .42rem;
  min-height: 44px;
  padding: .5rem;
  border: 1px solid var(--line, #e2ded4);
  border-radius: 6px;
  cursor: pointer;
}

.smart-order-choices label:has(:checked) {
  border-color: var(--blue, #315b7b);
  background: var(--cream, #f3ecdf);
}

.smart-order-choices input {
  flex: none;
  margin: .2em 0 0;
  accent-color: var(--navy, #102b49);
}

.smart-order-choices strong,
.smart-order-choices small {
  display: block;
  overflow-wrap: anywhere;
}

.smart-order-choices small,
.smart-order-note,
.smart-order-route-status {
  color: var(--muted, #586872);
  font-size: .8rem;
  line-height: 1.4;
}

.smart-order-postal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .5rem;
}

.smart-order-card-controls label,
.smart-order-postal label {
  display: grid;
  gap: .2rem;
  min-width: 0;
  font-weight: 650;
}

.smart-order input:not([type="radio"]),
.smart-order select,
.smart-order-route-button {
  width: 100%;
  min-height: 44px;
  min-width: 0;
  padding: .45rem .625rem;
  border: 1px solid var(--line, #e2ded4);
  border-radius: 6px;
  background: var(--white, #fffdf8);
  color: var(--ink, #142b3e);
  font-size: 1rem;
  font-weight: 500;
}

.smart-order-route-button {
  border-color: var(--navy, #102b49);
  background: var(--navy, #102b49);
  color: #fff;
  font-size: .875rem;
  font-weight: 750;
}

.smart-order input[aria-invalid="true"] {
  border-color: #a0382f;
}

.smart-order-route-status:empty {
  display: none;
}

.smart-order-route-status,
[data-order-origin] {
  overflow-wrap: anywhere;
}

[data-order-distance-fallback] summary {
  padding-block: .7rem;
  cursor: pointer;
}

[data-order-distance-fallback] label {
  display: grid;
  gap: .25rem;
  max-width: 14rem;
}

.smart-order-summary {
  display: grid;
  gap: .5rem;
  padding: .625rem .75rem;
  border-radius: 6px;
  background: var(--cream, #f3ecdf);
}

.smart-order-summary dl,
.smart-order-summary dd,
.smart-order-note {
  margin: 0;
}

.smart-order-summary dl > div,
.smart-order-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .5rem;
  align-items: baseline;
}

.smart-order-summary dl > div {
  padding: .22rem 0;
}

.smart-order-summary dd,
.smart-order-total strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.smart-order-total {
  padding-top: .5rem;
  border-top: 1px solid var(--line, #e2ded4);
  color: var(--navy, #102b49);
  font-weight: 750;
}

.smart-freight-quote {
  border-inline-start: 4px solid #173957;
  background: #eaf1f6;
  color: #122e45;
}

.smart-freight-quote [data-order-dispatch] {
  margin: .15rem 0 0;
  padding-top: .5rem;
  border-top: 1px solid #a9bcc9;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.45;
}

@container (max-width: 22rem) {
  .smart-order-summary dl > div,
  .smart-order-total { grid-template-columns: minmax(0,1fr); gap:.1rem; }
  .smart-order-summary dd,
  .smart-order-total strong { text-align:left; overflow-wrap:anywhere; }
  .smart-order-postal { grid-template-columns:minmax(0,1fr); }
}

@media (max-width: 365px) {
  .smart-order {
    padding: .75rem;
  }
  .smart-order-choices,
  .smart-order-card-controls {
    grid-template-columns: minmax(0, 1fr);
  }
}
