/* ==========================================================================
   PackageTrackNow — Kinetic Logistics design system
   Ported by hand from ui/.../kinetic_logistics/DESIGN.md. No Tailwind.

   Note on radii: DESIGN.md's prose and the generated tailwind config disagree
   (config says lg=0.5rem, prose says "rounded-lg (16px)"). The prose is the
   spec of record, so: controls 8px, cards 12px, hero surfaces 16px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Colour */
  --surface: #f8f9ff;
  --surface-dim: #d0dbed;
  --surface-bright: #f8f9ff;
  --surface-lowest: #ffffff;
  --surface-low: #eff4ff;
  --surface-container: #e6eeff;
  --surface-high: #dee9fc;
  --surface-highest: #d9e3f6;
  --surface-variant: #d9e3f6;
  --surface-alt: #f9fafb;

  --on-surface: #121c2a;
  --on-surface-variant: #444651;
  --inverse-surface: #27313f;
  --inverse-on-surface: #eaf1ff;

  --outline: #757682;
  --outline-variant: #c5c5d3;
  --border-subtle: #e5e7eb;

  --primary: #00236f;
  --on-primary: #ffffff;
  --primary-container: #1e3a8a;
  --on-primary-container: #90a8ff;
  --primary-fixed: #dce1ff;
  --primary-fixed-dim: #b6c4ff;

  --secondary: #0058be;
  --on-secondary: #ffffff;
  --secondary-container: #2170e4;

  --tertiary: #002f38;
  --tertiary-container: #004754;
  --on-tertiary-container: #1dbcda;

  --error: #ba1a1a;
  --error-container: #ffdad6;
  --on-error-container: #93000a;

  --status-delivered: #10b981;
  --status-transit: #f59e0b;

  /* Type */
  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Shape */
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Space — 8px base */
  --gutter: 24px;
  --margin: 16px;
  --container: 1280px;

  /* Elevation */
  --shadow-low: 0 4px 12px 0 rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 8px 24px 0 rgba(0, 0, 0, 0.08);
  --shadow-high: 0 16px 32px 0 rgba(0, 0, 0, 0.12);
}

@media (min-width: 768px) {
  :root { --margin: 32px; }
}

/* --------------------------------------------------------------------------
   Reset
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 24px;
  color: var(--on-surface);
  background: var(--surface-alt);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }

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

.material-symbols-outlined {
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  user-select: none;
}
.material-symbols-outlined.filled { font-variation-settings: "FILL" 1; }

/* Visible only to screen readers. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
.display-lg {
  font-family: var(--font-display);
  font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .display-lg { font-size: 48px; line-height: 56px; }
}

.headline-md { font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 600; }
.headline-sm { font-family: var(--font-display); font-size: 20px; line-height: 28px; font-weight: 600; }
.body-lg { font-size: 18px; line-height: 28px; }
.body-md { font-size: 16px; line-height: 24px; }
.body-sm { font-size: 14px; line-height: 20px; }

.label-code {
  font-family: var(--font-mono);
  font-size: 14px; line-height: 20px; font-weight: 500; letter-spacing: 0.05em;
}
.label-caps {
  font-size: 12px; line-height: 16px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-variant { color: var(--on-surface-variant); }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--margin);
}

.main { flex: 1 0 auto; }

.section { padding-block: 56px; }
.section--tint { background: var(--surface-low); }
.section--surface { background: var(--surface); }

.section__head { text-align: center; margin-bottom: 40px; }
.section__title { font-family: var(--font-display); font-size: 24px; line-height: 32px; font-weight: 600; color: var(--primary); }
.section__sub { margin-top: 8px; color: var(--on-surface-variant); font-size: 14px; }

.grid { display: grid; gap: var(--gutter); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------------------------------------
   Top navigation
   -------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--surface-lowest);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.nav__brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-size: 20px; font-weight: 700;
  color: var(--primary);
}
.nav__brand .material-symbols-outlined { color: var(--secondary); font-size: 24px; }

.nav__links { display: none; gap: 32px; align-items: center; }
@media (min-width: 768px) { .nav__links { display: flex; } }

.nav__link {
  font-size: 14px; color: var(--on-surface-variant);
  padding-bottom: 4px; border-bottom: 2px solid transparent;
  transition: color .15s;
}
.nav__link:hover { color: var(--primary); }
.nav__link.is-active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn:active { transform: scale(.97); }

.btn--primary { background: var(--secondary); color: #fff; }
.btn--primary:hover { background: var(--primary); }

.btn--navy { background: var(--primary-container); color: #fff; }
.btn--navy:hover { background: var(--primary); }

.btn--outline { border: 1px solid var(--primary); color: var(--primary); background: #fff; }
.btn--outline:hover { background: var(--surface-low); }

.btn--ghost {
  color: var(--on-surface-variant); font-weight: 600; padding: 8px 12px;
}
.btn--ghost:hover { color: var(--primary); }

.btn--pill { border-radius: var(--radius-full); }
.btn--sm { padding: 6px 16px; font-size: 13px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   Tracking search — the hero component
   -------------------------------------------------------------------------- */
