.task-description,
.task-description > *,
.task-description-modules,
.task-description-module-body {
  min-width: 0;
  max-width: 100%;
}

.task-description {
  font-size: 14px;
  letter-spacing: 0;
}

.task-description table th:first-child,
.task-description table td:first-child {
  min-width: 4rem;
  overflow-wrap: normal;
  word-break: normal;
}

.task-description-diagram {
  margin: 20px 0;
}

.task-description-diagram > h4 {
  margin: 0 0 10px;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.task-description-diagram-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.task-description-svg {
  display: block;
  max-width: none;
  flex-shrink: 0;
  font-family: inherit;
  letter-spacing: 0;
}

.task-description-edge > path {
  fill: none;
  stroke: #68777e;
  stroke-width: 1.5;
}

.task-description-svg marker path {
  fill: #68777e;
}

.task-description-edge-label rect {
  fill: var(--color-paper, #fff);
}

.task-description-edge-label text {
  fill: var(--color-text-main, #25333a);
  font-size: 13px;
}

.task-description-node-shape {
  fill: var(--color-paper, #fff);
  stroke: #9aa7af;
  stroke-width: 1.5;
}

.task-description-node-decision .task-description-node-shape {
  fill: #fffbea;
  stroke: #9b814b;
  stroke-dasharray: 5 3;
}

.task-description-node-result .task-description-node-shape {
  fill: #f0faf4;
  stroke: #618673;
}

.task-description-node-ref {
  fill: var(--accent-strong, #176b96);
  font-size: 12px;
  font-weight: 700;
}

.task-description-node-label {
  fill: var(--color-text-main, #25333a);
  font-size: 15px;
}

.task-description-node[role="button"] {
  cursor: pointer;
}

.task-description-node[role="button"]:hover .task-description-node-shape,
.task-description-node[role="button"]:focus .task-description-node-shape {
  stroke: var(--accent-strong, #176b96);
  stroke-width: 2.5;
}

.task-description-references {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0 0 12px;
}

.task-description-references button {
  min-height: 36px;
  max-width: 100%;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong, #176b96);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.task-description-module {
  margin-top: 16px;
  border-top: 1px solid var(--line, #dbe2e5);
  scroll-margin-top: 20px;
}

.task-description-modules-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-top: 24px;
}

.task-description-modules-title {
  margin: 0;
  font-size: 16px;
  overflow-wrap: anywhere;
}

.task-description-display-toggle {
  min-width: 112px;
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong, #176b96);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.task-description-module > summary,
.task-description-issues > summary {
  padding: 10px 0;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.task-description-module-body {
  padding-top: 4px;
}

.task-description-issues {
  margin-top: 16px;
}

.task-description-references button:focus-visible,
.task-description-display-toggle:focus-visible,
.task-description summary:focus-visible,
.task-description-diagram-scroll:focus-visible {
  outline: 2px solid var(--accent-strong, #176b96);
  outline-offset: 3px;
}

@media (max-width: 600px) {
  .task-description-references button,
  .task-description-display-toggle {
    min-height: 44px;
  }

  .task-description-module-body table {
    min-width: 0;
    table-layout: fixed;
  }

  .task-description-module-body table th,
  .task-description-module-body table td {
    min-width: 0;
    padding: 8px 6px;
    overflow-wrap: anywhere;
  }

  .task-description-module-body table th:first-child {
    width: 30%;
  }

  .task-description-module-body table:has(th:nth-child(3)) th:nth-child(2) {
    width: 24%;
  }
}
