@font-face {
  font-family: "Urbanist";
  src: url("fonts/urbanist-zoum.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --canvas: #F7EEDA;
  --raised: #FFFCF5;
  --surface: #F3E3BF;
  --fg: #340404;
  --muted: #5C3A33;
  --line: #D9C79F;
  --danger: #F47A36;
  --on-danger: #1A0202;
  --accent: var(--fg);
  --font: "Urbanist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #1A0606;
    --raised: #270B0A;
    --surface: #331312;
    --fg: #F3E3BF;
    --muted: #DCC6A6;
    --line: #5A3A2F;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--fg);
  font: 400 1rem/1.5 var(--font);
}
h1, h2, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

.demo {
  background: var(--fg);
  color: var(--canvas);
  text-align: center;
  font-weight: 700;
  font-size: .875rem;
  padding: .5rem 1rem;
}
.demo[hidden] { display: none; }

.head {
  border-top: 6px solid var(--accent);
  padding: 1.25rem 1rem 0;
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
}
.carrier {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

main {
  flex: 1;
  width: 100%;
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}
.muted { color: var(--muted); }
.small { font-size: .875rem; }

h1 { font-size: 1.75rem; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
h2 { font-size: .8125rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: .375rem; }

.cargo { margin-top: .25rem; font-size: 1.0625rem; overflow-wrap: anywhere; }
.status { margin-top: 1rem; font-size: 2.25rem; line-height: 1.1; font-weight: 800; }
.status[data-s="cancelled"] { text-decoration: line-through; text-decoration-thickness: 2px; }

.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.route {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  font-size: 1.125rem;
  font-weight: 700;
}
.route .arrow { color: var(--muted); font-weight: 400; }

.steps {
  display: flex;
  margin-top: 1rem;
}
.steps li {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .375rem;
  text-align: center;
  font-size: .75rem;
  line-height: 1.2;
  color: var(--muted);
  hyphens: auto;
}
.steps li::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--fg);
  background: var(--raised);
  position: relative;
  z-index: 1;
}
.steps li::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.steps li:last-child::after { display: none; }
.steps li.done { color: var(--fg); }
.steps li.done::before { background: var(--fg); }
.steps li.done::after { background: var(--fg); }
.steps li.current { color: var(--fg); font-weight: 800; }
.steps li.current::before { background: var(--fg); box-shadow: 0 0 0 4px var(--surface); }
@media (prefers-reduced-motion: no-preference) {
  .steps li.current::before { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { box-shadow: 0 0 0 7px var(--surface); } }
}

.eta { font-size: 1.25rem; font-weight: 700; overflow-wrap: anywhere; }
.eta + p { margin-top: .25rem; }

.pos-name { font-size: 1.0625rem; font-weight: 700; }
.pos-note { margin-top: .5rem; }

.miles { display: grid; gap: .625rem; }
.miles li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.miles time { color: var(--muted); font-size: .875rem; text-align: right; flex: none; }
.miles b { font-weight: 700; }

.handover { font-size: 1.0625rem; font-weight: 700; overflow-wrap: anywhere; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: .75rem;
  min-height: 44px;
  padding: .625rem 1.25rem;
  border-radius: 999px;
  background: var(--fg);
  color: var(--canvas);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
a.btn:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }
.btn.disabled { background: var(--surface); color: var(--muted); border: 1px dashed var(--line); cursor: not-allowed; }
.proof-note { margin-top: .5rem; }

.updated { margin-top: 1.25rem; }

.stop h1 { font-size: 1.375rem; }
.stop p { margin-top: .5rem; }
.stop .notice { margin-top: 1rem; }

.error {
  margin-top: 1rem;
  background: var(--danger);
  color: var(--on-danger);
  border-radius: 12px;
  padding: 1.25rem 1rem;
}
.error h1 { font-size: 1.375rem; }
.error p { margin-top: .5rem; font-size: 1.0625rem; }
.notice {
  margin-top: 1rem;
  border: 2px solid var(--danger);
  border-radius: 12px;
  padding: .625rem .875rem;
  font-size: .9375rem;
}
button {
  margin-top: 1rem;
  font: inherit;
  font-weight: 700;
  background: var(--on-danger);
  color: #F3E3BF;
  border: 0;
  border-radius: 999px;
  padding: .625rem 1.25rem;
  min-height: 44px;
  cursor: pointer;
}
button:focus-visible { outline: 3px solid var(--fg); outline-offset: 3px; }

.foot {
  max-width: 40rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .8125rem;
}
.foot p + p { margin-top: .125rem; }