.search { position: relative; display: flex; align-items: center; }

.search__icon {
  position: absolute; left: 16px;
  color: var(--on-surface-variant); pointer-events: none;
  font-size: 22px;
}

.search__input {
  width: 100%;
  padding: 16px 130px 16px 48px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-medium);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.search__input::placeholder { color: var(--outline); }
.search__input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: var(--shadow-medium), 0 0 0 2px var(--secondary);
}

.search__btn {
  position: absolute; right: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  background: var(--secondary); color: #fff;
  border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  transition: background-color .15s;
}
.search__btn:hover { background: var(--primary); }
.search__btn .material-symbols-outlined { font-size: 18px; }

@media (max-width: 560px) {
  /* Stack rather than crush the button into the field. */
  .search { flex-direction: column; align-items: stretch; gap: 8px; }
  .search__input { padding: 14px 16px 14px 44px; }
  .search__btn { position: static; justify-content: center; padding: 12px; }
}

.search__hint {
  margin-top: 12px; font-size: 12px; color: var(--on-surface-variant);
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
}
.search__hint a { color: var(--secondary); font-family: var(--font-mono); font-size: 12px; }
.search__hint a:hover { text-decoration: underline; }

.search__error {
  margin-top: 12px;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--error-container); color: var(--on-error-container);
  border-radius: var(--radius); font-size: 14px;
}
.search__error .material-symbols-outlined { font-size: 18px; }

/* Honeypot: off-screen, never focusable, invisible to humans. */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-low);
}
.card--pad { padding: 24px; }
.card--hover { transition: box-shadow .2s, transform .2s; }
.card--hover:hover { box-shadow: var(--shadow-medium); transform: translateY(-2px); }

