/* tasks pane — layout unique to this surface. Tokens and shared primitives only. */
.grid.pane-tasks {
  align-items: start;
}
.pane-tasks > .tasks-list-card {
  grid-column: span 8;
}
.pane-tasks > .tasks-side-card {
  grid-column: span 4;
}

.task-overview {
  display: flex;
  align-items: flex-end;
  gap: 28px;
  padding: 2px 0 18px;
  border-bottom: 1px solid var(--line);
}
.task-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.task-count b {
  font-family: var(--mono);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.task-count span {
  font-size: 12px;
  color: var(--text-2);
}
.task-progress {
  flex: 1;
  min-width: 120px;
  max-width: 280px;
  padding-bottom: 3px;
}

.task-add {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 6px;
}
.task-add .input {
  flex: 1;
  height: 38px;
  font-size: 13px;
}
.task-add .btn {
  height: 38px;
  padding: 0 14px;
}
.task-add .btn:disabled {
  opacity: 0.42;
}

.task-list {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 6px 6px 6px 4px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: background var(--fast) var(--ease), color var(--fast) var(--ease);
}
.task-list .task-item:first-child {
  border-top: 0;
}
.task-item:hover:not(:disabled) {
  background: var(--surface-2);
}
.task-item:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}
.task-check {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: none;
  border: 1px solid var(--line-2);
  border-radius: var(--r-xs);
  color: var(--good);
  transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.task-check .ic {
  width: 13px;
  height: 13px;
}
.task-item.done .task-check {
  background: var(--good-soft);
  border-color: var(--good);
}
.task-name {
  min-width: 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.task-item.done .task-name {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: var(--line-2);
}
.task-state {
  margin-left: auto;
  flex: none;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}
.task-group-label {
  margin: 18px 0 2px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
}

.task-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.task-foot .btn {
  height: 28px;
  flex: none;
}

.task-side-lead {
  margin: -4px 0 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 60ch;
}
.tasks-side-card .ghosts {
  grid-template-columns: 1fr;
}
.tasks-side-card .ghost {
  min-height: 104px;
}

@media (max-width: 1180px) {
  .pane-tasks > .tasks-list-card,
  .pane-tasks > .tasks-side-card {
    grid-column: span 12;
  }
  .tasks-side-card .ghosts {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
}

@media (max-width: 760px) {
  .pane-tasks > .tasks-list-card,
  .pane-tasks > .tasks-side-card {
    grid-column: 1 / -1;
  }
  .task-overview {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .task-progress {
    width: 100%;
    max-width: none;
  }
  .task-count b {
    font-size: 32px;
  }
  .task-add {
    align-items: stretch;
  }
  .task-add .btn {
    padding: 0 12px;
  }
  .task-foot {
    align-items: flex-start;
    flex-direction: column;
  }
  .tasks-side-card .ghosts {
    grid-template-columns: 1fr;
  }
}
