:root {
  color-scheme: light;
  --bg: #f6f8fc;
  --surface: #ffffff;
  --surface-raised: #f8fafc;
  --surface-muted: #eef3fb;
  --surface-strong: #e8edf6;
  --border: #d9e0ec;
  --border-strong: #b7c2d3;
  --border-tertiary: #8fa0b8;
  --text: #0e1628;
  --muted: #4f5d75;
  --faint: #758198;
  --tertiary: #9aa6b8;
  --nav: #061a2f;
  --nav-2: #031324;
  --brand: #0b5bd3;
  --brand-hover: #0a4db6;
  --brand-focus: #0b5bd3;
  --brand-soft: #e8f1ff;
  --blue: #0b5bd3;
  --green: #0a8f4b;
  --amber: #b7791f;
  --red: #d92d20;
  --danger: #b42318;
  --danger-hover: #912018;
  --danger-soft: #fff1f0;
  --slate: #64748b;
  --purple: #6d5bd0;
  --shadow: 0 22px 58px rgba(15, 23, 42, 0.14);
  --edge-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  --sidebar-width: 216px;
  --topbar-height: 68px;
  font-family:
    "SF Pro Display", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Workflow UI refresh */
body {
  color: var(--text);
  background: #f4f7fb;
}

.app-shell {
  background: var(--surface);
}

.sidebar {
  color: #eaf3ff;
  background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.workspace-button,
.nav-item,
.nav-link {
  color: #d8e7f8;
}

.workspace-button {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.workspace-button:hover,
.nav-item:hover,
.nav-item.active,
.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(43, 105, 197, 0.38);
}

.nav-item.active,
.nav-link.active {
  box-shadow: inset 3px 0 0 var(--brand);
}

.section-title,
.workspace-button small,
.boundary-copy small {
  color: #8fa7c2;
}

.main {
  background: var(--surface);
}

.topbar {
  border-bottom-color: var(--border);
  background: #ffffff;
  backdrop-filter: none;
}

.project-switcher,
.global-search,
.secondary-button,
.mini-action,
.table-action,
.icon-button {
  color: var(--muted);
  background: #ffffff;
}

.project-switcher {
  border-left-color: var(--brand);
}

.toolbar {
  padding-top: 14px;
  background: #ffffff;
}

.content {
  background: #ffffff;
}

.board {
  grid-auto-columns: minmax(226px, 1fr);
  gap: 10px;
}

.column {
  border-color: var(--border);
  background: #f8fafd;
}

.column[data-column="todo"],
.column[data-column="in-progress"],
.column[data-column="review"],
.column[data-column="done"] {
  background: #f8fafd;
}

.column[data-column="in-progress"] {
  border-top: 3px solid var(--brand);
}

.column[data-column="review"] {
  border-top: 3px solid #d28a09;
}

.column[data-column="done"] {
  border-top: 3px solid var(--green);
}

.column-header {
  min-height: 52px;
}

.issue-card {
  min-height: 148px;
  border-color: var(--border);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.issue-card h3 {
  color: var(--text);
  font-size: 15px;
}

.issue-card p,
.card-meta,
.detail-line,
.small-line,
.subtle {
  color: var(--muted);
}

.card-counter {
  color: var(--muted);
  font-size: 12px;
}

.review-groups {
  gap: 12px;
}

.review-group {
  display: grid;
  gap: 8px;
}

.review-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.review-group-title small {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.status-pill,
.priority-pill,
.stream-pill,
.pill {
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.status-pill.pending,
.status-pill.planning,
.status-pill.queued,
.status-pill.leased,
.status-pill.starting {
  color: #0057c2;
  background: #dcebff;
}

.status-pill.executing,
.status-pill.running,
.status-pill.materializing-changes {
  color: #0057c2;
  background: #dcebff;
}

.status-pill.plan-review,
.status-pill.change-review,
.status-pill.changes-requested {
  color: #a35f00;
  background: #fff2cc;
}

.status-pill.approved,
.status-pill.succeeded,
.status-pill.materialized,
.status-pill.merged,
.status-pill.available,
.status-pill.online {
  color: #087443;
  background: #dff6e7;
}

.status-pill.admin {
  color: #744210;
  background: #fef3c7;
}

.status-pill.selected {
  color: #0057c2;
  background: #dcebff;
}

.status-pill.blocks,
.status-pill.blocked {
  color: #b42318;
  background: #fee4e2;
}

.status-pill.relates-to {
  color: #475467;
  background: #edf2f7;
}

.status-pill.duplicates {
  color: #9a5b00;
  background: #fff2cc;
}

.priority-pill.high,
.priority-pill.urgent {
  color: #b42318;
  background: #ffd9d6;
}

.priority-pill.normal {
  color: #374151;
  background: #edf2f7;
}

.priority-pill.low {
  color: #087443;
  background: #dff6e7;
}

.type-pill {
  display: inline-grid;
  place-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  color: #334155;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.type-pill.story {
  color: #4c3db7;
  background: #ece9ff;
}

.type-pill.task {
  color: #334155;
  background: #eef2f7;
}

.card-progress {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.breaking-down,
.status-pill.breakdown-review,
.status-pill.parse-error {
  color: #4c3db7;
  background: #ece9ff;
}

.parent-breadcrumb {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.relation-card {
  display: grid;
  gap: 12px;
}

.relation-list,
.artifact-list {
  display: grid;
  gap: 8px;
}

.relation-row,
.relation-create-row {
  display: grid;
  grid-template-columns: minmax(92px, auto) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.relation-link {
  justify-content: flex-start;
  min-width: 0;
  text-align: left;
}

.relation-link span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relation-create-row input,
.relation-create-row select {
  min-width: 0;
}

.breakdown-layout,
.subtasks-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: 14px;
}

.artifact-list-card,
.breakdown-review-card,
.subtasks-card,
.add-subtask-card {
  min-width: 0;
}

.artifact-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.artifact-list-item.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.artifact-list-item small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.reference-image-panel {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.reference-image-panel h4 {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.reference-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.file-button {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.file-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.reference-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.reference-image-card {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 8px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
}

.reference-image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background: var(--panel);
}

.reference-image-card figcaption {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 12px;
}

.reference-image-card strong,
.reference-image-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-image-card span {
  color: var(--muted);
}

.reference-image-card .reference-image-source {
  color: var(--ink);
}

.reference-image-delete {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--danger);
  font: inherit;
  cursor: pointer;
}

.reference-image-delete:hover {
  text-decoration: underline;
}

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

.reference-pack-card {
  display: grid;
  gap: 8px;
  padding: 9px;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
}

.reference-pack-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.reference-pack-main strong,
.reference-pack-main span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-pack-main span {
  color: var(--muted);
  font-size: 12px;
}

.reference-pack-files {
  min-width: 0;
  font-size: 12px;
}

.reference-pack-files summary {
  cursor: pointer;
  color: var(--ink);
}

.reference-pack-file-list {
  display: grid;
  gap: 5px;
  margin-top: 6px;
}

.reference-pack-file {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  background: var(--panel);
}

.reference-pack-file code,
.reference-pack-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-pack-file span {
  color: var(--muted);
}

.subtask-table {
  display: grid;
  gap: 6px;
}

.subtask-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 96px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
}

.subtask-row.header {
  min-height: 30px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 800;
}

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

.child-row {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.child-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.child-row-main strong {
  color: var(--muted);
  font-size: 12px;
}

.child-title {
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.child-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.child-row-meta > span:not(.status-pill) {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.created-issues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.add-subtask-card {
  display: grid;
  gap: 10px;
  align-self: start;
}

.graph-shell {
  position: relative;
  min-height: 680px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #f7faff;
}

.graph-v2-workbench {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 690px;
}

.graph-controls,
.graph-inspector {
  min-width: 0;
  background: rgba(255, 255, 255, 0.96);
}

.graph-controls {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
  border-right: 1px solid var(--border);
}

.graph-rail-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.graph-summary strong {
  font-size: 15px;
}

.graph-metric,
.graph-query-pill,
.graph-zoom-value,
.graph-density-pill {
  display: inline-grid;
  place-items: center;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.graph-preset-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.graph-preset {
  min-height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 11px;
  font-weight: 850;
}

.graph-preset.active {
  color: var(--brand);
  border-color: rgba(11, 91, 211, 0.32);
  background: var(--brand-soft);
}

.graph-control-group {
  display: grid;
  gap: 7px;
}

.graph-filter-toggle {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
  white-space: nowrap;
}

.graph-filter-toggle small {
  color: var(--faint);
  font-size: 11px;
}

.graph-filter-toggle.active {
  color: var(--text);
  background: var(--surface-raised);
}

.graph-filter-mark {
  width: 22px;
  border-top: 2px solid var(--slate);
}

.graph-filter-toggle.parent .graph-filter-mark {
  border-color: var(--brand);
}

.graph-filter-toggle.blocks .graph-filter-mark {
  border-color: var(--red);
  border-top-style: dashed;
}

.graph-filter-toggle.relates_to .graph-filter-mark {
  border-top-style: dotted;
}

.graph-filter-toggle.duplicates .graph-filter-mark {
  border-color: var(--amber);
  border-top-style: dashed;
}

.graph-filter-toggle.requires_art .graph-filter-mark {
  border-color: #64748b;
}

.graph-filter-toggle.uses_asset .graph-filter-mark {
  border-color: #94a3b8;
  border-top-style: dashed;
}

.graph-filter-toggle:not(.active) {
  opacity: 0.58;
}

.graph-status-filter,
.graph-status-filter.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.graph-status-filter button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 11px;
}

.graph-rail-note {
  margin: auto 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.4;
}

.graph-canvas-frame {
  position: relative;
  min-height: 690px;
  overflow: hidden;
  background: #f8fbff;
}

.graph-canvas-surface {
  position: relative;
}

.graph-canvas-toolbar {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.graph-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.graph-zoom-controls .icon-button {
  width: 30px;
  height: 30px;
  min-height: 30px;
  font-size: 17px;
  font-weight: 900;
}

.issue-graph-svg {
  display: block;
  width: 100%;
  height: 690px;
  min-height: 690px;
  cursor: grab;
  touch-action: none;
}

.graph-grid-fill {
  fill: #f9fbff;
}

.graph-grid-line {
  fill: none;
  stroke: #dce5f2;
  stroke-width: 1;
  opacity: 0.58;
}

.graph-cluster-box {
  fill: rgba(255, 255, 255, 0.74);
  stroke: #d4deed;
  stroke-width: 1.2;
  filter: drop-shadow(0 10px 22px rgba(15, 23, 42, 0.05));
}

.graph-cluster.story .graph-cluster-box {
  stroke: rgba(11, 91, 211, 0.28);
}

.graph-cluster.godot-design .graph-cluster-box {
  fill: rgba(255, 255, 255, 0.52);
  stroke: rgba(34, 197, 94, 0.24);
}

.graph-cluster.unlinked .graph-cluster-box {
  fill: rgba(248, 250, 252, 0.78);
  stroke-dasharray: 7 6;
}

.graph-cluster-title {
  fill: var(--text);
  font-size: 13px;
  font-weight: 850;
  pointer-events: none;
}

.graph-cluster-meta rect,
.graph-group-toggle rect {
  fill: var(--brand-soft);
  stroke: rgba(11, 91, 211, 0.18);
}

.graph-cluster-meta text,
.graph-group-toggle text {
  fill: var(--brand);
  font-size: 11px;
  font-weight: 850;
  pointer-events: none;
}

.graph-group-toggle {
  cursor: pointer;
}

.graph-group-toggle:hover rect {
  stroke: var(--brand);
}

.graph-edge {
  color: var(--slate);
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
  transition: opacity 120ms ease, stroke-width 120ms ease;
}

.graph-edge-group.connected .graph-edge,
.graph-edge.connected {
  opacity: 1;
  stroke-width: 3;
}

.graph-edge-group.muted .graph-edge,
.graph-edge.muted {
  opacity: 0.13;
}

.graph-edge.parent {
  color: #2b6fd6;
  stroke-width: 2;
}

.graph-edge.blocks {
  color: var(--red);
  stroke-dasharray: 8 6;
}

.graph-edge.relates_to {
  color: var(--slate);
  stroke-dasharray: 2 7;
}

.graph-edge.duplicates {
  color: var(--amber);
  stroke-dasharray: 9 6;
}

.graph-edge.requires_art {
  color: #64748b;
  stroke-width: 1.9;
}

.graph-edge.uses_asset {
  color: #94a3b8;
  stroke-dasharray: 7 6;
  stroke-width: 1.8;
}

.graph-edge-label rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: var(--border);
}

.graph-edge-label text {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 850;
  pointer-events: none;
}

.graph-edge-label.blocks text {
  fill: var(--red);
}

.graph-edge-label.duplicates text {
  fill: var(--amber);
}

.graph-edge-group.muted .graph-edge-label {
  opacity: 0.16;
}

.graph-node {
  cursor: pointer;
}

.graph-node.muted {
  opacity: 0.42;
}

.graph-node-card {
  fill: #ffffff;
  stroke: var(--border-strong);
  stroke-width: 1.5;
  filter: drop-shadow(0 8px 16px rgba(15, 23, 42, 0.07));
}

.graph-node.story .graph-node-card {
  stroke: #5e6ad2;
}

.graph-node.task .graph-node-card {
  stroke: #8fa0b8;
}

.graph-node.game_design .graph-node-card {
  stroke: #22c55e;
}

.graph-node.game_art .graph-node-card {
  stroke: #f59e0b;
}

.graph-node.game_program .graph-node-card {
  stroke: #64748b;
}

.graph-node.selected .graph-node-card {
  stroke: var(--brand);
  stroke-width: 2.5;
}

.graph-node.hovered .graph-node-card {
  stroke-width: 2.5;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.14));
}

.graph-node text {
  pointer-events: none;
  fill: var(--text);
  font-size: 11px;
}

.graph-node-id {
  font-weight: 900;
}

.graph-node-title {
  fill: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.graph-node.godot-node .graph-node-title {
  font-size: 13px;
  font-weight: 850;
}

.graph-node-body {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.graph-node-meta,
.graph-node.godot-node .graph-node-id {
  fill: var(--faint);
  font-size: 10px;
  font-weight: 850;
}

.graph-node-type-stripe.game_design {
  fill: #22c55e;
}

.graph-node-type-stripe.game_art {
  fill: #f59e0b;
}

.graph-node-type-stripe.game_program {
  fill: #64748b;
}

.graph-node-status-stripe {
  fill: var(--slate);
}

.graph-node-status-stripe.done {
  fill: var(--green);
}

.graph-node-status-stripe.plan-review,
.graph-node-status-stripe.breakdown-review,
.graph-node-status-stripe.change-review {
  fill: var(--amber);
}

.graph-node-status-stripe.executing,
.graph-node-status-stripe.planning,
.graph-node-status-stripe.breaking-down,
.graph-node-status-stripe.in-progress {
  fill: var(--brand);
}

.graph-node-chip rect {
  stroke: none;
}

.graph-node-chip text {
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
}

.graph-node-chip.status rect {
  fill: #edf2f7;
}

.graph-node-chip.type rect {
  fill: #f8fafc;
}

.graph-node-chip.type text {
  fill: var(--muted);
}

.graph-node-chip.type.game_design rect {
  fill: #dcfce7;
}

.graph-node-chip.type.game_design text {
  fill: #15803d;
}

.graph-node-chip.type.game_art rect {
  fill: #fef3c7;
}

.graph-node-chip.type.game_art text {
  fill: #a16207;
}

.graph-node-chip.type.game_program rect {
  fill: #e2e8f0;
}

.graph-node-chip.type.game_program text {
  fill: #475569;
}

.graph-node-chip.status.done rect {
  fill: #dff6e7;
}

.graph-node-chip.status.done text {
  fill: #087443;
}

.graph-node-chip.status.plan-review rect,
.graph-node-chip.status.breakdown-review rect,
.graph-node-chip.status.change-review rect {
  fill: #fff2cc;
}

.graph-node-chip.status.plan-review text,
.graph-node-chip.status.breakdown-review text,
.graph-node-chip.status.change-review text {
  fill: #9a5b00;
}

.graph-node-chip.status.executing rect,
.graph-node-chip.status.planning rect,
.graph-node-chip.status.breaking-down rect,
.graph-node-chip.status.in-progress rect {
  fill: #dcebff;
}

.graph-node-chip.status.executing text,
.graph-node-chip.status.planning text,
.graph-node-chip.status.breaking-down text,
.graph-node-chip.status.in-progress text {
  fill: #0057c2;
}

.graph-priority-dot.high,
.graph-priority-dot.urgent {
  fill: var(--red);
}

.graph-priority-dot.normal {
  fill: var(--slate);
}

.graph-priority-dot.low {
  fill: var(--green);
}

.graph-empty-filter {
  display: grid;
  place-content: center;
  min-height: 690px;
  padding: 32px;
  text-align: center;
}

.graph-empty-filter h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.graph-empty-filter p {
  margin: 0;
  color: var(--muted);
}

.graph-legend {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.graph-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.graph-inspector {
  /* Slide-over panel: floats over the right edge of the canvas so the canvas keeps the
     full grid width. Opens when a node is selected, dismissable via its close button. */
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 290px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-left: 1px solid var(--border);
  background: #ffffff;
  box-shadow: -10px 0 28px rgba(15, 23, 42, 0.1);
  overflow-y: auto;
  z-index: 4;
}

.graph-inspector-head {
  position: relative;
  padding-right: 28px;
}

.graph-inspector-close {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 26px;
  height: 26px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.graph-filter-toggle.empty {
  opacity: 0.45;
}

.graph-inspector-head h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

.graph-inspector-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.graph-inspector-status,
.graph-inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.graph-inspector-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.graph-inspector-stats span {
  min-height: 52px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 750;
}

.graph-inspector-stats strong {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.graph-inspector-section {
  display: grid;
  gap: 8px;
}

.graph-inspector-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.graph-linked-list {
  display: grid;
  gap: 7px;
}

.graph-linked-ticket,
.graph-run-card {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: #ffffff;
  text-align: left;
}

.graph-linked-ticket {
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
}

.graph-linked-ticket > span:last-child {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.graph-linked-relation {
  color: var(--faint);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.graph-linked-ticket.blocks .graph-linked-relation {
  color: var(--red);
}

.graph-linked-ticket.duplicates .graph-linked-relation {
  color: var(--amber);
}

.graph-linked-ticket.requires_art .graph-linked-relation,
.graph-linked-ticket.uses_asset .graph-linked-relation {
  color: #64748b;
}

.graph-minimap {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  width: 156px;
  height: 112px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  pointer-events: none;
}

.graph-minimap svg {
  display: block;
  width: 100%;
  height: 100%;
}

.graph-minimap rect {
  fill: #94a3b8;
  opacity: 0.82;
}

.graph-minimap rect.game_design {
  fill: #22c55e;
}

.graph-minimap rect.game_art {
  fill: #f59e0b;
}

.graph-minimap rect.game_program {
  fill: #64748b;
}

@media (max-width: 700px) {
  .graph-canvas-toolbar {
    left: 8px;
    right: auto;
    bottom: 8px;
    flex-wrap: wrap;
    max-width: calc(100% - 16px);
    gap: 5px;
  }

  .graph-density-pill,
  .graph-zoom-value {
    font-size: 11px;
  }

  .graph-minimap {
    right: 8px;
    bottom: 92px;
    width: 96px;
    height: 70px;
    padding: 7px;
  }
}

.graph-run-card small {
  color: var(--muted);
}

.node-sample {
  width: 14px;
  height: 10px;
  border: 2px solid #8fa0b8;
  border-radius: 3px;
}

.node-sample.story {
  border-color: #5e6ad2;
}

.node-sample.game_design {
  border-color: #22c55e;
}

.node-sample.game_art {
  border-color: #f59e0b;
}

.node-sample.game_program {
  border-color: #64748b;
}

.edge-sample {
  width: 22px;
  border-top: 2px solid var(--slate);
}

.edge-sample.parent {
  border-color: var(--brand);
}

.edge-sample.blocks {
  border-color: var(--red);
  border-top-style: dashed;
}

.edge-sample.relates_to {
  border-top-style: dotted;
}

.edge-sample.duplicates {
  border-color: var(--amber);
  border-top-style: dashed;
}

.resource-detail-dialog {
  width: min(1296px, calc(100vw - 28px));
  max-height: min(94vh, calc(100vh - 24px));
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.resource-modal {
  max-height: min(94vh, calc(100vh - 24px));
  color: var(--text);
  background: #ffffff;
  border-radius: 8px;
}

.resource-modal-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 22px 24px 12px;
  border-bottom-color: var(--border);
}

.resource-modal-title h2 {
  font-size: 30px;
  line-height: 1.15;
}

.resource-modal-actions {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
}

.tabs {
  padding: 0 24px;
  background: #ffffff;
}

.tabs button {
  min-height: 54px;
  border-radius: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.tabs button.active {
  color: var(--brand);
  background: transparent;
  border-bottom-color: var(--brand);
}

.resource-modal-body {
  padding: 22px 24px;
  background: #ffffff;
}

.workflow-card{
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.workflow-card {
  padding: 16px;
}

.workflow-card h3,
.workflow-card h4{
  margin: 0;
  color: var(--text);
}

.issue-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 14px 18px;
  align-items: start;
}

.issue-overview-main,
.issue-overview-side {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-content: start;
}

.issue-overview-main {
  grid-column: 1;
}

.issue-overview-side {
  grid-column: 2;
}

.issue-summary-card,
.selected-plan-card,
.activity-card,
.issue-properties {
  min-width: 0;
}

.summary-editor {
  margin-top: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  overflow: hidden;
}

.editor-tools {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.summary-body {
  min-height: 144px;
  border: 0;
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  resize: vertical;
}

.summary-title-input {
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
}

.prop-grid {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 18px 20px;
  margin-top: 24px;
  align-items: center;
}

.prop-grid span {
  color: var(--text);
}

.prop-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.compact-input {
  min-height: 34px;
  padding: 6px 8px;
}

.selected-plan-row,
.activity-head,
.github-title{
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-plan-row {
  justify-content: space-between;
  margin-top: 12px;
}

.select-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: min(530px, 64vw);
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
}

.activity-card {
  padding-bottom: 0;
}

.activity-head {
  flex-wrap: wrap;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.note-box {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.note-box input {
  width: min(270px, 48vw);
}

.activity-list {
  display: grid;
}

.activity-row {
  display: grid;
  grid-template-columns: 30px 120px minmax(0, 1fr) 80px 28px;
  gap: 10px;
  align-items: center;
  min-height: 50px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}

.activity-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #ffffff;
  background: #0b2140;
  font-weight: 700;
}

.mini-avatar.system-icon {
  color: var(--muted);
  background: var(--surface-muted);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-title{
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 18px;
  font-weight: 800;
}

.small-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 9px;
  font-size: 14px;
}

.version {
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
}

.check {
  color: var(--green);
}

.section {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.section p {
  margin: 12px 0 0;
  line-height: 1.45;
}

.steps {
  margin: 12px 0 0;
  padding-left: 22px;
  line-height: 1.6;
}

.github-card {
  margin: 16px;
  padding: 16px;
  border: 1px solid #a9dfbd;
  border-radius: 6px;
  background: #effbf3;
}

.github-title {
  justify-content: space-between;
}

.pr-link {
  margin-top: 12px;
  color: var(--brand);
  font-weight: 800;
}

.diff-list {
  display: grid;
  gap: 8px;
  padding: 0 16px 16px;
}

.file {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.plus {
  color: var(--green);
}

.minus {
  color: var(--red);
}

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

@media (max-width: 1100px) {
  .issue-overview-grid{
    grid-template-columns: 1fr;
  }

  .issue-overview-main,
  .issue-overview-side {
    grid-column: auto;
  }

  .issue-summary-card,
  .selected-plan-card,
  .activity-card,
  .issue-properties {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 700px) {
  .resource-detail-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
  }

  .resource-modal-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-modal-title h2 {
    font-size: 22px;
  }

  .resource-modal-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .tabs {
    padding: 0 12px;
  }

  .resource-modal-body {
    padding: 12px;
  }

  .activity-row {
    grid-template-columns: 30px minmax(0, 1fr) 28px;
  }

  .activity-row span:nth-child(2),
  .activity-row span:nth-child(4) {
    display: none;
  }

  .note-box {
    width: 100%;
    margin-left: 0;
  }

  .note-box input {
    width: 100%;
  }

  .select-box {
    min-width: 0;
    width: 100%;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-width: 320px;
  min-height: 100%;
}

body {
  overflow: hidden;
  color: var(--text);
  background: var(--bg);
}

body.auth-only {
  overflow: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid rgba(94, 105, 209, 0.72);
  outline-offset: 2px;
}

.auth-gate {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg);
}

.auth-gate[hidden] {
  display: none;
}

.auth-panel {
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow), var(--edge-highlight);
}

.auth-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.auth-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.auth-heading h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.auth-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

.auth-panel label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-panel input {
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-raised);
  font-size: 14px;
}

.auth-error {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(214, 107, 115, 0.42);
  border-radius: 8px;
  color: #f1a1a8;
  background: rgba(214, 107, 115, 0.11);
  line-height: 1.4;
}

.auth-panel menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow: auto;
  box-shadow: var(--edge-highlight);
}

.avatar {
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--brand);
  font-weight: 700;
}

.workspace-button strong {
  display: block;
  line-height: 1.2;
}

.workspace-button small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.workspace-button,
.project-switcher,
.nav-item,
.nav-link,
.icon-button,
.primary-button,
.secondary-button,
.danger-button,
.mini-action,
.segmented button,
.table-action {
  border-radius: 8px;
  cursor: pointer;
}

.workspace-boundary {
  display: grid;
  gap: 6px;
}

.workspace-button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-raised);
  text-align: left;
}

.workspace-button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.boundary-mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--faint);
  background: var(--surface-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.boundary-copy,
.popover-copy {
  min-width: 0;
}

.chevron {
  color: var(--faint);
  font-size: 12px;
}

.nav-group,
.nav-section {
  display: grid;
}

.nav-group {
  gap: 14px;
}

.nav-section,
.nav-cluster {
  gap: 6px;
}

.nav-cluster {
  display: grid;
}

.nav-cluster + .nav-cluster {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.section-title {
  padding: 0 8px 4px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.nav-item,
.nav-link {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  text-align: left;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  color: var(--faint);
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active,
.nav-link:hover,
.nav-link.active {
  background: var(--surface-muted);
  color: var(--text);
}

.nav-item.active {
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--brand);
}

.nav-item.workspace-scope.active {
  box-shadow: inset 2px 0 0 var(--brand);
}

.nav-icon {
  width: 11px;
  height: 11px;
  border-radius: 4px;
  background: var(--tertiary);
}

.issue-icon,
.graph-icon,
.run-icon,
.agent-icon,
.runtime-icon,
.host-icon { background: var(--tertiary); }

.nav-item.active .nav-icon { background: var(--brand); }

.nav-link {
  padding: 8px 10px;
  color: var(--muted);
}

.nav-link.active {
  color: var(--text);
  box-shadow: inset 2px 0 0 var(--brand);
}

.state-dot,
.connection i,
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--slate);
}

.state-dot.online,
.state-dot.available,
.connection.online i,
.status-dot.in-review,
.status-dot.succeeded,
.status-dot.available {
  background: var(--green);
}

.status-dot.done {
  background: var(--purple);
}

.state-dot.running,
.state-dot.leased,
.state-dot.starting,
.connection.connecting i,
.status-dot.in-progress,
.status-dot.running {
  background: var(--blue);
}

.state-dot.queued,
.state-dot.open,
.status-dot.backlog,
.status-dot.queued,
.status-dot.open {
  background: var(--slate);
}

.state-dot.draining,
.state-dot.cancel-requested,
.state-dot.unavailable,
.status-dot.pending-requirement,
.status-dot.draining {
  background: var(--amber);
}

.state-dot.failed,
.state-dot.cancelled,
.state-dot.disabled,
.state-dot.removed,
.connection.error i,
.status-dot.failed,
.status-dot.cancelled {
  background: var(--red);
}

.main {
  display: grid;
  grid-template-rows: var(--topbar-height) auto auto minmax(0, 1fr);
  min-width: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(320px, 560px) minmax(260px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(1, 1, 2, 0.9);
  backdrop-filter: blur(12px);
}

.breadcrumb,
.top-actions,
.connection,
.hero-actions {
  display: flex;
  align-items: center;
}

.breadcrumb {
  min-width: 0;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb strong,
.breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb strong {
  color: var(--text);
}

.global-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--edge-highlight);
}

.global-search span {
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.global-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

kbd {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
}

.top-actions {
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.connection {
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-raised);
  font-size: 12px;
  font-weight: 600;
}

.icon-button svg {
  display: block;
  width: 14px;
  height: 14px;
}

.icon-button:hover,
.secondary-button:hover,
.table-action:hover,
.mini-action:hover,
.segmented button:hover {
  border-color: var(--border-strong);
  background: var(--surface-muted);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 12px;
}

.project-switcher {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
  min-height: 66px;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--brand);
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--edge-highlight);
  text-align: left;
}

.project-switcher:hover {
  border-color: var(--border-tertiary);
  border-left-color: var(--brand-hover);
  background: var(--surface-muted);
}

.project-switcher:disabled {
  opacity: 0.66;
  cursor: not-allowed;
}

.project-mark {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  max-width: 88px;
  height: 40px;
  padding: 0 8px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button,
.mini-action,
.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  background: var(--brand);
}

.primary-button:hover {
  background: var(--brand-hover);
}

.secondary-button,
.mini-action,
.table-action {
  border-color: var(--border);
  color: var(--muted);
  background: var(--surface-raised);
}

.danger-button {
  border-color: var(--danger);
  color: #ffffff;
  background: var(--danger);
}

.danger-button:hover {
  border-color: var(--danger-hover);
  background: var(--danger-hover);
}

.table-action.danger-action {
  border-color: rgba(180, 35, 24, 0.36);
  color: var(--danger);
  background: #ffffff;
}

.table-action.danger-action:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

button:disabled,
input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

::placeholder {
  color: var(--tertiary);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: var(--border-tertiary);
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.mini-action,
.table-action {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px 12px;
}

.segmented {
  display: flex;
  gap: 5px;
  min-width: 0;
  overflow-x: auto;
}

.segmented button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-raised);
  white-space: nowrap;
}

.segmented button.active {
  border-color: rgba(94, 106, 210, 0.58);
  color: var(--brand);
  background: var(--brand-soft);
}

.toolbar-spacer {
  flex: 1;
}

.content {
  min-height: 0;
  padding: 0 22px 22px;
  overflow: hidden;
}

.split-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  height: 100%;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(236px, 1fr);
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  padding-inline: 2px;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-inline: 24px;
  scrollbar-gutter: stable;
}

.column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 236px;
  min-height: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--edge-highlight);
}

.column[data-column="pending-requirement"] {
  background: #13110c;
}

.column[data-column="in-progress"] {
  background: #101118;
}

.column[data-column="in-review"] {
  background: #0f1411;
}

.column[data-column="done"] {
  background: #111118;
}

.column.drop-enabled.drag-over {
  outline: 2px solid rgba(94, 106, 210, 0.78);
  outline-offset: -2px;
}

.column.drop-disabled.drag-over {
  outline: 2px dashed var(--amber);
  outline-offset: -2px;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 11px 12px 6px;
}

.column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.column-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.column-title small {
  color: var(--muted);
}

.column-actions {
  display: inline-flex;
  gap: 5px;
}

.column-menu:disabled {
  opacity: 0.58;
  cursor: default;
}

.cards {
  /* Flex column (not grid): grid auto-rows collapsed to a fixed track height equal to
     the card min-height, which clamped tall cards and made long titles overflow under
     the corner-pinned assignee chip. Flexbox lets each card grow to fit its content
     while keeping min-height as a floor. */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.issue-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  /* Never shrink below content: as a flex item in the scrolling .cards column, the card
     would otherwise compress when the column is full, clamping tall cards so the title
     overflows under the footer. Keep natural height and let the column scroll instead. */
  flex: 0 0 auto;
  gap: 7px;
  min-height: 124px;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--edge-highlight);
  cursor: pointer;
}

.issue-card:hover,
.issue-card.selected,
.data-row:hover,
.data-row.selected {
  border-color: rgba(94, 106, 210, 0.64);
  background: var(--surface-muted);
  box-shadow: 0 0 0 1px rgba(94, 106, 210, 0.14), var(--edge-highlight);
}

.issue-card.selected {
  scroll-margin-inline: 24px;
}

.issue-card.failed,
.issue-card.cancelled { border-left-color: var(--red); }
.issue-card.in-progress,
.issue-card.running { border-left-color: var(--blue); }
.issue-card.pending-requirement,
.issue-card.queued { border-left-color: var(--amber); }
.issue-card.backlog,
.issue-card.open { border-left-color: var(--slate); }
.issue-card.in-review,
.issue-card.succeeded,
.issue-card.closed { border-left-color: var(--green); }
.issue-card.done { border-left-color: var(--purple); }

.card-kicker,
.card-meta,
.card-actions,
.detail-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex-wrap: wrap;
}

.card-kicker {
  justify-content: space-between;
}

.card-id,
.card-meta,
.detail-line {
  color: var(--muted);
  font-size: 12px;
}

.issue-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  line-height: 1.32;
}

.issue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 24px;
  /* Pin the footer row to the bottom of the card so the right-aligned assignee chip
     sits in a consistent bottom-right position regardless of title line count. */
  margin-top: auto;
}

.card-avatar {
  display: inline-grid;
  place-items: center;
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-size: 10px;
  font-weight: 700;
}

.card-avatar.unassigned {
  color: var(--muted);
  background: var(--surface-muted);
}

.pill,
.status-pill,
.priority-pill,
.stream-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.status-pill.open,
.status-pill.backlog { color: var(--faint); background: var(--surface-muted); }
.status-pill.pending-requirement { color: #e2bc77; background: rgba(201, 151, 69, 0.12); }
.status-pill.queued,
.status-pill.leased,
.status-pill.starting { color: #e2bc77; background: rgba(201, 151, 69, 0.12); }
.status-pill.in-progress,
.status-pill.running,
.status-pill.materializing-changes { color: #b7c0ff; background: rgba(94, 106, 210, 0.15); }
.status-pill.in-review,
.status-pill.succeeded,
.status-pill.closed,
.status-pill.available,
.status-pill.online { color: #9ce3ad; background: rgba(39, 166, 68, 0.13); }
.status-pill.done { color: #c8cbed; background: rgba(122, 127, 173, 0.16); }
.status-pill.failed,
.status-pill.cancelled,
.status-pill.disabled,
.status-pill.removed,
.status-pill.error,
.status-pill.blocked { color: #f1a1a8; background: rgba(214, 107, 115, 0.13); }
.status-pill.cancel-requested,
.status-pill.draining,
.status-pill.unavailable { color: #e2bc77; background: rgba(201, 151, 69, 0.12); }

.priority-pill.high,
.priority-pill.urgent {
  color: #f1a1a8;
  background: rgba(214, 107, 115, 0.13);
}

.priority-pill.low {
  color: var(--faint);
  background: var(--surface-muted);
}

.empty-card,
.empty-state,
.setup-state {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 22px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-raised);
  text-align: center;
}

.setup-state {
  align-content: center;
  height: 100%;
}

.setup-state h2,
.empty-state h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 20px;
}

.setup-state p,
.empty-state p {
  max-width: 680px;
  margin: 0;
  line-height: 1.5;
}

.empty-state-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  flex-wrap: wrap;
}

.setup-state code {
  padding: 2px 5px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-muted);
}

.resource-detail-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: min(82vh, calc(100vh - 32px));
  padding: 0;
  overflow: hidden;
  border-color: var(--border-strong);
}

.resource-modal {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  max-height: min(82vh, calc(100vh - 32px));
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--edge-highlight);
}

.resource-modal-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}

.resource-modal-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.resource-modal-title h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.resource-modal-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-raised);
  overflow-x: auto;
}

.tabs button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}

.tabs button.active {
  border-color: var(--border-strong);
  color: var(--text);
  background: var(--surface-muted);
}

.resource-modal-body {
  min-height: 0;
  padding: 14px;
  overflow: auto;
}

.resource-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.resource-meta-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--edge-highlight);
}

