:root {
  --orange: #e8620a;
  --orange-dark: #c94f00;
  --wine: #440000;
  --ink: #191919;
  --muted: #62656a;
  --line: #dfe1e4;
  --line-strong: #c9ccd1;
  --paper: #ffffff;
  --soft: #f5f6f7;
  --soft-orange: #fff5ee;
  --success: #176b43;
  --danger: #a12727;
  --radius: 8px;
  color-scheme: light;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--soft); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, var(--orange) 0 26%, var(--wine) 26% 34%, var(--ink) 34%) top / 100% 4px no-repeat,
    var(--soft);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }

a { color: var(--wine); text-underline-offset: 3px; }

.topbar {
  min-height: 84px;
  padding: 16px max(24px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.brand { display: inline-flex; align-items: center; width: min(245px, 52vw); }
.brand img { display: block; width: 100%; height: 48px; object-fit: contain; object-position: left center; }
.topbar-meta { text-align: right; line-height: 1.25; }
.topbar-meta strong, .topbar-meta span { display: block; }
.topbar-meta strong { font-size: 15px; }
.topbar-meta span { margin-top: 3px; color: var(--muted); font-size: 13px; }

.page-shell {
  width: min(1180px, calc(100% - 48px));
  margin: 38px auto;
  display: grid;
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 16px 42px rgba(25, 25, 25, .08);
}

.context-panel {
  padding: 44px 34px;
  color: #fff;
  background: var(--ink);
  border-top: 4px solid var(--orange);
}

.eyebrow, .step-kicker {
  margin: 0 0 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.context-panel h1 { margin: 0; max-width: 13ch; font-size: 30px; line-height: 1.13; }
.context-panel > p:not(.eyebrow) { margin: 22px 0 30px; color: #d7d7d7; }

.process-facts { margin: 0; border-top: 1px solid #404040; }
.process-facts div { padding: 14px 0; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid #404040; }
.process-facts dt { color: #bdbdbd; }
.process-facts dd { margin: 0; font-weight: 700; text-align: right; }

.privacy-note { margin-top: 30px; padding-left: 14px; border-left: 3px solid var(--orange); }
.privacy-note strong, .privacy-note span { display: block; }
.privacy-note span { margin-top: 4px; color: #cfcfcf; font-size: 13px; }

.form-surface { min-width: 0; min-height: 650px; padding: 40px 48px 34px; }
.form-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.form-heading h2, .verification h2, .success-panel h2 { margin: 0; font-size: 24px; line-height: 1.2; }

.progress { display: flex; gap: 10px; margin: 0; padding: 0; list-style: none; }
.progress li { display: grid; justify-items: center; gap: 4px; color: #94979c; font-size: 11px; }
.progress span { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; font-weight: 800; }
.progress em { font-style: normal; }
.progress li.is-active { color: var(--ink); }
.progress li.is-active span { border-color: var(--orange); color: #fff; background: var(--orange); }
.progress li.is-complete span { border-color: var(--ink); color: #fff; background: var(--ink); }

.alert { margin: 20px 0 -4px; padding: 12px 14px; color: #7c1d1d; background: #fff1f1; border: 1px solid #f0caca; border-radius: 6px; }

fieldset { min-width: 0; margin: 0; padding: 28px 0 8px; border: 0; }
legend { width: 100%; margin: 0 0 18px; padding: 0; font-size: 16px; font-weight: 800; }

.field-grid { display: grid; gap: 18px 20px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field-wide { grid-column: 1 / -1; }
.address-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.address-grid .field-street { grid-column: span 2; }
.address-grid .field-wide { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; min-width: 0; color: #303236; font-weight: 700; }
.field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field small { color: #74777c; font-size: 12px; font-weight: 400; }

input, select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
}

textarea { min-height: 132px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #999da3; }
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232, 98, 10, .13); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: #fffafa; }

.rfc-status { min-height: 18px; }
.rfc-status.is-loading { color: var(--muted); }
.rfc-status.is-found { color: var(--success); font-weight: 700; }
.rfc-status.is-error { color: var(--danger); }

.address-section, .delivery-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.section-heading { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.section-heading h3 { margin: 0; font-size: 15px; }
.section-heading > span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.delivery-toggle { margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); background: var(--soft); }
.shipping-details { padding-top: 4px; }

.map-panel { margin: 22px 0; border: 1px solid var(--line-strong); background: #fff; overflow: hidden; border-radius: 6px; }
.map-heading { min-height: 62px; padding: 10px 12px 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); }
.map-heading strong, .map-heading span { display: block; }
.map-heading span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.map-heading span.is-ready { color: var(--success); font-weight: 700; }
.map-heading span.is-error { color: var(--danger); }
.button.compact { min-height: 38px; padding: 7px 12px; font-size: 13px; }
.shipping-map { width: 100%; height: 300px; background: #e9ecef; }
.shipping-map .leaflet-control-attribution { font-size: 10px; }
.shipping-map .leaflet-marker-icon { cursor: grab; }
.shipping-map .leaflet-marker-dragging { cursor: grabbing; }

.segmented { width: fit-content; display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.segmented label { position: relative; cursor: pointer; }
.segmented label + label { border-left: 1px solid var(--line-strong); }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-width: 145px; min-height: 42px; padding: 9px 16px; display: grid; place-items: center; color: var(--muted); background: #fff; font-weight: 700; }
.segmented input:checked + span { color: #fff; background: var(--ink); }
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 3px var(--orange); }

.character-count { justify-self: end; margin-top: -3px; }
.choice-list { display: grid; gap: 0; margin: 22px 0; border-top: 1px solid var(--line); }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check-row input { width: 19px; min-height: 19px; margin: 2px 0 0; accent-color: var(--orange); flex: 0 0 auto; }
.check-row span, .check-row strong, .check-row small { display: block; }
.check-row small { margin-top: 2px; color: var(--muted); }

.review-block { margin-top: 24px; padding: 18px 20px; background: var(--soft-orange); border-left: 4px solid var(--orange); }
.review-block h3 { margin: 0 0 12px; font-size: 15px; }
.review-block dl { margin: 0; display: grid; gap: 7px; }
.review-block dl div { display: grid; grid-template-columns: 90px 1fr; gap: 14px; }
.review-block dt { color: var(--muted); }
.review-block dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.privacy-check { border: 0; padding-bottom: 0; }

.form-actions { min-height: 72px; margin-top: 20px; padding-top: 22px; display: flex; justify-content: flex-end; gap: 12px; border-top: 1px solid var(--line); }
.button { min-height: 44px; padding: 10px 20px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 800; text-decoration: none; }
.button.primary { color: #fff; background: var(--orange); border-color: var(--orange); }
.button.primary:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line-strong); }
.button.secondary:hover { background: var(--soft); }
.button:focus-visible { outline: 3px solid rgba(232, 98, 10, .25); outline-offset: 2px; }
.button[disabled] { opacity: .6; cursor: wait; }

.verification, .success-panel { max-width: 520px; padding: 54px 0 20px; }
.verification > p:not(.step-kicker), .success-panel > p:not(.step-kicker) { color: var(--muted); }
.verification-form { margin-top: 24px; }
.code-field { max-width: 250px; }
.code-field input { font-size: 24px; font-weight: 800; letter-spacing: 6px; text-align: center; }
.development-code { padding: 8px 10px; color: #6b4200; background: #fff6df; border: 1px solid #efdcaa; font-family: Consolas, monospace; font-size: 13px; }
.success-mark { width: 48px; height: 48px; margin-bottom: 20px; display: grid; place-items: center; color: #fff; background: var(--success); border-radius: 50%; font-size: 12px; font-weight: 900; }
.success-panel .button { margin-top: 18px; }
.trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

footer { width: min(1180px, calc(100% - 48px)); margin: 0 auto 30px; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .page-shell { grid-template-columns: 1fr; }
  .context-panel { padding: 30px; }
  .context-panel h1 { max-width: none; font-size: 26px; }
  .context-panel > p:not(.eyebrow) { margin: 14px 0 22px; }
  .process-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
  .process-facts div { display: block; padding: 12px; border-right: 1px solid #404040; }
  .process-facts div:last-child { border-right: 0; }
  .process-facts dd { margin-top: 3px; text-align: left; }
  .privacy-note { margin-top: 22px; }
  .form-surface { min-height: 620px; }
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .topbar { min-height: 72px; padding: 13px 18px; gap: 12px; }
  .brand { width: 176px; }
  .brand img { height: 40px; }
  .topbar-meta span { display: none; }
  .page-shell { width: 100%; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  .context-panel { padding: 26px 20px; }
  .context-panel h1 { font-size: 24px; }
  .context-panel > p:not(.eyebrow) { max-width: 48ch; }
  .process-facts { grid-template-columns: 1fr 1fr; }
  .process-facts div:nth-child(3) { display: none; }
  .privacy-note { display: none; }
  .form-surface { min-height: 660px; padding: 26px 20px 24px; }
  .form-heading { display: block; }
  .progress { margin-top: 18px; justify-content: space-between; }
  .progress li { flex: 1; }
  .two-columns { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .address-grid { grid-template-columns: 1fr 1fr; }
  .address-grid .field-street, .address-grid .field-wide { grid-column: 1 / -1; }
  fieldset { padding-top: 24px; }
  .segmented { width: 100%; }
  .segmented span { min-width: 0; }
  .form-actions { justify-content: stretch; }
  .form-actions .button { flex: 1; }
  .review-block dl div { grid-template-columns: 72px 1fr; }
  .map-heading { align-items: flex-start; }
  .shipping-map { height: 260px; }
  footer { width: 100%; margin: 0; padding: 20px; display: grid; background: var(--ink); color: #ccc; }
  footer a { color: #fff; }
}

@media (max-width: 420px) {
  .address-grid { grid-template-columns: 1fr; }
  .address-grid .field-street, .address-grid .field-wide { grid-column: auto; }
  .map-heading { display: grid; }
  .map-heading .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

