:root {
  --red: #e12019;
  --navy: #0a1a44;
  --ink: #2b2b2b;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Archivo", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand { text-decoration: none; display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.brand-run { color: var(--red); font-weight: 800; font-size: 28px; letter-spacing: 1px; }
.brand-way { color: var(--navy); font-weight: 800; font-size: 28px; letter-spacing: 1px; }
.brand small { width: 100%; color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.login { color: var(--navy); text-decoration: none; font-weight: 600; }
.login:hover { color: var(--red); }

/* ---------- search band ---------- */
.search {
  background: var(--navy);
  padding: 48px 24px;
}
#form {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  gap: 24px;
}
#trackno {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  font-size: 18px;
  border: 0;
  border-radius: 2px;
  outline: none;
}
#trackno:focus { box-shadow: 0 0 0 3px rgba(225, 32, 25, .5); }
#btn {
  height: 52px;
  padding: 0 28px;
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  background: var(--red);
  border: 0;
  border-radius: 3px;
  cursor: pointer;
}
#btn:hover { background: #bf1812; }
#btn:disabled { opacity: .6; cursor: wait; }

/* ---------- content ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 16px 60px; min-height: 40vh; }

.message {
  text-align: center;
  font-size: 18px;
  padding: 16px;
  border-radius: 4px;
  background: #fff4f3;
  color: #9b1c15;
  border: 1px solid #f3c6c3;
}
.message.info { background: #f1f5ff; color: var(--navy); border-color: #c9d6f5; }

/* ---------- progress bar ---------- */
.progress {
  list-style: none;
  margin: 12px 0 32px;
  padding: 0;
  display: flex;
  position: relative;
}
.progress li {
  flex: 1;
  text-align: center;
  font-size: 20px;
  color: #444;
  position: relative;
  padding-top: 0;
}
.progress li .dot {
  display: block;
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: #cfd4e0;
  border: 8px solid #e8ebf2;
  position: relative;
  z-index: 2;
}
.progress li::after {            /* the line between dots, through their centres */
  content: "";
  position: absolute;
  left: 50%;
  right: -50%;
  top: 15px;
  height: 8px;
  background: #cfd4e0;
  z-index: 1;
}
.progress li:last-child::after { display: none; }
.progress li.done .dot { background: var(--red); border-color: var(--navy); }
.progress li.done::after { background: var(--navy); }
.progress li.current { color: var(--red); font-weight: 700; }

/* ---------- headings ---------- */
.section-title { text-align: center; color: #1f4aa8; font-size: 22px; margin: 12px 0 8px; }
.tracking-number { text-align: center; color: var(--red); font-size: 34px; margin: 8px 0 24px; }
.history-title { text-align: center; color: var(--red); font-size: 28px; margin: 36px 0 4px; }
.history-sub { text-align: center; color: #1f4aa8; font-size: 20px; margin: 0 0 16px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 18px; }
th, td { padding: 14px 16px; border: 1px solid var(--line); text-align: center; }
th { background: #f6f7f9; font-weight: 700; }
table.summary td { vertical-align: middle; }
table.history tbody tr:nth-child(odd) { background: #f1f1f1; }
.red { color: var(--red); font-size: 20px; }

/* ---------- footer ---------- */
.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 24px 16px; border-top: 1px solid var(--line); }

/* ---------- mobile ---------- */
@media (max-width: 700px) {
  #form { flex-direction: column; gap: 12px; }
  #trackno { flex: none; width: 100%; }
  .search { padding: 28px 16px; }
  .progress li { font-size: 13px; }
  .progress li .dot { width: 26px; height: 26px; border-width: 5px; margin-bottom: 8px; }
  .progress li::after { height: 5px; top: 11px; }
  .tracking-number { font-size: 24px; }
  table { font-size: 14px; }
  th, td { padding: 10px 8px; }
}
