@font-face {
  font-family: "Space Grotesk";
  src: url("assets/space-grotesk.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/ibm-plex-mono.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #e9e3d6;
  --surface: #f7f3e9;
  --surface-raised: #fffdf7;
  --ink: #142c30;
  --muted: #52615f;
  --accent: #bd3e20;
  --accent-ink: #ffffff;
  --line: #aeb3a9;
  --line-dark: #71807d;
  --header: #102f35;
  --todo: #52615f;
  --progress: #2267a1;
  --blocked: #9b3c29;
  --done: #255f47;
  --focus: #bd3e20;
  --shadow: 8px 8px 0 rgba(16, 47, 53, 0.13);
  --header-height: 64px;
  --detail-width: 430px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--header);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Space Grotesk", "Avenir Next", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: clip;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input,
select {
  outline: 2px solid transparent;
  outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: var(--focus);
}

button:active,
a:active {
  transform: scale(0.97);
}

.site-header {
  min-height: var(--header-height);
  display: grid;
  grid-template-columns: 240px 1fr auto;
  align-items: center;
  gap: 24px;
  padding-inline: 24px;
  position: sticky;
  top: 0;
  z-index: 20;
  color: #edf0e8;
  background: var(--header);
  border-bottom: 1px solid #486065;
}

.brand {
  min-height: 44px;
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: color 180ms var(--ease), transform 180ms var(--ease);
}

.brand-mark {
  width: 36px;
  height: 36px;
  color: var(--accent);
}

.header-context {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #c5ceca;
  font-size: 13px;
}

.eyebrow,
.kicker,
.field label,
.list-header,
.meta-label,
.route-label,
.detail-id,
.tag,
.priority {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.header-separator {
  color: var(--accent);
}

.team-stack {
  display: flex;
  align-items: center;
  padding-left: 8px;
}

.team-stack span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-left: -8px;
  border: 2px solid var(--header);
  border-radius: 50%;
  color: var(--header);
  background: #dbe1d8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 700;
}

.team-stack span:last-child {
  color: #fff;
  background: var(--accent);
}

.app-shell {
  min-height: calc(100vh - var(--header-height));
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--detail-width);
  align-items: stretch;
}

