@font-face {
  font-family: "Noto Sans";
  src: url("./assets/NotoSans-Regular.woff") format("woff");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("./assets/NotoSans-Bold.woff") format("woff");
  font-weight: 650 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("./assets/NotoSerif-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}

body {
  color-scheme: light;
  --ink: #14291e;
  --muted: #52665a;
  --line: #d9e6dc;
  --forest: #102b1d;
  --paper: #fff;
  --accent: #006c39;
  --accent-soft: #e8f5ec;
  --serif: "Noto Serif", Georgia, serif;
  font-family: "Noto Sans", sans-serif;
  color: var(--ink);
  background: #f4f8f4;
}
:focus-visible { outline-color: #187848; }
.sidebar { border-color: #234532; }
.brand,
.side-footer { border-color: #35523f; }
.brand small,
.workspace-label,
.nav-label { color: #c3d8c8; }
.nav-link { color: #eef7ef; }
.nav-link:hover { background: #234832; }
.nav-link.active {
  color: #f3fdf1;
  background: #27583b;
  border-color: #3c6e4e;
}
.nav-link.active::before { background: #aee38c; }
.top {
  background: var(--paper);
  border-color: var(--line);
}
.avatar,
.demo-label {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: #d2e6d7;
}
.unread { background: var(--accent); border-color: white; }
.icon-btn,
.btn.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink);
}
.icon-btn:hover,
.btn.secondary:hover { background: var(--accent-soft); border-color: #a7cdb4; }
.btn.primary { background: var(--accent); color: white; }
.btn.primary:hover { background: #00572d; }
.btn.light { background: var(--accent-soft); color: var(--accent); border-color: #d2ead8; }
.btn.light:hover { background: #d8efdf; }
.rowbutton { color: var(--accent); }
.side-close { background: #234832; color: #fff; border-color: #3c6e4e; }
.side-close:hover { background: #27583b; }
.overlay.open { background: #102b1d78; }
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.045em;
}
h2 { font-size: 1.32rem; }
main { padding-top: clamp(22px, 4vw, 48px); }
.page { animation: none; }
.manifest-enter .manifest-head,
.manifest-enter .manifest-board {
  animation: page-in .34s ease-out both;
}
.manifest-enter .manifest-board { animation-delay: .08s; }
.manifest-head {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 22px;
  min-height: 215px;
  margin-bottom: 0;
  padding: clamp(20px, 3.5vw, 42px);
  border-radius: 14px 14px 0 0;
  color: #f6fff3;
  background: #103523;
}
.manifest-head::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0 0 0 34%;
  background: url('./assets/lagos.webp') 74% 44% / cover no-repeat;
  filter: grayscale(1) invert(1) contrast(1.23);
  opacity: .4;
}
.manifest-head::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #103523 24%, #103523ee 48%, #3d875035 86%),
              linear-gradient(0deg, #103523ab, transparent 72%);
}
.manifest-head h1 {
  font-size: clamp(2.4rem, 5.1vw, 4.8rem);
  line-height: 1.06;
  margin-bottom: 21px;
}
.manifest-date {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: #c9e7cf;
  font-size: .83rem;
  font-weight: 700;
}
.manifest-date span { border-left: 1px solid #63876b; padding-left: 7px; }
.manifest-head .btn.primary { background: #d4f49d; color: #1e371e; }
.manifest-head .btn.primary:hover { background: #e6f9ba; }
.manifest-head .btn.secondary {
  color: #f6fff3;
  background: #17412a;
  border-color: #77a481;
}
.manifest-head .btn.secondary:hover { background: #2a6240; }
.manifest-signal {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 17px;
  min-width: 204px;
  background: #123621e8;
  border: 1px solid #8cc296;
  border-radius: 9px;
  box-shadow: 0 8px 35px #09241343;
}
.manifest-signal-icon {
  display: grid;
  place-items: center;
  min-width: 33px;
  height: 33px;
  color: #ffe0a4;
  border: 1px solid #a57056;
  border-radius: 7px;
}
.manifest-signal-label { color: #c4e1c8; display: block; font-size: .79rem; }
.manifest-signal strong { font-size: 1.05rem; display: block; }
.signal-link {
  color: #dcf6ca;
  background: none;
  border: 0;
  padding: 4px 0;
  min-height: 32px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.signal-link:hover { color: white; }
.manifest-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  background: #e7f2e8;
  margin-bottom: 25px;
}
.manifest-metric {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  column-gap: 12px;
  row-gap: 4px;
  min-height: 100px;
  min-width: 0;
  padding: 12px clamp(10px, 1.3vw, 20px);
}
.manifest-metric + .manifest-metric { border-left: 1px solid #d1e6d4; }
.manifest-metric:hover { background: #d9eddd; }
.manifest-metric:focus-visible { outline-offset: -3px; }
.manifest-metric strong {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  font: 2.4rem/1 var(--serif);
  color: var(--accent);
  font-variant-numeric: lining-nums tabular-nums;
}
.manifest-metric-label { display: flex; align-items: center; gap: 5px; font-weight: 700; font-size: .88rem; }
.manifest-metric-label .icon { width: .95rem; height: .95rem; color: var(--accent); }
.manifest-metric small { font-size: .79rem; }
.manifest-board,
.manifest-records { display: grid; gap: 18px; }
.manifest-board { grid-template-columns: minmax(0, .95fr) minmax(0, 1.35fr); margin-bottom: 18px; }
.manifest-records { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.card { border-radius: 11px; box-shadow: 0 3px 12px #153d2508; }
.card-head { min-height: 70px; padding: 12px 16px; }
.queue-title { padding: 19px 16px 11px; }
.queue-total {
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
  font-size: .81rem;
  white-space: nowrap;
}
.queue-filters {
  margin: 0;
  padding: 0 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  gap: 16px;
  background: transparent;
}
.queue-filters button {
  flex: none;
  min-height: 44px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  font-size: .86rem;
}
.queue-filters button:hover,
.queue-filters button[aria-pressed=true] {
  color: var(--accent);
  background: transparent;
  border-bottom-color: var(--accent);
}
.queue-filters span { color: var(--accent); font-size: inherit; }
.queue-list { padding: 0; max-height: 386px; }
.queue-list li {
  padding: 8px 15px;
  border-color: var(--line);
  min-height: 66px;
}
.queue-list li.needs-attention { background: #fff5e8; border-radius: 0; }
.queue-icon,
.tile-icon {
  background: var(--accent-soft);
  color: var(--accent);
  border: 0;
}
.needs-attention .queue-icon,
.tile-icon.amber { background: #fbe8cb; color: #884e13; }
.queue-info strong { font-size: .91rem; }
.queue-info small,
.queue-meta .pill { font-size: .78rem; }
.queue-trip:hover strong { color: var(--accent); text-decoration: underline; }
.queue-pin[aria-pressed=true] { border-color: var(--accent); color: var(--accent); }

.manifest-map .map { border-radius: 0; height: 295px; }
.map-layer { background: #dbe9e9; }
.map-layer::before { display: none; }
img.map-art { filter: saturate(.85) contrast(.97); opacity: 1; }
.overview-map:has(.map-focus) .map-layer { mask-image: none; }
.map-art .route { stroke: #137943; stroke-width: 3.5; filter: none; }
.map-marker {
  color: white;
  background: #006c39;
  border-color: white;
  box-shadow: 0 2px 8px #183b2942;
}
.map-marker:hover,
.map-marker[aria-pressed=true] { box-shadow: 0 0 0 4px #006c3944, 0 2px 8px #183b2942; }
.map-marker.stale { color: #4b2b0a; background: #ffce82; }
.map-marker.depot { color: white; background: #405c76; }
.overview-map .map-legend {
  left: 12px;
  right: auto;
  top: 12px;
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}
.map-legend .dot { background: var(--accent); }
.map-legend .dot.warn { background: #ab651d; }
.attribution { color: #25392c; background: #fffffff0; }
.map-focus {
  position: static;
  min-height: 62px;
  max-width: none;
  margin: 0;
  padding: 8px 13px;
  background: white;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.map-focus .pill { margin-left: auto; }
.map-focus-icon { background: var(--accent-soft); color: var(--accent); }
.map-focus a,
.map-focus small { color: var(--ink); }
.data-table th { color: var(--muted); background: #f0f7f1; }
.data-table tbody tr:hover { background: #f4faf4; }
.activity li { border-color: var(--line); }
.pill { color: #365043; background: #e8f1eb; }
.pill.green { color: #245b3c; background: #e8f3ea; }
.pill.amber { color: #744108; background: #ffebca; }
.pill.blue { color: #355678; background: #e8eff7; }
.pill.red { color: #8b3246; background: #f9e6eb; }

dialog { background: white; border-color: var(--line); color: var(--ink); }
dialog::backdrop { background: #102b1d78; }
.skip { background: white; color: var(--accent); }

@media (max-width: 1200px) {
  .manifest-metric-label .icon { display: none; }
}
@media (max-width: 1020px) and (min-width: 891px), (max-width: 790px) {
  .manifest-board, .manifest-records { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 690px) {
  .manifest-head { gap: 17px; }
  .manifest-head::before { inset-inline-start: 0; }
  .manifest-head::after { background: linear-gradient(90deg, #103523f4 10%, #10352380); }
  .manifest-head h1 { margin-bottom: 16px; }
  .manifest-signal { width: 100%; }
  .manifest-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .manifest-metric:last-child { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .manifest-board, .manifest-records { gap: 13px; }
  .manifest-map .map { height: 300px; }
}
@media (max-width: 390px) {
  .queue-list li { padding-inline: 10px; }
  .queue-icon { display: none; }
}
