:root {
  color-scheme: light;
  --navy-900: #0b2235;
  --navy-800: #12304a;
  --teal-700: #06636d;
  --teal-600: #087f8c;
  --aqua-500: #20b8b2;
  --aqua-100: #ddf6f4;
  --background: #f4f7f8;
  --surface: #ffffff;
  --surface-muted: #eaf0f2;
  --text: #172b36;
  --muted: #5d7079;
  --border: #d5e0e4;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --warning: #9a6700;
  --success: #18794e;
  --focus: rgba(8, 127, 140, 0.2);
  --shadow-overlay: 0 16px 40px rgba(11, 34, 53, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--background);
  font-size: 16px;
  line-height: 1.5;
}

a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.site-header {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  color: #ffffff;
  background: var(--navy-800);
  border-bottom: 3px solid var(--teal-600);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand strong {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d8e3e8;
  font-size: 13px;
  font-weight: 500;
}

.secure-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--aqua-500);
}

main {
  width: min(940px, calc(100% - 48px));
  margin: 52px auto 72px;
}

.hero { text-align: left; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal-700);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 720px;
  margin: 0;
  color: var(--navy-800);
  font-size: clamp(30px, 4vw, 36px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 span { color: inherit; }

.intro {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.tracking-card {
  margin-top: 36px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.tracking-card > label {
  display: block;
  margin: 0 0 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.input-wrap { position: relative; }

.input-wrap > svg {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  pointer-events: none;
}

input {
  width: 100%;
  height: 56px;
  border: 1px solid #b9c8ce;
  border-radius: 6px;
  outline: none;
  padding: 0 18px 0 50px;
  color: var(--text);
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

input::placeholder { color: #82939b; }
input:hover { border-color: #8da3ad; }
input:focus { border-color: var(--teal-600); box-shadow: 0 0 0 3px var(--focus); }
input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.12); }

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button {
  min-width: 184px;
  min-height: 56px;
  border: 1px solid var(--teal-600);
  padding: 0 22px;
  color: #ffffff;
  background: var(--teal-600);
}

.primary-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.primary-button:hover { border-color: var(--teal-700); background: var(--teal-700); }
.primary-button:disabled { cursor: wait; opacity: 0.65; }

.form-help {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.form-help strong { color: var(--navy-800); }
.form-error { margin: 8px 0 0; color: var(--danger); font-size: 13px; font-weight: 500; }

.tracking-guide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.guide-step {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
}

.guide-step + .guide-step { border-left: 1px solid var(--border); }

.guide-icon {
  display: flex;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--teal-700);
  background: var(--aqua-100);
}

.guide-icon svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.guide-step div strong,
.guide-step div > span { display: block; }
.guide-step strong { color: var(--navy-800); font-size: 14px; font-weight: 600; line-height: 1.35; }
.guide-step div > span { margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.45; }

.result-card {
  --shipment-accent: var(--teal-600);
  --shipment-border: #b9e3dd;
  --shipment-soft: #eaf8f7;
  margin-top: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  scroll-margin-top: 16px;
  text-align: left;
}

.result-card[data-state="pending"] { --shipment-accent: #a96f00; --shipment-border: #ecd599; --shipment-soft: #fff7df; }
.result-card[data-state="in-transit"] { --shipment-accent: #256a9e; --shipment-border: #bfd9eb; --shipment-soft: #eaf4fb; }
.result-card[data-state="out-for-delivery"] { --shipment-accent: #087f8c; --shipment-border: #b9e3dd; --shipment-soft: #e6f7f5; }
.result-card[data-state="delivered"] { --shipment-accent: var(--success); --shipment-border: #b9dfca; --shipment-soft: #e9f6ef; }
.result-card[data-state="incident"] { --shipment-accent: var(--danger); --shipment-border: #f1c5c1; --shipment-soft: var(--danger-soft); }
.result-card[data-state="cancelled"] { --shipment-accent: #667780; --shipment-border: #d5e0e4; --shipment-soft: var(--surface-muted); }

.result-card[hidden], [hidden] { display: none !important; }

.loading-card {
  display: flex;
  min-height: 96px;
  align-items: center;
  gap: 16px;
}

.loading-card strong { font-size: 16px; font-weight: 600; }
.loading-card p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--surface-muted);
  border-top-color: var(--teal-600);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.result-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.result-title-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.result-header h2 { margin: 0; color: var(--navy-800); font-size: 24px; font-weight: 600; letter-spacing: -0.015em; }

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border: 1px solid var(--shipment-border);
  border-radius: 999px;
  color: var(--shipment-accent);
  background: var(--shipment-soft);
  font-size: 13px;
  font-weight: 600;
}

.shipment-identifiers {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.shipment-identifiers.has-order-reference { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.identifier-card {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f7fafb;
}

.identifier-card svg {
  flex: 0 0 22px;
  width: 22px;
  fill: none;
  stroke: var(--navy-800);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.identifier-card div { min-width: 0; }
.identifier-card span,
.identifier-card strong { display: block; }
.identifier-card span { color: var(--muted); font-size: 12px; font-weight: 550; }
.identifier-card strong { margin-top: 2px; overflow-wrap: anywhere; color: var(--navy-800); font-size: 15px; font-weight: 650; }
.shipment-folio { border-left: 3px solid var(--navy-800); }
.shipment-folio strong { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; letter-spacing: 0.01em; }
.order-reference { border-color: #c5e6e2; border-left: 3px solid var(--aqua-500); background: #eff9f8; }
.order-reference svg { stroke: var(--teal-700); }
.order-reference strong { color: var(--teal-700); font-size: 16px; }

.status-summary {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--shipment-border);
  border-left: 4px solid var(--shipment-accent);
  border-radius: 8px;
  background: var(--shipment-soft);
}

.status-icon {
  display: grid;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 8px;
  color: var(--shipment-accent);
  background: rgba(255, 255, 255, 0.72);
}

.status-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.status-kicker { margin: 0 0 2px; color: var(--shipment-accent); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.current-status { margin: 0; color: var(--navy-800); font-size: 21px; font-weight: 650; line-height: 1.32; }
.updated-at { margin: 5px 0 0; color: var(--muted); font-size: 13px; }

.progress-wrap {
  margin: 18px 0 28px;
  padding: 19px 20px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafb;
}

.progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.progress-heading > div > span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.045em; text-transform: uppercase; }
.progress-heading strong { display: block; margin-top: 2px; color: var(--navy-800); font-size: 15px; font-weight: 650; }
.progress-active { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--shipment-border); border-radius: 999px; color: var(--shipment-accent); background: var(--shipment-soft); font-size: 12px; font-weight: 600; white-space: nowrap; }
.progress-active i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.progress-track { position: relative; }
.progress-line { position: absolute; top: 8px; right: 4%; left: 4%; height: 4px; overflow: hidden; border-radius: 999px; background: #ccd8dc; }
.progress-line span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--shipment-accent); transition: width 240ms ease; }
.progress-steps { position: relative; display: flex; justify-content: space-between; margin: 0; padding: 0; list-style: none; }
.progress-steps li { display: flex; width: 20%; align-items: center; flex-direction: column; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 500; text-align: center; }
.progress-steps i { display: grid; width: 20px; height: 20px; place-items: center; border: 3px solid #f8fafb; border-radius: 50%; background: #9babb2; box-shadow: 0 0 0 1px #b8c8ce; }
.progress-steps .is-complete { color: var(--navy-800); }
.progress-steps .is-complete i { background: var(--shipment-accent); box-shadow: 0 0 0 1px var(--shipment-accent); }
.progress-steps .is-complete:not(.is-current) i::after { content: "✓"; color: #ffffff; font-size: 10px; font-style: normal; font-weight: 800; line-height: 1; }
.progress-steps .is-current { color: var(--navy-800); font-weight: 600; }
.progress-steps .is-current i { box-shadow: 0 0 0 4px var(--shipment-soft), 0 0 0 5px var(--shipment-accent); }

.delivery-details {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr);
  gap: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px 8px 0 0;
  background: var(--surface);
}

.detail-box { min-width: 0; padding: 18px; }
.detail-box + .detail-box { border-left: 1px solid var(--border); }
.detail-box span, .detail-box strong { display: block; }
.detail-box span { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 500; }
.detail-box strong { overflow-wrap: anywhere; color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.45; }

.estimated-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 32px;
  padding: 16px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--surface-muted);
}

.estimated-box svg { flex: 0 0 20px; width: 20px; fill: none; stroke: var(--teal-700); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.estimated-box span, .estimated-box strong { display: block; }
.estimated-box span { color: var(--muted); font-size: 13px; font-weight: 500; }
.estimated-box strong { margin-top: 2px; color: var(--navy-800); font-size: 15px; font-weight: 600; }
.estimated-box p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

.history-section { padding-top: 0; }
.history-section h3 { margin: 0 0 20px; color: var(--navy-800); font-size: 20px; font-weight: 600; }
.event-list { margin: 0; padding: 0; list-style: none; }
.event-list li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 0 0 20px; }
.event-list li:not(:last-child)::before { position: absolute; top: 14px; bottom: 0; left: 6px; width: 1px; content: ""; background: var(--border); }
.event-marker { z-index: 1; width: 13px; height: 13px; margin-top: 3px; border: 3px solid var(--surface); border-radius: 50%; background: #91a3aa; box-shadow: 0 0 0 1px var(--border); }
.event-list .is-current .event-marker { background: var(--shipment-accent); box-shadow: 0 0 0 3px var(--shipment-soft); }
.event-meta { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.event-content strong { color: var(--text); font-size: 15px; font-weight: 600; }
.event-location { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.secondary-button {
  min-height: 42px;
  margin-top: 4px;
  border: 1px solid #b9c8ce;
  padding: 0 14px;
  color: var(--navy-800);
  background: var(--surface);
}

.secondary-button svg { width: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.secondary-button:hover { border-color: var(--teal-600); color: var(--teal-700); background: #f6fbfb; }
.secondary-button.is-success { border-color: #9fd0b4; color: var(--success); background: #e9f6ef; }
.clipboard-helper { position: fixed; left: -9999px; top: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.catalog-promo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 32px;
  padding: 20px 22px;
  border: 1px solid var(--navy-800);
  border-left: 4px solid var(--aqua-500);
  border-radius: 8px;
  background: var(--navy-800);
}

.catalog-promo-icon {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #7bd8d3;
  background: rgba(255, 255, 255, 0.08);
}

.catalog-promo-icon svg,
.catalog-promo-link svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.catalog-promo-icon svg { width: 22px; height: 22px; }
.catalog-promo-copy p { margin: 0 0 3px; color: #7bd8d3; font-size: 12px; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
.catalog-promo-copy h2 { margin: 0; color: #ffffff; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.catalog-promo-copy > span { display: block; margin-top: 4px; color: #c9d8de; font-size: 13px; line-height: 1.45; }

.catalog-promo-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  color: var(--navy-800);
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.catalog-promo-link svg { width: 17px; height: 17px; }
.catalog-promo-link:hover { border-color: #9ae3de; color: var(--navy-900); background: #e8f8f7; }

.site-footer {
  border-top: 3px solid var(--teal-600);
  color: #c9d8de;
  background: var(--navy-900);
}

.footer-content {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(230px, 1fr) minmax(0, 2.3fr);
  gap: 64px;
  margin: 0 auto;
  padding: 52px 0 42px;
}

.footer-brand,
.footer-column a,
.footer-legal a { text-decoration: none; }

.footer-brand {
  display: inline-block;
  color: #ffffff;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.footer-brand-block p { max-width: 330px; margin: 14px 0 0; color: #9fb2bb; font-size: 14px; line-height: 1.65; }
.footer-navigation { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; }
.footer-column { display: flex; align-items: flex-start; flex-direction: column; gap: 10px; }
.footer-column h2 { margin: 0 0 5px; color: #ffffff; font-size: 15px; font-weight: 650; }
.footer-column > a:not(.footer-contact-item) { color: #aebfc6; font-size: 14px; line-height: 1.45; transition: color 160ms ease; }
.footer-column > a:not(.footer-contact-item):hover,
.footer-legal a:hover { color: #7bd8d3; }

.footer-contact-item {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  color: #d7e2e6;
  text-decoration: none;
}

.footer-contact-item svg { flex: 0 0 20px; width: 20px; margin-top: 2px; fill: none; stroke: #7bd8d3; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.footer-contact-item span { min-width: 0; }
.footer-contact-item small,
.footer-contact-item strong { display: block; }
.footer-contact-item small { color: #8fa5ae; font-size: 12px; }
.footer-contact-item strong { margin-top: 2px; color: #ffffff; font-size: 14px; font-weight: 600; line-height: 1.45; }
.footer-contact a:hover strong { color: #7bd8d3; }

.footer-legal {
  display: flex;
  width: min(1120px, calc(100% - 48px));
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-top: 1px solid rgba(201, 216, 222, 0.16);
  color: #8fa5ae;
  font-size: 13px;
}

.footer-legal a { color: #aebfc6; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10;
  max-width: min(360px, calc(100% - 40px));
  padding: 11px 14px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--navy-900);
  box-shadow: var(--shadow-overlay);
  font-size: 13px;
  font-weight: 500;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .footer-content { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 58px; padding: 0 16px; }
  .secure-badge { font-size: 12px; }
  main { width: min(100% - 28px, 940px); margin-top: 32px; }
  h1 { font-size: 29px; }
  .tracking-card, .result-card { padding: 20px 16px; }
  .input-row { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .tracking-guide { grid-template-columns: 1fr; }
  .guide-step { padding: 14px 4px; }
  .guide-step + .guide-step { border-top: 1px solid var(--border); border-left: 0; }
  .catalog-promo { grid-template-columns: auto 1fr; gap: 14px; padding: 18px 16px; }
  .catalog-promo-link { grid-column: 1 / -1; width: 100%; }
  .result-title-row { align-items: center; }
  .shipment-identifiers.has-order-reference { grid-template-columns: 1fr; }
  .identifier-card { padding: 13px 14px; }
  .status-summary { align-items: flex-start; padding: 16px; }
  .status-icon { flex-basis: 42px; width: 42px; height: 42px; }
  .current-status { font-size: 18px; }
  .progress-wrap { padding: 16px 12px 15px; }
  .progress-heading { align-items: flex-start; margin-bottom: 20px; }
  .progress-active { padding: 4px 7px; font-size: 11px; }
  .progress-steps li { font-size: 11px; }
  .progress-steps span { max-width: 62px; }
  .delivery-details { grid-template-columns: 1fr; }
  .detail-box + .detail-box { border-top: 1px solid var(--border); border-left: 0; }
  .footer-content, .footer-legal { width: min(100% - 32px, 1120px); }
  .footer-content { padding: 40px 0 32px; }
  .footer-navigation { grid-template-columns: 1fr; gap: 28px; }
  .footer-legal { min-height: 0; align-items: flex-start; flex-direction: column; gap: 8px; padding: 20px 0 24px; }
  .toast { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; }
}
