:root {
  color-scheme: light;
  --ink: #17211f;
  --muted: #73807b;
  --line: #e3e8e4;
  --paper: #f5f4ef;
  --card: #fff;
  --green: #235f4d;
  --green-dark: #194838;
  --mint: #e7f1eb;
  --coral: #e87d5d;
  --sans: 'DM Sans', 'Segoe UI', sans-serif;
  --display: 'Manrope', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--paper); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(ellipse at 13% 34%, rgba(207, 226, 211, .65), transparent 31rem),
    radial-gradient(ellipse at 85% 7%, rgba(247, 224, 210, .47), transparent 30rem),
    var(--paper);
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
[hidden] { display: none !important; }

.page-shell { max-width: 1320px; min-height: 100vh; margin: 0 auto; padding: 0 6.2%; display: flex; flex-direction: column; }
.gate-layout { min-height: 100vh; display: grid; place-items: center; padding: 30px 21px; }
.gate-card { position: relative; width: min(100%, 465px); padding: 34px 39px 26px; border: 1px solid rgba(30,58,46,.08); border-radius: 18px; background: rgba(255,255,255,.93); box-shadow: 0 22px 65px rgba(33,58,46,.1), 0 3px 9px rgba(33,58,46,.04); }
.gate-brand { margin-bottom: 47px; }
.gate-icon { position: absolute; top: 38px; right: 39px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: var(--mint); font-size: 16px; }
.gate-card h1 { margin: 17px 0 11px; font-size: clamp(42px, 8vw, 55px); }
.gate-card .intro-copy { max-width: 365px; font-size: 12px; }
.gate-form { display: grid; margin-top: 25px; }
.gate-form label:not(:first-child) { margin-top: 15px; }
.gate-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #dce4de; border-radius: 9px; outline: 0; color: var(--ink); background: #fbfcfa; font-size: 12px; }
.gate-form input:focus { border-color: #66a086; box-shadow: 0 0 0 3px rgba(79,145,113,.12); }
.gate-form .submit-button { margin-top: 17px; }
.gate-message { min-height: 15px; margin: 9px 0 0; color: #9e543d; font-size: 10px; line-height: 1.5; }
.gate-foot { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; padding-top: 16px; border-top: 1px solid #edf0ed; color: #939d97; font-size: 9px; }
.topbar { min-height: 91px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(33, 57, 47, .12); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: var(--green); border: 1px solid rgba(35, 95, 77, .23); border-radius: 12px; background: rgba(255,255,255,.52); }
.brand-mark svg { width: 27px; height: 27px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-family: var(--display); font-size: 16px; line-height: 1; letter-spacing: -.03em; }
.brand-copy span { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.connection { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid rgba(35,95,77,.13); border-radius: 999px; color: #52645c; background: rgba(255,255,255,.44); font-size: 11px; font-weight: 600; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #bd9c60; box-shadow: 0 0 0 3px rgba(189,156,96,.13); }
.connection[data-state="ready"] .connection-dot { background: #46a27c; box-shadow: 0 0 0 3px rgba(70,162,124,.14); }
.connection[data-state="error"] .connection-dot { background: #d66753; box-shadow: 0 0 0 3px rgba(214,103,83,.12); }
.sign-out-button { margin-left: 11px; padding: 8px 11px; border: 1px solid rgba(35,95,77,.15); border-radius: 8px; color: #52645c; background: rgba(255,255,255,.45); font-size: 10px; font-weight: 600; }
.sign-out-button:hover { background: #fff; }

main { flex: 1; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .78fr); align-content: center; align-items: center; column-gap: clamp(54px, 9vw, 130px); row-gap: 43px; padding: 60px 0 49px; }
.intro { max-width: 515px; align-self: center; padding-bottom: 13px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .17em; }
.eyebrow-line { width: 24px; height: 1px; background: var(--coral); }
h1 { margin: 20px 0 17px; font-family: var(--display); font-size: clamp(45px, 5.2vw, 68px); font-weight: 600; line-height: 1.04; letter-spacing: -.07em; }
h1 em { color: var(--green); font-weight: 500; font-style: normal; }
.intro-copy { max-width: 360px; margin: 0; color: #6d7a74; font-size: 14px; line-height: 1.75; }
.carrier-list { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 43px; }
.carrier-label { width: 100%; margin-bottom: 1px; color: #929d97; font-size: 8px; font-weight: 700; letter-spacing: .17em; }
.carrier-chip { display: inline-flex; align-items: center; gap: 6px; color: #5a6962; font-size: 10px; font-weight: 600; }
.carrier-symbol { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; font-family: var(--display); font-size: 10px; font-weight: 800; }
.dhl { color: #b31c2c; background: #fff0cf; }
.dpd { color: #fff; background: #c63435; }
.ups { color: #fff; background: #61482f; }
.fedex { color: #fff; background: #5641a5; }

.tracker-card { position: relative; width: 100%; max-width: 480px; justify-self: end; padding: 31px 33px 24px; border: 1px solid rgba(30,58,46,.08); border-radius: 18px; background: rgba(255,255,255,.92); box-shadow: 0 22px 65px rgba(33,58,46,.09), 0 3px 9px rgba(33,58,46,.035); }
.card-topline { display: flex; align-items: center; gap: 10px; color: #86928d; font-size: 8px; font-weight: 700; letter-spacing: .15em; }
.step-number { color: var(--green); font-family: var(--display); font-size: 10px; letter-spacing: .05em; }
.topline-rule { height: 1px; flex: 1; margin-left: 7px; background: var(--line); }
.card-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--green); background: var(--mint); font-size: 14px; }
.tracker-card h2 { margin: 23px 0 6px; font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -.045em; }
.card-intro { margin: 0 0 24px; color: var(--muted); font-size: 11px; line-height: 1.6; }
#tracking-form { display: grid; }
label { margin: 0 0 8px; color: #46554f; font-size: 10px; font-weight: 700; }
.input-wrap, .select-wrap { position: relative; }
.input-wrap { display: flex; align-items: center; border: 1px solid #dce4de; border-radius: 9px; background: #fbfcfa; transition: border-color .18s, box-shadow .18s; }
.input-wrap:focus-within, .select-wrap:focus-within { border-color: #66a086; box-shadow: 0 0 0 3px rgba(79,145,113,.12); }
.input-wrap > svg { width: 17px; height: 17px; margin-left: 13px; color: #819087; flex: 0 0 auto; }
.input-wrap input { width: 100%; min-width: 0; height: 46px; padding: 0 10px; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; font-weight: 500; }
.input-wrap input::placeholder { color: #a7b1aa; }
.clear-button { width: 29px; height: 29px; margin-right: 7px; border: 0; border-radius: 7px; color: #839088; background: transparent; font-size: 20px; line-height: 1; }
.clear-button:hover { background: #f0f3f0; }
.field-hint { margin: 7px 0 20px; color: #9aa49e; font-size: 9px; }
.current-order-panel { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 18px; padding: 11px 12px; border: 1px solid #d8e8dd; border-radius: 9px; background: #f3f8f4; }
.current-order-copy strong, .current-order-copy small { display: block; }
.current-order-copy strong { color: #44564c; font-size: 9px; }
.current-order-copy small { margin-top: 4px; color: #87958c; font-size: 8px; }
.current-order-button { flex: 0 0 auto; padding: 7px 9px; border: 0; border-radius: 7px; color: #fff; background: var(--green); font-size: 8px; font-weight: 700; }
.current-order-button span { margin-left: 3px; }
.optional-label { float: right; color: #a0aaa4; font-size: 8px; letter-spacing: .08em; }
.select-wrap { height: 43px; border: 1px solid #dce4de; border-radius: 9px; background: #fbfcfa; }
.select-wrap select { width: 100%; height: 100%; appearance: none; padding: 0 38px 0 13px; border: 0; outline: 0; color: #45544e; background: transparent; font-size: 11px; }
.select-chevron { position: absolute; top: 10px; right: 14px; color: #829088; font-size: 15px; pointer-events: none; }
.submit-button { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 47px; margin-top: 22px; padding: 0 14px 0 16px; border: 0; border-radius: 9px; color: #fff; background: var(--green); font-size: 11px; font-weight: 700; transition: background .18s, transform .18s, opacity .18s; }
.submit-button:not(:disabled):hover { background: var(--green-dark); transform: translateY(-1px); }
.submit-button:disabled { cursor: not-allowed; opacity: .52; }
.button-arrow { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.26); border-radius: 7px; font-size: 13px; }
.form-message { min-height: 0; margin: 0; color: #9e543d; font-size: 10px; line-height: 1.5; }
.form-message:not(:empty) { margin-top: 11px; }
.card-foot { display: flex; align-items: center; gap: 7px; margin-top: 19px; padding-top: 16px; border-top: 1px solid #edf0ed; color: #939d97; font-size: 9px; }
.shield-icon { color: var(--green); font-size: 13px; }

.trust-strip { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: clamp(20px, 5.5vw, 76px); padding: 21px 24px; border: 1px solid rgba(33,57,47,.09); border-radius: 13px; background: rgba(255,255,255,.48); }
.trust-item { display: flex; align-items: center; gap: 10px; }
.trust-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; color: var(--green); background: rgba(225,238,229,.9); font-size: 16px; }
.trust-item strong, .trust-item small { display: block; }
.trust-item strong { color: #48564f; font-size: 10px; font-weight: 700; }
.trust-item small { margin-top: 3px; color: #929c96; font-size: 9px; }
.trust-divider { width: 1px; height: 30px; background: #e2e7e3; }
.footer { min-height: 53px; display: flex; align-items: center; gap: 8px; border-top: 1px solid rgba(33,57,47,.11); color: #8a9690; font-size: 9px; letter-spacing: .02em; }
.footer > span:first-child { color: #54635c; font-weight: 700; }
.footer-separator { color: #c0c9c2; }
.footer > span:nth-child(3) { font-size: 8px; font-weight: 700; letter-spacing: .12em; }
.footer-spacer { flex: 1; }

.result-card { grid-column: 1 / -1; justify-self: center; width: min(100%, 850px); padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 16px 45px rgba(33,58,46,.07); }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #edf0ed; }
.result-heading h2 { margin: 5px 0 4px; font-family: var(--display); font-size: 23px; letter-spacing: -.04em; }
.result-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.status-badge { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; color: var(--green); background: var(--mint); font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-badge:before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.result-meta { display: flex; flex-wrap: wrap; gap: 25px; padding: 17px 0; border-bottom: 1px solid #edf0ed; }
.result-meta span { color: #98a29c; font-size: 8px; font-weight: 700; letter-spacing: .11em; }
.result-meta strong { display: block; margin-top: 6px; color: #3e4e46; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.shipment-item { padding: 18px 0; border-bottom: 1px solid #edf0ed; }
.shipment-item:last-child { padding-bottom: 0; border-bottom: 0; }
.shipment-item-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.shipment-item-heading h3 { margin: 0; color: #405148; font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: -.025em; }
.shipment-line-label { margin-top: 4px; color: #9aa49e; font-size: 8px; }
.shipment-tracking-number { display: inline-block; margin-top: 13px; color: #315c4a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; font-weight: 600; word-break: break-all; }
.shipment-item-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; }
.shipment-item-meta span { color: #98a29c; font-size: 8px; font-weight: 700; letter-spacing: .1em; }
.shipment-item-meta strong { display: block; margin-top: 5px; color: #3e4e46; font-size: 10px; font-weight: 600; letter-spacing: 0; }
.shipment-source { margin-top: 15px; color: #98a29c; font-size: 8px; }
.timeline { display: grid; gap: 0; padding: 18px 0 0 6px; }
.timeline-event { position: relative; display: grid; grid-template-columns: 18px 1fr auto; gap: 12px; min-height: 59px; padding-bottom: 14px; }
.timeline-event:not(:last-child):before { position: absolute; top: 14px; bottom: 0; left: 6px; width: 1px; background: #dce9df; content: ''; }
.event-dot { z-index: 1; width: 13px; height: 13px; margin-top: 1px; border: 3px solid #8bb39a; border-radius: 50%; background: white; }
.timeline-event:first-child .event-dot { border-color: var(--green); box-shadow: 0 0 0 3px var(--mint); }
.event-copy strong { display: block; color: #34463c; font-size: 11px; font-weight: 700; }
.event-copy small { display: block; margin-top: 4px; color: #8a9790; font-size: 9px; }
.event-time { color: #98a29c; font-size: 9px; white-space: nowrap; }
.error-banner { grid-column: 1 / -1; justify-self: center; width: min(100%, 850px); display: flex; gap: 11px; padding: 14px 16px; border: 1px solid #f0d9cf; border-radius: 10px; color: #924a38; background: #fff7f3; font-size: 11px; line-height: 1.5; }
.error-icon { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #bf6d53; font-size: 11px; font-weight: 700; }

@media (max-width: 880px) {
  .page-shell { padding: 0 5%; }
  main { grid-template-columns: minmax(0, 1fr) minmax(330px, .95fr); column-gap: 32px; }
  .tracker-card { padding: 27px 25px 22px; }
  .carrier-list { gap: 10px; }
  .trust-strip { gap: 20px; }
}

@media (max-width: 700px) {
  .page-shell { padding: 0 21px; }
  .gate-card { padding: 28px 23px 23px; }
  .gate-brand { margin-bottom: 40px; }
  .gate-icon { top: 30px; right: 23px; }
  .topbar { min-height: 72px; }
  .brand-mark { width: 36px; height: 36px; }
  .connection { padding: 8px 10px; font-size: 9px; }
  main { grid-template-columns: 1fr; align-content: start; row-gap: 27px; padding: 42px 0 30px; }
  .intro { padding: 0; }
  h1 { margin: 16px 0 11px; font-size: clamp(43px, 12vw, 60px); }
  .intro-copy { max-width: 390px; font-size: 12px; }
  .carrier-list { margin-top: 25px; }
  .tracker-card { justify-self: stretch; max-width: none; padding: 25px 22px 20px; }
  .tracker-card h2 { margin-top: 19px; font-size: 22px; }
  .trust-strip { grid-column: auto; display: grid; grid-template-columns: 1fr; gap: 15px; justify-content: stretch; padding: 17px; }
  .trust-divider { display: none; }
  .trust-item small { font-size: 8px; }
  .footer { min-height: 48px; font-size: 8px; }
  #footer-mode { max-width: 130px; text-align: right; }
  .result-card, .error-banner { grid-column: auto; }
  .result-card { padding: 22px 18px; }
  .result-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .result-meta { gap: 15px 25px; }
  .current-order-panel { align-items: flex-start; flex-direction: column; }
  .current-order-button { align-self: flex-end; }
  .timeline-event { grid-template-columns: 18px 1fr; }
  .event-time { grid-column: 2; margin-top: -8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
