:root {
  /* Brand tokens shared with @compass/marketing — keep these in sync. */
  --navy: #162b6f;
  --navy-light: #1f3aa6;
  --navy-deep: #0f1f54;
  --orange: #ff9a2c;
  --orange-deep: #ee8a18;
  --teal: #2dc0b3;
  /* `--gold*` retained as aliases for legacy class names that still
   * carry meaning in this tool (panel-head-gold, warning-list, etc).
   * They now resolve to the orange brand tone, not literal gold. */
  --gold: var(--orange);
  --gold-light: var(--orange);
  --paper: #ffffff;
  --white: #ffffff;
  --canvas: #fafbff;
  --line: #d8def0;
  --line-strong: #b7c0cb;
  --text: #1a2240;
  --muted: #4a5378;
  --success: #2f7d4a;
  --danger: #c43d35;
  --shadow: 0 24px 80px rgba(15, 31, 84, 0.10);

  --font-head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Nunito Sans", "Avenir Next", "Helvetica Neue", Arial, sans-serif;

  --radius-card: 6px;
  --radius-input: 6px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
}

/* -------- shared header (mirrors @compass/marketing) -------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.brand-link { display: inline-flex; align-items: center; }
.brand-logo { height: 56px; width: auto; }

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav { display: flex; align-items: center; }
.primary-nav-list {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav-link {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  text-decoration: none;
  transition: color 120ms ease, border-color 120ms ease;
}
.primary-nav-link:hover,
.primary-nav-link.is-active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  border-radius: var(--radius-card);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  position: relative;
  margin: 0 auto;
}
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top:  7px; }

.locale-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 4px 2px 6px;
  border-radius: 999px;
  background: rgba(22, 43, 111, 0.04);
  border: 1px solid rgba(22, 43, 111, 0.12);
}
.locale-globe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex: none;
}
.locale-globe-btn:hover { color: var(--navy); }
.locale-globe-btn .icon-globe { width: 13px; height: 13px; }
.locale-btn {
  border: 0;
  border-radius: 999px;
  padding: 3px 9px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.locale-btn:hover { color: var(--navy); }
.locale-btn.is-active {
  background: var(--orange);
  color: var(--white);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.page-shell {
  padding: 28px 0 48px;
}

.panel,
.result-panel {
  margin-bottom: 18px;
  border: 1px solid rgba(22, 43, 111, 0.08);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.panel-kicker { color: rgba(255, 255, 255, 0.78); }

.panel-head-navy {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
}

.panel-head-gold {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-deep) 100%);
  color: var(--white);
}

.panel-head-split {
  justify-content: space-between;
}

.panel-body {
  padding: 22px;
}

.field-grid {
  display: grid;
  gap: 18px;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-span-two {
  grid-column: 1 / -1;
}

label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

select,
input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  padding: 0 14px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 154, 44, 0.22);
}

select:disabled,
input:disabled {
  background: #eef2f6;
  color: #7c8795;
}

.search-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-input);
  background: #fff;
  padding: 4px 8px;
}

mapbox-search-box {
  display: block;
  min-height: 42px;
}

.hint {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  min-height: 20px;
}

.hint.ok {
  color: var(--success);
}

.hint.error {
  color: var(--danger);
}

.inline-check {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
  color: var(--text);
}

.inline-check input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

.action-btn,
.quote-btn,
.delete-btn {
  border: 0;
  border-radius: var(--radius-card);
  padding: 12px 22px;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.action-btn {
  background: var(--orange);
  color: var(--white);
}
.action-btn:hover { background: var(--orange-deep); }

.action-btn:disabled,
.quote-btn:disabled,
.delete-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.action-btn-outline,
.delete-btn {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(22, 43, 111, 0.2);
}
.action-btn-outline:hover,
.delete-btn:hover {
  background: rgba(22, 43, 111, 0.04);
}

.carrier-field {
  margin-bottom: 18px;
}

.container-list {
  display: grid;
  gap: 16px;
}

.container-card {
  border: 1px solid rgba(22, 43, 111, 0.10);
  border-radius: var(--radius-card);
  padding: 18px;
  background: var(--white);
}

.container-card-head,
.result-container-head,
.result-head,
.journey-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.container-label,
.result-meta,
.manual-summary-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.inline-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 10px;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-pill-ok {
  background: rgba(47, 125, 74, 0.12);
  color: var(--success);
}

.status-pill-danger {
  background: rgba(196, 61, 53, 0.12);
  color: var(--danger);
}

.status-meta {
  color: var(--muted);
  font-size: 14px;
}

.warning-list {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: var(--radius-card);
  background: rgba(255, 154, 44, 0.12);
  color: #7a4400;
  border: 1px solid rgba(255, 154, 44, 0.4);
}

.warning-list p {
  margin: 0;
}

.warning-list p + p {
  margin-top: 6px;
}

.form-message {
  min-height: 22px;
  margin: 10px 2px 14px;
  color: var(--danger);
  font-weight: 700;
}

.cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
  margin-bottom: 28px;
}

.quote-btn {
  min-width: 280px;
  padding: 16px 30px;
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(255, 154, 44, 0.28);
}
.quote-btn:hover { background: var(--orange-deep); }

.result-panel {
  padding: 22px;
  border: 1px solid rgba(255, 154, 44, 0.55);
}

.journey-section {
  display: grid;
  gap: 18px;
}

.journey-section:not(.hidden) {
  margin-bottom: 22px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(22, 43, 111, 0.10);
}

.journey-head h2,
.journey-head .panel-kicker {
  margin-bottom: 0;
}

.journey-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(22, 43, 111, 0.08);
  background: var(--white);
}

.metric-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(20px, 2vw, 28px);
  color: var(--navy);
}

.metric-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.route-map {
  min-height: 360px;
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid rgba(22, 43, 111, 0.12);
  background: #dfe6ef;
}

.quote-content {
  display: grid;
  gap: 18px;
}

.grand-total span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.grand-total strong {
  display: block;
  margin-top: 8px;
  color: var(--navy);
  font-size: clamp(30px, 4vw, 44px);
}

/* Stack the grand-total pricing block on top of the Request CTA so the
 * button reads as a separate sibling action rather than part of the price. */