.resource-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form-grid {
  gap: 8px;
}

.issue-draft-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-top: 4px;
  flex-wrap: wrap;
}

.issue-draft-error {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  line-height: 1.4;
}

.detail-grid {
  display: grid;
  gap: 10px;
}

.detail-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.detail-field span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail-field strong,
.detail-field code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-field code {
  padding: 6px 8px;
  border-radius: 7px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 12px;
}

.inline-form {
  display: grid;
  gap: 8px;
}

.inline-form input,
.inline-form textarea,
.inline-form select {
  min-height: 34px;
  padding: 8px 9px;
}

.logs {
  display: grid;
  gap: 6px;
  min-height: 240px;
  align-content: start;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #08090a;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.log-row {
  display: grid;
  grid-template-columns: 74px auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
}

.log-row time {
  color: var(--faint);
}

.log-row code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.stream-pill {
  min-height: 20px;
  padding: 3px 6px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
}

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

.event-item {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
}

.table-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
  min-height: 0;
}

.hosts-view {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

.host-onboarding-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.6fr) minmax(360px, 1fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-raised);
  box-shadow: var(--edge-highlight);
}

.host-onboarding-copy {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.host-onboarding-copy h2 {
  margin: 0;
  font-size: 16px;
}

.host-onboarding-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.host-onboarding-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.host-onboarding-meta span {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted);
  background: #ffffff;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.host-onboarding-command {
  display: grid;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.command-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--faint);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.command-block {
  margin: 0;
  padding: 12px;
  color: #dce8ff;
  background: #08101c;
  font-family: var(--mono-font);
  font-size: 12px;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--edge-highlight);
  overflow: auto;
}

