/* Shared UI tokens. Runtime owner; mirrored in DESIGN.md. */
:root {
  --ink: #1e1f21;
  --muted: #60636a;
  --surface: #ffffff;
  --canvas: #f6f6f7;
  --panel: #ededf0;
  --accent: #505fc7;
  --accent-hover: #414fa8;
  --accent-soft: #eaecfb;
  --border: #d7d9df;
  --line: #e6e7eb;
  --danger: #a6323d;
  --danger-soft: #fff0f0;
  --stage-todo: #245cba;
  --tag-integration: #6d45a6;
  --tag-integration-soft: #f1eafa;
  --tag-bug: #a6323d;
  --tag-bug-soft: #fff0f0;
  --tag-feature: #245cba;
  --tag-feature-soft: #eaf1fd;
  --stage-progress: #ba7c1b;
  --stage-ready: #3e8b76;
  --stage-main: #8c78c8;
  --stage-prod: #447957;
  --scrollbar: #b0b3bd;
  --scrollbar-hover: #878c9b;
  --shell: #2e2e30;
  --shell-ink: #f5f5f7;
  --shell-muted: #c2c3c7;
  --radius: 8px;
  --space: 4px;
  --page: 24px;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: var(--body);
  --mono: "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
  scrollbar-color: var(--scrollbar) var(--panel);
  scrollbar-width: thin;
}
* {
  box-sizing: border-box;
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--panel);
}
*::-webkit-scrollbar-thumb {
  background: var(--scrollbar);
  border: 2px solid var(--panel);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--scrollbar-hover);
}
*::-webkit-scrollbar-thumb:active {
  background: var(--muted);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-family: var(--body);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: -0.4px;
}
h2,
h3,
h4,
h5,
h6,
strong,
b {
  font-family: var(--body);
  font-weight: 400;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
a,
button,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.15s,
    border-color 0.15s,
    box-shadow 0.15s;
}
button:hover,
.button:hover {
  background: var(--panel);
  border-color: var(--scrollbar);
}
button:active,
.button:active {
  background: var(--line);
}
button:disabled {
  cursor: default;
  opacity: 0.55;
}
button:disabled:hover {
  background: var(--surface);
  border-color: var(--border);
}
.primary {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}
.primary:hover,
.primary:active {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
.primary:disabled:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.secondary {
  font-size: 13px;
}
input,
select,
textarea {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  background: var(--surface);
  color: var(--ink);
  line-height: 22px;
  transition:
    border-color 0.12s,
    box-shadow 0.12s;
}
input::placeholder {
  color: var(--muted);
  opacity: 1;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--scrollbar);
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 46px;
}
input:disabled,
select:disabled {
  cursor: default;
  opacity: 0.6;
}
label {
  display: block;
  margin: 18px 0 7px;
  font-size: 13px;
  font-weight: 400;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
textarea {
  resize: none;
  height: auto;
  min-height: 104px;
  line-height: 1.6;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.code {
  font: 12px/1.5 var(--mono);
  letter-spacing: 0.01em;
  color: var(--muted);
}
.skip {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 8px;
}
.icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 48px;
  padding: 6px var(--page);
  background: var(--shell);
  color: var(--shell-ink);
  border-bottom: 1px solid var(--shell);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--body);
  font-size: 20px;
  font-weight: 400;
  letter-spacing: -0.4px;
  white-space: nowrap;
}
.topbar .wordmark {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--shell-ink);
}
.topbar :focus-visible {
  outline-color: var(--shell-ink);
}
.environment {
  color: var(--shell-muted);
  border-left: 1px solid #62636a;
  padding-left: 16px;
  font-size: 12px;
  line-height: 18px;
}
.account {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 400;
}
.account button {
  min-height: 32px;
  border-color: #62636a;
  background: transparent;
  color: var(--shell-ink);
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.account button:hover {
  color: var(--shell-ink);
  background: #414247;
}
.workspace {
  max-width: none;
  margin: auto;
  padding: 0 var(--page) 28px;
}
.workspace[data-view="card"] {
  max-width: 1200px;
}
.workspace[data-view="card"] #workspace-content {
  padding-top: 24px;
}
.workspace-toolbar {
  margin: 0 calc(-1 * var(--page));
  padding: 24px var(--page) 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}
