@font-face {
  font-family: "Oswald";
  src: url("assets/oswald.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Work Sans";
  src: url("assets/work-sans.ttf") format("truetype");
  font-display: swap;
}

:root {
  --paper: #dce8e2;
  --paper-light: #edf4ef;
  --ink: #132e2c;
  --ink-soft: #45635e;
  --navy: #102c3b;
  --white: #f6faf6;
  --line: #9bb3aa;
  --acid: #d9f04e;
  --orange: #f36d3d;
  --blue: #3b86ee;
  --red: #e8483f;
  --green: #268d68;
  --focus: #132e2c;
  --display: "Oswald", sans-serif;
  --body: "Work Sans", sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(rgba(19, 46, 44, .035) 1px, transparent 1px),
    var(--paper);
  background-size: 100% 8px;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
}

::selection { color: var(--white); background: var(--ink); }

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

button, input, select { font: inherit; }
button, select { cursor: pointer; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--navy);
  transform: translateY(-160%);
}
.skip-link:focus { transform: translateY(0); }

.masthead {
  height: 80px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(19, 46, 44, .55);
}

.brand {
  width: max-content;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.02em;
  text-decoration: none;
  text-transform: uppercase;
}

.brand-mark { width: 37px; height: 37px; fill: none; stroke: currentColor; stroke-width: 2.5; }
.brand-mark circle { fill: var(--acid); }