.data-table {
  display: grid;
  min-width: 880px;
}

.data-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.data-row.header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px;
  color: var(--faint);
  background: var(--surface-raised);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.runs-grid {
  grid-template-columns: 110px 120px 120px 120px 110px minmax(130px, 1fr) 115px 80px;
}

.run-failure-note {
  display: block;
  margin-top: 4px;
  max-width: 104px;
  overflow: hidden;
  color: var(--red);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agents-grid {
  grid-template-columns: 84px minmax(150px, 1fr) 76px 92px 138px 72px 190px;
}

.runtimes-grid {
  grid-template-columns: 120px 86px minmax(140px, 1fr) 110px 96px 92px 74px 90px 90px;
}

.hosts-grid {
  grid-template-columns: 84px 96px 76px 70px minmax(96px, 0.85fr) minmax(130px, 1fr) 84px 76px 76px 86px 78px;
}

.mono-cell {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono-font);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.users-grid {
  grid-template-columns: minmax(170px, 1.2fr) minmax(190px, 1.2fr) 100px 130px 110px minmax(300px, 1.5fr);
}

.users-view {
  gap: 12px;
}

.compact-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) minmax(150px, 0.9fr) minmax(150px, 0.9fr) minmax(120px, 0.7fr) max-content;
  gap: 10px;
  align-items: end;
  padding: 12px;
}

