:root {
  --color-black: #111111;
  --color-text: #1a1a1a;
  --color-muted: #767676;
  --color-border: #e5e5e5;
  --color-bg-soft: #f7f7f7;
  --color-danger-bg: #f2f2f2;
  --font-sans: "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* Promo bar */
.promo-bar {
  background: var(--color-black);
  color: #ffffff;
  font-size: 12px;
  letter-spacing: 0.03em;
  display: flex;
  justify-content: center;
  gap: 48px;
  padding: 8px 16px;
  flex-wrap: wrap;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--color-border);
}

.site-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.25em;
  white-space: nowrap;
}

.search-bar {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 8px 16px;
}

.search-bar input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.search-bar button {
  border: none;
  background: none;
  display: flex;
  color: var(--color-muted);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
}

.account-link {
  font-size: 12px;
  line-height: 1.4;
  color: var(--color-muted);
}

.account-link strong {
  color: var(--color-text);
}

.site-header__actions button {
  border: none;
  background: none;
  color: var(--color-text);
  display: flex;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  flex-wrap: wrap;
}

/* Tracking hero */
.tracking-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.tracking-hero {
  text-align: center;
}

.tracking-hero h1 {
  font-size: 32px;
  margin: 0 0 8px;
}

.tracking-hero p {
  color: var(--color-muted);
  font-size: 14px;
  margin: 0 0 32px;
}

.tracking-form {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 560px;
  margin: 0 auto;
}

.tracking-form input {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid var(--color-border);
  border-radius: 24px 0 0 24px;
  border-right: none;
  font-size: 14px;
  outline: none;
}

.tracking-form button {
  padding: 14px 28px;
  background: var(--color-black);
  color: #ffffff;
  border: none;
  border-radius: 0 24px 24px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tracking-hero__help {
  margin-top: 16px;
  font-size: 13px;
  color: var(--color-muted);
}

.tracking-hero__help a {
  font-weight: 700;
  text-decoration: underline;
}

/* Results */
.tracking-result {
  margin-top: 48px;
}

.tracking-result--hidden {
  display: none;
}

.loading-text {
  text-align: center;
  color: var(--color-muted);
}

.delivery-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.delivery-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
}

.delivery-card--eta {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.delivery-card--details {
  flex: 1;
  min-width: 320px;
}

.icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
}

.icon-circle--muted {
  color: var(--color-muted);
}

.label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  margin-bottom: 4px;
}

.eta-date {
  font-size: 18px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}

.details-grid strong {
  font-size: 15px;
}

/* Stepper */
.stepper {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.stepper__step {
  flex: 1;
  text-align: center;
  position: relative;
}

.stepper__icon {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  border: 2px solid var(--color-border);
}

.stepper__step::before {
  content: "";
  position: absolute;
  top: 17px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--color-border);
  z-index: -1;
}

.stepper__step:first-child::before {
  content: none;
}

.stepper__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-muted);
}

.stepper__step--done .stepper__icon,
.stepper__step--current .stepper__icon {
  background: var(--color-black);
  border-color: var(--color-black);
}

.stepper__step--done::before,
.stepper__step--current::before {
  background: var(--color-black);
}

.stepper__step--done .stepper__label,
.stepper__step--current .stepper__label {
  color: var(--color-text);
}

/* History */
.history-title {
  font-size: 20px;
  margin: 40px 0 16px;
}

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}

.history-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--color-border);
  font-size: 14px;
  color: var(--color-muted);
}

.history-list li:last-child {
  border-bottom: none;
}

.history-list li::before {
  content: "○";
  margin-right: 12px;
  font-size: 10px;
}

.history-list li.history-list__item--latest {
  color: var(--color-text);
  font-weight: 700;
}

.history-list li.history-list__item--latest::before {
  content: "●";
}

.history-list .history-date {
  white-space: nowrap;
  font-weight: 400;
  color: var(--color-muted);
}

/* Not found */
.notfound-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 56px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.notfound-card h2 {
  margin: 8px 0 0;
  font-size: 22px;
}

.notfound-card p {
  color: var(--color-muted);
  max-width: 420px;
  margin: 0;
}

.notfound-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1px solid var(--color-black);
}

.btn--primary {
  background: var(--color-black);
  color: #ffffff;
}

.btn--outline {
  background: #ffffff;
  color: var(--color-text);
}

/* Footer */
.site-footer {
  background: var(--color-bg-soft);
  padding: 48px 32px 0;
}

.site-footer__brand {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.social-icons {
  display: flex;
  gap: 12px;
}

.social-icons a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-text);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.site-footer__columns {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1.6fr;
  gap: 24px;
  padding: 32px 0;
}

.footer-column h3 {
  font-size: 14px;
  margin: 0 0 16px;
}

.footer-column a {
  display: block;
  font-size: 13px;
  color: var(--color-muted);
  margin-bottom: 10px;
}

.footer-column--newsletter p {
  font-size: 13px;
  color: var(--color-muted);
  margin: 0 0 16px;
}

.newsletter-input {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 4px 4px 4px 16px;
  background: #ffffff;
}

.newsletter-input input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 13px;
  background: transparent;
}

.newsletter-input button {
  border: none;
  background: var(--color-black);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.site-footer__bottom {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 12px;
  color: var(--color-muted);
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 860px) {
  .site-header__top {
    flex-wrap: wrap;
  }

  .site-nav {
    gap: 16px;
  }

  .details-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stepper {
    flex-wrap: wrap;
  }

  .stepper__step {
    flex: 0 0 33.33%;
    margin-bottom: 16px;
  }

  .site-footer__columns {
    grid-template-columns: repeat(2, 1fr);
  }
}