/* Courier tile */
.courier {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 24px 16px;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-low);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.courier:hover {
  box-shadow: var(--shadow-medium); transform: translateY(-2px);
  border-color: var(--primary-fixed-dim);
}
.courier__icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: var(--surface-container);
  color: var(--primary);
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.courier__name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--on-surface); }
.courier__meta { font-size: 11px; color: var(--on-surface-variant); margin-top: 2px; }
.courier__cta {
  margin-top: 12px; width: 100%;
  padding: 6px; border-radius: var(--radius-sm);
  background: var(--surface-low); color: var(--secondary);
  font-size: 12px; font-weight: 700;
}
.courier:hover .courier__cta { background: var(--secondary); color: #fff; }

/* --------------------------------------------------------------------------
   Status chips + tones
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.chip .material-symbols-outlined { font-size: 14px; }

.chip--service {
  background: var(--surface-container); color: var(--primary);
  border-radius: var(--radius-sm); text-transform: uppercase;
}

/* One tone vocabulary, reused by chips, card bars and status tiles. */
.tone-transit   { --tone: var(--status-transit); --tone-bg: #fff7e6; --tone-fg: #92400e; }
.tone-delivered { --tone: var(--status-delivered); --tone-bg: #e7f8f1; --tone-fg: #065f46; }
.tone-out       { --tone: var(--secondary); --tone-bg: #e8f0fe; --tone-fg: #0058be; }
.tone-exception { --tone: var(--error); --tone-bg: #ffe9e6; --tone-fg: #93000a; }
.tone-customs   { --tone: var(--tertiary-container); --tone-bg: #e2f7fb; --tone-fg: #004754; }
.tone-info      { --tone: var(--primary-container); --tone-bg: var(--surface-container); --tone-fg: var(--primary); }
.tone-pickup    { --tone: var(--secondary-container); --tone-bg: #eaf1ff; --tone-fg: #1e3a8a; }
.tone-muted     { --tone: var(--outline-variant); --tone-bg: #f1f2f6; --tone-fg: #444651; }

.chip--tone { background: var(--tone-bg); color: var(--tone-fg); }

/* --------------------------------------------------------------------------
   Status card (results hero)
   -------------------------------------------------------------------------- */
.status-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--tone, var(--outline-variant));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-low);
  padding: 24px;
  overflow: hidden;
}
@media (min-width: 768px) { .status-card { padding: 40px; } }

.status-card__top {
  display: flex; flex-direction: column; gap: 24px;
  justify-content: space-between; margin-bottom: 8px;
}
@media (min-width: 768px) {
  .status-card__top { flex-direction: row; align-items: flex-start; }
}
.status-card__eta { text-align: left; }
@media (min-width: 768px) { .status-card__eta { text-align: right; } }

.status-card__title {
  font-family: var(--font-display);
  font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--primary);
  margin: 8px 0 4px;
}
@media (min-width: 768px) {
  .status-card__title { font-size: 44px; line-height: 52px; }
}

.eta-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 600; font-size: 14px; margin-top: 4px;
}
.eta-badge .material-symbols-outlined { font-size: 18px; }
.eta-badge--ontime { color: var(--status-delivered); }
.eta-badge--late { color: var(--status-transit); }
.eta-badge--delivered { color: var(--status-delivered); }

/* --------------------------------------------------------------------------
   Horizontal stepper
   -------------------------------------------------------------------------- */
.stepper { position: relative; padding: 32px 0 8px; --steps: 4; }

/* Nodes are flex:1 and centred, so node i sits at 100%*(i+0.5)/steps — i.e.
   12.5% and 87.5% for the first and last of four. The rail must start and end
   on those centres, not at an arbitrary inset, or it visibly overshoots. */
.stepper__track {
  position: absolute; top: 52px; height: 2px;
  left: calc(100% / (var(--steps) * 2));
  right: calc(100% / (var(--steps) * 2));
  background: var(--surface-variant);
}
.stepper__fill {
  position: absolute; top: 52px; height: 2px;
  left: calc(100% / (var(--steps) * 2));
  background: var(--secondary);
  transition: width .4s ease;
}

.stepper__nodes { position: relative; display: flex; justify-content: space-between; }

.step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }

.step__dot {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--surface-variant);
  color: var(--on-surface-variant);
  border: 4px solid #fff;
  z-index: 1;
}
.step--done .step__dot { background: var(--secondary); color: #fff; border-color: #fff; box-shadow: var(--shadow-medium); }
.step--current .step__dot {
  background: var(--secondary); color: #fff; border-color: #fff;
  box-shadow: var(--shadow-medium);
  animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}

.step__label {
  font-size: 12px; font-weight: 500; color: var(--on-surface-variant); text-align: center;
  /* Reserve two lines so a wrapped label ("Out for Delivery") doesn't shove its
     own date down out of line with the others. */
  min-height: 2.4em;
}
.step--done .step__label, .step--current .step__label { color: var(--primary); font-weight: 600; }
.step__time { font-size: 11px; color: var(--outline); margin-top: -4px; }

@media (max-width: 560px) {
  .step { min-width: 0; padding-inline: 2px; }
  .step__label { font-size: 10px; line-height: 13px; min-height: 26px; }
  .step__time { font-size: 9px; }
  .step__dot { width: 34px; height: 34px; border-width: 3px; }
  .step__dot .material-symbols-outlined { font-size: 18px; }
  .stepper__track, .stepper__fill { top: 49px; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}
@media (prefers-reduced-motion: reduce) {
  .step--current .step__dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Vertical timeline
   -------------------------------------------------------------------------- */
.timeline { position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 17px; top: 8px; bottom: 8px;
  width: 2px; background: var(--border-subtle);
}

.tl-item { position: relative; padding-left: 48px; padding-bottom: 24px; }

.tl-item__dot {
  position: absolute; left: 0; top: 6px;
  width: 36px; height: 36px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: #fff; border: 2px solid var(--border-subtle);
  z-index: 1;
  transition: border-color .2s;
}
.tl-item__dot span { width: 10px; height: 10px; border-radius: var(--radius-full); background: var(--outline-variant); }

.tl-item--latest .tl-item__dot { background: var(--surface-low); border-color: #fff; }
.tl-item--latest .tl-item__dot span { width: 12px; height: 12px; background: var(--secondary); }
.tl-item:hover .tl-item__dot { border-color: var(--secondary); }

.tl-item__body {
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-low);
  padding: 16px 20px;
  transition: box-shadow .2s;
}
.tl-item:hover .tl-item__body { box-shadow: var(--shadow-medium); }

.tl-item__head {
  display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px;
}
@media (min-width: 768px) {
  .tl-item__head { flex-direction: row; justify-content: space-between; align-items: baseline; gap: 16px; }
}
.tl-item__title { font-weight: 700; color: var(--primary); font-size: 15px; }
.tl-item__time { font-size: 13px; color: var(--on-surface-variant); font-weight: 500; white-space: nowrap; }
.tl-item__loc { font-size: 13px; color: var(--on-surface-variant); }
.tl-item__provider {
  display: inline-block; margin-top: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  color: var(--secondary);
}

/* --------------------------------------------------------------------------
   Accordion (FAQ)
   -------------------------------------------------------------------------- */
.acc { display: flex; flex-direction: column; gap: 12px; }

.acc__item {
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-low);
  overflow: hidden;
}
.acc__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; text-align: left;
  color: var(--secondary); font-weight: 500; font-size: 15px;
}
.acc__btn .material-symbols-outlined { transition: transform .2s; color: var(--on-surface-variant); flex-shrink: 0; }
.acc__item.is-open .acc__btn .material-symbols-outlined { transform: rotate(180deg); }

.acc__panel {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.acc__item.is-open .acc__panel { grid-template-rows: 1fr; }
.acc__panel > div { overflow: hidden; }
.acc__panel p { padding: 0 20px 18px; color: var(--on-surface-variant); font-size: 14px; line-height: 22px; }

@media (prefers-reduced-motion: reduce) { .acc__panel { transition: none; } }

/* --------------------------------------------------------------------------
   Status explainer list / tiles
   -------------------------------------------------------------------------- */
.status-list { display: flex; flex-direction: column; gap: 12px; }

.status-row {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--tone, var(--outline-variant));
  border-radius: var(--radius); padding: 14px 16px;
}
.status-row__icon {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  display: grid; place-items: center; flex-shrink: 0;
  background: var(--tone-bg); color: var(--tone-fg);
}
.status-row__icon .material-symbols-outlined { font-size: 18px; }
.status-row__name { font-weight: 600; font-size: 14px; color: var(--on-surface); }
.status-row__desc { font-size: 12px; line-height: 18px; color: var(--on-surface-variant); margin-top: 2px; }

.status-tile {
  background: #fff; border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--tone, var(--outline-variant));
  border-radius: var(--radius); padding: 16px;
}
.status-tile__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.status-tile__head .material-symbols-outlined { font-size: 18px; color: var(--tone-fg); }
.status-tile__name { font-weight: 600; font-size: 14px; color: var(--tone-fg); }
.status-tile__desc { font-size: 12px; line-height: 18px; color: var(--on-surface-variant); }

/* --------------------------------------------------------------------------
   Ad slots — plain block containers holding an AdSense <ins responsive>. No
   background/border/fixed size, so Google's creative sets the dimensions. The
   <ins> is display:block;width:100%, so a block parent lets it fill.
   -------------------------------------------------------------------------- */
.ad {
  display: block; text-align: center;
  color: var(--outline);
  min-height: 24px;
  overflow: hidden;
}
.ad .adsbygoogle { display: block; width: 100%; }
.ad--leaderboard { width: 100%; margin-inline: auto; }
.ad--label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .4; }

.promo {
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 24px;
  background: var(--primary-container); color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-medium);
  text-align: center;
}
@media (min-width: 768px) { .promo { flex-direction: row; text-align: left; } }
.promo__icon { background: rgba(255, 255, 255, .12); padding: 14px; border-radius: var(--radius-full); }
.promo__icon .material-symbols-outlined { font-size: 32px; }
.promo__body { flex: 1; }
.promo__title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.promo__text { color: var(--on-primary-container); font-size: 14px; }