.page-heading h1 {
  margin: 0;
  overflow-wrap: anywhere;
}
.freshness {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  max-width: 100%;
}
.freshness p {
  margin: 0;
  max-width: 260px;
}
#refresh {
  min-width: 120px;
  height: 40px;
  min-height: 40px;
  padding: 8px 14px;
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
  box-shadow: none;
}
#refresh:disabled .icon {
  opacity: 0.6;
}
.filters {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(190px, 220px));
  gap: 16px;
  align-items: end;
  max-width: 1240px;
  padding: 0;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.filters label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  margin: 0 0 6px;
}
.search-row {
  position: relative;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: flex;
  pointer-events: none;
}
#search {
  padding-left: 44px;
  padding-right: 46px;
  background: var(--surface);
}
#search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}
#clear-search {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 40px;
  height: 40px;
  width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
}
#clear-search:hover {
  background: var(--panel);
  color: var(--ink);
}
.feedback-slot {
  min-height: 24px;
  padding: 4px 0;
}
.workspace[data-view="card"] .feedback-slot:has(.error[hidden]) {
  min-height: 0;
  padding: 0;
}
.error {
  color: var(--danger);
  background: var(--danger-soft);
  border-radius: 6px;
  padding: 9px 12px;
  font-size: 13px;
  margin: 0;
}
#workspace-content {
  min-height: 300px;
}
#toggle-descriptions {
  min-height: 40px;
  min-width: 190px;
  padding: 8px 12px;
  font-size: 13px;
}
#toggle-descriptions[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.workspace:not(.show-descriptions) .task-preview,
.workspace:not(.show-descriptions) .preview-more {
  display: none;
}
.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 260px;
  color: var(--muted);
  font-size: 13px;
}
.board {
  --board-column-width: 320px;
  --board-column-gap: 20px;
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 0 0 18px;
  min-height: 480px;
  scrollbar-gutter: stable;
}
.board-group {
  display: flex;
  flex-direction: column;
  flex: 3 0
    calc(3 * var(--board-column-width) + 2 * var(--board-column-gap) + 34px);
  min-width: 0;
  padding: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
}
.board-group--backlog {
  background: var(--panel);
  border-color: var(--line);
}
.board-group--development {
  flex-grow: 4;
  flex-basis: calc(
    4 * var(--board-column-width) + 3 * var(--board-column-gap) + 34px
  );
}
.board-group-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 32px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.board-group-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.board-group-caption {
  color: var(--muted);
  font-size: 12px;
}
.board-group-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--board-column-gap);
  flex: 1;
}
.board-group--development .board-group-columns {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.column {
  min-width: 0;
  padding: 0 0 12px;
  background: transparent;
  border: 0;
  border-radius: 0;
  --stage-color: var(--stage-todo);
}
.column[data-stage="new_integrations"] {
  --stage-color: var(--tag-integration);
}
.column[data-stage="new_bugs"] {
  --stage-color: var(--tag-bug);
}
.column[data-stage="in_progress"] {
  --stage-color: var(--stage-progress);
}
.column[data-stage="ready"] {
  --stage-color: var(--stage-ready);
}
.column[data-stage="merged_main"] {
  --stage-color: var(--stage-main);
}
.column[data-stage="deployed_prod"] {
  --stage-color: var(--stage-prod);
}
.column-heading {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 2px 16px;
}
.column-heading h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}
.stage-order {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border: 1.5px solid var(--stage-color);
  border-radius: 50%;
  font-size: 0;
}
.column[data-stage="ready"] .stage-order,
.column[data-stage="merged_main"] .stage-order,
.column[data-stage="deployed_prod"] .stage-order {
  background: var(--stage-color);
}
.stage-count {
  min-width: 20px;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 400;
  color: var(--muted);
}
.task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.task-tag {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 2px 8px;
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 20px;
  color: var(--muted);
  background: var(--panel);
}
.tag-integration {
  color: var(--tag-integration);
  background: var(--tag-integration-soft);
}
.tag-bug {
  color: var(--tag-bug);
  background: var(--tag-bug-soft);
}
.tag-feature {
  color: var(--tag-feature);
  background: var(--tag-feature-soft);
}
#edit-tag-field {
  margin-top: 16px;
}
.task-card {
  display: block;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 8px;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 3px #1e1f210a;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.task-card:hover {
  border-color: #aeb2c0;
  box-shadow: 0 2px 8px #1e1f2110;
}
.parallel-threads {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  overflow: visible;
  pointer-events: none;
}
.parallel-threads path {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 78%, var(--surface));
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.parallel-threads circle {
  fill: var(--accent);
  stroke: var(--surface);
  stroke-width: 1;
}
.task-card.parallel-neighbor {
  margin-bottom: 22px;
}
.parallel-preview {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
}
.parallel-caption,
.parallel-link {
  display: block;
}
.parallel-caption {
  color: var(--muted);
}
.parallel-link {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration-color: color-mix(in srgb, currentColor 42%, transparent);
}
.parallel-link:hover {
  color: var(--accent-hover);
  text-decoration-color: currentColor;
}
.parallel-link + .parallel-link {
  margin-top: 4px;
}
.parallel-detail {
  flex-basis: 100%;
}
.parallel-action {
  min-height: 28px;
  height: auto;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
}
.parallel-action:hover {
  background: transparent;
  text-decoration: underline;
}
.parallel-detail .parallel-link {
  margin: 4px 0;
  font-size: 14px;
}
#edit-parallel {
  padding-top: 16px;
}
.parallel-results {
  max-height: min(34vh, 280px);
  overflow: auto;
}
.parallel-choice {
  display: grid;
  gap: 2px;
  width: 100%;
  justify-items: start;
  text-align: left;
  overflow-wrap: anywhere;
  white-space: normal;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px;
  background: transparent;
}
.parallel-choice small {
  font-size: 12px;
  color: var(--muted);
}
.parallel-choice:hover,
.parallel-choice:focus-visible {
  background: var(--accent-soft);
}
#edit-parallel-current:not(:empty) {
  margin-bottom: 16px;
}
#edit-parallel-current p,
#edit-parallel-intent {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
}
#edit-parallel-more {
  margin-top: 8px;
}
#edit-parallel-title {
  overflow-wrap: anywhere;
  font-size: 16px;
}
.task-card:active {
  background: var(--surface);
}
.task-card h3 {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0;
  margin: 4px 0 8px;
}
.task-card .task-tags {
  margin: 6px 0;
}
.task-preview {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0 0 12px;
}
.preview-more {
  display: block;
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--accent);
}
.task-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.assignee {
  font-size: 13px;
  margin: 0;
  color: var(--ink);
}
.task-time {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.task-card-heading,
.task-actions,
.editor-actions,
.editor-heading,
.editor-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}
.task-card-heading {
  justify-content: flex-end;
  gap: 4px;
}
.task-card-heading .task-actions {
  flex-shrink: 0;
}
.task-link {
  display: block;
  color: var(--ink);
  text-decoration: none;
  border-radius: 4px;
}
.task-link:hover h3 {
  color: var(--accent);
}
.icon-button {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 6px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
.icon-button .icon {
  width: 18px;
  height: 18px;
}
.move-task {
  cursor: grab;
}
.move-task:active {
  cursor: grabbing;
}
.task-card.is-dragging {
  opacity: 0.5;
}
.column.is-drop-target {
  background: var(--accent-soft);
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.assignee-control {
  min-width: 0;
  min-height: 44px;
  justify-content: flex-start;
  gap: 10px;
  padding: 4px 8px 4px 4px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}
.assignee-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
}
.is-unassigned .assignee-avatar {
  background: var(--canvas);
  border: 1px dashed var(--border);
  color: var(--muted);
}
.assignee-label {
  display: grid;
  min-width: 0;
  line-height: 1.4;
}
.assignee-caption {
  color: var(--muted);
  font-size: 11px;
}
.task-card .assignee-caption {
  display: none;
}
.task-card .assignee {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assignee-label .assignee {
  font-size: 14px;
  overflow-wrap: anywhere;
}
.action-status {
  color: var(--accent);
  font-size: 13px;
  margin: 0;
}
.action-status .undo-delete {
  min-height: 32px;
  margin-inline-start: 8px;
  padding: 4px 10px;
  font-size: inherit;
}
.action-status:empty {
  display: none;
}
.task-editor {
  width: min(700px, calc(100vw - 32px));
  max-width: none;
  max-height: min(900px, calc(100svh - 48px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 80px #1e1f2133;
  overflow: hidden;
}
.task-editor::backdrop {
  background: #1e1f2166;
}
.drawer-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}
.task-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(840px, calc(100vw - 72px));
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 12px 0 0 12px;
  background: var(--canvas);
  color: var(--ink);
  box-shadow: -12px 0 48px color-mix(in srgb, var(--ink) 14%, transparent);
  overflow: hidden;
}
.task-drawer[open] {
  display: flex;
  flex-direction: column;
  animation: drawer-enter 180ms ease-out;
}
.task-drawer::backdrop {
  background: color-mix(in srgb, var(--ink) 15%, transparent);
}
@keyframes drawer-enter {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
.drawer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 12px 20px 12px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.drawer-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 28px;
}
#drawer-title {
  margin-bottom: 20px;
  font-size: 24px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.drawer-freshness {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
}
.drawer-freshness p {
  margin: 0;
}
#drawer-refresh {
  flex-shrink: 0;
  min-height: 36px;
  font-size: 13px;
  padding: 6px 10px;
}
.task-drawer .card-overview {
  gap: 12px;
  margin-top: 4px;
}
.task-drawer .detail-columns {
  grid-template-columns: 1fr;
  gap: 0;
}
.task-editor form {
  display: flex;
  flex-direction: column;
  max-height: min(898px, calc(100svh - 50px));
}
.editor-heading {
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--line);
}
.editor-heading h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.35;
}
.editor-heading .code {
  margin: 0;
  overflow-wrap: anywhere;
}
.editor-body {
  min-height: 0;
  overflow: auto;
  scrollbar-gutter: stable;
  padding: 4px 24px 24px;
}
.editor-body fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}
.editor-selects {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
}
.editor-footer {
  flex: 0 0 auto;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--canvas);
}
.editor-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
#edit-save {
  min-width: 194px;
}
.editor-recovery {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.editor-recovery:has(button:not([hidden])),
.editor-recovery:has(a:not([hidden])),
#edit-error:not([hidden]),
#edit-loading:not([hidden]) {
  margin: 16px 0 0;
}
.field-error,
.field-hint {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.5;
}
.field-error {
  color: var(--danger);
}
.field-hint {
  color: var(--muted);
}
[aria-invalid="true"] {
  border-color: var(--danger);
}
.discard-changes {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 20px;
}
.discard-changes p {
  margin-bottom: 12px;
}
.discard-changes .editor-actions {
  flex-wrap: wrap;
}
@media (max-width: 700px) {
  .parallel-link {
    min-height: 24px;
    padding-block: 3px;
  }
  .parallel-action {
    min-height: 40px;
  }
  .task-card-heading .icon-button {
    width: 40px;
    height: 40px;
    min-height: 40px;
  }
  .task-editor {
    width: calc(100vw - 16px);
    max-height: calc(100svh - 16px);
  }
  .task-editor form {
    max-height: calc(100svh - 18px);
  }
  .editor-heading {
    padding: 20px 16px 16px;
  }
  .editor-body {
    padding: 0 16px 20px;
  }
  .editor-selects {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .editor-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
  }
  .editor-footer .editor-actions {
    width: 100%;
  }
  #edit-save {
    flex: 1;
    min-width: 0;
  }
  .task-editor input,
  .task-editor select,
  .task-editor textarea {
    font-size: 16px;
  }
  .task-editor input,
  .task-editor select {
    height: 48px;
  }
}
.lifecycle {
  display: inline-flex;
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 11px;
}
.search-match {
  border-top: 1px solid var(--line);
  margin: 12px 0 0;
  padding-top: 10px;
  font-size: 12px;
  color: var(--muted);
}
.search-match span {
  display: block;
  font-size: 11px;
  margin-bottom: 3px;
  font-weight: 400;
}
.empty-column {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin: 2px 0;
  padding: 24px 4px;
  text-align: center;
}
.board.is-empty {
  min-height: 0;
  padding-bottom: 0;
}
.board.is-empty .column {
  padding-bottom: 0;
  background: transparent;
}
.empty-state {
  text-align: center;
  padding: 54px 24px 60px;
  color: var(--muted);
}
.empty-state h2 {
  margin: 16px 0 10px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.2px;
}
.empty-state p {
  margin: 0 auto;
  max-width: 390px;
  font-size: 14px;
  line-height: 1.6;
}
.list-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
}
.list-footer p {
  margin: 0;
}
.page-footer {
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding: 18px 0 0;
  font-size: 12px;
}
#back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
#back:hover {
  color: var(--accent);
}
.card-overview {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: -4px 0 24px;
  font-size: 13px;
  color: var(--muted);
}
.stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 400;
}
.detail-panel {
  min-width: 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: none;
}
.detail-panel h2 {
  font-size: 16px;
  font-weight: 400;
  letter-spacing: -0.2px;
  margin: 0 0 22px;
}
.detail-panel > h2:not(:first-child) {
  margin-top: 30px;
}
.detail-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  align-items: start;
}
.prose {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
  font-size: 15px;
  max-width: 85ch;
  margin: 0 0 16px;
}
.prose:last-child {
  margin-bottom: 0;
}
.timeline-item {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  overflow-wrap: anywhere;
}
.timeline-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-item > p:not(.prose):not(.timeline-meta) {
  font-size: 13px;
  margin-bottom: 10px;
}
.timeline-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
}
.timeline-item details {
  margin-top: 10px;
}
.timeline-item summary {
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  min-height: 36px;
  padding: 8px 0;
}
.timeline-item summary:hover {
  color: var(--accent);
}
.change {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.change h4 {
  margin: 0 0 10px;
  font-size: 13px;
}
.change strong {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
.change .prose {
  margin: 4px 0 12px;
  font-size: 13px;
}
.evidence {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
  margin-top: 8px;
}
.auth {
  width: 100%;
  max-width: 496px;
  padding: 24px;
  margin: 10vh auto 40px;
}
.auth > .wordmark {
  display: flex;
  justify-content: center;
  margin: 0 0 32px;
}
.auth-panel {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 8px #1e1f210a;
}
.auth-panel h1 {
  font-size: 26px;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
}
.auth-panel > .muted {
  font-size: 13px;
  margin-bottom: 26px;
}
.auth .error {
  margin-bottom: 18px;
}
.auth label {
  font-size: 13px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 126px;
}
.password-field button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 5px;
  border: 0;
  min-height: 36px;
  height: 36px;
  padding: 6px 9px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.password-field button:hover {
  color: var(--ink);
  background: var(--panel);
}
.auth .primary[type="submit"] {
  width: 100%;
  margin-top: 24px;
  min-height: 48px;
}
[data-submit-status] {
  min-height: 20px;
  margin: 10px 0 0;
  font-size: 12px;
  text-align: center;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.actions .primary[type="submit"] {
  width: auto;
  margin: 0;
}
.editor-actions button {
  min-height: 48px;
}
@media (min-width: 1200px) {
  .board {
    --board-column-gap: 8px;
    gap: 16px;
  }
  .board-group {
    flex: 3 1 0;
    padding: 12px;
  }
  .board-group--development {
    flex-grow: 4;
  }
  .column-heading {
    min-height: 64px;
    gap: 6px;
  }
  .column-heading h2 {
    font-size: 14px;
    line-height: 20px;
  }
  .stage-count {
    min-width: 0;
  }
  .task-card {
    padding: 8px;
  }
  .task-card h3 {
    font-size: 14px;
    margin: 4px 0 6px;
  }
  .task-card-heading .task-actions {
    gap: 0;
  }
  .task-card-heading .icon-button {
    width: 24px;
    height: 24px;
    min-height: 24px;
    padding: 2px;
  }
  .task-card .task-meta {
    gap: 4px;
    margin-top: 8px;
    padding-top: 6px;
  }
  .task-card .assignee-control {
    min-height: 32px;
    gap: 6px;
    padding: 2px 0;
  }
  .task-card .assignee-avatar {
    flex-basis: 24px;
    width: 24px;
    height: 24px;
    font-size: 13px;
  }
  .task-card .assignee {
    font-size: 13px;
  }
  .task-card .task-time {
    margin-left: auto;
    font-size: 11px;
  }
}

@media (max-width: 1100px) {
  .filters {
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(180px, 200px));
  }
  .workspace {
    padding-right: 24px;
    padding-left: 24px;
  }
  .freshness p {
    max-width: 200px;
  }
}
@media (max-width: 900px) {
  .filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .search-control {
    grid-column: 1 / -1;
  }
  .detail-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .page-heading {
    gap: 16px;
  }
  .freshness {
    gap: 10px;
  }
  .freshness p {
    max-width: 150px;
  }
}
@media (max-width: 700px) {
  :root {
    --page: 16px;
  }
  .topbar {
    min-height: 60px;
    gap: 10px;
  }
  .environment {
    display: none;
  }
  .account {
    gap: 8px;
  }
  .account > span {
    max-width: 100px;
    overflow-wrap: anywhere;
  }
  .account button {
    min-height: 40px;
  }
  .workspace {
    padding: 0 16px 24px;
  }
  .page-heading {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .page-heading h1 {
    font-size: 26px;
  }
  #refresh {
    min-height: 44px;
    height: 44px;
  }
  .freshness {
    width: 100%;
    justify-content: space-between;
  }
  .freshness p {
    max-width: 220px;
  }
  .filters {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 0;
  }
  .filters > div:not(.search-control) {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
  }
  .filters > div:not(.search-control) > label {
    margin: 0;
  }
  .filters input,
  .filters select {
    height: 48px;
    font-size: 16px;
    padding-left: 12px;
  }
  .filters #search {
    padding-left: 42px;
  }
  .filters select {
    padding-right: 40px;
  }
  .board {
    --board-column-gap: 10px;
    gap: 16px;
    min-height: 340px;
  }
  .board.is-empty {
    --board-column-width: 260px;
    min-height: 0;
  }
  .empty-state {
    padding: 38px 12px 44px;
  }
  .detail-panel {
    padding: 20px;
  }
  .card-overview {
    gap: 10px;
  }
  .workspace-toolbar {
    padding-top: 20px;
  }
  #toggle-descriptions {
    min-height: 44px;
    min-width: 0;
    flex: 1;
  }
  .freshness p {
    flex-basis: 100%;
    max-width: none;
  }
  .task-drawer {
    width: calc(100vw - 12px);
  }
  .drawer-toolbar {
    padding: 10px 12px 10px 20px;
  }
  .drawer-scroll {
    padding: 20px 16px;
  }
  #drawer-title {
    font-size: 22px;
  }
  .auth {
    margin-top: 8vh;
    padding: 18px;
  }
  .auth-panel {
    padding: 28px;
  }
}