.masthead-note {
  margin: 0;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.live-signal {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.signal-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(38, 141, 104, .14);
}

main { overflow: clip; }

.control-deck {
  min-height: 290px;
  padding: 48px clamp(22px, 4vw, 64px) 50px;
  display: grid;
  grid-template-columns: minmax(340px, 1.1fr) minmax(480px, .9fr);
  gap: 7vw;
  align-items: end;
  background: var(--paper-light);
  border-bottom: 1px solid var(--ink);
}

.intro { display: flex; align-items: end; gap: clamp(28px, 4vw, 72px); }

.intro h1 {
  max-width: 620px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(65px, 7vw, 96px);
  font-weight: 560;
  line-height: .89;
  letter-spacing: -.04em;
  text-transform: uppercase;
}

.intro p {
  max-width: 250px;
  margin: 0 0 7px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.45;
}

.controls {
  display: grid;
  grid-template-columns: minmax(250px, 1.7fr) minmax(185px, 1fr);
  gap: 16px;
}

.control-field > span:first-child,
.route-control label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.input-wrap, .select-wrap, .status-select-wrap { position: relative; display: block; }

.input-wrap input,
.select-wrap select {
  width: 100%;
  height: 55px;
  border: 1px solid var(--ink);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  appearance: none;
  transition: background-color 160ms ease-out;
}

.input-wrap input { padding: 0 45px 0 48px; caret-color: var(--orange); }
.select-wrap select { padding: 0 43px 0 16px; }
.input-wrap input:hover, .select-wrap select:hover { background: #fff; }
.input-wrap input::placeholder { color: #657e78; opacity: 1; }

.input-wrap > svg, .select-wrap > svg, .status-select-wrap > svg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.input-wrap > svg { left: 17px; width: 20px; }
.select-wrap > svg, .status-select-wrap > svg { right: 14px; width: 19px; }

kbd {
  position: absolute;
  top: 50%; right: 14px;
  transform: translateY(-50%);
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  background: var(--paper-light);
  font: 600 12px var(--body);
}

.route-map {
  position: relative;
  padding: 0 clamp(22px, 4vw, 64px);
  min-height: 124px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: stretch;
  color: var(--white);
  background: var(--navy);
}

.route-line {
  position: absolute;
  top: 46px;
  left: calc(clamp(22px, 4vw, 64px) + 10%);
  right: calc(clamp(22px, 4vw, 64px) + 10%);
  height: 2px;
  background: rgba(246,250,246,.3);
}

.route-line::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--acid);
  transform: scaleX(.25);
  transform-origin: left;
  transition: transform 430ms cubic-bezier(.16,1,.3,1);
}

.route-map[data-route="in-progress"] .route-line::after { transform: scaleX(.5); }
.route-map[data-route="blocked"] .route-line::after { transform: scaleX(.75); }
.route-map[data-route="done"] .route-line::after { transform: scaleX(1); }
.route-map[data-route="all"] .route-line::after { transform: scaleX(.08); }

.route-stop {
  position: relative;
  z-index: 1;
  padding: 29px 10px 17px;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: center;
}

.route-stop::after {
  content: "";
  position: absolute;
  inset: auto 20% 0;
  height: 3px;
  background: var(--acid);
  transform: scaleX(0);
  transition: transform 180ms ease-out;
}
.route-stop:hover::after, .route-stop.is-active::after { transform: scaleX(1); }

.stop-node {
  width: 14px; height: 14px;
  margin: 10px auto 12px;
  display: block;
  border: 3px solid var(--navy);
  border-radius: 50%;
  outline: 2px solid rgba(246,250,246,.85);
  background: var(--navy);
  transition: transform 220ms cubic-bezier(.16,1,.3,1), background 160ms ease-out;
}
.route-stop:hover .stop-node, .route-stop.is-active .stop-node { transform: scale(1.3); }
.route-stop.is-active .stop-node { background: var(--acid); }

.stop-name { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.route-stop strong { margin-top: 1px; display: block; font: 500 24px var(--display); }

.queue-section { padding: 42px clamp(22px, 4vw, 64px) 96px; }

.queue-header {
  margin-bottom: 30px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.queue-header h2 {
  margin: 0;
  font: 560 clamp(36px, 4vw, 55px)/1 var(--display);
  letter-spacing: -.025em;
  text-transform: uppercase;
}

.queue-header p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }

.queue-key { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.queue-key i { width: 9px; height: 9px; border-radius: 50%; }
.key-high { background: var(--orange); }
.key-other { border: 1px solid var(--ink-soft); }

.queue-labels {
  padding: 0 66px 9px 54px;
  display: grid;
  grid-template-columns: minmax(360px, 1.65fr) minmax(130px, .7fr) minmax(90px, .45fr) minmax(120px, .5fr);
  gap: 20px;
  border-bottom: 1px solid var(--ink);
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.task-list { margin: 0; padding: 0; list-style: none; }

.task-item {
  --status: var(--blue);
  position: relative;
  min-height: 93px;
  padding: 0 66px 0 54px;
  display: grid;
  grid-template-columns: minmax(360px, 1.65fr) minmax(130px, .7fr) minmax(90px, .45fr) minmax(120px, .5fr);
  gap: 20px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: rgba(246,250,246,0);
  transition: background-color 180ms ease-out, padding-left 220ms cubic-bezier(.16,1,.3,1);
  animation: dispatch-in 440ms cubic-bezier(.16,1,.3,1) both;
  animation-delay: calc(var(--order) * 28ms);
}

.task-item:hover, .task-item:focus-within { padding-left: 64px; background: rgba(246,250,246,.67); }
.task-item[data-status="todo"] { --status: var(--blue); }
.task-item[data-status="in-progress"] { --status: var(--orange); }
.task-item[data-status="blocked"] { --status: var(--red); }
.task-item[data-status="done"] { --status: var(--green); }

.rail {
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 18px;
}
.rail::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.rail i { position: absolute; left: 3px; top: calc(50% - 5px); width: 11px; height: 11px; border: 2px solid var(--paper); border-radius: 50%; background: var(--status); outline: 1px solid var(--status); }

.task-main { min-width: 0; display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: center; }
.task-number { color: var(--ink-soft); font: 500 12px var(--display); font-variant-numeric: tabular-nums; }
.open-item {
  max-width: 100%;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  font: 560 20px/1.25 var(--display);
  letter-spacing: -.012em;
  text-align: left;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-underline-offset: 5px;
  transition: text-decoration-color 160ms ease-out;
}
.open-item:hover { text-decoration-color: var(--ink); }
.task-project { margin: 3px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }

.task-owner { font-size: 13px; }
.task-owner::before { content: ""; width: 6px; height: 6px; margin: 0 8px 1px 0; display: inline-block; border-radius: 50%; background: var(--ink-soft); }
.task-due { font-size: 13px; font-variant-numeric: tabular-nums; }
.task-status { width: max-content; padding: 5px 9px; border: 1px solid var(--status); color: var(--ink); font-size: 10px; font-weight: 700; letter-spacing: .06em; line-height: 1; text-transform: uppercase; }
.open-arrow { position: absolute; right: 18px; width: 24px; fill: none; stroke: var(--ink); stroke-width: 1.5; transition: transform 200ms ease-out; }
.task-item:hover .open-arrow, .task-item:focus-within .open-arrow { transform: translateX(6px); }

.empty-state {
  max-width: 660px;
  margin: 72px auto 0;
  text-align: center;
}
.empty-state[hidden] { display: none; }
.empty-state svg { width: 120px; fill: var(--acid); stroke: var(--ink); stroke-width: 2; }
.empty-state h2 { margin: 20px 0 8px; font: 560 42px/1 var(--display); text-transform: uppercase; }
.empty-state p { margin: 0 auto 22px; color: var(--ink-soft); }
.empty-state button { padding: 12px 18px; border: 1px solid var(--ink); color: var(--white); background: var(--ink); font-weight: 650; }

.footer {
  min-height: 78px;
  padding: 0 clamp(22px, 4vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--ink);
  color: var(--ink-soft);
  background: var(--paper-light);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.scrim {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: rgba(8, 25, 30, .35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease-out;
}
.scrim[hidden] { display: none; }
.scrim.is-visible { opacity: 1; pointer-events: auto; }

.detail-panel {
  position: fixed;
  z-index: 30;
  top: 0; right: 0;
  width: min(610px, 48vw);
  height: 100dvh;
  color: var(--white);
  background: var(--navy);
  box-shadow: -20px 0 50px rgba(5, 24, 29, .26);
  transform: translateX(102%);
  pointer-events: none;
  transition: transform 380ms cubic-bezier(.16,1,.3,1);
}
.detail-panel[hidden] { display: none; }
.detail-panel.is-open { transform: translateX(0); pointer-events: auto; }
.detail-shell { height: 100%; overflow-y: auto; scrollbar-color: var(--acid) #183d4d; scrollbar-width: thin; }

.detail-topbar {
  min-height: 78px;
  padding: 0 28px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(246,250,246,.25);
  color: #bad1ca;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.close-detail { padding: 9px; display: flex; align-items: center; gap: 8px; border: 0; color: var(--white); background: transparent; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.close-detail svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
.detail-panel :focus-visible { outline-color: var(--acid); }

.detail-content { padding: 42px 46px 60px; }
.detail-route { height: 24px; display: flex; align-items: center; }
.detail-route span { flex: none; width: 13px; height: 13px; border: 2px solid var(--acid); border-radius: 50%; }
.detail-route span:last-child { background: var(--acid); }
.detail-route i { width: 95px; height: 1px; background: var(--acid); }
.detail-project { margin: 26px 0 12px; color: var(--acid); font-size: 11px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.detail-content h2 { max-width: 520px; margin: 0; font: 560 clamp(38px, 4vw, 56px)/1.03 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.detail-body { max-width: 68ch; margin: 30px 0 38px; color: #d6e5e0; font-size: 15px; line-height: 1.7; }
.detail-body p { margin: 0 0 15px; }
.detail-body p:last-child { color: var(--white); }

.manifest-grid { margin: 0 0 28px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(246,250,246,.24); border-left: 1px solid rgba(246,250,246,.24); }
.manifest-grid div { padding: 15px 17px; border-right: 1px solid rgba(246,250,246,.24); border-bottom: 1px solid rgba(246,250,246,.24); }
.manifest-grid dt { color: #9ab7af; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.manifest-grid dd { margin: 3px 0 0; font-size: 14px; font-weight: 600; text-transform: capitalize; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 40px; }
.tag { padding: 5px 9px; border: 1px solid rgba(246,250,246,.35); color: #d6e5e0; font-size: 10px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }

.route-control { padding: 25px; color: var(--ink); background: var(--acid); }
.route-control label { margin: 0; color: var(--ink); font-size: 12px; }
.route-control > p { margin: 3px 0 18px; font-size: 12px; }
.status-select-wrap select { width: 100%; height: 52px; padding: 0 45px 0 15px; border: 1px solid var(--ink); border-radius: 0; color: var(--ink); background: var(--white); appearance: none; font-weight: 650; }
.status-feedback { min-height: 21px; margin-top: 9px; font-size: 12px; font-weight: 650; }

.toast {
  position: fixed;
  z-index: 50;
  right: 26px; bottom: 26px;
  max-width: min(340px, calc(100vw - 36px));
  padding: 13px 18px;
  color: var(--white);
  background: var(--ink);
  box-shadow: 0 10px 28px rgba(10,30,28,.22);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition: opacity 180ms ease-out, transform 250ms cubic-bezier(.16,1,.3,1);
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@keyframes dispatch-in {
  from { opacity: .01; transform: translateX(-16px); filter: blur(3px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@media (max-width: 1020px) {
  .control-deck { grid-template-columns: 1fr; gap: 42px; }
  .intro { justify-content: space-between; }
  .controls { max-width: 760px; }
  .queue-labels, .task-item { grid-template-columns: minmax(300px, 1.5fr) minmax(130px, .7fr) 90px; }
  .queue-labels span:nth-child(3) { display: none; }
  .task-due { display: none; }
  .detail-panel { width: min(650px, 66vw); }
}

@media (max-width: 680px) {
  html { scroll-behavior: auto; }
  .masthead { height: 66px; padding: 0 18px; grid-template-columns: 1fr auto; }
  .brand { font-size: 21px; }
  .brand-mark { width: 31px; height: 31px; }
  .masthead-note { display: none; }
  .live-signal { font-size: 10px; }
  .control-deck { min-height: 0; padding: 37px 18px 32px; gap: 34px; }
  .intro { display: block; }
  .intro h1 { font-size: clamp(58px, 18vw, 74px); }
  .intro p { max-width: 300px; margin-top: 20px; }
  .controls { grid-template-columns: 1fr; gap: 14px; }
  .input-wrap input, .select-wrap select { height: 51px; background: rgba(255,255,255,.45); }

  .route-map { min-height: 100px; padding: 0 12px; overflow-x: auto; scrollbar-width: none; }
  .route-map::-webkit-scrollbar { display: none; }
  .route-line { left: 10%; right: 10%; top: 36px; }
  .route-stop { min-width: 73px; padding: 19px 2px 10px; }
  .stop-node { margin: 10px auto 9px; width: 12px; height: 12px; }
  .stop-name { font-size: 9px; letter-spacing: .06em; }
  .route-stop strong { font-size: 19px; }

  .queue-section { padding: 34px 18px 64px; }
  .queue-header { margin-bottom: 20px; align-items: start; }
  .queue-header h2 { font-size: 38px; }
  .queue-key { display: none; }
  .queue-labels { padding: 0 38px 8px 34px; display: flex; justify-content: space-between; }
  .queue-labels span:not(:first-child) { display: none; }
  .queue-labels span:first-child::after { content: " / route"; }
  .task-item {
    min-height: 104px;
    padding: 13px 36px 13px 33px;
    display: block;
  }
  .task-item:hover, .task-item:focus-within { padding-left: 39px; }
  .rail { left: 0; }
  .task-main { grid-template-columns: 27px 1fr; gap: 5px; }
  .open-item { font-size: 19px; }
  .task-owner, .task-due { display: none; }
  .task-status { margin: 10px 0 0 32px; padding: 4px 7px; }
  .open-arrow { right: 5px; top: calc(50% - 12px); }
  .empty-state { margin-top: 50px; }
  .empty-state h2 { font-size: 35px; }
  .footer { min-height: 68px; padding: 0 18px; }
  .footer span:last-child { display: none; }

  .detail-panel { width: 100%; }
  .detail-topbar { min-height: 66px; padding: 0 18px; }
  .detail-content { padding: 32px 22px 54px; }
  .detail-content h2 { font-size: 41px; }
  .detail-body { margin: 24px 0 30px; }
  .manifest-grid { grid-template-columns: 1fr 1fr; }
  .route-control { padding: 21px; }
  .toast { right: 18px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