/* --------------------------------------------------------------------------
   Filter pills
   -------------------------------------------------------------------------- */
.pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pill {
  padding: 6px 16px; border-radius: var(--radius-full);
  background: #fff; border: 1px solid var(--border-subtle);
  font-size: 13px; font-weight: 500; color: var(--on-surface-variant);
  transition: background-color .15s, color .15s, border-color .15s;
}
.pill:hover { border-color: var(--primary-fixed-dim); color: var(--primary); }
.pill.is-active { background: var(--secondary); border-color: var(--secondary); color: #fff; font-weight: 600; }

/* --------------------------------------------------------------------------
   Empty / message states
   -------------------------------------------------------------------------- */
.empty {
  display: grid; place-items: center; text-align: center;
  padding: 56px 24px;
  border: 1px dashed var(--outline-variant);
  border-radius: var(--radius-md);
  background: #fff;
}
.empty__icon {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--surface-container); color: var(--secondary);
  margin-bottom: 16px;
}
.empty__title { font-family: var(--font-display); font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.empty__text { font-size: 14px; color: var(--on-surface-variant); max-width: 340px; }

.notice {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px; border-radius: var(--radius);
  font-size: 14px; line-height: 20px;
  margin-bottom: 24px;
}
.notice--warn { background: #fff7e6; color: #92400e; border: 1px solid #fde3b0; }
.notice--error { background: var(--error-container); color: var(--on-error-container); }
.notice--info { background: var(--surface-container); color: var(--primary); }
.notice .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero { position: relative; padding: 56px 0 64px; overflow: hidden; }
.hero__deco {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(33, 112, 228, .07), transparent 70%),
    radial-gradient(50% 50% at 90% 20%, rgba(29, 188, 218, .06), transparent 70%);
}
.hero__inner { position: relative; z-index: 1; }
.hero__title { color: var(--primary); text-align: center; }
.hero__sub {
  margin: 16px auto 32px; max-width: 560px; text-align: center;
  color: var(--on-surface-variant); font-size: 16px;
}
.hero__form { max-width: 620px; margin-inline: auto; }

.hero__disclaimer {
  margin: -16px auto 28px; max-width: 620px; text-align: center;
  color: var(--outline); font-size: 13px; line-height: 20px;
}

/* Homepage: tighten every gap above the CTA so the ad below the fold-line on a
   laptop screen is pulled up into the first view. Only the funnel homepage —
   the /track hero keeps its roomier spacing. */
.hero--home { padding: 12px 0 20px; }
.hero--home .hero__title { font-size: 36px; line-height: 42px; }
.hero--home .hero__sub { margin: 10px auto 12px; max-width: 560px; font-size: 13px; line-height: 20px; }
.hero--home .hero__disclaimer { margin: 0 auto 20px; font-size: 12px; line-height: 18px; }
.hero--home .gate { gap: 18px; }
@media (min-width: 768px) {
  .hero--home .hero__title { font-size: 42px; line-height: 48px; }
}

/* --------------------------------------------------------------------------
   Gate — the homepage funnel: carrier picker + big CTA, no input box.
   The input lives on the second screen (a carrier page or /track).
   -------------------------------------------------------------------------- */
.gate {
  max-width: 560px; margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}

.gate__select {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--surface-container);
  padding: 8px 8px 8px 20px;
  border-radius: var(--radius-full);
}
.gate__select > label { font-weight: 600; color: var(--on-surface); font-size: 15px; }