.result-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

.quote-request-btn {
  display: inline-block;
  padding: 14px 32px;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 120ms ease;
  box-shadow: 0 6px 18px rgba(255, 154, 44, 0.28);
}
.quote-request-btn:hover { background: var(--orange-deep); }
.quote-request-btn:focus-visible {
  outline: 3px solid rgba(255, 154, 44, 0.4);
  outline-offset: 2px;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.result-stack {
  display: grid;
  gap: 14px;
}

.result-sidebar {
  display: grid;
  gap: 14px;
}

.result-container,
.summary-card,
.manual-summary-card,
.result-error-card {
  border: 1px solid rgba(22, 43, 111, 0.10);
  border-radius: var(--radius-card);
  padding: 18px;
  background: var(--white);
}

.result-container h3,
.summary-card h3,
.manual-summary-card h3,
.result-error-card h3 {
  margin: 0;
}

.result-rows {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--text);
}

.total-row {
  padding-top: 10px;
  border-top: 1px solid rgba(22, 43, 111, 0.10);
  font-weight: 700;
}

.possible-fees,
.manual-summary-list {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.possible-fees li + li,
.manual-summary-list li + li {
  margin-top: 12px;
}

.possible-fees p,
.manual-summary-card p,
.result-error-card p {
  margin: 6px 0 0;
}

.manual-summary-card a,
.modal-card a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.result-error-card {
  border-color: rgba(196, 61, 53, 0.22);
}

.result-error-card h3 {
  color: var(--danger);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 84, 0.6);
}

.modal-card {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  margin: 10vh auto 0;
  padding: 28px;
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 31, 84, 0.26);
}

.modal-card h3 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 28px;
}

.modal-copy {
  margin: 0;
  color: var(--muted);
}

.modal-copy + .modal-copy {
  margin-top: 14px;
}

.modal-reasons {
  margin: 18px 0;
  padding-left: 20px;
  color: var(--text);
}

.modal-reasons li + li {
  margin-top: 8px;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.hidden {
  display: none;
}

/* --- Contact form inside manual quote modal --- */
.modal-card-wide {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

.contact-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.contact-form-intro {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin-bottom: 12px;
}

.contact-form .field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-form .field-full {
  grid-column: 1 / -1;
}

.contact-form .field label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 154, 44, 0.22);
}

.contact-form textarea {
  resize: vertical;
  min-height: 96px;
  font-family: inherit;
}

.contact-form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.contact-form-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 13px;
}
.contact-form-status[data-state="info"] {
  color: var(--muted);
}
.contact-form-status[data-state="success"] {
  color: var(--success);
  font-weight: 600;
}
.contact-form-status[data-state="error"] {
  color: var(--danger);
}

.contact-form-fallback {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.action-btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
}
.action-btn-ghost:hover {
  background: var(--canvas);
  color: var(--text);
}

@media (max-width: 960px) {
  .panel-head-split,
  .result-head,
  .container-card-head,
  .journey-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .three-up,
  .two-up,
  .journey-summary,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .quote-btn {
    width: 100%;
  }

  .primary-nav-list { gap: 18px; }
  .primary-nav-link { font-size: 13px; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .header-actions { gap: 8px; }
  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .primary-nav[data-open="true"] { display: block; }
  .primary-nav-list {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 24px;
    gap: 0;
  }
  .primary-nav-link {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .locale-btn { padding: 3px 8px; }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 20px, 1180px);
  }

  .panel-body,
  .result-panel,
  .modal-card {
    padding: 18px;
  }

  .inline-row {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }

  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}