.compact-form input,
.compact-form select {
  min-width: 0;
}

.compact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.user-create-email-field {
  min-width: 0;
}

.user-name-line {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
}

.user-name-line > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  overflow: visible;
  white-space: normal;
}

.compact-button {
  min-height: 32px;
  padding-inline: 10px;
}

.data-row > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.switch input {
  width: 16px;
  height: 16px;
}

.popover {
  position: fixed;
  z-index: 20;
  width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100vh - 24px));
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow), var(--edge-highlight);
  overflow: auto;
}

.popover-item {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.workspace-popover-item,
.project-popover-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 58px;
}

.popover-item:hover,
.popover-item.active {
  background: var(--surface-muted);
}

.popover-item strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-item small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-list {
  display: grid;
  gap: 2px;
}

.popover-empty {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 12px 10px;
  align-content: center;
}

.popover-empty strong {
  color: var(--text);
  font-size: 14px;
}

.popover-empty small {
  color: var(--muted);
  line-height: 1.4;
}

.popover-footer {
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 10px 8px 2px;
  border-top: 1px solid var(--border);
}

.popover-footer small {
  color: var(--muted);
  line-height: 1.4;
}

.popover-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.popover-action {
  width: 100%;
}

.popover-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.popover-mark.boundary {
  border: 1px solid var(--border);
  color: var(--faint);
  background: var(--surface-muted);
}