.gate__field { position: relative; display: inline-flex; align-items: center; }
.gate__field select {
  appearance: none; -webkit-appearance: none;
  background: #fff; color: var(--primary);
  border: 1.5px solid var(--secondary);
  border-radius: var(--radius-full);
  padding: 8px 40px 8px 18px;
  font-weight: 600; font-size: 15px; cursor: pointer;
  min-width: 150px;
}
.gate__field select:focus { outline: none; box-shadow: 0 0 0 3px rgba(33,112,228,.25); }
.gate__field > .material-symbols-outlined {
  position: absolute; right: 12px; pointer-events: none;
  color: var(--secondary); font-size: 22px;
}

.btn--cta {
  width: 100%; max-width: 520px;
  padding: 20px 32px;
  background: var(--secondary); color: #fff;
  border-radius: var(--radius-md);
  font-size: 20px; font-weight: 700;
  box-shadow: var(--shadow-medium);
  transition: background-color .15s, transform .1s, box-shadow .15s;
}
.btn--cta:hover { background: var(--primary); box-shadow: var(--shadow-high); }
.btn--cta:active { transform: scale(.99); }

@media (max-width: 560px) {
  .gate__select { width: 100%; justify-content: space-between; }
  .gate__field, .gate__field select { flex: 1; }
  .btn--cta { font-size: 17px; padding: 18px 24px; }
}