.queue-region {
  min-width: 0;
  padding: 28px 32px 48px;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(16, 47, 53, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 53, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.queue-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: 24px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: clamp(32px, 3.2vw, 46px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.queue-summary {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.queue-summary span:first-child {
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
}

.routing-key {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 245px;
  padding: 10px 12px;
  border: 1px solid var(--line-dark);
  background: rgba(247, 243, 233, 0.8);
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.routing-symbol {
  color: var(--accent);
  font-size: 28px;
  line-height: 1;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 220px;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-dark);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
}

.input-frame,
.select-frame {
  min-height: 46px;
  display: flex;
  align-items: center;
  position: relative;
  border: 1px solid var(--line-dark);
  background: var(--surface-raised);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.input-frame:focus-within,
.select-frame:focus-within {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.input-frame svg {
  width: 19px;
  height: 19px;
  margin-left: 13px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.input-frame input,
.select-frame select {
  width: 100%;
  min-height: 44px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.input-frame input:active,
.select-frame select:active {
  color: var(--ink);
}

.input-frame input {
  padding: 8px 50px 8px 10px;
}

.input-frame input::placeholder {
  color: #747f7d;
}

.input-frame kbd {
  position: absolute;
  right: 10px;
  min-width: 26px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-align: center;
}

.select-frame select {
  appearance: none;
  padding: 8px 38px 8px 12px;
  cursor: pointer;
}

.select-frame svg {
  width: 18px;
  height: 18px;
  position: absolute;
  right: 12px;
  pointer-events: none;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.7;
}

.status-route {
  min-height: 70px;
  display: grid;
  grid-template-columns: 118px repeat(4, minmax(92px, 1fr));
  margin: 24px 0 18px;
  border-block: 1px solid var(--line-dark);
  background: rgba(233, 227, 214, 0.84);
}

.route-label,
.route-stop {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.route-label {
  justify-content: space-between;
  color: var(--muted);
}

.route-label span:last-child {
  color: var(--accent);
  font-size: 20px;
}

.route-stop {
  position: relative;
  color: var(--muted);
  font-size: 12px;
}

.route-stop:last-child {
  border-right: 0;
}

.route-stop::before {
  content: "";
  height: 1px;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  z-index: 0;
  background: var(--line);
}

.route-dot,
.route-stop strong,
.route-stop > span:last-child {
  position: relative;
  z-index: 1;
  background: var(--bg);
}

.route-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.route-stop strong {
  padding-left: 3px;
  color: var(--ink);
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
}

.route-stop > span:last-child {
  padding-right: 4px;
  white-space: nowrap;
}

.route-todo { color: var(--todo); }
.route-progress { color: var(--progress); }
.route-blocked { color: var(--blocked); }
.route-done { color: var(--done); }

.list-header {
  display: grid;
  grid-template-columns: minmax(310px, 1.7fr) minmax(100px, 0.55fr) 104px 112px 48px;
  gap: 12px;
  align-items: center;
  min-height: 34px;
  padding-inline: 16px;
  color: var(--muted);
}

.task-list {
  display: grid;
  gap: 8px;
}

.task-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(310px, 1.7fr) minmax(100px, 0.55fr) 104px 112px 48px;
  gap: 12px;
  align-items: center;
  position: relative;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--line-dark);
  background: var(--surface);
  box-shadow: 3px 3px 0 rgba(16, 47, 53, 0.08);
  transition: border-color 180ms var(--ease), background-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.task-item::before {
  content: "";
  width: 7px;
  position: absolute;
  inset-block: 5px;
  left: -4px;
  background: radial-gradient(circle, var(--bg) 2px, transparent 2.5px) center top / 7px 12px repeat-y;
}

.task-item.is-active {
  border-color: var(--accent);
  background: var(--surface-raised);
  box-shadow: 5px 5px 0 rgba(234, 91, 53, 0.2);
}

.task-main {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.task-number {
  color: #7c8885;
  font-family: "IBM Plex Mono", monospace;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.08em;
}

.task-copy {
  min-width: 0;
}

.task-title {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-assignee {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-project,
.task-date {
  overflow: hidden;
  color: #435552;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-date {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  min-height: 26px;
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border: 1px solid currentColor;
  color: var(--todo);
  background: transparent;
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: currentColor;
}

.status-in-progress { color: var(--progress); }
.status-blocked { color: var(--blocked); }
.status-done { color: var(--done); }

.open-item {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: color 160ms var(--ease), background-color 160ms var(--ease), border-color 160ms var(--ease), transform 160ms var(--ease);
}

.open-item svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.open-item:focus,
.open-item:focus-visible {
  outline-offset: 3px;
}

.loading-state {
  min-height: 280px;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.loading-state p {
  margin: 4px 0 0;
}

.loading-line {
  height: 1px;
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--line);
}

.loading-line::after {
  content: "";
  width: 30%;
  position: absolute;
  inset-block: 0;
  left: -30%;
  background: var(--accent);
  animation: load-route 900ms linear infinite;
}

.empty-state {
  min-height: 360px;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1fr);
  align-items: center;
  gap: 40px;
  margin-top: 8px;
  padding: 40px;
  border: 1px solid var(--line-dark);
  background: var(--surface);
}

.empty-state:not([hidden]) {
  display: grid;
}

.empty-state h2 {
  margin-bottom: 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.empty-state p:not(.kicker) {
  max-width: 48ch;
  color: var(--muted);
}

.empty-diagram {
  min-height: 200px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: center;
  position: relative;
  border: 1px solid var(--line);
  background-image:
    linear-gradient(rgba(16, 47, 53, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 47, 53, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

.empty-diagram::before {
  content: "";
  height: 2px;
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  background: var(--line-dark);
}

.empty-diagram span {
  width: 18px;
  height: 18px;
  z-index: 1;
  justify-self: center;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--line-dark);
}

.empty-diagram span:last-child {
  background: var(--accent);
}

.button-primary {
  min-height: 46px;
  padding: 11px 20px;
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  background: var(--accent);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 180ms var(--ease), color 180ms var(--ease), transform 160ms var(--ease), box-shadow 180ms var(--ease);
}

.detail-panel {
  min-width: 0;
  min-height: calc(100vh - var(--header-height));
  height: calc(100vh - var(--header-height));
  position: sticky;
  top: var(--header-height);
  z-index: 5;
  align-self: start;
  overflow-y: auto;
  border-left: 1px solid #486065;
  color: #e9eee8;
  background-color: var(--header);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
}

.detail-placeholder {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px;
}

.detail-placeholder .kicker {
  color: #9eaaa6;
}

.detail-placeholder h2 {
  margin-bottom: 16px;
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.detail-placeholder > p:last-child {
  max-width: 31ch;
  color: #b9c4c0;
  font-size: 14px;
}

.inspection-diagram {
  max-width: 300px;
  margin-bottom: 46px;
  position: relative;
}

.inspection-diagram svg {
  width: 100%;
  height: auto;
  display: block;
}

.inspection-diagram .diagram-grid {
  fill: none;
  stroke: #355158;
  stroke-width: 1;
}

.inspection-diagram .diagram-route {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  animation: draw-route 650ms var(--ease) forwards;
}

.inspection-diagram circle,
.inspection-diagram > svg > path:last-child {
  fill: var(--header);
  stroke: #e9eee8;
  stroke-width: 2;
}

.diagram-index {
  position: absolute;
  right: 8px;
  bottom: 0;
  color: #78908f;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
}

.detail-view {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
  animation: detail-enter 220ms var(--ease) both;
}

.detail-topbar {
  min-height: 61px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  border-bottom: 1px solid #486065;
}

.detail-id {
  color: #aebbb6;
}

.close-detail {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #718481;
  color: #f1f3ee;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: border-color 160ms var(--ease), background-color 160ms var(--ease), transform 160ms var(--ease);
}

.close-detail svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.close-detail:focus,
.close-detail:focus-visible,
.detail-panel select:focus,
.detail-panel select:focus-visible {
  outline-color: #ff8a68;
}

.detail-scroll {
  flex: 1;
  padding: 28px 28px 42px;
}

.detail-title-block {
  position: relative;
  padding: 0 0 28px 26px;
  border-bottom: 1px solid #486065;
}

.detail-title-block::before {
  content: "";
  width: 2px;
  position: absolute;
  left: 5px;
  top: 5px;
  bottom: 24px;
  background: var(--accent);
  transform-origin: top;
  animation: route-grow 400ms var(--ease) both;
}

.detail-title-block::after {
  content: "";
  width: 11px;
  height: 11px;
  position: absolute;
  left: 0;
  top: 0;
  border: 2px solid var(--header);
  border-radius: 50%;
  background: var(--accent);
}

.detail-title-block .kicker {
  color: #aebbb6;
}

.detail-title {
  margin-bottom: 16px;
  font-size: clamp(27px, 2.6vw, 38px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}

.detail-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.priority,
.tag {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #607571;
  color: #c8d3ce;
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 0.05em;
}

.priority-high {
  border-color: #d67b62;
  color: #ffc3b2;
}

.detail-body {
  padding-block: 24px;
  border-bottom: 1px solid #486065;
}

.detail-body p {
  margin-bottom: 16px;
  color: #d4dcd8;
  font-size: 15px;
  line-height: 1.65;
}

.detail-body p:last-child {
  margin-bottom: 0;
}

.detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-bottom: 1px solid #486065;
}

.detail-meta div {
  min-width: 0;
  padding: 16px 14px 16px 0;
  border-bottom: 1px solid #355158;
}

.detail-meta div:nth-child(odd) {
  border-right: 1px solid #355158;
}

.detail-meta div:nth-child(even) {
  padding-left: 14px;
}

.detail-meta div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.detail-meta dt {
  margin-bottom: 5px;
  color: #92a39e;
}

.detail-meta dd {
  margin: 0;
  overflow: hidden;
  color: #f0f3ee;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-meta time,
.detail-meta .number {
  font-family: "IBM Plex Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.status-form {
  margin-top: 24px;
  padding: 18px;
  border: 1px solid #718481;
  background: rgba(255, 255, 255, 0.045);
}

.status-form label {
  display: block;
  margin-bottom: 8px;
  color: #bac7c2;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.detail-select-frame {
  position: relative;
}

.detail-select-frame select {
  width: 100%;
  min-height: 48px;
  appearance: none;
  padding: 10px 42px 10px 12px;
  border: 1px solid #879793;
  color: var(--header);
  background: #f4f0e6;
  cursor: pointer;
  font-size: 16px;
  font-weight: 650;
}

.detail-select-frame select:active {
  border-color: var(--accent);
}

.detail-select-frame svg {
  width: 18px;
  position: absolute;
  right: 13px;
  top: 15px;
  fill: none;
  stroke: var(--header);
  stroke-width: 2;
  pointer-events: none;
}

.status-feedback {
  min-height: 22px;
  margin: 9px 0 0;
  color: #bdc8c4;
  font-size: 12px;
}

.status-feedback.is-confirmed {
  color: #9edab9;
}

.toast {
  max-width: min(360px, calc(100vw - 40px));
  min-height: 48px;
  display: flex;
  align-items: center;
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  padding: 12px 16px;
  border: 1px solid #6e8c82;
  color: #f4f7f2;
  background: #164738;
  box-shadow: 5px 5px 0 rgba(16, 47, 53, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.mobile-scrim {
  display: none;
}

.noscript {
  margin: 0;
  padding: 16px 24px;
  color: white;
  background: #8a2f23;
}

@keyframes draw-route {
  to { stroke-dashoffset: 0; }
}

@keyframes route-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

@keyframes detail-enter {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes load-route {
  to { left: 100%; }
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover { color: #ff9a7f; }
  .task-item:hover { transform: translateY(-2px); border-color: #687a77; box-shadow: 4px 5px 0 rgba(16, 47, 53, 0.12); }
  .task-item:hover .open-item { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
  .open-item:hover { color: var(--accent-ink); border-color: var(--accent); background: var(--accent); }
  .close-detail:hover { border-color: #ff8a68; background: rgba(234, 91, 53, 0.18); }
  .button-primary:hover { color: var(--accent-ink); background: #c94727; box-shadow: 3px 3px 0 rgba(16, 47, 53, 0.22); }
  .input-frame:hover,
  .select-frame:hover { border-color: var(--ink); }
  .detail-select-frame select:hover { border-color: #ff8a68; }
}

@media (max-width: 1120px) {
  :root { --detail-width: 370px; }
  .queue-region { padding-inline: 24px; }
  .list-header,
  .task-item { grid-template-columns: minmax(260px, 1.5fr) 90px 102px 48px; }
  .list-header span:nth-child(2),
  .task-project { display: none; }
  .list-header span:last-child { grid-column: 4; }
  .task-item .open-item { grid-column: 4; }
  .status-route { grid-template-columns: repeat(4, 1fr); }
  .route-label { display: none; }
}

@media (max-width: 960px) {
  :root { --header-height: 60px; }
  .site-header {
    min-height: var(--header-height);
    grid-template-columns: 1fr auto;
    padding-inline: 20px;
  }
  .header-context { display: none; }
  .app-shell { display: block; }
  .queue-region { min-height: calc(100vh - var(--header-height)); }
  .detail-panel {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    position: fixed;
    inset: 0;
    z-index: 30;
    border-left: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 220ms var(--ease), visibility 0s linear 220ms;
  }
  .detail-panel.is-open {
    transform: translateX(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .detail-placeholder { display: none; }
  .detail-view { height: 100dvh; min-height: 0; }
  .detail-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .mobile-scrim { display: none !important; }
  body.detail-open { overflow: hidden; }
}

@media (max-width: 620px) {
  .site-header { padding-inline: 20px; }
  .team-stack span:nth-child(-n + 2) { display: none; }
  .queue-region { padding: 22px 20px 40px; }
  .queue-heading { align-items: flex-start; margin-bottom: 20px; }
  .routing-key { display: none; }
  h1 { font-size: 38px; }
  .toolbar { grid-template-columns: 1fr; padding: 12px; box-shadow: 5px 5px 0 rgba(16, 47, 53, 0.12); }
  .status-route {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-block: 20px 16px;
    border: 1px solid var(--line-dark);
  }
  .route-stop { min-height: 52px; border-bottom: 1px solid var(--line); }
  .route-stop:nth-child(2) { border-right: 0; }
  .route-stop:nth-last-child(-n + 2) { border-bottom: 0; }
  .list-header { display: none; }
  .task-list { gap: 10px; }
  .task-item {
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px 12px;
    padding: 13px 12px 12px 16px;
  }
  .task-main { grid-column: 1 / -1; grid-template-columns: 42px minmax(0, 1fr); }
  .task-title { font-size: 15px; white-space: normal; }
  .task-project { display: block; grid-column: 1; grid-row: 2; padding-left: 54px; }
  .task-date { display: none; }
  .task-item .status-badge { grid-column: 1; grid-row: 3; margin-left: 54px; }
  .task-item .open-item { grid-column: 2; grid-row: 2 / span 2; align-self: end; }
  .empty-state:not([hidden]) { display: block; padding: 24px; }
  .empty-diagram { min-height: 140px; margin-bottom: 28px; }
  .detail-topbar { padding-inline: 20px; }
  .detail-scroll { padding: 24px 20px 40px; }
  .detail-title { font-size: 30px; }
  .toast { right: 20px; bottom: 20px; }
}

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