.select-field {
  position: relative;
}
.select-chevron {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--ink);
}
.select-field:has(select:disabled) .select-chevron {
  opacity: 0.45;
}
#refresh:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}
#refresh:disabled:hover {
  background: var(--accent);
  border-color: var(--accent);
}
.empty-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  color: var(--accent);
}
.empty-symbol svg {
  width: 30px;
  height: 30px;
}
.timeline-item summary {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  list-style: none;
}
.timeline-item summary::-webkit-details-marker {
  display: none;
}
.timeline-item summary::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 18px;
  background: currentColor;
  mask: url("./chevron.svg") no-repeat center / 16px 16px;
  transform: rotate(-90deg);
}
.timeline-item details[open] > summary::before {
  transform: none;
}
@media (max-width: 700px) {
  .select-chevron {
    right: 14px;
  }
  .wordmark {
    font-size: 20px;
  }
  .empty-state h2 {
    font-size: 22px;
  }
  .workspace[data-view="card"] .page-heading h1 {
    font-size: 26px;
  }
}

@media (max-width: 360px) {
  .filters > div:not(.search-control) {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (forced-colors: active) {
  :root {
    scrollbar-color: auto;
  }
  *::-webkit-scrollbar-thumb {
    background: ButtonText;
  }
  button,
  input,
  select,
  .task-card,
  .column,
  .stage-order {
    border-color: ButtonText;
  }
}

/* One visible, editable place in the shared column queue. */
.queue-number {
  margin-right: auto;
  min-width: 32px;
  min-height: 32px;
  padding: 3px 8px;
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
  font-variant-numeric: tabular-nums;
}
.queue-hint {
  margin: -4px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.task-card.insert-before {
  box-shadow: 0 -3px 0 var(--accent);
}
.task-card.insert-after {
  box-shadow: 0 3px 0 var(--accent);
}
#edit-position {
  max-width: 140px;
}

.access-mode {
  color: var(--shell-muted);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.account-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 200px;
  text-align: right;
}
.read-only .queue-number,
.read-only .assignee-control {
  cursor: default;
}