/* --------------------------------------------------------------------------
   How it works
   -------------------------------------------------------------------------- */
.steps3 { display: grid; gap: 32px; grid-template-columns: 1fr; position: relative; }
@media (min-width: 768px) { .steps3 { grid-template-columns: repeat(3, 1fr); } }

.how { text-align: center; position: relative; }
.how__icon {
  width: 56px; height: 56px; margin: 0 auto 16px;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: var(--primary); color: #fff;
  position: relative; z-index: 1;
}
.how__title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--on-surface); margin-bottom: 6px; }
.how__text { font-size: 13px; line-height: 20px; color: var(--on-surface-variant); max-width: 260px; margin-inline: auto; }

/* Connector line between the three nodes, desktop only. */
@media (min-width: 768px) {
  .steps3::before {
    content: ""; position: absolute; top: 28px; left: 16.66%; right: 16.66%;
    border-top: 1px dashed var(--outline-variant); z-index: 0;
  }
}

/* --------------------------------------------------------------------------
   Courier landing hero
   -------------------------------------------------------------------------- */
.chero { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; padding: 20px 0; }
@media (min-width: 900px) { .chero { grid-template-columns: 1.1fr .9fr; } }


.chero__badges { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.chero__logo {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--surface-container); color: var(--primary);
}
.chero__logo .material-symbols-outlined { font-size: 18px; }
.chero__title { color: var(--primary); margin-bottom: 8px; }
.chero__text { color: var(--on-surface-variant); font-size: 15px; line-height: 23px; max-width: 520px; margin-bottom: 18px; }
.chero__note { margin-top: 12px; font-size: 12px; color: var(--on-surface-variant); display: flex; align-items: center; gap: 6px; }
.chero__note .material-symbols-outlined { font-size: 14px; }

.chero__art {
  border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-medium);
  background: linear-gradient(135deg, var(--surface-container), var(--surface-low));
  min-height: 220px;
  display: grid; place-items: center;
  color: var(--primary-fixed-dim);
}
.chero__art .material-symbols-outlined { font-size: 72px; }

/* Courier fact sheet */
.facts { display: flex; flex-direction: column; gap: 16px; }
.fact__label { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-surface-variant); font-weight: 700; }
.fact__value { font-size: 14px; color: var(--on-surface); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Cookie consent
   -------------------------------------------------------------------------- */
.cookie-bar {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  max-width: 720px; margin-inline: auto;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--inverse-surface); color: var(--inverse-on-surface);
  border-radius: var(--radius-md); box-shadow: var(--shadow-high);
  padding: 16px 20px;
}
@media (min-width: 620px) { .cookie-bar { flex-direction: row; align-items: center; justify-content: space-between; } }
.cookie-bar__text { font-size: 13px; line-height: 20px; }
.cookie-bar__text a { color: var(--primary-fixed-dim); text-decoration: underline; }
.cookie-bar__actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie-bar__actions .btn--ghost { background: transparent; color: var(--inverse-on-surface); }
.cookie-bar__actions .btn--ghost:hover { background: rgba(255,255,255,.12); }

/* --------------------------------------------------------------------------
   Guides / help center
   -------------------------------------------------------------------------- */
.guide-card {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); box-shadow: var(--shadow-low);
  padding: 20px; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.guide-card:hover { box-shadow: var(--shadow-medium); transform: translateY(-2px); border-color: var(--primary-fixed-dim); }
