@font-face {
  font-family: "AS Stencil";
  src: url("fonts/stencil-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face { font-family: "Archivo"; src: url("fonts/archivo-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("fonts/archivo-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --harbor: #10343b;
  --harbor-2: #1b4c55;
  --steel: #e8eef0;
  --surface: #ffffff;
  --text: #13242a;
  --muted: #55686e;
  --line: #cbd6d9;
  --crane: #f2b90f;
  --crane-deep: #d9a400;
  --ok: #26734f;
  --warn: #9a5200;
  --danger: #b3261e;
  --focus: #0a6cff;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --stencil: "AS Stencil", "Archivo", Impact, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 2.4414rem;
  --step-4: clamp(3rem, 7vw + 1rem, 6.2rem);

  --radius-plate: 6px;
  --radius-field: 4px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.5;
  color: var(--text);
  background: var(--steel);
}

a { color: var(--harbor-2); text-underline-offset: 2px; }
a:hover { color: var(--harbor); }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-field);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: inherit;
}
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name {
  font-family: var(--stencil);
  font-weight: 800;
  font-size: 1.65rem;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Form controls */
label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: 0.35rem; }

input[type="text"], input[type="password"], input[type="search"], input[type="date"],
input[type="datetime-local"], select, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-field);
  padding: 0.7rem 0.8rem;
  min-height: 2.9rem;
}
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--harbor-2); }

.hint { font-size: var(--step--1); color: var(--muted); margin: 0.35rem 0 0; }
.hint.is-warn { color: var(--warn); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: var(--radius-field);
  padding: 0.8rem 1.3rem;
  min-height: 2.9rem;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--crane); color: #1d1600; }
.btn-primary:hover { background: var(--crane-deep); }
.btn-dark { background: var(--harbor); color: #fff; }
.btn-dark:hover { background: var(--harbor-2); color: #fff; }
.btn-ghost { background: transparent; color: var(--harbor); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--harbor-2); }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid #e4b9b6; }
.btn-danger:hover { border-color: var(--danger); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* Container number, painted the way it appears on a container door */
.cn {
  font-family: var(--stencil);
  font-weight: 800;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.28em;
  line-height: 1;
  white-space: nowrap;
}
.cn-check {
  display: inline-block;
  border: 0.09em solid currentColor;
  padding: 0.06em 0.16em 0.02em;
  line-height: 1;
}

.status-pill {
  display: inline-block;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: #dbe7ea;
  color: var(--harbor);
  white-space: nowrap;
}
.status-pill[data-stage="in_transit"], .status-pill[data-stage="loaded"] { background: #fff1c2; color: #4a3a00; }
.status-pill[data-stage="arrived"] { background: #d7ecf5; color: #0f4560; }
.status-pill[data-stage="delivered"] { background: #d6efe2; color: var(--ok); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