.popover-mark.project {
  width: auto;
  min-width: 34px;
  max-width: 80px;
  padding: 0 7px;
  color: #ffffff;
  background: var(--brand);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.popover-token {
  justify-self: end;
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.search-popover {
  width: min(560px, calc(100vw - 24px));
}

dialog {
  width: min(620px, calc(100vw - 28px));
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow), var(--edge-highlight);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

form,
.dialog-header,
menu {
  display: grid;
  gap: 15px;
}

.dialog-header,
menu {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.dialog-header strong {
  font-size: 16px;
}

.project-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.project-detail-meta div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-detail-meta span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.project-detail-meta strong,
.project-detail-meta code {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.project-detail-meta p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.field-help {
  color: var(--faint);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

input,
textarea,
select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
  background: var(--surface-raised);
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
  height: 16px;
}

menu {
  margin: 0;
  padding: 0;
}

.dialog-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.confirm-options {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-muted);
}

.confirm-options[hidden] {
  display: none;
}

.confirm-check {
  align-items: flex-start;
  color: var(--text);
}

.confirm-check small {
  flex-basis: 100%;
  margin-left: 25px;
  color: var(--faint);
  font-weight: 500;
  line-height: 1.35;
}

.token-box {
  max-height: 180px;
  margin: 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #08090a;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  max-width: min(560px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface-raised);
  box-shadow: var(--shadow), var(--edge-highlight);
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 220px;
  }

  .topbar {
    grid-template-columns: 1fr minmax(260px, 420px) auto;
  }

  .hero-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .resource-overview-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
  }

  .sidebar {
    position: static;
    display: flex;
    gap: 10px;
    max-height: none;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .workspace-button {
    min-height: 48px;
  }

  .nav-group {
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
  }

  .nav-cluster {
    grid-template-columns: repeat(3, minmax(84px, 1fr));
    gap: 6px;
  }

  .nav-cluster .section-title {
    grid-column: 1 / -1;
  }

  .nav-cluster + .nav-cluster {
    padding-top: 8px;
  }

  .nav-item {
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .nav-item.active {
    box-shadow: inset 0 -3px 0 var(--brand);
  }

  .nav-section {
    display: none;
  }

  .main {
    height: auto;
    min-height: 100vh;
    grid-template-rows: auto auto auto auto;
    overflow: visible;
  }

  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    padding-left: 14px;
    padding-right: 14px;
  }

  .project-switcher {
    grid-template-columns: auto minmax(0, 1fr) auto;
    min-height: 60px;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .content {
    padding: 0 14px 18px;
    overflow: visible;
  }

  .split-view,
  .table-view {
    grid-template-columns: 1fr;
    height: auto;
  }

  .hosts-view {
    grid-template-rows: auto auto;
  }

  .host-onboarding-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .command-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .compact-form .primary-button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .board {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow: visible;
  }

  .column {
    min-height: auto;
  }

  .cards {
    max-height: none;
  }

  .resource-detail-dialog {
    width: min(720px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
  }

  .resource-modal {
    max-height: calc(100vh - 20px);
  }

  .resource-modal-header,
  .resource-modal-body {
    padding: 12px;
  }

  .resource-detail-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .popover-footer-actions {
    grid-template-columns: 1fr;
  }

  .global-search {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .global-search span {
    display: none;
  }
}

/* Workflow UI final overrides */
body { color: var(--text); background: #f4f7fb; }
.sidebar { color: #eaf3ff; background: linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%); border-right: 1px solid rgba(255,255,255,0.08); }
.workspace-button { border-color: rgba(255,255,255,0.12); color: #d8e7f8; background: rgba(255,255,255,0.04); }
.workspace-button:hover, .nav-item:hover, .nav-item.active, .nav-link:hover, .nav-link.active { color: #ffffff; background: rgba(43,105,197,0.38); }
.nav-item, .nav-link { color: #d8e7f8; }
.section-title, .workspace-button small, .boundary-copy small { color: #8fa7c2; }
.main, .toolbar, .content { background: #ffffff; }
.topbar { border-bottom-color: var(--border); background: #ffffff; backdrop-filter: none; }
.project-switcher, .global-search, .secondary-button, .mini-action, .table-action, .icon-button { color: var(--muted); background: #ffffff; }
.board { grid-auto-columns: minmax(226px, 1fr); gap: 10px; }
.column, .column[data-column="todo"], .column[data-column="in-progress"], .column[data-column="review"], .column[data-column="done"] { border-color: var(--border); background: #f8fafd; }
.column[data-column="in-progress"] { border-top: 3px solid var(--brand); }
.column[data-column="review"] { border-top: 3px solid #d28a09; }
.column[data-column="done"] { border-top: 3px solid var(--green); }
.issue-card { min-height: 148px; border-color: var(--border); background: #ffffff; box-shadow: 0 8px 24px rgba(15,23,42,0.06); }
.resource-detail-dialog { width: min(1296px, calc(100vw - 28px)); max-height: min(94vh, calc(100vh - 24px)); border: 0; border-radius: 8px; background: transparent; }
.resource-modal { max-height: min(94vh, calc(100vh - 24px)); color: var(--text); background: #ffffff; border-radius: 8px; }
.resource-modal-header { grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; padding: 22px 24px 12px; border-bottom-color: var(--border); }
.resource-modal-title h2 { font-size: 30px; line-height: 1.15; }
.resource-modal-actions { grid-column: 2; grid-row: 1; align-self: center; }
.resource-modal-header > .icon-button[data-action="clear-selection"] { grid-column: 3; grid-row: 1; align-self: start; }
.tabs { padding: 0 24px; background: #ffffff; }
.tabs button { min-height: 54px; border-radius: 0; border: 0; border-bottom: 3px solid transparent; color: var(--text); background: transparent; font-size: 16px; }
.tabs button.active { color: var(--brand); background: transparent; border-bottom-color: var(--brand); }
.resource-modal-body { padding: 22px 24px; background: #ffffff; }
.status-pill, .priority-pill, .stream-pill, .pill { border: 0; border-radius: 6px; font-weight: 700; }
.status-pill.pending, .status-pill.planning, .status-pill.queued, .status-pill.leased, .status-pill.starting, .status-pill.executing, .status-pill.running, .status-pill.materializing-changes { color: #0057c2; background: #dcebff; }
.status-pill.plan-review, .status-pill.change-review, .status-pill.changes-requested { color: #a35f00; background: #fff2cc; }
.status-pill.approved, .status-pill.succeeded, .status-pill.materialized, .status-pill.merged, .status-pill.available, .status-pill.online { color: #087443; background: #dff6e7; }
.status-pill.failed, .status-pill.cancelled, .status-pill.disabled, .status-pill.error, .status-pill.blocked { color: #b42318; background: #ffd9d6; }
.status-pill.selected { color: #0057c2; background: #dcebff; }
.priority-pill.high, .priority-pill.urgent { color: #b42318; background: #ffd9d6; }
.priority-pill.normal { color: #374151; background: #edf2f7; }
.priority-pill.low { color: #087443; background: #dff6e7; }

@media (max-width: 1100px) {
  .issue-overview-grid{ grid-template-columns: 1fr; }
  .issue-overview-main, .issue-overview-side { grid-column: auto; }
  .issue-summary-card, .selected-plan-card, .activity-card, .issue-properties { grid-column: auto; grid-row: auto; }
}

@media (max-width: 700px) {
  .resource-detail-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
  .resource-modal-header { grid-template-columns: minmax(0, 1fr); }
  .resource-modal-title h2 { font-size: 22px; }
  .resource-modal-actions { grid-column: 1; grid-row: auto; }
  .tabs { padding: 0 12px; }
  .resource-modal-body { padding: 12px; }
  .activity-row { grid-template-columns: 30px minmax(0, 1fr) 28px; }
  .activity-row span:nth-child(2), .activity-row span:nth-child(4) { display: none; }
  .note-box { width: 100%; margin-left: 0; }
  .note-box input { width: 100%; }
  .select-box { min-width: 0; width: 100%; }
}

/* Review workflow v2 */
.column.drop-disabled .cards {
  cursor: default;
}

.issue-card.done {
  opacity: 0.68;
}

.issue-card {
  min-height: 118px;
}

.card-footer {
  align-items: center;
  gap: 10px;
}

.card-footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.card-counter,
.waiting-chip,
.done-note,
.status-banner,
.stage-actions,
.stage-card-head,
.stepper,
.plan-version-row,
.github-title,
.revision-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-counter svg,
.version svg,
.pr-link svg,
.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.assignee-chip {
  /* In-flow in the footer row (not absolute) so the badge sits below the title and can
     never overlap title text. margin-left:auto pins it to the right edge of the footer
     so it stays in a consistent corner regardless of the status chips beside it. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 24px;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  color: #334155;
  background: #eef2f7;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.waiting-chip {
  color: #a35f00;
  font-size: 12px;
  font-weight: 800;
}

.done-note {
  color: #087443;
  font-size: 12px;
  font-weight: 800;
}

.pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  margin-right: 6px;
  background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.status-banner {
  max-width: 100%;
  min-height: 28px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.status-banner.running { color: #0057c2; background: #dcebff; }
.status-banner.review { color: #a35f00; background: #fff2cc; }
.status-banner.approved { color: #087443; background: #dff6e7; }
.status-banner.done,
.status-banner.muted { color: var(--muted); background: var(--surface-muted); }

.success-button {
  background: var(--green);
}

.disabled-reason {
  color: var(--muted);
  font-size: 12px;
}

.issue-draft-actions[hidden] {
  display: none !important;
}

.link-button {
  border: 0;
  padding: 0;
  color: var(--brand);
  background: transparent;
  font: inherit;
  font-weight: 800;
}

.summary-editor {
  display: grid;
  gap: 10px;
  border: 0;
}

.summary-title-input,
.summary-body {
  border: 1px solid var(--border-strong);
  border-radius: 6px;
}

.activity-card {
  grid-column: 1 / -1;
}

.activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-row {
  grid-template-columns: 30px 150px minmax(0, 1fr) 92px;
}

.note-box {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  margin-left: 0;
}

.note-box input {
  flex: 1;
}

.stages {
  display: grid;
  gap: 0;
  max-width: 980px;
}

.stage {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
}

.stage-rail {
  position: relative;
  display: flex;
  justify-content: center;
}

.stage-rail::after {
  content: "";
  position: absolute;
  top: 32px;
  bottom: -12px;
  width: 2px;
  background: var(--border);
}

.stage:last-child .stage-rail::after {
  display: none;
}

.stage-dot {
  z-index: 1;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--border-strong);
  border-radius: 999px;
  color: #ffffff;
  background: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.stage.approved .stage-dot,
.stage.succeeded .stage-dot,
.stage.done .stage-dot {
  border-color: #16a34a;
  background: #16a34a;
}

.stage.running .stage-dot,
.stage.executing .stage-dot,
.stage.planning .stage-dot,
.stage.queued .stage-dot,
.stage.leased .stage-dot,
.stage.starting .stage-dot {
  border-color: var(--brand);
  background: var(--brand);
}

.stage.pending .stage-dot,
.stage.change-review .stage-dot,
.stage.plan-review .stage-dot {
  border-color: #d28a09;
  background: #d28a09;
}

.stage.locked .stage-dot {
  border-style: dashed;
  background: #ffffff;
}

.stage-main {
  min-width: 0;
  padding: 0 0 18px 8px;
}

.stage-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 36px;
}

.stage-title-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
}

.stage-title-button:disabled {
  color: var(--muted);
}

.stage-index {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-summary,
.stage-locked,
.gate-note {
  color: var(--muted);
  font-size: 13px;
}

.stage-card {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.stage-card-head {
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.compact-section {
  padding: 14px 16px;
}

.plan-markdown {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  color: var(--text);
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.plan-markdown > * {
  min-width: 0;
  margin: 0;
}

.plan-markdown h2,
.plan-markdown h3,
.plan-markdown h4,
.plan-markdown h5,
.plan-markdown h6 {
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 15px;
  line-height: 1.35;
}

.plan-markdown ol,
.plan-markdown ul {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.plan-markdown code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f1f5f9;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

.plan-markdown pre {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  white-space: pre-wrap;
}

.plan-markdown pre code {
  padding: 0;
  background: transparent;
}

.plan-markdown a {
  color: var(--brand);
}

.markdown-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
}

.plan-markdown table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
  line-height: 1.45;
}

.plan-markdown th,
.plan-markdown td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.plan-markdown th:last-child,
.plan-markdown td:last-child {
  border-right: 0;
}

.plan-markdown tbody tr:last-child td {
  border-bottom: 0;
}

.plan-markdown th {
  color: var(--text-strong);
  background: var(--surface-muted);
  font-weight: 700;
}

.godot-spec-markdown {
  gap: 14px;
}

.godot-spec-markdown h2 {
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 17px;
}

.godot-spec-markdown h2:first-child {
  padding-top: 0;
  border-top: 0;
}

.raw-plan {
  padding: 0 16px 14px;
}

.raw-plan pre {
  max-height: 180px;
  overflow: auto;
  padding: 12px;
  border-radius: 6px;
  background: #f8fafc;
}

.breakdown-limit-note {
  display: grid;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  background: #fbfcfe;
}

.breakdown-limit-note.warning {
  color: #7a4b0b;
  background: #fffbeb;
}

.breakdown-limit-note.blocked {
  color: var(--danger);
  background: var(--danger-soft);
}

.art-materialization-note {
  border-top: 1px solid var(--border);
}

.gate-note {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.revision-box {
  align-items: stretch;
  padding: 12px 16px 16px;
}

.revision-box textarea {
  flex: 1;
  min-height: 72px;
}

.plan-version-list {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #fbfdff;
}

.plan-version-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(120px, auto) auto;
  gap: 10px;
  font-size: 13px;
}

.stepper {
  flex-wrap: wrap;
  padding: 14px 16px;
}

.stepper-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.stepper-item.done { color: #087443; }
.stepper-item.active,
.stepper-item.running { color: var(--brand); }
.stepper-item.failed { color: var(--red); }

.log-preview {
  display: grid;
  gap: 0;
  margin: 0 16px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: #0f172a;
}

.log-preview .log-row {
  grid-template-columns: 84px minmax(0, 1fr);
  color: #dbeafe;
}

.log-preview .log-row code {
  color: #dbeafe;
}

.github-card {
  margin: 14px 16px;
}

.pr-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--brand);
}

.diff-list {
  padding: 0 16px 16px;
}

.compact-empty {
  padding: 22px;
}

@media (max-width: 700px) {
  .compact-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-detail-dialog {
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
    max-height: calc(100vh - 12px);
    max-height: calc(100dvh - 12px);
  }

  .resource-modal {
    height: 100%;
    max-height: 100%;
    padding-bottom: 0;
  }

  .resource-modal-header {
    grid-template-columns: minmax(0, 1fr) 36px;
    align-items: start;
  }

  .resource-modal-actions {
    position: static;
    z-index: 5;
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 2px;
    padding: 0;
    border-top: 0;
    background: transparent;
  }

  .resource-modal-header > .icon-button[data-action="clear-selection"] {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .resource-modal-actions .primary-button,
  .resource-modal-actions .secondary-button,
  .resource-modal-actions .danger-button {
    min-width: 0;
    max-width: 100%;
  }

  .resource-modal-actions .primary-button {
    flex: 1 1 180px;
    width: auto;
  }

  .resource-modal-actions .secondary-button {
    flex: 1 1 150px;
  }

  .resource-modal-actions .danger-button {
    flex: 0 1 auto;
  }

  .stage-head,
  .plan-version-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .revision-box,
  .note-box {
    flex-direction: column;
  }
}

/* Run liveness indicator (L1 progress) */
.liveness {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.liveness-bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}

.liveness-bar span {
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: 999px;
  background: #0057c2;
  animation: liveness-slide 1.6s ease-in-out infinite;
}

.liveness.stalled .liveness-bar span {
  background: var(--amber);
  animation-duration: 3.2s;
}

@keyframes liveness-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.liveness-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.liveness-line.running { color: #0057c2; }
.liveness-line.queued { color: var(--amber); }

.liveness-alert {
  font-size: 12px;
  color: var(--red);
}

/* Failure states */
.status-banner.failed { color: #b42318; background: #fee4e2; cursor: pointer; }

.stage-failed h2 { color: var(--red); }

.run-error-summary {
  max-width: 680px;
  margin: 4px auto 12px;
  color: #9f1c13;
  font-size: 12px;
  font-weight: 600;
}

.run-error-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #fecdca;
  border-radius: 8px;
  color: #9f1c13;
  background: #fff4f3;
  font-size: 12px;
}

.run-error-alert strong {
  flex: 0 0 auto;
}

.stage-failed-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.stepper-empty { margin: 8px 0; }

/* Step progress bar (L2) */
.step-progress {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 6px;
  margin: 10px 0 4px;
  border-radius: 999px;
  background: var(--surface-muted);
}

.step-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #0a8a4f;
  transition: width 0.3s ease;
}

.step-progress small {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 11px;
  color: var(--muted);
}

.version-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.toast.clickable { cursor: pointer; }
.toast.error { background: #b42318; color: #fff; }

/* Single-line board context bar (replaces hero-row + standalone toolbar rows) */
.context-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 22px 8px;
  background: var(--bg);
}

.context-bar h1 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

.context-sep {
  color: var(--muted);
  font-size: 14px;
}

.project-switcher.project-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  min-width: 0;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border-left-width: 1px;
}

.project-chip .project-mark {
  min-width: 22px;
  max-width: 64px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
}

.project-chip strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.project-chip .chevron {
  display: inline-flex;
  color: var(--muted);
}

.context-bar .toolbar {
  flex: 1;
  min-height: 0;
  padding: 0;
}

.context-bar .hero-actions {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
}

.godot-workspace {
  display: grid;
  grid-template-columns: minmax(236px, 280px) minmax(0, 1fr);
  gap: 14px;
  min-height: 0;
  height: 100%;
}

.godot-design-list,
.godot-design-dashboard,
.godot-lane,
.godot-ticket,
.godot-dashboard-header {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
}

.godot-design-list {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
}

.godot-panel-head,
.godot-lane-head,
.godot-ticket-top,
.godot-ticket-actions,
.godot-dashboard-actions,
.godot-ticket-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.godot-panel-head,
.godot-lane-head,
.godot-ticket-top {
  justify-content: space-between;
}

.godot-panel-head h2,
.godot-dashboard-header h2,
.godot-ticket h3 {
  margin: 0;
  color: var(--text);
}

.godot-panel-head h2 {
  font-size: 16px;
}

.godot-design-stack,
.godot-ticket-grid {
  display: grid;
  gap: 10px;
}

.godot-design-selector {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 10px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.godot-design-selector.active {
  border-color: var(--brand);
  background: var(--brand-soft);
}

.godot-design-selector strong,
.godot-ticket h3 {
  overflow-wrap: anywhere;
}

.godot-design-selector small,
.godot-ticket p,
.godot-ticket-meta {
  color: var(--muted);
  font-size: 12px;
}

.godot-design-dashboard {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  padding: 12px;
  overflow: auto;
}

.godot-dashboard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
}

.godot-planning-ticket {
  align-items: start;
}

.godot-planning-ticket-body {
  display: grid;
  align-content: start;
  gap: 8px;
}

.godot-planning-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.godot-dashboard-header h2 {
  font-size: 22px;
  line-height: 1.2;
}

.godot-dashboard-header p {
  max-width: 780px;
  margin: 6px 0 0;
  color: var(--muted);
}

.godot-dashboard-actions {
  align-self: start;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.godot-production-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.godot-lane {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 12px;
}

.godot-lane-head {
  min-height: 30px;
}

.godot-lane-head small {
  margin-left: auto;
  color: var(--muted);
}

.godot-ticket {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #fbfcff;
}

.godot-ticket.primary {
  min-height: 240px;
}

.godot-ticket h3 {
  font-size: 15px;
  line-height: 1.3;
}

.godot-ticket p {
  margin: 0;
  line-height: 1.45;
}

.godot-ticket-meta {
  flex-wrap: wrap;
}

.godot-ticket-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.godot-detail-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 14px;
}

.godot-detail-layout.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.godot-design-revision {
  display: grid;
  gap: 10px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.godot-design-revision label {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.godot-design-revision textarea {
  min-height: 112px;
  resize: vertical;
}

.godot-art-preview-gallery {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.godot-art-preview-gallery p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.godot-art-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.godot-art-preview-frame {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.godot-art-preview-frame img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: 6px;
  background:
    linear-gradient(45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(-45deg, #e5e7eb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e7eb 75%),
    linear-gradient(-45deg, transparent 75%, #e5e7eb 75%);
  background-color: #f8fafc;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}

.godot-art-preview-frame figcaption {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.godot-art-preview-frame strong {
  color: var(--text-strong);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.godot-art-preview-frame code {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.godot-art-markdown {
  padding-top: 2px;
}

.godot-program-playable {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.godot-web-frame {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #0f172a;
}

.program-version-meta {
  margin-top: 14px;
}

.godot-program-quality {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

.quality-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fbfcfe;
}

.quality-check strong,
.quality-check span,
.quality-check code {
  min-width: 0;
}

.quality-check code {
  display: block;
  margin-top: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

.quality-warnings {
  display: grid;
  gap: 4px;
  color: #7a4b0b;
  font-size: 12px;
}

.godot-program-markdown {
  padding-top: 4px;
}

.asset-draft-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.asset-draft-step {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.asset-draft-step strong {
  color: var(--text-strong);
  font-size: 13px;
}

.asset-draft-step span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.asset-draft-step.current {
  border-color: #facc15;
  background: #fffbeb;
}

.asset-draft-step.done {
  border-color: #86efac;
  background: #f0fdf4;
}

.asset-draft-step.blocked {
  border-color: #fecaca;
  background: #fef2f2;
}

.asset-draft-step.locked {
  opacity: 0.72;
}

.asset-draft-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.asset-draft-meta div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.asset-draft-meta span {
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.asset-draft-meta code {
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.godot-planned-tickets {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px 0 0;
  border-top: 1px solid var(--border);
}

.godot-planned-tickets .activity-head {
  align-items: start;
}

.godot-planned-tickets p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.godot-planned-ticket-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.planned-ticket {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-muted);
}

.planned-ticket-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.planned-ticket h4 {
  font-size: 14px;
  line-height: 1.3;
}

.planned-ticket p,
.planned-ticket small {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.planned-ticket p {
  max-height: 118px;
  overflow: auto;
}

.planned-ticket small {
  color: var(--faint);
}

.pulse-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.type-pill.game_design,
.type-pill.game_art,
.type-pill.game_program {
  color: #073b4c;
  background: #dff6f4;
}

@media (max-width: 700px) {
  .context-bar .toolbar {
    flex-basis: 100%;
    order: 10;
  }

  .relation-row,
  .relation-create-row,
  .subtask-row,
  .breakdown-layout,
  .subtasks-layout,
  .asset-draft-flow,
  .godot-workspace,
  .godot-dashboard-header,
  .godot-production-grid,
  .godot-detail-layout,
  .godot-detail-layout.two-column {
    grid-template-columns: 1fr;
  }

  .graph-shell,
  .issue-graph-svg {
    min-height: 540px;
  }

  .graph-v2-workbench {
    grid-template-columns: 1fr;
  }

  .graph-controls,
  .graph-inspector {
    border: 0;
  }

  .graph-controls {
    border-bottom: 1px solid var(--border);
  }

  .graph-inspector {
    border-top: 1px solid var(--border);
  }

  .graph-legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .artifact-list-item {
    grid-template-columns: 1fr;
  }

  .godot-web-frame {
    min-height: 360px;
  }

  .godot-workspace {
    height: auto;
  }

  .godot-design-list,
  .godot-design-dashboard {
    overflow: visible;
  }
}

/* Runs workbench */

.run-status-filters {
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.run-status-filters::-webkit-scrollbar {
  display: none;
}

.run-status-filters button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.run-status-filters button strong {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--faint);
  background: var(--surface-muted);
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.run-status-filters button.active strong {
  color: var(--brand);
  background: #ffffff;
}

.runs-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 38fr) minmax(0, 62fr);
  gap: 12px;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.runs-list-pane,
.runs-inspector {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--edge-highlight);
  overflow: hidden;
}

.runs-list-pane {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.runs-list-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.runs-list-controls label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.runs-list-controls label > span {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.runs-list-controls select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  background-color: #ffffff;
  font-size: 12px;
}

.runs-list-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.runs-list-summary > span:first-child {
  white-space: nowrap;
}

.runs-list-summary .link-button {
  margin-left: auto;
  white-space: nowrap;
}

.runs-limit-note,
.runs-selection-note {
  min-width: 0;
  padding: 3px 6px;
  border-radius: 5px;
  color: #8a5a00;
  background: #fff4cc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-selection-note {
  color: var(--muted);
  background: var(--surface-muted);
}

.runs-list-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.run-list-item {
  position: relative;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  gap: 0;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.run-list-item:hover {
  background: #f8fbff;
}

.run-list-item:focus-visible {
  z-index: 1;
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.run-list-item.selected {
  background: #f0f6ff;
  box-shadow: inset 0 0 0 1px #b8d3ff;
}

.run-status-rail {
  width: 4px;
  height: 100%;
  background: var(--slate);
}

.run-status-rail.running,
.run-status-rail.starting,
.run-status-rail.leased {
  background: #2563eb;
}

.run-status-rail.queued,
.run-status-rail.cancel-requested {
  background: #d59a22;
}

.run-status-rail.succeeded {
  background: #15945b;
}

.run-status-rail.failed,
.run-status-rail.timed-out,
.run-status-rail.stale {
  background: #d92d20;
}

.run-status-rail.cancelled {
  background: #7b8495;
}

.run-list-primary {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 13px;
}

.run-list-heading,
.run-list-context,
.run-list-progress-line,
.run-list-meta {
  display: flex;
  align-items: center;
  min-width: 0;
}

.run-list-heading {
  gap: 8px;
}

.run-list-heading strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-list-heading time {
  margin-left: auto;
  color: var(--faint);
  font-size: 11px;
  white-space: nowrap;
}

.run-list-context {
  gap: 8px;
}

.run-list-issue {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-list-context code {
  max-width: 42%;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-list-progress-line,
.run-list-meta {
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.run-list-progress-line span,
.run-list-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-progress-track {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: #e6eaf0;
  overflow: hidden;
}

.run-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
  transition: width 160ms ease;
}

.run-list-error {
  min-width: 0;
  overflow: hidden;
  color: #b42318;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-empty-state,
.runs-detail-empty {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 240px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.runs-empty-state strong,
.runs-detail-empty strong {
  color: var(--text);
}

.runs-empty-state span,
.runs-detail-empty p {
  max-width: 360px;
  margin: 0;
  line-height: 1.45;
}

.runs-detail-empty-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  color: var(--brand);
  background: #e9f2ff;
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.runs-inspector {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.runs-inspector-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.runs-inspector-title {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.runs-inspector-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 21px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-inspector-title > code {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-detail-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
}

.run-detail-badges > span:not(.status-pill) {
  min-width: 0;
  padding: 3px 6px;
  border-radius: 5px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.runs-inspector-actions,
.run-log-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.runs-back {
  display: none;
}

.runs-inspector-tabs {
  display: flex;
  gap: 18px;
  min-width: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  overflow-x: auto;
}

.runs-inspector-tabs button {
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.runs-inspector-tabs button.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.runs-inspector-body {
  min-height: 0;
  padding: 16px 18px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.run-overview-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.run-workbench-error,
.run-log-error {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #f4b8b2;
  border-radius: 7px;
  color: #8f1f17;
  background: #fff3f1;
}

.run-workbench-error span {
  font-family: var(--mono-font);
  font-size: 11px;
  font-weight: 700;
}

.run-workbench-error strong {
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.run-log-error {
  display: block;
  font-size: 12px;
}

.run-timing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.run-timing-card,
.run-overview-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #ffffff;
}

.run-timing-card {
  display: grid;
  gap: 4px;
  padding: 10px 11px;
}

.run-timing-card span,
.run-card-heading span,
.run-metadata-list dt {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.run-timing-card strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-timing-card small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-overview-card {
  overflow: hidden;
}

.run-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  background: #fbfcfe;
}

.run-card-heading > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.run-card-heading strong {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-step-list {
  display: grid;
}

.run-step-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  min-width: 0;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
}

.run-step-row:last-child {
  border-bottom: 0;
}

.run-step-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 11px;
  font-weight: 800;
}

.run-step-row.done .run-step-icon {
  color: #087443;
  background: #dff6e7;
}

.run-step-row.running .run-step-icon,
.run-step-row.active .run-step-icon {
  color: #0057c2;
  background: #dcebff;
}

.run-step-row.failed .run-step-icon {
  color: #b42318;
  background: #ffd9d6;
}

.run-step-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.run-step-copy strong,
.run-step-copy small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.run-step-copy strong {
  font-size: 12px;
}

.run-step-copy small,
.run-step-status {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.run-step-status {
  white-space: nowrap;
}

.run-step-empty {
  padding: 18px 13px;
  color: var(--muted);
  font-size: 12px;
}

.run-lifecycle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 13px;
}

.run-lifecycle-point {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 2px 7px;
  min-width: 0;
}

.run-lifecycle-point::after {
  position: absolute;
  top: 6px;
  left: 8px;
  right: -4px;
  height: 1px;
  background: var(--border);
  content: "";
}

.run-lifecycle-point:last-child::after {
  display: none;
}

.run-lifecycle-point > span {
  position: relative;
  z-index: 1;
  grid-row: 1 / span 2;
  width: 9px;
  height: 9px;
  margin-top: 2px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #aab2bf;
  box-shadow: 0 0 0 1px var(--border);
}

.run-lifecycle-point.reached > span {
  background: var(--brand);
  box-shadow: 0 0 0 1px #8bb8f8;
}

.run-lifecycle-point strong,
.run-lifecycle-point small {
  position: relative;
  z-index: 1;
  width: max-content;
  max-width: 100%;
  padding-right: 4px;
  background: #ffffff;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-lifecycle-point strong {
  font-size: 11px;
}

.run-lifecycle-point small {
  color: var(--muted);
  font-size: 10px;
}

.run-overview-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.run-metadata-list {
  display: grid;
  margin: 0;
  padding: 4px 13px 8px;
}

.run-metadata-list > div {
  display: grid;
  grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  padding: 7px 0;
  border-bottom: 1px solid #eef0f3;
}

.run-metadata-list > div:last-child {
  border-bottom: 0;
}

.run-metadata-list dt,
.run-metadata-list dd {
  min-width: 0;
  margin: 0;
}

.run-metadata-list dd {
  overflow: hidden;
  color: var(--text);
  font-family: var(--mono-font);
  font-size: 11px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-overview-card > .secondary-button {
  margin: 0 13px 13px;
}

.run-instruction {
  max-height: 320px;
  margin: 0;
  padding: 13px;
  overflow: auto;
  color: #dbeafe;
  background: #0f172a;
  font-family: var(--mono-font);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.run-live-log-card .run-log-preview {
  min-height: 150px;
  max-height: 240px;
  margin: 0;
  border: 0;
  border-radius: 0;
  overflow: auto;
}

.run-logs-panel {
  display: grid;
  grid-template-rows: auto auto minmax(360px, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 100%;
}

.run-log-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.run-log-toolbar > div:first-child {
  display: grid;
  gap: 3px;
}

.run-log-toolbar strong {
  font-size: 13px;
}

.run-log-toolbar span {
  color: var(--muted);
  font-size: 11px;
}

.run-log-actions .active {
  border-color: #8bb8f8;
  color: var(--brand);
  background: #edf5ff;
}

.run-workbench-logs {
  min-width: 0;
  min-height: 360px;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.runs-inspector-body > .detail-grid {
  align-content: start;
}

@media (max-width: 1180px) {
  .runs-workbench {
    grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  }

  .run-timing-grid,
  .run-lifecycle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .run-lifecycle-point:nth-child(2)::after {
    display: none;
  }

  .run-overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  body.runs-detail-open {
    overflow: hidden;
  }

  body.runs-view .context-bar {
    min-width: 0;
    overflow: hidden;
  }

  body.runs-view .context-bar .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    order: 9;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
  }

  body.runs-view .context-bar .hero-actions button {
    width: 100%;
    min-width: 0;
    justify-content: center;
  }

  body.runs-view .context-bar .toolbar {
    order: 10;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  body.runs-view .run-status-filters {
    width: 100%;
    max-width: 100%;
  }

  .runs-workbench {
    display: block;
    height: auto;
    overflow: visible;
  }

  .runs-list-pane {
    min-height: 540px;
  }

  .runs-list-scroll {
    max-height: none;
    overflow: visible;
  }

  .runs-inspector {
    display: none;
  }

  .runs-workbench.detail-open .runs-list-pane {
    visibility: hidden;
  }

  .runs-workbench.detail-open .runs-inspector {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    overflow: hidden;
  }

  .runs-back {
    display: inline-flex;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .runs-inspector-header {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .runs-inspector-actions {
    align-self: end;
  }

  .runs-inspector-tabs {
    padding: 0 12px;
  }

  .runs-inspector-body {
    padding: 12px;
  }
}

@media (max-width: 620px) {
  .runs-list-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .runs-inspector-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .runs-inspector-title h2 {
    font-size: 18px;
  }

  .runs-inspector-actions {
    justify-content: flex-start;
  }

  .runs-inspector-actions .secondary-button,
  .runs-inspector-actions .danger-button {
    flex: 1;
    justify-content: center;
  }

  .run-timing-grid,
  .run-lifecycle-grid,
  .run-overview-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .run-lifecycle-point::after {
    display: none;
  }

  .run-step-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .run-step-status {
    grid-column: 2;
  }

  .run-log-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .run-log-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .run-workbench-logs .log-row,
  .run-log-preview .log-row {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .run-workbench-logs .stream-pill,
  .run-log-preview .stream-pill {
    display: none;
  }
}