.guide-card__icon {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--surface-container); color: var(--primary);
}
.guide-card--feat { background: linear-gradient(135deg, var(--surface-low), #fff); }
.guide-card__cat { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--secondary); }
.guide-card__title { font-family: var(--font-display); font-size: 16px; line-height: 22px; font-weight: 600; color: var(--primary); margin: 4px 0; }
.guide-card__excerpt { font-size: 13px; line-height: 20px; color: var(--on-surface-variant); margin-bottom: 8px; }
.guide-card__meta { font-size: 12px; color: var(--outline); }

.crumbs { font-size: 13px; color: var(--on-surface-variant); margin-bottom: 16px; }
.crumbs a { color: var(--secondary); }
.crumbs span { margin: 0 6px; color: var(--outline-variant); }

.guide-cta {
  max-width: 760px; margin: 24px auto 0;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  background: var(--primary-container); color: #fff;
  border-radius: var(--radius-lg); padding: 24px 28px;
}
@media (min-width: 620px) { .guide-cta { flex-direction: row; align-items: center; justify-content: space-between; } }
.guide-cta__title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.guide-cta__text { color: var(--on-primary-container); font-size: 14px; margin-top: 2px; }

.related { max-width: 760px; margin: 40px auto 0; }
.related__title { font-family: var(--font-display); font-size: 20px; color: var(--primary); margin-bottom: 16px; }

/* --------------------------------------------------------------------------
   Content / legal pages
   -------------------------------------------------------------------------- */
.page { padding: 48px 0 64px; }
.page__header { max-width: 760px; margin: 0 auto 32px; }
.page__title { font-family: var(--font-display); font-size: 32px; line-height: 40px; font-weight: 700; color: var(--primary); }
.page__sub { margin-top: 8px; color: var(--on-surface-variant); font-size: 15px; }
.page__updated { margin-top: 8px; font-size: 13px; color: var(--outline); }

.prose {
  max-width: 760px; margin-inline: auto;
  background: #fff; border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-low);
  padding: 32px;
}
@media (min-width: 768px) { .prose { padding: 48px; } }
.prose h2 { font-family: var(--font-display); font-size: 20px; line-height: 28px; color: var(--primary); margin: 32px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 16px; font-weight: 600; color: var(--on-surface); margin: 20px 0 8px; }
.prose p { color: var(--on-surface-variant); font-size: 15px; line-height: 25px; margin-bottom: 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; list-style: disc; }
.prose li { color: var(--on-surface-variant); font-size: 15px; line-height: 24px; margin-bottom: 6px; }
.prose a { color: var(--secondary); }
.prose a:hover { text-decoration: underline; }
.prose strong { color: var(--on-surface); }
.prose .lead { font-size: 17px; line-height: 27px; color: var(--on-surface); }

.contact-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface-low); border-radius: var(--radius-md);
  padding: 18px 20px; margin: 8px 0 20px;
}
.contact-card .material-symbols-outlined { color: var(--secondary); font-size: 28px; }
.contact-card a { font-family: var(--font-mono); font-size: 15px; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { margin-top: auto; background: var(--surface-container); border-top: 1px solid var(--border-subtle); }
.footer__grid {
  display: grid; gap: var(--gutter); padding: 48px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer__brand { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--primary); margin-bottom: 12px; }
.footer__text { font-size: 13px; line-height: 20px; color: var(--on-surface-variant); margin-bottom: 20px; max-width: 320px; }
.footer__title { font-weight: 700; color: var(--primary); margin-bottom: 14px; font-size: 14px; }
.footer__nav { display: flex; flex-direction: column; gap: 8px; }
.footer__nav a { font-size: 13px; color: var(--on-surface-variant); }
.footer__nav a:hover { text-decoration: underline; }

.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 32px; height: 32px; border-radius: var(--radius-full);
  display: grid; place-items: center;
  background: #fff; color: var(--primary);
  box-shadow: var(--shadow-low);
  transition: background-color .15s, color .15s;
}
.footer__social a:hover { background: var(--secondary); color: #fff; }
.footer__social .material-symbols-outlined { font-size: 16px; }

.footer__bottom {
  border-top: 1px solid rgba(0, 0, 0, .06);
  padding: 20px 0; text-align: center;
  font-size: 13px; color: var(--on-surface-variant);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.mono { font-family: var(--font-mono); letter-spacing: .05em; }
